/* =========================================================
   一道科技 yidaoit.com · 资讯中心 & 文章页 共享样式
   设计体系与官网首页（index.html）保持一致：靛蓝紫科技
   ========================================================= */
:root {
  --c-brand: #4F46E5;
  --c-brand-700: #4338CA;
  --c-brand-800: #3730A3;
  --c-purple: #7C3AED;
  --c-cyan: #06B6D4;
  --c-grad: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  --c-grad-soft: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);

  --c-ink: #0F172A;
  --c-body: #334155;
  --c-muted: #64748B;

  --c-bg: #F6F7FB;
  --c-surface: #FFFFFF;
  --c-surface-2: #F2F4FC;
  --c-line: rgba(79, 70, 229, 0.12);

  --shadow-1: 0 4px 20px rgba(30, 27, 75, 0.06);
  --shadow-2: 0 18px 50px rgba(30, 27, 75, 0.12);

  --radius: 22px;
  --radius-lg: 28px;
  --maxw: 1200px;
  --readw: 820px;
  --nav-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--c-body);
  background: var(--c-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--c-brand); text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== 导航（与首页一致） ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--c-line);
  transition: box-shadow .3s ease, background .3s ease;
}
.nav.scrolled { box-shadow: 0 8px 30px rgba(30, 27, 75, 0.10); background: rgba(255,255,255,0.92); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.nav .logo img { height: 42px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links a { color: var(--c-ink); font-weight: 500; font-size: 0.96rem; position: relative; padding: 6px 0; transition: color .2s; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--c-grad); transition: width .25s; }
.nav-links a:hover, .nav-links a.active { color: var(--c-brand); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta {
  background: var(--c-grad); color: #fff !important; padding: 9px 20px !important; border-radius: 999px;
  font-weight: 600; box-shadow: 0 8px 22px rgba(79,70,229,.30);
}
.nav-cta::after { display: none; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--c-ink); margin: 5px auto; border-radius: 2px; transition: .3s; }
.drawer-mask { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 99; }
.drawer {
  position: fixed; top: 0; right: -280px; width: 280px; height: 100%; background: #fff; z-index: 101;
  padding: 80px 26px 26px; display: flex; flex-direction: column; gap: 6px; transition: right .32s ease;
  box-shadow: -20px 0 50px rgba(30,27,75,.16);
}
.drawer.open { right: 0; }
.drawer a { color: var(--c-ink); font-weight: 500; padding: 13px 10px; border-radius: 12px; }
.drawer a:hover { background: var(--c-surface-2); }
.drawer .nav-cta { color: #fff !important; text-align: center; margin-top: 8px; }
.drawer-close { position: absolute; top: 18px; right: 18px; background: none; border: 0; font-size: 30px; color: var(--c-muted); cursor: pointer; }

/* ===== 通用按钮 ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 0.98rem; transition: transform .2s, box-shadow .2s; }
.btn-primary { background: var(--c-grad); color: #fff; box-shadow: 0 12px 30px rgba(79,70,229,.30); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(79,70,229,.40); }
.btn-secondary { background: #fff; color: var(--c-brand); border: 1.5px solid var(--c-line); }
.btn-secondary:hover { transform: translateY(-2px); border-color: var(--c-brand); }

/* =========================================================
   资讯中心（insights.html）
   ========================================================= */
.page-hero {
  padding: calc(var(--nav-h) + 70px) 24px 56px;
  text-align: center;
  background:
    radial-gradient(900px 360px at 50% -10%, rgba(124,58,237,.14), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--c-bg) 100%);
}
.page-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px;
  background: var(--c-surface-2); color: var(--c-brand); font-weight: 700; font-size: .82rem; letter-spacing: .5px;
  border: 1px solid var(--c-line); margin-bottom: 18px;
}
.page-hero .eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-grad); }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); color: var(--c-ink); line-height: 1.25; letter-spacing: -.5px; }
.page-hero p { max-width: 720px; margin: 16px auto 0; color: var(--c-muted); font-size: 1.04rem; }

.insights-wrap { max-width: var(--maxw); margin: 0 auto; padding: 10px 24px 80px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 4px 0 38px; }
.tag-row .tag {
  padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--c-line);
  color: var(--c-body); font-size: .9rem; font-weight: 500; cursor: default; transition: .2s;
}
.tag-row .tag.on, .tag-row .tag:hover { background: var(--c-grad); color: #fff; border-color: transparent; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 26px; }
.news-card {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); border-color: rgba(79,70,229,.28); }
.news-card .thumb {
  height: 168px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #EEF0FF 0%, #F5EDFF 100%); position: relative; overflow: hidden;
}
.news-card .thumb .cat {
  font-size: .78rem; font-weight: 700; color: #fff; background: var(--c-grad); padding: 6px 14px; border-radius: 999px;
  letter-spacing: .5px;
}
.news-card .nc-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.news-card .nc-date { font-size: .8rem; color: var(--c-muted); margin-bottom: 8px; }
.news-card h3 { font-size: 1.08rem; line-height: 1.5; color: var(--c-ink); margin-bottom: 10px; transition: color .2s; }
.news-card:hover h3 { color: var(--c-brand); }
.news-card .nc-desc { font-size: .92rem; color: var(--c-muted); flex: 1; }
.news-card .nc-more { margin-top: 16px; font-weight: 600; color: var(--c-brand); font-size: .9rem; }
.news-card .nc-more::after { content: ' →'; }

/* =========================================================
   文章页（news-*.html）
   ========================================================= */
