/* ============================================================
   KEWO DSE · common.css  全站公用样式（所有页面必须引入）
   设计系统见开发文档 §3；移动优先；断点 480/768/1024
   ============================================================ */

/* ---------- Reset & 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--c-blue); text-decoration: none; }
a:hover { color: var(--c-primary-light); }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; font-size: inherit; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 16px; /* 防微信 iOS 缩放 */ color: var(--c-text); }
table { border-collapse: collapse; width: 100%; }

:root {
  --c-primary: #14335C;
  --c-primary-light: #2F5FA8;
  --c-accent: #C8A24B;
  --c-accent-deep: #B08D3A;
  --c-blue: #2F6FE4;
  --c-bg: #FFFFFF;
  --c-bg-soft: #F6F8FB;
  --c-text: #1F2430;
  --c-text-2: #5A6472;
  --c-line: #E5E9F0;
  --c-danger: #D9534F;
  --c-ok: #2E9E6B;
  --radius-s: 8px; --radius-m: 12px; --radius-l: 16px;
  --shadow: 0 4px 16px rgba(20,51,92,.08);
  --shadow-up: 0 8px 24px rgba(20,51,92,.14);
  --font: -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --header-h: 60px;
}

/* ---------- 排版 ---------- */
h1, .h1 { font-size: clamp(26px, 5vw, 40px); line-height: 1.3; color: var(--c-primary); font-weight: 700; }
h2, .h2 { font-size: clamp(21px, 3.6vw, 30px); line-height: 1.35; color: var(--c-primary); font-weight: 700; }
h3, .h3 { font-size: clamp(17px, 2.6vw, 20px); color: var(--c-primary); font-weight: 600; }
p  { word-break: break-word; }
.lead { font-size: 16px; color: var(--c-text-2); }
.muted { color: var(--c-text-2); font-size: 13px; }
.gold-num { color: var(--c-accent); font-weight: 700; }
strong { color: var(--c-primary); }

