/* ========================================
   Tech_Nexus v2.0 - LONGi Style Layout
   ======================================== */

/* === CSS Variables === */
:root {
  --primary: #e60012;
  --primary-dark: #cb0010;
  --primary-light: #ff1a2d;
  --dark: #131313;
  --text: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border: #e5e5e5;
  --border-light: #f0f0f0;
  --bg-light: #f7f8fa;
  --bg-white: #ffffff;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --header-h: 72px;
  --max-w: 1280px;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); font-size: 14px; line-height: 1.7; color: var(--text); background: var(--bg-white); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; transition: color .2s; }
img { max-width: 100%; height: auto; vertical-align: middle; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--dark); }
ul, ol { list-style: none; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }

/* === Page Wrapper (offset fixed header) === */
.page-wrapper { padding-top: var(--header-h); }

/* === Container === */
.min-container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; box-sizing: border-box; }

/* ===========================
   Header - LONGi White Style
   =========================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,.06); }

.header-inner {
  display: flex; align-items: center; justify-content: flex-start;
  max-width: var(--max-w); height: 100%; margin: 0 auto; padding: 0 20px; box-sizing: border-box;
}

/* Logo */
.site-logo { margin-right: 32px; }

/* Logo */
.site-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-logo img { height: 36px; }
.logo-text { font-weight: 700; font-size: 20px; color: var(--dark); letter-spacing: .5px; }
.logo-subtitle { font-size: 12px; color: var(--text-muted); margin-left: 8px; }

