/* ============================================
   公考真题库 · 单页样式
   ============================================ */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --accent: #f97316;
  --ink: #0f172a;
  --text: #475569;
  --muted: #94a3b8;
  --bg: #f6f8fc;
  --card: #ffffff;
  --border: #e2e8f0;
  --green: #16a34a;
  --green-soft: #f0fdf4;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(15, 23, 42, .08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s, border-color .3s;
}
.site-header.scrolled { border-color: var(--border); box-shadow: 0 2px 16px rgba(15,23,42,.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: 800; color: var(--primary);
}
.nav { display: flex; gap: 28px; }
.nav a { font-size: 15px; color: var(--text); transition: color .2s; }
.nav a:hover { color: var(--primary); }
.nav .nav-blog { color: var(--primary); font-weight: 600; }
.menu-btn { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .3s; }

/* ---------- 首屏 ---------- */
.hero {
  background:
    radial-gradient(1000px 400px at 85% -10%, rgba(37, 99, 235, .12), transparent),
    radial-gradient(800px 400px at -10% 110%, rgba(249, 115, 22, .10), transparent),
    linear-gradient(180deg, #f0f5ff 0%, var(--bg) 100%);
  padding: 72px 0 64px;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.badge {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border);
  color: var(--primary); font-size: 13px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .08);
}
.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.25; font-weight: 900; letter-spacing: 1px;
}
.hero h1 em { font-style: normal; color: var(--primary); }
.hero-sub { color: var(--text); font-size: 17px; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; margin: 26px 0 22px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: 12px;
  font-size: 16px; font-weight: 600;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(37, 99, 235, .32); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

.hero-art img {
  width: 100%; border-radius: 20px;
  box-shadow: var(--shadow);
}

/* ---------- 统计 ---------- */
.stats { padding: 8px 0 56px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 12px; box-shadow: var(--shadow);
}
.stat { text-align: center; }
.stat b { font-size: clamp(26px, 3vw, 38px); font-weight: 900; color: var(--primary); }
.stat span { display: block; color: var(--text); font-size: 14px; margin-top: 2px; }

/* ---------- 通用 Section ---------- */
.section { padding: 64px 0; }
.section-title { text-align: center; font-size: clamp(26px, 3.4vw, 36px); font-weight: 900; }
.section-desc { text-align: center; color: var(--text); margin: 10px 0 40px; }

/* ---------- 题库分类 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.cat-card {
  position: relative; display: block;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px 22px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: rgba(37, 99, 235, .4); }
.cat-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary); margin-bottom: 16px;
}
.cat-icon svg { width: 24px; height: 24px; }
.cat-tag {
  position: absolute; top: 20px; right: 20px;
  font-size: 12px; font-weight: 600; color: var(--primary);
  background: var(--primary-soft); padding: 2px 10px; border-radius: 999px;
}
.cat-tag.tag-sl { color: var(--accent); background: #fff7ed; }
.cat-tag.tag-ms { color: var(--green); background: var(--green-soft); }
.cat-card h3 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.cat-card p { color: var(--text); font-size: 14px; min-height: 48px; }
.cat-card em { font-style: normal; font-size: 14px; font-weight: 700; color: var(--accent); }

/* ---------- 使用步骤 ---------- */
.steps-section { padding-bottom: 80px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 900px; margin: 0 auto; }
.step {
  text-align: center; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px 22px;
}
.step-num {
  display: inline-block; font-size: 15px; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  width: 44px; height: 44px; line-height: 44px; border-radius: 50%;
  margin-bottom: 14px;
}
.step h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.step p { color: var(--text); font-size: 14px; }

/* ---------- 页脚 ---------- */
.footer { background: var(--ink); color: #cbd5e1; padding: 30px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.footer a { color: #93c5fd; }
.footer a:hover { text-decoration: underline; }

/* ---------- 动效 ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 省考官网与真题下载 ---------- */
.links-sub { font-size: 19px; font-weight: 800; margin: 40px 0 18px; }
.pdf-grid { margin-bottom: 8px; }
.gov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.gov-card {
  display: flex; flex-direction: column; gap: 2px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.gov-card:hover { transform: translateY(-4px); border-color: rgba(37, 99, 235, .4); box-shadow: var(--shadow); }
.gov-card b { font-size: 15px; font-weight: 800; }
.gov-card span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.gov-card .gov-time {
  margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--primary);
  line-height: 1.6;
}
.gov-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 20px; }
.btn-download {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 6px; padding: 9px 26px; border-radius: 999px;
  background: var(--primary); color: #fff;
  font-size: 14px; font-weight: 700; letter-spacing: 2px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .32);
  transition: background .2s, transform .2s, box-shadow .2s;
}
.cat-card:hover .btn-download {
  background: var(--primary-dark); transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, .4);
}
.btn-download:active { transform: scale(.96); }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 420px; margin: 0 auto; }
  .hero { padding: 48px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .steps { grid-template-columns: 1fr; }
  .menu-btn { display: block; }
  .nav {
    position: fixed; top: 64px; right: 0; left: 0;
    flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .nav.open { max-height: 300px; box-shadow: 0 16px 30px rgba(15,23,42,.08); }
  .nav a { padding: 14px 24px; border-top: 1px solid var(--bg); }
  .quiz-card { padding: 20px 16px 24px; }
}
