/* ========================================
   小红书投流完整方案 — 品牌样式
   色板：深蓝 #0E2A5E / 金色 #C9A227 / 暖白 #FFF8F0
   ======================================== */

:root {
  --bg: #0E2A5E;
  --bg-light: #132D64;
  --bg-card: #1A3A78;
  --bg-card-hover: #1F4288;
  --gold: #C9A227;
  --gold-light: #D4B34A;
  --gold-dark: #A8861F;
  --warm-white: #FFF8F0;
  --text-primary: #E8E2D5;
  --text-secondary: #B0A890;
  --text-muted: #8A8270;
  --border: rgba(201, 162, 39, 0.2);
  --border-light: rgba(201, 162, 39, 0.1);
  --accent-red: #E05555;
  --accent-green: #4CAF84;
  --accent-blue: #5B9BD5;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --sh-sm: 0 2px 8px rgba(0,0,0,0.3);
  --sh-md: 0 4px 16px rgba(0,0,0,0.4);
  --sh-gold: 0 4px 20px rgba(201, 162, 39, 0.15);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 200ms ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.8;
  display: flex;
  min-height: 100vh;
}

/* ====== 侧栏导航 ====== */
.sidenav {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg-light);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 100;
  transition: transform var(--transition);
}

.sidenav-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-light);
  z-index: 2;
}

.sidenav-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.5px;
}

.sidenav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.sidenav-toggle:hover {
  background: var(--bg-card);
}

.sidenav-list {
  list-style: none;
  padding: 12px 0;
}

.sidenav-list li { margin: 0; }

.nav-link {
  display: block;
  padding: 10px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: all var(--transition);
  line-height: 1.5;
}

.nav-link:hover {
  color: var(--gold);
  background: rgba(201, 162, 39, 0.06);
  border-left-color: var(--gold);
}

.nav-link.active {
  color: var(--gold);
  background: rgba(201, 162, 39, 0.1);
  border-left-color: var(--gold);
  font-weight: 600;
}

/* ====== 主内容区 ====== */
.main-content {
  margin-left: 280px;
  flex: 1;
  max-width: 960px;
  padding: 40px 48px 80px;
  min-height: 100vh;
}

.mobile-nav-btn {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  background: var(--gold);
  color: var(--bg);
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--sh-md);
}

/* ====== 页面头部 ====== */
.page-hero {
  text-align: center;
  padding: 24px 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.page-hero h1 {
  font-size: 38px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 20px;
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  gap: 24px;
  justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ====== 内容区块 ====== */
.content-section {
  margin-bottom: 48px;
  scroll-margin-top: 24px;
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  letter-spacing: 0.5px;
}

.section-body {
  color: var(--text-primary);
}

.section-goal {
  background: rgba(201, 162, 39, 0.08);
  border-left: 4px solid var(--gold);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 20px;
  font-size: 15px;
  color: var(--gold-light);
  line-height: 1.7;
}

/* ====== 方案概述卡片 ====== */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all var(--transition);
}

.overview-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: var(--sh-gold);
}

.ov-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.overview-card h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--warm-white);
  margin-bottom: 8px;
}

.overview-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ====== 素材卡片 ====== */
.material-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  position: relative;
}

.material-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 14px;
  color: var(--bg);
}

.tag-cost { background: var(--accent-red); }
.tag-compete { background: var(--accent-blue); }
.tag-cognition { background: var(--accent-green); }
.tag-suspense { background: #E8A640; }
.tag-compare { background: #6CB4EE; }
.tag-anxiety { background: #E05555; }

.material-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--warm-white);
  margin-bottom: 14px;
}

.material-card h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gold-light);
  margin: 16px 0 8px;
}

/* ====== 口播稿 ====== */
.script-box {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 12px 0;
}

.script-box p {
  margin-bottom: 10px;
  line-height: 1.8;
  font-size: 15px;
}

.script-box p:last-child { margin-bottom: 0; }

/* ====== 正文 ====== */
.article-body {
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 12px 0;
}

.article-body p {
  margin-bottom: 10px;
  line-height: 1.8;
  font-size: 15px;
}

.article-body p:last-child { margin-bottom: 0; }

.headline {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  margin: 12px 0;
  padding: 12px 16px;
  background: rgba(201, 162, 39, 0.08);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
}

.tags-line {
  color: var(--text-muted) !important;
  font-size: 13px !important;
  margin-top: 16px !important;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

/* ====== 问题预案 ====== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}

.faq-item h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--warm-white);
  margin-bottom: 8px;
}

.faq-item p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  line-height: 1.7;
}

/* ====== 表格 ====== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}

.data-table th {
  background: rgba(201, 162, 39, 0.1);
  color: var(--gold-light);
  text-align: left;
  padding: 10px 14px;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  line-height: 1.6;
}

.data-table tr:hover td {
  background: rgba(201, 162, 39, 0.03);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* ====== 列表 ====== */
.section-body ul {
  list-style: none;
  padding-left: 0;
  margin: 12px 0;
}

.section-body ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
}

.section-body ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 12px;
  line-height: 1.7;
}

.sub-list {
  margin-left: 20px !important;
}

.sub-list li::before {
  content: "◦" !important;
  color: var(--gold-dark) !important;
}

.section-body p {
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.8;
}

.section-body strong {
  color: var(--warm-white);
}

/* ====== 页脚 ====== */
.page-footer {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-inner {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 2;
}

.footer-inner a {
  color: var(--gold-light);
  text-decoration: none;
}

.footer-inner a:hover {
  text-decoration: underline;
}

/* ====== 响应式 ====== */
@media (max-width: 960px) {
  .sidenav {
    transform: translateX(-100%);
  }

  .sidenav.open {
    transform: translateX(0);
  }

  .sidenav-toggle {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 40px 20px 80px;
  }

  .mobile-nav-btn {
    display: block;
  }

  .page-hero h1 {
    font-size: 28px;
  }

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

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .script-box, .article-body {
    padding: 16px 18px;
  }

  .data-table {
    font-size: 12px;
  }

  .data-table th,
  .data-table td {
    padding: 8px 10px;
  }
}

@media (max-width: 640px) {
  .main-content {
    padding: 16px 14px 60px;
  }

  .page-hero h1 {
    font-size: 24px;
  }

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

  .material-card {
    padding: 20px 16px;
  }

  .hero-meta {
    flex-direction: column;
    gap: 4px;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }
}

/* ====== 暗色覆盖层 ====== */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

.overlay.show {
  display: block;
}

@media (min-width: 961px) {
  .overlay.show {
    display: none;
  }
}

/* ====== 打印 ====== */
@media print {
  .sidenav, .mobile-nav-btn { display: none; }
  .main-content { margin-left: 0; padding: 20px; }
  body { background: white; color: #1A1A2E; }
  .section-title { color: #0E2A5E; }
  .material-card, .faq-item, .overview-card { border: 1px solid #ddd; background: #fff; }
}

/* ====== prefers-reduced-motion ====== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