/* Navigation */
.main-nav { display: flex; align-items: center; height: 100%; gap: 0; }
.main-nav > a,
.main-nav > .nav-dropdown > .nav-item {
  display: flex; align-items: center; height: var(--header-h);
  padding: 0 20px; font-size: 14px; color: var(--text);
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.main-nav > a:hover,
.main-nav > a.active,
.main-nav > .nav-dropdown > .nav-item:hover,
.main-nav > .nav-dropdown > .nav-item.active {
  color: var(--primary); border-bottom-color: var(--primary);
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > .nav-item { cursor: pointer; gap: 4px; }
.nav-dropdown > .nav-item svg { transition: transform .3s; }
.nav-dropdown:hover > .nav-item svg { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: var(--header-h); left: 0;
  min-width: 200px; padding: 12px 0;
  background: var(--bg-white); box-shadow: 0 8px 24px rgba(0,0,0,.1);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .25s; z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown-menu a {
  display: block; padding: 10px 24px; font-size: 14px; color: var(--text-secondary);
  transition: color .15s, background .15s;
}
.nav-dropdown-menu a:hover { color: var(--primary); background: var(--bg-light); }

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.header-actions a, .header-actions button {
  display: nonoe; align-items: center; justify-content: center;
  color: var(--text); background: none; border: none; cursor: pointer; padding: 6px;
  transition: color .2s;
}
.header-actions a:hover, .header-actions button:hover { color: var(--primary); }


.header-search {
  display: inline-flex;
  align-items: center;
  height: 38px;
  border: 1px solid var(--border);
  background: var(--bg-white);
  overflow: hidden;
}
.header-search:focus-within { border-color: var(--primary); }
.header-search-input {
  width: 180px;
  height: 100%;
  border: none;
  outline: none;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text);
  background: transparent;
}
.header-search-input::placeholder { color: var(--text-muted); }
.header-search-btn {
  width: 38px;
  height: 100%;
  border: none;
  border-left: 1px solid var(--border-light);
  padding: 0;
  color: var(--text-secondary);
  background: transparent;
}
.header-search-btn:hover { color: var(--primary); background: var(--bg-light); }

/* Mobile Toggle */
.mobile-toggle { display: none; flex-direction: column; gap: 5px; width: 24px; cursor: pointer; background: none; border: none; padding: 0; }
.mobile-toggle span { display: block; width: 100%; height: 2px; background: var(--dark); border-radius: 1px; transition: all .3s; }
.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
.mobile-menu {
  display: none; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
  background: var(--bg-white); z-index: 999; overflow-y: auto;
  transform: translateX(100%); transition: transform .3s;
}
.mobile-menu.active { transform: translateX(0); }
.mobile-menu a, .mobile-menu .nav-item {
  display: block; padding: 16px 24px; font-size: 15px; color: var(--text);
  border-bottom: 1px solid var(--border-light);
}
.mobile-menu a.active, .mobile-menu .nav-item.active { color: var(--primary); }
.mobile-menu .nav-dropdown-menu { display: none; padding-left: 16px; }
.mobile-menu .nav-dropdown:hover .nav-dropdown-menu { display: block; }

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; font-size: 14px; font-weight: 500; line-height: 1;
  border: 2px solid transparent; cursor: pointer;
  transition: all .2s;
}
.btn-primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline { color: var(--text); background: transparent; border-color: var(--border); }
.btn-outline:hover { color: #fff; background: var(--primary); border-color: var(--primary); }
.btn-dark-bg { color: #fff; background: transparent; border-color: rgba(255,255,255,.5); }
.btn-dark-bg:hover { background: var(--primary); border-color: var(--primary); }

/* ===========================
   Mark Bar (red decorative)
   =========================== */
.mark-bar { width: 52px; height: 0; border-top: 6px solid var(--primary); margin-top: 12px; }
.bar-white { border-top-color: #fff; }

/* Section Title */
.section-title { font-weight: 800; font-size: 36px; line-height: 1.4; color: var(--dark); }

/* ===========================
   Module: Hero Banner (Carousel)
   =========================== */
.home-banner { position: relative; width: 100%; overflow: hidden; }
.hero-carousel { position: relative; width: 100%; height: calc(100vh - var(--header-h)); min-height: 560px; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0;
  z-index: 0;
  transition: opacity 1.2s ease-in-out;
  display: flex; align-items: center;
  width: 100%;
}
.hero-slide-active { opacity: 1; z-index: 1; }
.banner-slide-bg {
  position: absolute; inset: 0; z-index: 0;
  background-position: center; background-size: cover; background-repeat: no-repeat;
}
.banner-slide-gradient {
  background: linear-gradient(135deg,#1a1a2e 0%,#16213e 50%,#0f3460 100%);
}
.hero-slide-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.3) 100%);
}
.banner-video {
  position: absolute; top: 50%; left: 50%;
  min-width: 100%; min-height: 100%;
  width: auto; height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover; z-index: 0;
}
.banner-content-container {
  position: relative; z-index: 2;
  width: 100%;
  max-width: var(--max-w); margin: 0 auto; padding: 0 20px; box-sizing: border-box;
}
.banner-content { max-width: 620px; text-align: left; }
.banner-title {
  font-weight: 800; font-size: 48px; line-height: 1.3;
  color: #fff; margin-bottom: 16px; white-space: pre-wrap; text-align: left;
}
.banner-desc { font-size: 16px; line-height: 1.8; color: rgba(255,255,255,.85); margin-bottom: 0; max-width: 520px; text-align: left; }
.hero-slide-btn-wrap {
  position: absolute; bottom: 100px; left: 20px; z-index: 4;
  max-width: var(--max-w); width: 100%;
  padding: 0;
}
.redirect-button {
  color: #fff; background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.5);
  backdrop-filter: blur(4px);
}
.redirect-button:hover {
  background: var(--primary); border-color: var(--primary);
}

/* Hero Progress Bar */
.hero-progress-bar {
  position: absolute; bottom: 48px; left: 50%; transform: translateX(-50%); z-index: 5;
  display: flex; align-items: center; gap: 6px;
}
.hero-progress-item {
  position: relative; width: 42px; height: 4px;
  background: rgba(255,255,255,.25); cursor: pointer;
  border-radius: 2px; overflow: hidden;
  transition: background .3s;
}
.hero-progress-item:hover { background: rgba(255,255,255,.4); }
.hero-progress-item.hero-progress-active { background: rgba(255,255,255,.3); }
.hero-progress-track {
  position: absolute; top: 0; left: 0; height: 100%; width: 0;
  background: rgba(255,255,255,.85); border-radius: 2px;
}
.hero-progress-item.hero-progress-active .hero-progress-track {
  animation: heroProgress var(--progress-duration, 8s) linear forwards;
}
@keyframes heroProgress {
  from { width: 0; }
  to { width: 100%; }
}

/* ===========================
   Module: Introduction
   =========================== */
.section-introduction { padding: 80px 0 40px; }
.intro-block .intro-text { max-width: 800px; color: var(--text-secondary); font-size: 15px; line-height: 1.8; margin-top: 24px; font-weight: 300; }

/* ===========================
   Module: Advantage Cards
   =========================== */
.section-advantage { padding: 0 0 100px; }
.web-card-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.web-card-item {
  position: relative; overflow: hidden; min-width: 0;
  background: var(--bg-light); transition: all .35s cubic-bezier(.4,0,.2,1);
  box-sizing: border-box;
}
.web-card-item:hover { transform: scale(1.05); z-index: 5; box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.web-card-header { display: flex; align-items: center; justify-content: center; padding: 32px 16px 0; }
.web-card-title {
  font-weight: 600; font-size: 18px; color: var(--dark); text-align: center;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  transition: all .3s;
}
.web-card-hover-point { width: 10px; height: 10px; margin: 14px auto; background: var(--border); border-radius: 50%; transition: all .3s; }
.web-card-item:hover .web-card-hover-point { background: var(--primary); margin-left: 32px; margin-right: auto; }
.web-card-intro { position: relative; height: 240px; margin: 8px 0 28px; display: flex; align-items: stretch; overflow: hidden; min-width: 0; }
.web-card-img {
  flex-shrink: 0; width: 100%; height: 100%; object-fit: cover; min-width: 0;
  transition: width .4s cubic-bezier(.4,0,.2,1);
}
.web-card-item:hover .web-card-img { width: 50%; }
.web-card-img-placeholder {
  flex-shrink: 0; width: 100%; height: 100%; background: var(--border-light);
  display: flex; align-items: center; justify-content: center; min-width: 0;
  transition: width .4s cubic-bezier(.4,0,.2,1);
}
.web-card-item:hover .web-card-img-placeholder { width: 50%; }
.web-card-desc {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center;
  padding: 0 20px; color: var(--text-secondary); font-size: 13px; line-height: 1.7;
  opacity: 0; transition: opacity .4s .1s; overflow-wrap: break-word;
}
.web-card-item:hover .web-card-desc { opacity: 1; }
.web-card-link {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  opacity: 0; transition: opacity .3s .15s;
}
.web-card-item:hover .web-card-link { opacity: 1; }

/* ===========================
   Module: Dark CTA Banner
   =========================== */
.section-dark-banner {
  position: relative; width: 100%; background: #000; color: #fff; overflow: hidden;
}
.dark-banner-bg { position: absolute; inset: 0; }
.dark-banner-bg img { width: 100%; height: 100%; object-fit: cover; }
.dark-banner-bg::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.dark-banner-container {
  position: relative; z-index: 2;
  max-width: var(--max-w); margin: 0 auto; padding: 80px 20px; box-sizing: border-box;
}
.dark-banner-title { font-weight: 800; font-size: 36px; line-height: 1.4; margin-bottom: 8px; }
.dark-banner-container .btn { margin-top: 24px; }

/* ===========================
   Module: Stats
   =========================== */
.section-stats { padding: 60px 0; border-bottom: 1px solid var(--border-light); }
.stats-row { display: flex; max-width: var(--max-w); margin: 0 auto; width: 100%; }
.stat-card {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 24px 32px; min-height: 120px;
}
.stat-card:not(:last-child) { border-right: 1px solid var(--border-light); }
.stat-data { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
.stat-number { font-weight: 800; font-size: 36px; color: var(--dark); line-height: 1.2; }
.stat-unit { font-size: 18px; color: var(--text-muted); font-weight: 600; }
.stat-label { font-size: 14px; color: var(--text-muted); }

/* ===========================
   Module: Solution Cards
   =========================== */
.section-solution { position: relative; padding-bottom: 100px; }
.solution-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.solution-card {
  position: relative; min-height: 500px; overflow: hidden;
  color: #fff; cursor: pointer;
}
.solution-bg { position: absolute; inset: 0; }
.solution-bg img { width: 100%; height: 100%; object-fit: cover; }
.solution-mask {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.7));
  opacity: 0; transition: opacity .3s;
}
.solution-progress-back { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: rgba(255,255,255,.2); }
.solution-progress { position: absolute; top: 0; left: 0; height: 3px; width: 0; background: var(--primary); transition: width .4s; }
.solution-title-mask {
  position: absolute; top: 0; left: 0; right: 0; height: 200px;
  background: linear-gradient(180deg, transparent, rgba(0,20,60,.6));
  transform: rotate(180deg);
}
.solution-title {
  position: relative; z-index: 1;
  font-weight: 600; font-size: 20px; line-height: 1.4;
  padding: 60px 24px 24px;
}
.solution-desc {
  position: relative; z-index: 1;
  font-size: 14px; line-height: 1.7; padding: 0 24px;
  opacity: 0; transition: opacity .3s;
}
.solution-link {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: center;
  height: 56px; background: var(--primary); color: #fff; font-size: 14px;
  transform: translateY(100%); transition: transform .3s;
}
.solution-card:hover .solution-mask { opacity: 1; }
.solution-card:hover .solution-desc { opacity: 1; }
.solution-card:hover .solution-progress { width: 100%; }
.solution-card:hover .solution-link { transform: translateY(0); }

/* ===========================
   Module: News (Articles)
   =========================== */
.section-news { padding: 80px 0; background: var(--bg-light); }
.news-header { margin-bottom: 40px; }
.news-container { display: flex; flex-direction: column; }
.news-list { display: flex; flex-direction: column; gap: 20px; }
.news-item {
  display: flex; height: 200px; background: var(--bg-white);
  overflow: hidden; transition: box-shadow .3s;
}
.news-item:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.news-item:hover .news-image-box img { transform: scale(1.05); }
.news-image-box {
  position: relative; width: 320px; flex-shrink: 0; overflow: hidden;
}
.news-image-box img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s;
}
.news-image-placeholder {
  width: 100%; height: 100%; background: var(--border-light);
  display: flex; align-items: center; justify-content: center;
}
.news-text-box {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 24px 28px;
}
.news-title { font-weight: 600; font-size: 18px; line-height: 1.5; color: var(--dark); display: -webkit-box; -webkit-line-clamp: 2; overflow: hidden; }
.news-desc { font-size: 14px; line-height: 1.7; color: var(--text-secondary); margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; overflow: hidden; }
.news-tag-box { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.news-tag { font-size: 12px; color: var(--primary); padding: 4px 12px; background: rgba(230,0,18,.06); }
.news-date { font-size: 13px; color: var(--text-muted); }
.news-more { align-self: center; margin-top: 32px; }

/* ===========================
   Module: Bottom Dark Banner
   =========================== */
.section-bottom-cta {
  position: relative; width: 100%; background: #000; color: #fff;
  text-align: center; overflow: hidden; padding: 80px 20px;
}
.bottom-cta-bg { position: absolute; inset: 0; }
.bottom-cta-bg img { width: 100%; height: 100%; object-fit: cover; }
.bottom-cta-bg::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.bottom-cta-title { position: relative; z-index: 2; font-weight: 800; font-size: 36px; line-height: 1.4; margin-bottom: 12px; }
.bottom-cta-desc { position: relative; z-index: 2; font-size: 15px; line-height: 1.8; color: rgba(255,255,255,.8); max-width: 680px; margin: 0 auto 32px; }

/* ===========================
   Footer
   =========================== */
.site-footer { background: var(--bg-light); border-top: 1px solid var(--border); }
.footer-main {
  display: flex; gap: 40px; padding: 48px 20px 40px;
  max-width: var(--max-w); margin: 0 auto;
}
.footer-brand { flex-shrink: 0; max-width: 280px; }
.footer-logo { margin-bottom: 16px; }
.gradient-text { font-weight: 700; font-size: 20px; color: var(--dark); }
.footer-desc { font-size: 14px; line-height: 1.7; color: var(--text-secondary); }
.footer-col { flex: 1; }
.footer-col-title { font-weight: 600; font-size: 15px; color: var(--dark); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--primary); display: inline-block; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: var(--text-secondary); transition: color .2s; }
.footer-links a:hover { color: var(--dark); text-decoration: underline; }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px; border-top: 1px solid var(--border);
  max-width: var(--max-w); margin: 0 auto;
  font-size: 13px; color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--dark); text-decoration: underline; }