.article-page { padding-top: var(--nav-h); }
.article-main { max-width: var(--readw); margin: 0 auto; padding: 56px 22px 30px; }
.article-hero { text-align: center; padding-bottom: 30px; border-bottom: 1px solid var(--c-line); margin-bottom: 38px; }
.article-hero .a-cat {
  display: inline-block; padding: 6px 15px; border-radius: 999px; background: var(--c-surface-2);
  color: var(--c-brand); font-weight: 700; font-size: .8rem; letter-spacing: .5px; border: 1px solid var(--c-line); margin-bottom: 16px;
}
.article-hero h1 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); color: var(--c-ink); line-height: 1.4; letter-spacing: -.4px; }
.article-hero .a-meta { margin-top: 16px; color: var(--c-muted); font-size: .9rem; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.article-hero .a-meta span { display: inline-flex; align-items: center; gap: 6px; }

.article-body { font-size: 1.05rem; color: var(--c-body); }
.article-body h2 {
  font-size: 1.42rem; color: var(--c-ink); margin: 42px 0 16px; padding-left: 16px; position: relative; line-height: 1.45;
}
.article-body h2::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px; border-radius: 4px; background: var(--c-grad); }
.article-body h3 { font-size: 1.16rem; color: var(--c-ink); margin: 28px 0 12px; }
.article-body p { margin: 0 0 16px; }
.article-body strong { color: var(--c-ink); font-weight: 700; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 22px; }
.article-body li { margin-bottom: 10px; }
.article-body a.inline { color: var(--c-brand); font-weight: 600; border-bottom: 1px solid rgba(79,70,229,.35); }

/* 直接答案框（GEO 核心：首段给出明确结论） */
.answer-box {
  background: linear-gradient(135deg, #EEF0FF 0%, #F5EDFF 100%);
  border: 1px solid var(--c-line); border-left: 4px solid var(--c-brand);
  border-radius: 16px; padding: 20px 22px; margin: 0 0 30px; font-size: 1.06rem; color: var(--c-ink);
}
.answer-box .lab { display: inline-block; font-size: .76rem; font-weight: 800; letter-spacing: 1px; color: var(--c-brand); margin-bottom: 8px; }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin: 26px 0; }
.stat-card { background: #fff; border: 1px solid var(--c-line); border-radius: 16px; padding: 20px 18px; text-align: center; box-shadow: var(--shadow-1); }
.stat-card .num { font-size: 1.9rem; font-weight: 900; background: var(--c-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.1; }
.stat-card .lab { font-size: .86rem; color: var(--c-muted); margin-top: 6px; }

/* 引用 */
.article-body blockquote {
  margin: 22px 0; padding: 16px 22px; border-left: 4px solid var(--c-purple); background: var(--c-surface-2);
  border-radius: 0 14px 14px 0; color: var(--c-ink); font-style: normal;
}
.article-body blockquote p { margin: 0; }

/* FAQ */
.faq { margin: 36px 0; }
.faq h2 { margin-bottom: 20px; }
.faq-item { border: 1px solid var(--c-line); border-radius: 14px; margin-bottom: 12px; background: #fff; overflow: hidden; }
.faq-q { padding: 16px 20px; font-weight: 700; color: var(--c-ink); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-q .ic { color: var(--c-brand); font-weight: 900; transition: transform .2s; flex-shrink: 0; }
.faq-item.open .faq-q .ic { transform: rotate(45deg); }
.faq-a { padding: 0 20px 16px; color: var(--c-body); display: none; }
.faq-item.open .faq-a { display: block; }

/* 对比表 */
.cmp-table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: .96rem; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-1); }
.cmp-table th, .cmp-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--c-line); }
.cmp-table thead th { background: var(--c-grad); color: #fff; font-weight: 700; }
.cmp-table tbody tr:nth-child(even) { background: var(--c-surface-2); }
.cmp-table td:first-child { font-weight: 600; color: var(--c-ink); }

/* 文章底部 CTA */
.article-cta {
  max-width: var(--readw); margin: 30px auto 0; padding: 32px 28px; border-radius: var(--radius);
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%); color: #fff; text-align: center;
}
.article-cta h3 { color: #fff; font-size: 1.25rem; margin-bottom: 10px; }
.article-cta p { color: rgba(255,255,255,.92); margin-bottom: 10px; font-size: .98rem; }
.article-cta .cta-btn { display: inline-block; margin-top: 12px; background: #fff; color: var(--c-brand); font-weight: 700; padding: 12px 28px; border-radius: 999px; }
.article-cta a { color: #fff; text-decoration: underline; }

/* 相关阅读 */
.related { max-width: var(--readw); margin: 40px auto 0; }
.related h3 { font-size: 1.1rem; color: var(--c-ink); margin-bottom: 14px; }
.related a { display: block; padding: 14px 18px; border: 1px solid var(--c-line); border-radius: 12px; margin-bottom: 10px; color: var(--c-body); background: #fff; transition: .2s; }
.related a:hover { border-color: var(--c-brand); color: var(--c-brand); }
.related a span { color: var(--c-muted); font-size: .82rem; margin-right: 10px; }

/* footer（与首页一致） */
.footer { background: #0B1120; color: #CBD5E1; padding: 56px 24px 36px; text-align: center; position: relative; margin-top: 60px; }
.footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--c-grad); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; }
.footer-brand { font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer p { margin-bottom: 8px; font-size: .95rem; color: #94A3B8; }
.footer a { color: #A5B4FC; }
.footer a:hover { color: #fff; }

/* 滚动进度条 */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--c-grad); z-index: 200; transition: width .1s; }

/* 入场动画 */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .article-main { padding-top: 40px; }
  .article-body { font-size: 1rem; }
  .news-grid { grid-template-columns: 1fr; }
}
