/* ============================================================
   同兴智学 · 总门户 — 设计令牌与全局样式
   主题：护眼深绿 + 金（对照设计稿 Design Tokens）
   ============================================================ */
:root {
  /* 主色 */
  --navy-900: #0F4028;   /* header / 播放器 / 深底 */
  --navy-700: #165C3C;   /* 渐变浅端 */
  --navy-600: #1B6E47;   /* 主按钮 / 激活 / 进度条 */
  /* 强调金 */
  --gold-600: #C9A227;   /* 倒计时 / 证书 / CTA */
  --gold-300: #E9D28A;
  --gold-text: #8a6d10;
  --gold-bg: #FBF6E8;
  --gold-bg-2: #F7F1DC;
  /* 浅蓝 */
  --blue-050: #E8F6F0;   /* 选中态 / 头像底 */
  /* 状态 */
  --success: #1E8E5A;  --success-bg: #E5F4ED;
  --error: #D64545;    --error-bg: #FBEAEA;  --error-bd: #EFC9C9;
  /* 背景与灰阶 */
  --bg-page: #F5F8F7;
  --bg-card: #FFFFFF;
  --bg-grey: #EDF2F0;
  --bg-head: #F0F7F4;
  /* 文字 */
  --t-title: #16221D;
  --t-body: #3B5046;
  --t-sub: #667A6F;
  --t-weak: #99ABA2;
  --t-disabled: #B7C7BF;
  /* 边框 */
  --bd: #C7D5CF;
  --bd-light: #EDF2F0;
  /* 规格 */
  --radius: 8px;
  --shadow-card: 0 1px 4px rgba(15, 64, 40, 0.06);
  --shadow-hover: 0 6px 20px rgba(27, 110, 71, 0.15);
  --shadow-float: 0 4px 16px rgba(15, 64, 40, 0.12);
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-page);
  color: var(--t-body);
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy-600); text-decoration: none; }
a:hover { color: #23855B; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
.serif { font-family: 'Noto Serif SC', 'PingFang SC', serif; }

.wrap { width: var(--wrap); max-width: 100%; margin: 0 auto; }

/* ---------- 品牌区 + 主导航 ---------- */
.header { background: #fff; box-shadow: 0 3px 12px rgba(15,64,40,.12); position: sticky; top: 0; z-index: 50; }
.header-brand-row { background: #fff; overflow: hidden; }
.header-brand-row .wrap { height: 130px; position: relative; display: flex; align-items: center; }
.brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 22px; }
.brand-logo {
  width: 104px; height: 104px; border-radius: 10px; display: block;
  object-fit: contain; background: #fff;
}
.brand-name { font-size: 36px; font-weight: 700; color: var(--navy-900); font-family: 'Noto Serif SC', serif; line-height: 1.12; letter-spacing: 2px; }
.brand-sub { margin-top: 7px; font-size: 15px; color: var(--t-sub); letter-spacing: 2px; }
.header-art {
  position: absolute; z-index: 1; top: 0; right: 0; width: 560px; height: 130px;
  background: #fff url('header-campus-static.png?v=20260827-campus-static1') right center / auto 130px no-repeat;
  filter: none;
  pointer-events: none;
}
.header-nav-row {
  position: relative; height: 58px;
  background: var(--navy-900);
  border-bottom: 4px solid var(--gold-600);
}
.header-nav-row::after {
  display: none;
}
.nav { height: 100%; display: flex; align-items: center; justify-content: center; font-family: 'Microsoft YaHei', 'Noto Sans SC', Arial, sans-serif; font-size: 18px; font-weight: 600; }
.nav a { flex: 1 1 0; min-width: 0; height: 100%; padding: 0 10px; display: flex; align-items: center; justify-content: center; color: #fff; white-space: nowrap; transition: background-color .2s ease, filter .1s ease; }
.nav a:hover,
.nav a:focus-visible { color: #fff; background: #0e7967; }
.nav a:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.nav a:active { filter: brightness(.88); }
.nav a.active { color: #fff; background: #0e7967; }
.btn-login {
  height: 40px; padding: 0 22px; border: none; background: var(--navy-600);
  color: #fff; font-size: 15px; font-weight: 700; border-radius: 8px;
}
.btn-login:hover { background: var(--navy-700); }

/* ---------- 通用按钮 ---------- */
.btn {
  height: 44px; padding: 0 22px; border: none; border-radius: var(--radius);
  font-size: 15px; font-weight: 700; background: var(--navy-600); color: #fff;
}
.btn:hover { background: var(--navy-700); }
.btn-gold { background: var(--gold-600); color: #fff; }
.btn-gold:hover { filter: brightness(0.95); }
.btn-ghost { background: #fff; color: var(--navy-600); border: 1px solid var(--navy-600); }
.btn-block { width: 100%; }

/* ---------- 卡片 ---------- */
.card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-card); }

/* ---------- 区块标题 ---------- */
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 36px 0 16px; }
.section-title { font-size: 24px; font-weight: 700; font-family: 'Noto Serif SC', serif; color: var(--t-title); }
.section-title small { font-size: 14px; color: var(--t-sub); font-weight: 400; margin-left: 8px; }
.section-more { font-size: 14px; color: var(--navy-600); cursor: pointer; }

/* ---------- 课程卡 ---------- */
.course-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.course-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden; cursor: pointer; transition: box-shadow .2s; }
.course-card:hover { box-shadow: var(--shadow-hover); }
.course-cover {
  height: 120px; background: linear-gradient(120deg, var(--navy-700), var(--navy-600));
  position: relative; display: flex; align-items: center; justify-content: center;
}
.course-cover .thumb-image { width: 100%; height: 100%; display: block; object-fit: cover; }
.course-cover .tag {
  position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.2);
  color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 10px;
}
.course-cover .hours {
  position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.4);
  color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 6px;
}
.course-body { padding: 14px; }
.course-name { font-size: 15px; font-weight: 600; color: var(--t-title); line-height: 1.5; height: 45px; overflow: hidden; }
.course-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.course-price { font-size: 16px; font-weight: 700; color: var(--error); }
.course-price.free { color: var(--navy-600); }
.course-stu { font-size: 12px; color: var(--t-sub); }

/* ---------- 页脚 ---------- */
.footer { background: #16221D; padding: 32px 0; color: #667A6F; font-size: 13px; margin-top: 48px; }
.footer a { color: #A7B0BC; }
.footer a:hover { color: #fff; }
.footer-title { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; line-height: 2; }
.footer-copy { border-top: 1px solid #353E4A; padding-top: 16px; margin-top: 20px; }

/* ---------- 面包屑 ---------- */
.crumb { font-size: 13px; color: var(--t-sub); margin-bottom: 14px; }
.crumb a { color: var(--t-sub); }
.crumb a:hover { color: var(--navy-600); }

/* ---------- 加载/空态 ---------- */
.state { text-align: center; padding: 48px 0; color: var(--t-sub); font-size: 14px; }
.spinner {
  width: 28px; height: 28px; border: 3px solid var(--bg-grey); border-top-color: var(--navy-600);
  border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 分页 ---------- */
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pager span, .pager a {
  min-width: 34px; height: 34px; padding: 0 8px; border-radius: 6px; background: #fff;
  border: 1px solid var(--bd); color: var(--t-body); display: flex; align-items: center;
  justify-content: center; font-size: 14px; cursor: pointer;
}
.pager .cur { background: var(--navy-600); color: #fff; border-color: var(--navy-600); font-weight: 700; }
.pager .disabled { color: var(--t-disabled); cursor: not-allowed; }

/* ---------- 标签/胶囊 ---------- */
.chip {
  font-size: 14px; color: var(--t-body); background: #fff; padding: 6px 16px;
  border-radius: 16px; cursor: pointer; border: 1px solid var(--bd-light);
}
.chip.active { background: var(--navy-600); color: #fff; font-weight: 600; border-color: var(--navy-600); }

/* Toast */
.toast {
  position: fixed; left: 50%; top: 80px; transform: translateX(-50%);
  background: rgba(22,27,34,.92); color: #fff; padding: 12px 22px; border-radius: 8px;
  font-size: 14px; z-index: 999; box-shadow: 0 6px 24px rgba(0,0,0,.2);
}

@media (max-width: 900px) {
  .wrap { width: calc(100% - 32px); }
  .header-brand-row .wrap { height: 108px; }
  .brand-logo { width: 76px; height: 76px; }
  .brand-name { font-size: 29px; }
  .brand-sub { font-size: 13px; letter-spacing: 1px; }
  .header-art { right: -120px; opacity: .78; }
  .nav { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .nav a { flex: 0 0 auto; min-width: max-content; padding: 0 22px; }
  .nav::-webkit-scrollbar { display: none; }
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .header-brand-row .wrap { height: 88px; }
  .brand { gap: 10px; }
  .brand-logo { width: 58px; height: 58px; }
  .brand-name { font-size: 23px; letter-spacing: 1px; }
  .brand-sub { margin-top: 4px; font-size: 10px; letter-spacing: .5px; }
  .header-art { right: -300px; opacity: .42; }
  .header-nav-row { height: 58px; }
  .nav { width: calc(100% - 24px); height: 100%; justify-content: flex-start; overflow-x: auto; font-size: 16px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .section-head { flex-wrap: wrap; gap: 8px 16px; }
  .section-title { font-size: 21px; }
  .section-title small { display: block; margin: 4px 0 0; }
  .course-grid { grid-template-columns: 1fr; }
}
