/* ========================================
   书琅教育 · 全站样式
   品牌色：深蓝 #1B3A5C / 金色 #C9A227
   ======================================== */

:root {
  --c-primary: #1B3A5C;      /* 深蓝主色 */
  --c-primary-light: #2B5583;
  --c-primary-dark: #122B45;
  --c-accent: #C9A227;       /* 金色点缀 */
  --c-accent-light: #E4C65C;
  --c-bg: #FFFFFF;
  --c-bg-alt: #F5F7FA;
  --c-text: #2C3338;
  --c-text-light: #6B7280;
  --c-border: #E5E7EB;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-width: 1800px;
  --shadow: 0 4px 20px rgba(27, 58, 92, 0.08);
  --radius: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 74px;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; color: var(--c-primary); letter-spacing: 2px; }
.brand-mark { width: 36px; height: 36px; background: var(--c-primary); border-radius: 6px; display: grid; place-items: center; color: var(--c-accent-light); font-size: 20px; font-weight: 700; }
.nav-toggle { display: none; background: none; border: 0; font-size: 28px; color: var(--c-primary); cursor: pointer; }
.site-nav ul { display: flex; gap: 28px; }
.site-nav a { display: inline-block; font-size: 15px; color: var(--c-text); font-weight: 500; padding: 9px 16px; border-radius: 7px; transition: color .2s, background-color .2s; }
.site-nav a:hover { color: var(--c-primary); background: #F1F6FB; }
.site-nav a.active { color: var(--c-primary); background: #E9F1F9; font-weight: 600; }
.site-nav a.cta { background: var(--c-primary); color: #fff; padding: 9px 18px; border-radius: 5px; }
.site-nav a.cta:hover { background: var(--c-primary-light); color: #fff; }

/* ---------- 通用区块 ---------- */
.section { padding: 76px 0; }
.section-alt { background: var(--c-bg-alt); }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 { font-size: 34px; color: var(--c-primary); margin-bottom: 12px; position: relative; display: inline-block; }
.section-head h2::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: -10px; width: 50px; height: 3px; background: var(--c-accent); border-radius: 2px; }
.section-head p { color: var(--c-text-light); font-size: 16px; margin-top: 18px; }

/* ---------- 首屏 ---------- */
.hero {
  background:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(135deg, var(--c-primary-dark) 0%, var(--c-primary) 55%, var(--c-primary-light) 100%);
  background-size: 44px 44px, 44px 44px, 100% 100%;
  color: #fff; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; top: -80px; right: -80px; width: 360px; height: 360px;
  border: 1px solid rgba(201,162,39,0.25); border-radius: 50%;
}
.hero::after {
  content: ""; position: absolute; bottom: -120px; left: -60px; width: 280px; height: 280px;
  border: 1px solid rgba(201,162,39,0.18); border-radius: 50%;
}
.hero .container { position: relative; z-index: 2; max-width: 1800px; padding: 58px 32px 88px; display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 48px; align-items: center; }
.hero-visual { position: relative; }
.hero-carousel { position: relative; width: 100%; aspect-ratio: 2 / 1; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,0.06); }
.hero-carousel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.hero-carousel img.active { opacity: 1; }
.hero-visual::before {
  content: ""; position: absolute; inset: -14px; z-index: 1; pointer-events: none;
  background:
    linear-gradient(var(--c-accent), var(--c-accent)) top left / 48px 3px,
    linear-gradient(var(--c-accent), var(--c-accent)) top left / 3px 48px,
    linear-gradient(var(--c-accent), var(--c-accent)) bottom right / 48px 3px,
    linear-gradient(var(--c-accent), var(--c-accent)) bottom right / 3px 48px;
  background-repeat: no-repeat;
}
.hero-visual::after {
  content: ""; position: absolute; inset: 0; border-radius: 16px; pointer-events: none;
  background: radial-gradient(ellipse 90% 90% at 50% 50%, rgba(18,43,69,0) 58%, rgba(18,43,69,0.42) 88%, rgba(18,43,69,0.72) 100%);
}
.hero-curve { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 3; line-height: 0; pointer-events: none; }
.hero-curve svg { width: 100%; height: 52px; display: block; }
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; padding: 56px 24px 76px; }
  .hero-visual { max-width: 640px; }
  .hero-carousel { aspect-ratio: 4 / 3; }
}
.hero h1 { font-size: 54px; line-height: 1.3; font-weight: 700; margin-bottom: 22px; max-width: 780px; }
.hero h1 strong {
  background: linear-gradient(120deg, #E8D48A 0%, #C9A227 45%, #F0DFA0 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.hero .lead { font-size: 19px; max-width: 680px; margin-bottom: 34px; color: rgba(255,255,255,0.9); }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 13px 30px; border-radius: 5px; font-size: 16px; font-weight: 600; transition: all .2s; }
.btn-primary { background: var(--c-accent); color: #1B3A5C; }
.btn-primary:hover { background: var(--c-accent-light); transform: translateY(-2px); }
.btn-outline { border: 1px solid rgba(255,255,255,0.6); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.1); }

/* ---------- 数据条 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-item { padding: 26px 10px; }
.stat-num {
  font-size: 56px; font-weight: 800; line-height: 1.15;
  background: linear-gradient(180deg, #E8D48A 0%, #C9A227 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.stat-num span { color: var(--c-accent); -webkit-text-fill-color: var(--c-accent); font-size: 24px; font-weight: 700; }
.stat-num .count { font-size: inherit; }
.stat-num-sm { font-size: 48px; letter-spacing: 2px; }
.stat-label { color: var(--c-text-light); font-size: 15px; margin-top: 8px; letter-spacing: 1px; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow); border: 1px solid var(--c-border);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-8px); box-shadow: 0 16px 40px rgba(27,58,92,0.15); border-color: rgba(201,162,39,0.55); }
.card h3 { font-size: 20px; color: var(--c-primary); margin-bottom: 14px; }
.card p { color: var(--c-text-light); font-size: 15px; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  color: var(--c-accent); font-size: 26px; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(201,162,39,0.14), rgba(201,162,39,0.30));
  box-shadow: inset 0 0 0 1px rgba(201,162,39,0.28);
}

/* ---------- 图文块 ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-img { background: var(--c-bg-alt); border-radius: var(--radius); min-height: 320px; overflow: hidden; border: 1px dashed var(--c-border); display: grid; place-items: center; color: var(--c-text-light); }
.split-img img { width: 100%; height: 100%; object-fit: cover; }
.split-img .ph { text-align: center; padding: 30px; font-size: 14px; }
.split-img .ph strong { display: block; font-size: 18px; color: var(--c-primary); margin-bottom: 8px; }
.split h2 { font-size: 32px; color: var(--c-primary); margin-bottom: 18px; }
.split p { color: var(--c-text-light); margin-bottom: 16px; }

/* ---------- 列表/时间线 ---------- */
.check-list li { position: relative; padding-left: 28px; margin-bottom: 12px; color: var(--c-text-light); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--c-accent); font-weight: 700; }
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--c-border); }
.timeline-item { position: relative; margin-bottom: 26px; }
.timeline-item::before { content: ""; position: absolute; left: -28px; top: 8px; width: 12px; height: 12px; background: var(--c-accent); border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--c-accent); }
.timeline-month { font-weight: 700; color: var(--c-primary); font-size: 18px; margin-bottom: 6px; }
.timeline-item p { color: var(--c-text-light); font-size: 15px; }