/* ===========================
   Floating Actions
   =========================== */
.float-actions { position: fixed; bottom: 40px; right: 40px; z-index: 900; display: flex; flex-direction: column; gap: 12px; }
.float-btn {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; background: var(--bg-white);
  border: 1px solid var(--border); color: var(--text-secondary);
  box-shadow: 0 2px 12px rgba(0,0,0,.08); cursor: pointer;
  transition: all .2s;
}
.float-btn:hover { color: var(--primary); border-color: var(--primary); box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.float-btn.hidden { display: none; }

/* ===========================
   Article Detail (echo_log)
   =========================== */
.article-detail { padding-top: var(--header-h); }
.detail-header {
  background: var(--dark); color: #fff; padding: 48px 0;
  position: relative;
  background-size: cover; background-position: center;
}
.detail-header::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
}
.detail-header[data-has-bg]::before { display: block; }
.detail-header:not([data-has-bg])::before { display: none; }
.detail-header .header-inner { position: relative; z-index: 1; }
.detail-header .header-inner { flex-direction: column; align-items: flex-start; }
.detail-meta { display: flex; align-items: center; gap: 16px; font-size: 13px; color: rgba(255,255,255,.6); margin-bottom: 16px; flex-wrap: wrap; }
.detail-meta a { color: rgba(255,255,255,.6); }
.detail-meta a:hover { color: #fff; }
.detail-category { color: var(--primary-light); font-weight: 600; }
.detail-title { font-weight: 800; font-size: 36px; line-height: 1.4; margin-bottom: 16px; color: #fff; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-tags a { font-size: 12px; padding: 4px 12px; background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); border-radius: 0; transition: all .2s; }
.detail-tags a:hover { background: var(--primary); color: #fff; }

/* Main Container & Detail Body */
.main-container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.detail-body { display: flex; gap: 48px; padding: 48px 0 80px; }
.detail-content { flex: 1; min-width: 0; }

/* Markdown Body */
.markdown-body { font-size: 16px; line-height: 1.8; color: var(--text); }
.markdown-body h1 { font-size: 28px; font-weight: 800; margin: 40px 0 16px; color: var(--dark); }
.markdown-body h2 { font-size: 24px; font-weight: 700; margin: 36px 0 14px; color: var(--dark); border-bottom: 1px solid var(--border-light); padding-bottom: 8px; }
.markdown-body h3 { font-size: 20px; font-weight: 600; margin: 32px 0 12px; color: var(--dark); }
.markdown-body h4 { font-size: 18px; font-weight: 600; margin: 28px 0 10px; }
.markdown-body p { margin-bottom: 20px; }
.markdown-body img { max-width: 100%; margin: 20px 0; }
.markdown-body a { color: var(--primary); }
.markdown-body a:hover { text-decoration: underline; }
.markdown-body pre { background: var(--bg-light); padding: 20px; overflow-x: auto; margin-bottom: 20px; font-size: 14px; line-height: 1.6; }
.markdown-body code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; }
.markdown-body blockquote { border-left: 4px solid var(--primary); padding: 12px 20px; margin: 20px 0; background: var(--bg-light); color: var(--text-secondary); }
.markdown-body ul, .markdown-body ol { padding-left: 24px; margin-bottom: 20px; }
.markdown-body li { margin-bottom: 4px; list-style: disc; }
.markdown-body ol li { list-style: decimal; }
.markdown-body table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.markdown-body th, .markdown-body td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.markdown-body th { background: var(--bg-light); font-weight: 600; }

/* Neighbor Nav */
.neighbor-nav { display: flex; gap: 20px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border-light); }
.neighbor-item { flex: 1; padding: 20px; border: 1px solid var(--border); transition: all .2s; }
.neighbor-item:hover { border-color: var(--primary); }
.neighbor-label { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.neighbor-title { font-size: 14px; font-weight: 600; color: var(--dark); display: -webkit-box; -webkit-line-clamp: 1; overflow: hidden; }

/* Top Flag & Edit Link */
.top-flag { display: inline-block; font-size: 12px; color: var(--primary); background: rgba(230,0,18,.08); padding: 2px 8px; margin-left: 8px; vertical-align: middle; }
.edit-link { margin-left: 12px; }
.edit-link a { font-size: 12px; color: var(--text-muted); }

/* ===========================
   Comments
   =========================== */
.comments-section { margin-top: 48px; }
.comments-title { font-weight: 600; font-size: 20px; margin-bottom: 24px; display: flex; align-items: center; gap: 8px; }
.comment-list { margin-bottom: 24px; }
.comment-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border-light); }
.comment-avatar img { width: 40px; height: 40px; border-radius: 50%; }
.comment-info { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.comment-author { font-weight: 600; font-size: 14px; color: var(--dark); }
.comment-time { font-size: 13px; color: var(--text-muted); }
.comment-body { font-size: 14px; line-height: 1.7; color: var(--text-secondary); }
.comment-reply { margin-top: 6px; }
.comment-reply a { font-size: 13px; color: var(--text-muted); }
.comment-reply a:hover { color: var(--primary); }
.comment-children { padding-left: 40px; }

/* Comment Form */
.comment-form { margin-top: 32px; }
.comment-form h4 { font-weight: 600; font-size: 18px; margin-bottom: 20px; }
.reply-notice {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  margin-bottom: 16px; background: rgba(var(--primary-rgb,.2),.06);
  border-left: 3px solid var(--primary); font-size: 13px; color: var(--text-secondary);
}
.reply-notice a { color: var(--primary); font-weight: 600; }
.reply-notice a:hover { text-decoration: underline; }
.comment-form textarea {
  width: 100%; height: 120px; padding: 12px 16px;
  border: 1px solid var(--border); background: var(--bg-white);
  resize: vertical; outline: none; font-size: 14px; line-height: 1.6;
  transition: border-color .2s;
}
.comment-form textarea:focus { border-color: var(--primary); }
.form-row { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.form-group { flex: 1; min-width: 160px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.form-group input, .form-group select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  outline: none; font-size: 14px; transition: border-color .2s;
}
.form-group input:focus { border-color: var(--primary); }
.form-submit { margin-top: 16px; }

/* ===========================
   Page (Custom Page)
   =========================== */
.page-content { padding-top: var(--header-h); }
.page-hero {
  background: var(--dark); color: #fff; padding: 48px 0; text-align: center;
}
.page-title { font-weight: 800; font-size: 36px; line-height: 1.4; }
.page-body .markdown-body { padding-top: 8px; }

/* ===========================
   404 Page
   =========================== */
.error-page {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - var(--header-h)); text-align: center; padding: 40px 20px;
}
.error-content { max-width: 400px; }
.error-code { font-weight: 800; font-size: 120px; color: var(--border); line-height: 1; }
.error-title { font-size: 24px; font-weight: 600; color: var(--dark); margin-top: 16px; }
.error-desc { font-size: 14px; color: var(--text-muted); margin-top: 8px; }
.error-actions { display: flex; gap: 16px; justify-content: center; margin-top: 32px; }

/* ===========================
   Sidebar
   =========================== */
.sidebar { width: 300px; flex-shrink: 0; }
.widget {
  margin-bottom: 24px; padding: 20px;
  background: #fff; border: 1px solid var(--border-light);
  transition: box-shadow .25s;
}
.widget:hover { box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.widget-title {
  font-weight: 700; font-size: 15px; color: var(--dark); margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 2px solid var(--primary);
  display: flex; align-items: center; gap: 8px;
}
.widget-title::before {
  content: ''; display: inline-block; width: 3px; height: 16px;
  background: var(--primary);
}

/* Widget: Blogger */
.widget-blogger { text-align: center; padding: 24px 20px; }
.widget-blogger .blogger-avatar { margin-bottom: 12px; }
.widget-blogger .blogger-avatar img { width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--bg-light); }
.widget-blogger .blogger-name { font-weight: 600; font-size: 16px; color: var(--dark); }
.widget-blogger .blogger-desc { font-size: 13px; color: var(--text-secondary); margin-top: 8px; line-height: 1.6; }

/* Widget: Search */
.widget-search .search-form { display: flex; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.widget-search .search-input { flex: 1; padding: 10px 14px; border: none; outline: none; font-size: 14px; background: var(--bg-white); }
.widget-search .search-input:focus { box-shadow: inset 0 0 0 2px rgba(var(--primary-rgb,.2),.2); }
.widget-search .search-btn { padding: 10px 20px; background: var(--primary); color: #fff; border: none; cursor: pointer; font-size: 14px; transition: background .2s; }
.widget-search .search-btn:hover { background: var(--primary-dark); }

/* Widget: Sort */
.widget-sort .sort-list a { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-light); font-size: 14px; color: var(--text-secondary); transition: color .2s; }
.widget-sort .sort-list a:last-child { border-bottom: none; }
.widget-sort .sort-list a:hover { color: var(--primary); padding-left: 4px; }
.sort-count { font-size: 12px; color: var(--text-muted); background: var(--bg-light); padding: 2px 8px; border-radius: 10px; }

/* Widget: Tag Cloud */
.widget-tag .tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.widget-tag .tag-item {
  padding: 4px 12px; background: var(--bg-light); color: var(--text-secondary);
  font-size: 12px; transition: all .25s; display: inline-block;
}
.widget-tag .tag-size-1 { font-size: 12px; }
.widget-tag .tag-size-2 { font-size: 13px; color: var(--text); }
.widget-tag .tag-size-3 { font-size: 14px; font-weight: 600; color: var(--dark); background: rgba(var(--primary-rgb,.2),.08); }
.widget-tag .tag-item:hover { background: var(--primary); color: #fff; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(var(--primary-rgb,.2),.25); }

/* Widget: New Log */
.widget-newlog .log-list { display: flex; flex-direction: column; gap: 0; }
.widget-newlog .log-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-light); transition: background .15s; }
.widget-newlog .log-item:last-child { border-bottom: none; }
.widget-newlog .log-thumb { width: 64px; height: 46px; flex-shrink: 0; overflow: hidden; background: var(--bg-light); display: flex; align-items: center; justify-content: center; border-radius: 4px; }
.widget-newlog .log-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.widget-newlog .log-item:hover .log-thumb img { transform: scale(1.05); }
.widget-newlog .log-info { flex: 1; min-width: 0; }
.widget-newlog .log-title { font-size: 14px; color: var(--text); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; overflow: hidden; transition: color .2s; }
.widget-newlog .log-title:hover { color: var(--primary); }

/* Widget: New Comments */
.widget-newcomm .comm-list { display: flex; flex-direction: column; gap: 0; }
.comm-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.comm-item:last-child { border-bottom: none; }
.comm-avatar { flex-shrink: 0; }
.comm-avatar img { width: 32px; height: 32px; border-radius: 50%; }
.comm-content { flex: 1; min-width: 0; font-size: 13px; line-height: 1.5; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comm-author { font-weight: 600; color: var(--text); }

/* Widget: Links */
.widget-link .link-list { display: flex; flex-wrap: wrap; gap: 8px; }
.widget-link .link-list a { padding: 5px 14px; background: var(--bg-light); color: var(--text-secondary); font-size: 13px; transition: all .2s; }
.widget-link .link-list a:hover { background: var(--primary); color: #fff; }

/* Widget: Archive */
.widget_archive select { width: 100%; padding: 10px 14px; border: 1px solid var(--border); font-size: 14px; outline: none; background: var(--bg-white); border-radius: 4px; cursor: pointer; }
.widget_archive select:focus { border-color: var(--primary); }

/* Widget: Calendar */
.widget_calendar { padding: 16px; }
.widget_calendar #calendar { font-size: 13px; color: var(--text-secondary); }
.widget_calendar table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.widget_calendar .calendartop { margin-bottom: 8px; }
.widget_calendar .calendartop td { text-align: center; padding: 4px 0; font-weight: 600; color: var(--dark); font-size: 14px; }
.widget_calendar .calendartop a { color: var(--primary); text-decoration: none; margin: 0 6px; font-size: 13px; }
.widget_calendar .calendartop a:hover { color: var(--primary-dark); }
.widget_calendar .week, .widget_calendar .sun { text-align: center; padding: 6px 0; font-weight: 600; color: var(--text-muted); font-size: 12px; }
.widget_calendar .calendar td { text-align: center; padding: 5px 0; }
.widget_calendar .calendar td a { display: block; width: 28px; height: 28px; line-height: 28px; margin: 0 auto; border-radius: 50%; color: var(--primary); text-decoration: none; font-weight: 600; transition: all .2s; }
.widget_calendar .calendar td a:hover { background: var(--primary); color: #fff; }
.widget_calendar .calendar .day { background: var(--primary); border-radius: 50%; }
.widget_calendar .calendar .day, .widget_calendar .calendar .day a { color: #fff; font-weight: 700; }
.widget_calendar .calendar .day2 { background: rgba(var(--primary-rgb,.2),.1); border-radius: 50%; }

/* Widget: Twitter */
.widget-twitter .tw-list { display: flex; flex-direction: column; gap: 0; }
.tw-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.tw-item:last-child { border-bottom: none; }
.tw-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.tw-body { flex: 1; min-width: 0; }
.tw-text { font-size: 13px; line-height: 1.6; color: var(--text); word-break: break-word; }
.tw-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.tw-author { font-weight: 600; color: var(--text-secondary); }

/* Widget: Custom Text */
.widget_custom_text { font-size: 14px; line-height: 1.7; color: var(--text-secondary); }

/* ===========================
   Pagination
   =========================== */
.pagination { text-align: center; padding: 40px 0; }
.pagination a, .pagination span { display: inline-block; padding: 8px 16px; margin: 0 3px; border: 1px solid var(--border); font-size: 14px; color: var(--text-secondary); transition: all .2s; border-radius: 4px; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===========================
   Article List (Full)
   =========================== */
.section-articles { padding: 80px 0; }
.articles-list { display: flex; flex-direction: column; gap: 20px; }

/* ===========================
   Responsive
   =========================== */
@media (max-width: 1024px) {
  /* Header */
  .header-inner { max-width: 100%; }

  /* Cards */
  .web-card-group { grid-template-columns: repeat(2, 1fr); }
  .web-card-item:hover { transform: none; }
  .web-card-item:hover .web-card-img,
  .web-card-item:hover .web-card-img-placeholder { width: 50%; }

  /* Solution */
  .solution-list { grid-template-columns: repeat(2, 1fr); }
  .solution-card { min-height: 360px; }

  /* Dark Banner */
  .dark-banner-container { max-width: 100%; padding: 60px 20px; }
  .dark-banner-title { font-size: 32px; }

  /* Detail */
  .detail-body { flex-direction: column; }
  .sidebar { width: 100%; border-top: 1px solid var(--border-light); padding-top: 32px; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }

  /* Header */
  .header-inner { padding: 0 16px; }
  .main-nav { display: none; }
  .header-search { display: none; }
  .mobile-toggle { display: flex; }
  .mobile-menu { display: block; }

  /* Hero */
  .hero-carousel { height: calc(100vh - 60px); min-height: 360px; }
  .banner-video { display: block; }
  .banner-content-container { text-align: center; }
  .banner-content { margin: 0 auto; text-align: center; }
  .banner-title { font-size: 26px; text-align: center; }
  .banner-desc { font-size: 14px; text-align: center; }
  .hero-slide-btn-wrap { bottom: 64px; left: 20px; }
  .redirect-button { display: inline-flex; }
  .hero-progress-bar { bottom: 32px; }
  .hero-progress-item { width: 32px; height: 3px; }

  /* Section Title */
  .section-title { font-size: 26px; text-align: center; }
  .mark-bar { margin: 10px auto 0; }

  /* Intro */
  .section-introduction { padding: 40px 0 20px; }
  .intro-block .intro-text { text-align: center; font-size: 14px; }

  /* Cards */
  .web-card-group { grid-template-columns: 1fr; }
  .web-card-item:hover { grid-column: span 1; transform: none; }
  .web-card-intro { height: auto; flex-direction: column; }
  .web-card-img, .web-card-img-placeholder { width: 100% !important; height: 200px; }
  .web-card-desc { opacity: 1; padding: 16px; width: auto; }
  .web-card-link { position: static; transform: none; opacity: 1; margin: 16px auto; }

  /* Dark CTA Banner */
  .section-dark-banner { min-height: auto; }
  .dark-banner-container { padding: 48px 16px; text-align: center; }
  .dark-banner-title { font-size: 28px; }
  .mark-bar { margin: 10px auto 0; }

  /* Stats */
  .stats-row { flex-wrap: wrap; width: 100%; }
  .stat-card { width: 50%; border-right: none !important; padding: 20px 12px; }
  .stat-number { font-size: 28px; }
  .stat-label { font-size: 13px; }

  /* Solution */
  .solution-list { grid-template-columns: 1fr; }
  .solution-card { min-height: auto; height: 320px; }
  .solution-card .solution-mask,
  .solution-card .solution-desc { opacity: 1; }
  .solution-card .solution-progress { width: 100%; }
  .solution-card .solution-link { transform: translateY(0); }

  /* News */
  .news-item { flex-direction: column; height: auto; }
  .news-image-box { width: 100%; height: 180px; }
  .news-text-box { padding: 16px 0; }

  /* Bottom CTA */
  .section-bottom-cta { padding: 48px 16px; }
  .bottom-cta-title { font-size: 26px; }
  .bottom-cta-desc { font-size: 14px; }

  /* Footer */
  .footer-main { flex-direction: column; gap: 24px; padding: 32px 16px; }
  .footer-brand { max-width: 100%; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; padding: 16px; }

  /* Detail */
  .detail-title { font-size: 22px; }
  .detail-body { padding: 32px 0 60px; }
  .neighbor-nav { flex-direction: column; }

  /* 404 */
  .error-code { font-size: 72px; }
  .error-actions { flex-direction: column; align-items: center; }

  /* Float Actions */
  .float-actions { bottom: 16px; right: 16px; }
}

@media (max-width: 480px) {
  :root { --header-h: 56px; }

  .header-inner { padding: 0 12px; }
  .site-logo img { height: 28px; }
  .logo-text { font-size: 16px; }

  .slide-container { min-height: 300px; }
  .hero-carousel { min-height: 300px; }
  .banner-title { font-size: 22px; }
  .banner-desc { font-size: 13px; }
  .hero-progress-item { width: 24px; height: 3px; }

  .section-title { font-size: 22px; }

  .web-card-header { padding: 20px 8px 0; }
  .web-card-title { font-size: 16px; }
  .web-card-img, .web-card-img-placeholder { height: 160px; }

  .stat-card { width: 50%; padding: 16px 8px; }
  .stat-number { font-size: 24px; }
  .stat-label { font-size: 12px; }

  .solution-card { height: 260px; }
  .solution-title { font-size: 17px; padding: 40px 16px 16px; }
  .solution-desc { font-size: 13px; padding: 0 16px; }

  .news-image-box { height: 150px; }

  .dark-banner-title { font-size: 22px; }
  .bottom-cta-title { font-size: 22px; }
}
