/* ============================================================
 *  base.css — 变量 / 重置 / 通用组件
 *  主题色由 config.js 注入到 :root（见 common.js），
 *  这里给一份兜底默认值。
 * ============================================================ */
:root {
  --theme: #c8102e;
  --theme-dark: #9c0c22;
  --text: #222;
  --text-light: #666;
  --text-lighter: #999;
  --border: #e5e5e5;
  --bg-gray: #f6f7f9;
  --white: #fff;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--theme); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---------- 通用容器 ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--theme);
  color: var(--white);
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 15px;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--theme-dark); color: var(--white); transform: translateY(-2px); }
.btn-outline { background: transparent; border: 1px solid var(--white); }
.btn-outline:hover { background: var(--white); color: var(--theme); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- 章节标题 ---------- */
.section { padding: 70px 0; }
.section-gray { background: var(--bg-gray); }
.section-title { text-align: center; margin-bottom: 45px; }
.section-title h2 { font-size: 30px; font-weight: 700; margin-bottom: 12px; }
.section-title p { color: var(--text-light); font-size: 15px; }
.section-title h2::after {
  content: "";
  display: block;
  width: 50px; height: 3px;
  background: var(--theme);
  margin: 14px auto 0;
}

/* ---------- 顶部导航 ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
.header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--theme); }
.logo img { height: 40px; }
.nav-list { display: flex; gap: 6px; align-items: center; }
.nav-list a {
  display: block; padding: 8px 18px; font-size: 15px; border-radius: 6px;
}
.nav-list a.active, .nav-list a:hover { color: var(--theme); background: rgba(200,16,46,.06); }
.header-right { display: flex; align-items: center; gap: 14px; }
.user-box { font-size: 14px; color: var(--text-light); }
.user-box a { color: var(--theme); margin-left: 6px; }

/* 汉堡菜单按钮（移动端显示） */
.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.menu-toggle span { width: 24px; height: 2px; background: var(--text); transition: .3s; }

/* ---------- 页脚 ---------- */
.footer { background: #1e1e24; color: #bbb; padding: 50px 0 0; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer-col h4 { color: var(--white); font-size: 16px; margin-bottom: 18px; }
.footer-col li { margin-bottom: 10px; font-size: 14px; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid #33333c; margin-top: 40px; padding: 20px 0; text-align: center; font-size: 13px; color: #888; }

/* ---------- 卡片通用 ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }

/* ---------- 页面小 banner（内页顶部） ---------- */
.page-hero {
  height: 240px;
  background: linear-gradient(135deg, var(--theme), var(--theme-dark));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.page-hero h1 { font-size: 34px; }
.page-hero .crumb { margin-top: 10px; font-size: 14px; opacity: .9; }
.page-hero .crumb a:hover { color: var(--white); text-decoration: underline; }