/* ---------- 布局 ---------- */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 760px; }
.section { padding: 48px 0; }
.section-soft { background: var(--c-bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.section-head p { margin-top: 8px; color: var(--c-text-2); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 769px) {
  body { font-size: 16px; }
  .section { padding: 80px 0; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 24px; border-radius: var(--radius-s);
  font-size: 16px; font-weight: 600; line-height: 1.2;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-align: center; border: 1px solid transparent;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-light); color: #fff; }
.btn-gold { background: linear-gradient(135deg, var(--c-accent), var(--c-accent-deep)); color: #fff; box-shadow: 0 4px 14px rgba(200,162,75,.35); }
.btn-gold:hover { filter: brightness(1.05); color: #fff; }
.btn-ghost { border-color: var(--c-primary); color: var(--c-primary); background: transparent; }
.btn-ghost:hover { background: rgba(20,51,92,.06); color: var(--c-primary); }
.btn-white { background: #fff; color: var(--c-primary); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 14px 32px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 auto; }

/* ---------- 徽标 ---------- */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; line-height: 1.6; white-space: nowrap;
}
.badge-gold { background: rgba(200,162,75,.12); color: var(--c-accent-deep); border: 1px solid rgba(200,162,75,.4); }
.badge-blue { background: rgba(47,111,228,.1); color: var(--c-blue); border: 1px solid rgba(47,111,228,.3); }
.badge-gray { background: var(--c-bg-soft); color: var(--c-text-2); border: 1px solid var(--c-line); }
.badge-guarantee { background: rgba(46,158,107,.08); color: var(--c-ok); border: 1px solid rgba(46,158,107,.45); font-weight: 500; }
.badge-guarantee::before { content: "✓ "; }
.badge-demo { background: #FDF3E7; color: #B96A1B; border: 1px dashed #E5B98A; font-size: 11px; padding: 0 6px; border-radius: 4px; vertical-align: 2px; margin-left: 4px; }

/* ---------- 卡片 ---------- */
.card {
  background: #fff; border-radius: var(--radius-m); box-shadow: var(--shadow);
  padding: 20px; transition: transform .2s ease, box-shadow .2s ease;
  border: 1px solid transparent;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-up); }
.card-link { display: block; color: inherit; }
.card-link:hover { color: inherit; }
.card h3 { margin-bottom: 6px; }
.card .muted { display: block; }
.card-tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }

/* ---------- 占位图 ---------- */
.ph-img {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #E8EEF7 0%, #D5E0F0 60%, #C7D6EC 100%);
  color: var(--c-primary-light); font-size: 13px; letter-spacing: 1px;
  border-radius: var(--radius-s); width: 100%; text-align: center; overflow: hidden;
}
.ph-gold { background: linear-gradient(135deg, #F7EFDC 0%, #EBDDC0 100%); color: var(--c-accent-deep); }

/* ---------- 评分标签（AfterSchool 模式） ---------- */
.rating-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--c-text-2); }
.rating-star { color: var(--c-accent); font-weight: 700; }
.rating-star::before { content: "★ "; }

/* ---------- 页头导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid var(--c-line);
  transition: box-shadow .25s ease, height .25s ease;
  height: var(--header-h);
}
.site-header.scrolled { box-shadow: 0 2px 12px rgba(20,51,92,.12); --header-h: 56px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); max-width: 1120px; margin: 0 auto; padding: 0 16px; transition: height .25s ease; }
.logo { display: flex; align-items: baseline; gap: 2px; font-weight: 800; font-size: 22px; color: var(--c-primary); letter-spacing: .5px; }
.logo em { font-style: normal; color: var(--c-accent); }
.logo:hover { color: var(--c-primary); }

.main-nav { display: none; align-items: center; gap: 4px; }
.main-nav > .nav-item { position: relative; }
.main-nav > .nav-item > a {
  display: block; padding: 8px 12px; font-size: 15px; font-weight: 500;
  color: var(--c-text); border-radius: 6px;
}
.main-nav > .nav-item > a:hover, .main-nav > .nav-item.active > a { color: var(--c-primary); background: var(--c-bg-soft); }
.main-nav > .nav-item.active > a { box-shadow: inset 0 -2px 0 var(--c-accent); border-radius: 6px 6px 0 0; background: transparent; }
.nav-drop {
  position: absolute; top: 100%; left: 0; min-width: 150px;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-s);
  box-shadow: var(--shadow-up); padding: 6px; display: none;
}
.nav-item:hover .nav-drop, .nav-item:focus-within .nav-drop { display: block; }
.nav-drop a { display: block; padding: 8px 12px; font-size: 14px; color: var(--c-text); border-radius: 6px; }
.nav-drop a:hover { background: var(--c-bg-soft); color: var(--c-primary); }
.header-cta { display: none; }

.hamburger { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; padding: 8px; border-radius: 8px; }
.hamburger span { display: block; height: 2px; background: var(--c-primary); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 1025px) {
  :root { --header-h: 72px; }
  .main-nav { display: flex; }
  .header-cta { display: inline-flex; }
  .hamburger { display: none; }
}

/* 移动抽屉 */
.drawer-mask { position: fixed; inset: 0; background: rgba(20,51,92,.45); z-index: 98; opacity: 0; visibility: hidden; transition: opacity .25s ease; }
.drawer-mask.show { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 84vw); z-index: 99;
  background: #fff; transform: translateX(100%); transition: transform .28s ease;
  overflow-y: auto; padding: 76px 16px 96px;
}
.drawer.show { transform: translateX(0); }
.drawer-group { border-bottom: 1px solid var(--c-line); }
.drawer-group > button { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 14px 4px; font-size: 16px; font-weight: 600; color: var(--c-primary); }
.drawer-group > button::after { content: "▾"; color: var(--c-text-2); transition: transform .2s ease; }
.drawer-group.open > button::after { transform: rotate(180deg); }
.drawer-group .drawer-links { display: none; padding: 0 4px 12px; }
.drawer-group.open .drawer-links { display: block; }
.drawer-links a { display: block; padding: 10px 8px; color: var(--c-text); font-size: 15px; border-radius: 6px; }
.drawer-links a:hover { background: var(--c-bg-soft); }
.drawer .btn { margin-top: 16px; }
.drawer a.active { color: var(--c-accent-deep); font-weight: 700; }

/* ---------- 面包屑 ---------- */
.breadcrumb { padding: 14px 0 0; font-size: 13px; color: var(--c-text-2); }
.breadcrumb a { color: var(--c-text-2); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb .sep { margin: 0 6px; color: var(--c-line); }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--c-primary); color: rgba(255,255,255,.82); margin-top: 64px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 40px 0 28px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-col a { display: block; color: rgba(255,255,255,.75); padding: 4px 0; }
.footer-col a:hover { color: var(--c-accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 16px 0 24px; text-align: center; color: rgba(255,255,255,.55); font-size: 12px; }
@media (min-width: 769px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- 悬浮转化条 / 返回顶部 ---------- */
.float-bar { position: fixed; right: 16px; bottom: 84px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 769px) { .float-bar { bottom: 24px; } }
.float-btn {
  width: 48px; height: 48px; border-radius: 50%; background: #fff;
  box-shadow: var(--shadow-up); display: flex; align-items: center; justify-content: center;
  font-size: 20px; border: 1px solid var(--c-line);
}
.float-btn:hover { transform: translateY(-2px); }
#backTop { opacity: 0; visibility: hidden; transition: opacity .25s ease; }
#backTop.show { opacity: 1; visibility: visible; }

.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  display: flex; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: #fff; box-shadow: 0 -4px 16px rgba(20,51,92,.1);
}
.mobile-cta .btn { flex: 1; padding: 11px 0; font-size: 15px; }
@media (min-width: 769px) { .mobile-cta { display: none; } }
body.has-mobile-cta { padding-bottom: 76px; }
@media (min-width: 769px) { body.has-mobile-cta { padding-bottom: 0; } }

/* ---------- 弹窗（企微二维码 / 留资成功） ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 200; background: rgba(20,51,92,.55);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-l); max-width: 420px; width: 100%;
  max-height: 86vh; overflow-y: auto; padding: 28px 22px; position: relative;
  animation: modalIn .25s ease;
}
@keyframes modalIn { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close { position: absolute; top: 10px; right: 12px; font-size: 22px; color: var(--c-text-2); width: 36px; height: 36px; }
.modal h3 { margin-bottom: 10px; text-align: center; }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 14px; }
.qr-box img { width: 180px; height: 180px; border: 1px solid var(--c-line); border-radius: var(--radius-s); }

/* ---------- 表单 ---------- */
.form-grid { display: grid; gap: 14px; }
.form-item label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--c-primary); }
.form-item label .req { color: var(--c-danger); margin-left: 2px; }
.form-item input[type="text"], .form-item input[type="tel"], .form-item input[type="number"],
.form-item select, .form-item textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--c-line);
  border-radius: var(--radius-s); background: #fff; outline: none;
  transition: border-color .15s ease;
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: var(--c-blue); }
.form-item textarea { min-height: 88px; resize: vertical; }
.form-err { color: var(--c-danger); font-size: 12px; margin-top: 4px; display: none; }
.form-item.error input, .form-item.error select, .form-item.error textarea { border-color: var(--c-danger); }
.form-item.error .form-err { display: block; }
.radio-row, .check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span {
  display: inline-block; padding: 7px 14px; border: 1px solid var(--c-line);
  border-radius: 999px; font-size: 14px; color: var(--c-text-2); cursor: pointer; transition: all .15s ease;
}
.chip-check input:checked + span { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.form-note { font-size: 12px; color: var(--c-text-2); }
@media (min-width: 769px) {
  .form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
}

/* ---------- 手风琴 ---------- */
.accordion { border: 1px solid var(--c-line); border-radius: var(--radius-m); overflow: hidden; background: #fff; }
.acc-item + .acc-item { border-top: 1px solid var(--c-line); }
.acc-head {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px; text-align: left; font-size: 15px; font-weight: 600; color: var(--c-primary);
}
.acc-head::after { content: "＋"; color: var(--c-accent); font-size: 18px; flex-shrink: 0; transition: transform .2s ease; }
.acc-item.open .acc-head::after { content: "－"; }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.acc-inner { padding: 0 16px 16px; color: var(--c-text-2); font-size: 14px; }
.acc-inner .btn { margin-top: 10px; }
.acc-item.pinned .acc-head::before { content: "置顶"; flex-shrink: 0; font-size: 11px; font-weight: 400; color: var(--c-accent-deep); border: 1px solid var(--c-accent); border-radius: 4px; padding: 0 5px; margin-right: 8px; }

/* ---------- Tab ---------- */
.tab-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--c-line);
  font-size: 14px; color: var(--c-text-2); background: #fff; transition: all .15s ease;
}
.tab-btn.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 轮播 ---------- */
.carousel { position: relative; overflow: hidden; border-radius: var(--radius-m); }
.carousel-track { display: flex; transition: transform .4s ease; touch-action: pan-y; }
.carousel-slide { flex: 0 0 100%; padding: 4px; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.carousel-dots button { width: 8px; height: 8px; border-radius: 50%; background: var(--c-line); transition: all .2s ease; }
.carousel-dots button.active { background: var(--c-accent); width: 20px; border-radius: 4px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-m); border: 1px solid var(--c-line); background: #fff; }
table.data-table { min-width: 560px; font-size: 14px; }
table.data-table th { background: var(--c-primary); color: #fff; padding: 12px; text-align: left; font-weight: 600; white-space: nowrap; }
table.data-table td { padding: 12px; border-top: 1px solid var(--c-line); vertical-align: top; }
table.data-table tr:nth-child(even) td { background: var(--c-bg-soft); }
table.data-table td.hl { color: var(--c-accent-deep); font-weight: 700; }
.source-note { font-size: 12px; color: var(--c-text-2); margin-top: 8px; }

/* ---------- 步骤流程 ---------- */
.steps { display: grid; grid-template-columns: 1fr; gap: 16px; counter-reset: step; }
.step-card { position: relative; background: #fff; border-radius: var(--radius-m); box-shadow: var(--shadow); padding: 20px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; background: var(--c-accent); color: #fff;
  font-weight: 700; margin-bottom: 10px;
}
.step-card h3 { font-size: 16px; margin-bottom: 6px; }
.step-card p { font-size: 13px; color: var(--c-text-2); }
@media (min-width: 769px) {
  .steps.s4 { grid-template-columns: repeat(4, 1fr); }
  .steps.s7 { grid-template-columns: repeat(7, 1fr); }
  .steps.s3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Key Takeaways（GEO） ---------- */
.key-takeaways {
  background: linear-gradient(135deg, rgba(200,162,75,.08), rgba(20,51,92,.04));
  border: 1px solid rgba(200,162,75,.35); border-left: 4px solid var(--c-accent);
  border-radius: var(--radius-s); padding: 18px 20px; margin-bottom: 28px;
}
.key-takeaways h2 { font-size: 16px; margin-bottom: 8px; }
.key-takeaways ol { padding-left: 20px; list-style: decimal; color: var(--c-text); font-size: 14px; }
.key-takeaways li { margin: 4px 0; }

/* ---------- CTA 区块 ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-light) 100%);
  color: #fff; border-radius: var(--radius-l); padding: 36px 24px; text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,.85); margin-bottom: 20px; }
.cta-band .btn-row { justify-content: center; }

/* ---------- 动效（data-animate） ---------- */
[data-animate] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
[data-animate].in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-animate] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 结构化内容（文章正文） ---------- */
.rich-body { font-size: 15.5px; color: var(--c-text); }
.rich-body h2 { font-size: 20px; margin: 28px 0 12px; scroll-margin-top: 80px; }
.rich-body h3 { font-size: 17px; margin: 20px 0 8px; }
.rich-body p { margin: 10px 0; }
.rich-body ul, .rich-body ol { padding-left: 22px; margin: 10px 0; }
.rich-body ul { list-style: disc; }
.rich-body ol { list-style: decimal; }
.rich-body li { margin: 4px 0; }
.rich-body table { margin: 14px 0; }
.rich-body img { border-radius: var(--radius-s); margin: 12px 0; }

/* ---------- 文章卡 ---------- */
.post-card { display: flex; flex-direction: column; }
.post-card .ph-img { aspect-ratio: 16/9; margin-bottom: 12px; }
.post-card h3 { font-size: 16px; line-height: 1.5; }
.post-card .excerpt { font-size: 13px; color: var(--c-text-2); margin: 6px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { font-size: 12px; color: var(--c-text-2); }

/* ---------- 通用工具类 ---------- */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; }
.justify-between { justify-content: space-between; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