/* ---------- 波浪时间线 ---------- */
.wave-timeline { position: relative; height: 430px; max-width: 1600px; margin: 0 auto; }
.wave-path { position: absolute; inset: 0; width: 100%; height: 100%; }
.wave-node { position: absolute; width: 200px; margin-left: -100px; text-align: center; }
.wave-dot { display: block; width: 14px; height: 14px; margin: -7px auto 0; background: var(--c-accent); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px var(--c-accent), 0 2px 8px rgba(201,162,39,0.35); }
.wave-month { display: inline-block; background: linear-gradient(135deg, var(--c-accent), #A8861D); color: #fff; font-size: 13px; font-weight: 600; padding: 3px 14px; border-radius: 14px; margin-bottom: 7px; }
.wave-label p { font-size: 13px; line-height: 1.65; color: var(--c-text-light); margin: 0; }
.wave-node.side-below .wave-label { margin-top: 20px; }
.wave-node.side-above .wave-label { position: absolute; bottom: 20px; left: 0; right: 0; }
@media (max-width: 900px) {
  .wave-timeline { height: auto; padding-left: 30px; }
  .wave-timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--c-border); }
  .wave-path { display: none; }
  .wave-node { position: relative; left: auto !important; top: auto !important; width: auto; margin: 0 0 26px; text-align: left; }
  .wave-dot { position: absolute; left: -27px; top: 4px; margin: 0; }
  .wave-node.side-above .wave-label { position: static; }
  .wave-node.side-below .wave-label { margin-top: 8px; }
  .wave-label p { font-size: 14px; }
}

/* ---------- 师资卡片 ---------- */
.teacher-photo { aspect-ratio: 10 / 9; background: #fff; border-radius: 10px 10px 0 0; margin: -32px -32px 22px; overflow: hidden; display: grid; place-items: center; border-bottom: 2px solid var(--c-accent); }
.teacher-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.teacher-photo .ph { color: var(--c-text-light); font-size: 13px; }
.teacher-subject {
  display: inline-block; background: linear-gradient(135deg, var(--c-accent), #A8861D);
  color: #fff; padding: 4px 16px; border-radius: 20px; font-size: 13px; font-weight: 600;
  letter-spacing: 1px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(201,162,39,0.35);
}
.teacher-photo + .teacher-subject + h3 { font-size: 26px; letter-spacing: 1px; }
.teacher-books { font-size: 0; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--c-border); }
.tb-label { display: block; font-size: 13px; color: var(--c-text-light); letter-spacing: 1px; margin-bottom: 8px; }
.book-tag {
  display: inline-block; background: var(--c-bg-alt); border: 1px solid var(--c-border);
  border-radius: 14px; padding: 2px 11px; font-size: 12px; color: var(--c-primary);
  margin: 0 6px 6px 0; transition: border-color .2s, color .2s;
}
.book-tag:hover { border-color: var(--c-accent); color: var(--c-accent); }

/* ---------- 教材 ---------- */
.book-card { text-align: center; }
.book-cover { height: 300px; background: #fff; border: 1px solid var(--c-border, #e8e8e8); border-radius: 6px; margin-bottom: 16px; display: grid; place-items: center; overflow: hidden; }
.book-cover span { font-size: 19px; font-weight: 700; letter-spacing: 1px; }
.book-cover img { width: 100%; height: 100%; object-fit: contain; }
.book-card h3 { font-size: 16px; }

/* ---------- 页内标题 ---------- */
.page-banner { background: linear-gradient(135deg, var(--c-primary-dark), var(--c-primary)); color: #fff; padding: 66px 0 60px; text-align: center; position: relative; overflow: hidden; }
.page-banner::after { content: ""; position: absolute; top: -60px; right: -40px; width: 260px; height: 260px; border: 1px solid rgba(201,162,39,0.2); border-radius: 50%; }
.page-banner h1 { font-size: 38px; margin-bottom: 12px; position: relative; }
.page-banner p { color: rgba(255,255,255,0.82); font-size: 16px; position: relative; }
.breadcrumb { font-size: 13px; color: rgba(255,255,255,0.7); margin-top: 18px; position: relative; }
.breadcrumb a:hover { color: var(--c-accent-light); }

/* ---------- 联系页 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-item { display: flex; gap: 16px; margin-bottom: 24px; align-items: flex-start; }
.contact-icon { width: 44px; height: 44px; background: rgba(201,162,39,0.12); border-radius: 50%; display: grid; place-items: center; color: var(--c-accent); font-size: 20px; flex-shrink: 0; }
.contact-item h3 { font-size: 17px; color: var(--c-primary); margin-bottom: 4px; }
.contact-item p { color: var(--c-text-light); }
.contact-item a:hover { color: var(--c-accent); }
.contact-note { background: var(--c-bg-alt); border-left: 4px solid var(--c-accent); padding: 18px 22px; border-radius: 0 6px 6px 0; color: var(--c-text-light); font-size: 14px; margin-top: 26px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--c-primary-dark); color: rgba(255,255,255,0.75); padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; padding-bottom: 40px; }
.footer-brand .brand { color: #fff; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.9; }
.footer-col h3 { color: #fff; font-size: 16px; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.15); }
.footer-col li { margin-bottom: 10px; font-size: 14px; }
.footer-col a:hover { color: var(--c-accent-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 20px 0; text-align: center; font-size: 13px; color: rgba(255,255,255,0.6); }
.footer-bottom a { color: rgba(255,255,255,0.8); }
.footer-bottom a:hover { color: var(--c-accent-light); }
.beian-icon { display: inline; width: 15px; height: 17px; vertical-align: -3px; margin-right: 4px; }

/* ---------- 图片占位提示（仅开发期显示） ---------- */
.img-placeholder { background: var(--c-bg-alt); border: 1px dashed var(--c-border); display: grid; place-items: center; text-align: center; color: var(--c-text-light); font-size: 13px; padding: 20px; }
.img-placeholder strong { display: block; color: var(--c-primary); font-size: 15px; margin-bottom: 6px; }

/* ---------- 滚动淡入动效 ---------- */
.js [data-animate] {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.js [data-animate].in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-animate] { opacity: 1; transform: none; transition: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 74px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--c-border); box-shadow: var(--shadow); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 12px 24px; }
  .site-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--c-border); }
  .site-nav a.cta { margin-top: 12px; text-align: center; }
  .grid-2, .grid-3, .grid-4, .split, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 34px; }
  .hero .lead { font-size: 16px; }
  .section-head h2 { font-size: 27px; }
  .page-banner h1 { font-size: 28px; }
}
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .section { padding: 52px 0; }
  .hero .container { padding: 70px 18px 80px; }
  .stats { gap: 8px; }
  .stat-num { font-size: 40px; }
  .stat-num span { font-size: 18px; }
  .stat-num-sm { font-size: 32px; }
}
