/* ============================================
   西安陈氏太极拳研究会 - 全站样式（故宫博物院官网风格）
   ============================================ */
/* 开源免费字体（OFL 授权，可免费商用）：标题思源宋体 + 正文思源黑体 */
@font-face {
  font-family: 'Noto Serif SC';
  src: url('/fonts/noto-serif-sc.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Serif SC';
  src: url('/fonts/noto-serif-sc-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans SC';
  src: url('/fonts/noto-sans-sc-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans SC';
  src: url('/fonts/noto-sans-sc-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f8f5f0;          /* 玉白 */
  --paper-deep: #f3efe7;     /* 暖白 */
  --ink: #1a1a1a;            /* 墨色 */
  --ink-light: #4a4a4a;      /* 正文灰 */
  --cinnabar: #9b2d26;       /* 故宫红（朱红） */
  --cinnabar-dark: #6e1f1a;  /* 深红 */
  --gold: #b89a67;           /* 故宫金 */
  --gold-light: #d8c196;     /* 浅金 */
  --gray: #8c8c8c;           /* 辅助灰 */
  --jade: #6b8e84;           /* 瓷青 */
  --line: #ddd8ce;           /* 线框灰 */
  --white: #fff;
  --radius: 2px;
  --shadow: 0 2px 12px rgba(26, 26, 26, 0.08);
  --font-kai: 'Noto Serif SC', 'SimSun', 'Songti SC', serif;
  --font-song: 'Noto Serif SC', 'SimSun', 'Songti SC', serif;
  --font-body: 'Noto Sans SC', 'Noto Serif SC', 'SimSun', 'Songti SC', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.75;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- 通用区块标题 ---------- */
.section {
  padding: 64px 0;
}
.section-head {
  text-align: center;
  margin-bottom: 40px;
}
.section-head .cn {
  font-family: var(--font-kai);
  font-size: 34px;
  letter-spacing: 8px;
  color: var(--ink);
  position: relative;
  display: inline-block;
  padding: 0 24px;
}
.section-head .cn::before,
.section-head .cn::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.section-head .cn::before { right: 100%; }
.section-head .cn::after { left: 100%; background: linear-gradient(90deg, var(--gold), transparent); }
.section-head .en {
  font-family: var(--font-song);
  font-size: 12px;
  letter-spacing: 6px;
  color: var(--gray);
  margin-top: 6px;
  text-transform: uppercase;
}
.section-head .sub {
  max-width: 640px;
  margin: 14px auto 0;
  color: var(--ink-light);
  font-size: 14px;
}

/* ---------- 顶部信息栏 / 主导航 ----------
   已统一迁移到 /css/site-header.css（由 /js/site-header.js 渲染），
   全站共用一份，本文件不再保留旧导航样式。 */

/* ---------- Hero Banner ---------- */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 75% 20%, rgba(184,145,63,0.16), transparent 45%),
    radial-gradient(ellipse at 15% 85%, rgba(160,50,42,0.12), transparent 40%),
    linear-gradient(160deg, #1d1a16 0%, #33291f 45%, #241f19 100%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='1'%3E%3Ccircle cx='60' cy='60' r='40'/%3E%3Ccircle cx='60' cy='60' r='28'/%3E%3Cpath d='M60 12 L60 108 M12 60 L108 60 M26 26 L94 94 M26 94 L94 26'/%3E%3C/g%3E%3C/svg%3E");
  opacity: .6;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, #241f19 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding: 80px 20px;
  max-width: 900px;
}
.hero .seal {
  font-family: var(--font-kai);
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 10px;
  border: 1px solid var(--gold);
  padding: 6px 18px;
  display: inline-block;
  margin-bottom: 26px;
  transform: rotate(-1.5deg);
  background: rgba(184,145,63,0.08);
}
.hero h1 {
  font-family: var(--font-kai);
  font-size: clamp(38px, 6vw, 64px);
  letter-spacing: 14px;
  color: #fdf8ec;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
  margin-bottom: 18px;
}
.hero .hero-sub {
  color: #d8cdb8;
  font-size: 18px;
  letter-spacing: 4px;
  margin-bottom: 40px;
  font-family: var(--font-song);
}
.hero-btns { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 12px 34px;
  font-size: 15px;
  letter-spacing: 3px;
  border: 1px solid var(--cinnabar);
  color: #fff;
  background: var(--cinnabar);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .25s;
  font-family: var(--font-body);
}
.btn:hover { background: var(--cinnabar-dark); border-color: var(--cinnabar-dark); }
.btn-ghost {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
}
.btn-ghost:hover { background: var(--gold); color: #fff; }
.btn-ink { background: var(--ink); border-color: var(--ink); }
.btn-ink:hover { background: #1c1915; }

/* ---------- 公告栏 ---------- */
.announce {
  background: linear-gradient(90deg, var(--cinnabar), var(--cinnabar-dark));
  color: #fff;
  padding: 12px 0;
  font-size: 14px;
  letter-spacing: 1px;
}
.announce .container { display: flex; align-items: center; gap: 16px; }
.announce .tag {
  background: rgba(255,255,255,0.18);
  padding: 2px 14px;
  border-radius: 2px;
  font-size: 13px;
  flex-shrink: 0;
  letter-spacing: 2px;
}
.announce .text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ---------- 关于 / 养生理念 ---------- */
.about-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-visual {
  position: relative;
  border: 1px solid var(--line);
  padding: 14px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.about-visual::before {
  content: '';
  position: absolute;
  top: -8px; left: -8px; right: 8px; bottom: 8px;
  border: 1px solid var(--gold);
  z-index: 0;
}
.about-visual img { position: relative; z-index: 1; width: 100%; height: 380px; object-fit: cover; }
.about-text h3 {
  font-family: var(--font-kai);
  font-size: 26px;
  letter-spacing: 4px;
  margin-bottom: 18px;
  color: var(--ink);
}
.about-text p { color: var(--ink-light); margin-bottom: 14px; text-indent: 2em; }
.feature-list { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feature-list li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--ink);
  background: var(--paper-deep);
  padding: 10px 14px;
  border-left: 3px solid var(--gold);
}
.feature-list li::before { content: '●'; color: var(--cinnabar); font-size: 8px; }

/* ---------- 统计数据 ---------- */
.stats {
  background: var(--ink);
  color: #eee;
  position: relative;
  overflow: hidden;
}
.stats::before {
  content: '';
  position: absolute;
  right: -60px; bottom: -80px;
  width: 320px; height: 320px;
  border: 1px solid rgba(184,145,63,0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 40px rgba(184,145,63,0.05), 0 0 0 80px rgba(184,145,63,0.03);
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; position: relative; z-index: 1; }
.stat-item { text-align: center; padding: 20px 0; }
.stat-item .num {
  font-family: var(--font-kai);
  font-size: 52px;
  color: var(--gold);
  line-height: 1.2;
}
.stat-item .label { font-size: 14px; letter-spacing: 4px; color: #b9b0a0; margin-top: 6px; }

/* ---------- 培训课程 ---------- */
.courses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.course {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px 22px;
  text-align: center;
  transition: transform .3s, box-shadow .3s;
  position: relative;
}
.course::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 0; height: 3px;
  background: var(--cinnabar);
  transition: width .3s;
}
.course:hover { transform: translateY(-6px); box-shadow: 0 10px 26px rgba(47,43,38,0.14); }
.course:hover::after { width: 70%; }
.course-icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--paper);
  color: var(--cinnabar);
  font-family: var(--font-kai);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.course h3 { font-family: var(--font-kai); font-size: 19px; letter-spacing: 2px; margin-bottom: 10px; }
.course p { font-size: 13px; color: var(--gray); min-height: 42px; }
.course-meta {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--gold);
  display: flex;
  justify-content: center;
  gap: 14px;
}

/* ---------- 卡片网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 10px 28px rgba(47,43,38,0.14); }
.card-media {
  position: relative;
  height: 210px;
  overflow: hidden;
  background: var(--paper-deep);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.06); }
.card-media .tag-pos {
  position: absolute;
  left: 12px; top: 12px;
  background: var(--cinnabar);
  color: #fff;
  font-size: 12px;
  padding: 2px 10px;
  letter-spacing: 1px;
  border-radius: 2px;
}
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 16px; letter-spacing: 1px; margin-bottom: 8px; line-height: 1.5; }
.card-body h3 a:hover { color: var(--cinnabar); }
.card-body p { font-size: 13px; color: var(--gray); flex: 1; }
.card-meta {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-meta .author { color: var(--cinnabar); }

/* 视频卡片 */
.video-card .card-media { height: 190px; }
.video-card .play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.video-card .play-icon span {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(32,28,24,0.55);
  border: 2px solid rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  transition: all .3s;
}
.video-card .play-icon span::after {
  content: '';
  border-left: 16px solid #fff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 4px;
}
.video-card:hover .play-icon span { background: var(--cinnabar); border-color: var(--cinnabar); transform: scale(1.1); }

/* 图片墙 */
.masonry { columns: 3; column-gap: 20px; }
.masonry .g-item {
  break-inside: avoid;
  margin-bottom: 20px;
  position: relative;
  border: 1px solid var(--line);
  background: var(--white);
  overflow: hidden;
  border-radius: var(--radius);
}
.masonry .g-item img { width: 100%; transition: transform .5s; }
.masonry .g-item:hover img { transform: scale(1.05); }
.masonry .g-cap {
  position: absolute;
  inset: auto 0 0 0;
  background: linear-gradient(transparent, rgba(20,17,14,0.85));
  color: #fff;
  padding: 30px 16px 12px;
  font-size: 13px;
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity .3s;
}
.masonry .g-item:hover .g-cap { opacity: 1; }

/* ---------- 名师 ---------- */
.teachers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.teacher {
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 22px 16px 18px;
  border-radius: var(--radius);
  transition: transform .3s, box-shadow .3s;
}
.teacher:hover { transform: translateY(-6px); box-shadow: 0 10px 26px rgba(47,43,38,0.14); }
.teacher .avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  margin: 0 auto 14px;
  border: 3px solid var(--gold);
  overflow: hidden;
  background: var(--paper-deep);
}
.teacher .avatar img { width: 100%; height: 100%; object-fit: cover; }
.teacher .avatar.no-img {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-kai);
  font-size: 34px;
  color: var(--cinnabar);
}
.teacher h3 { font-family: var(--font-kai); font-size: 20px; letter-spacing: 3px; }
.teacher .title { font-size: 12px; color: var(--gold); letter-spacing: 2px; margin: 4px 0 10px; }
.teacher p { font-size: 12px; color: var(--gray); }

/* ---------- CTA 报名 ---------- */
.cta {
  background: linear-gradient(135deg, var(--cinnabar), #6d2019);
  color: #fff;
  text-align: center;
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '武';
  position: absolute;
  left: 4%; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-kai);
  font-size: 260px;
  color: rgba(255,255,255,0.06);
  line-height: 1;
}
.cta h2 { font-family: var(--font-kai); font-size: 32px; letter-spacing: 8px; margin-bottom: 12px; position: relative; z-index: 1; }
.cta p { letter-spacing: 2px; opacity: .9; margin-bottom: 26px; position: relative; z-index: 1; }
.cta-contact {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 26px;
  font-size: 15px;
  letter-spacing: 1px;
}
.cta-contact span {
  border: 1px solid rgba(255,255,255,0.35);
  padding: 8px 18px;
  border-radius: 2px;
  background: rgba(255,255,255,0.08);
}
.cta-contact b { color: var(--gold); }

/* ---------- 页脚 ---------- */
.footer { background: #1c1915; color: #b0a797; font-size: 13px; }
.footer-main {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0 36px;
}
.footer h4 {
  font-family: var(--font-kai);
  font-size: 17px;
  color: #e6ddca;
  letter-spacing: 3px;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 10px;
}
.footer h4::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 36px; height: 2px;
  background: var(--gold);
}
.footer p { line-height: 2; }
.footer .links li { margin-bottom: 8px; }
.footer .links a:hover { color: var(--gold); }
.footer .contact li { margin-bottom: 8px; display: flex; gap: 8px; align-items: flex-start; }
.footer .contact .k { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 16px 0;
  text-align: center;
  color: #6f675c;
  font-size: 12px;
}

/* ---------- 页面横幅（内页） ---------- */
.page-hero {
  background: linear-gradient(135deg, #241f19, #4a3a2a);
  color: #fff;
  padding: 54px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.04'%3E%3Ccircle cx='60' cy='60' r='40'/%3E%3Cpath d='M60 12 L60 108 M12 60 L108 60'/%3E%3C/g%3E%3C/svg%3E");
}
.page-hero h1 {
  font-family: var(--font-kai);
  font-size: 38px;
  letter-spacing: 10px;
  position: relative;
  z-index: 1;
}
.page-hero .crumb {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 2px;
}
.page-hero .crumb a { color: #cfc5b2; }
.page-hero .crumb a:hover { color: var(--gold); }

/* ---------- 列表筛选 ---------- */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.filter-bar .f-btn {
  padding: 7px 22px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink-light);
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: 2px;
  transition: all .2s;
}
.filter-bar .f-btn:hover { border-color: var(--cinnabar); color: var(--cinnabar); }
.filter-bar .f-btn.active {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
  color: #fff;
}
.empty-tip {
  text-align: center;
  color: var(--gray);
  padding: 80px 0;
  font-size: 15px;
  letter-spacing: 2px;
}

/* ---------- 文章详情 ---------- */
.article-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 34px;
  padding: 40px 0 60px;
}
.article-content {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 40px 44px;
  border-radius: var(--radius);
}
.article-content h1 {
  font-family: var(--font-kai);
  font-size: 30px;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.article-content .meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--gray);
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px dashed var(--line);
  flex-wrap: wrap;
}
.article-content .meta .cat { color: var(--cinnabar); }
.article-content .cover-img {
  margin-bottom: 26px;
  border: 1px solid var(--line);
}
.article-content .body {
  font-size: 15.5px;
  color: #3d382f;
  line-height: 2;
}
.article-content .body p { margin-bottom: 18px; text-indent: 2em; }
.article-content .body h3 {
  font-family: var(--font-kai);
  font-size: 20px;
  margin: 26px 0 12px;
  color: var(--cinnabar);
  letter-spacing: 2px;
}
.article-content .body img { margin: 16px auto; border: 1px solid var(--line); }
.article-content .body blockquote {
  border-left: 3px solid var(--gold);
  background: var(--paper);
  padding: 14px 20px;
  margin: 18px 0;
  color: var(--ink-light);
  font-family: var(--font-kai);
  font-size: 15px;
}
.article-side { display: flex; flex-direction: column; gap: 24px; }
.side-box {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: var(--radius);
}
.side-box h3 {
  font-family: var(--font-kai);
  font-size: 17px;
  letter-spacing: 3px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--cinnabar);
  display: inline-block;
}
.side-box .side-list li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.side-box .side-list li:last-child { border-bottom: none; }
.side-box .side-list a:hover { color: var(--cinnabar); }
.side-box .side-list .d { font-size: 12px; color: var(--gray); }

/* ---------- 文章上下篇导航 ---------- */
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.article-nav a {
  flex: 1;
  min-width: 200px;
  font-size: 14px;
  color: var(--ink-light);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: var(--radius);
  transition: all .2s;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.article-nav a:hover { border-color: var(--cinnabar); color: var(--cinnabar); }
.article-nav a.next { text-align: right; }

/* ---------- 视频详情 ---------- */
.video-player {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 26px;
}
.video-player video { width: 100%; max-height: 540px; display: block; }
.video-info h1 { font-family: var(--font-kai); font-size: 26px; letter-spacing: 2px; margin: 16px 0 10px; }
.video-info .desc { color: var(--ink-light); }

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
  border-radius: 2px;
  transition: all .2s;
}
.pagination a:hover { border-color: var(--cinnabar); color: var(--cinnabar); }
.pagination .current { background: var(--cinnabar); border-color: var(--cinnabar); color: #fff; }

/* ---------- 加载提示 ---------- */
.loading-tip {
  text-align: center;
  color: var(--gray);
  padding: 60px 0;
  letter-spacing: 3px;
}
.loading-tip::before {
  content: '';
  display: block;
  width: 30px; height: 30px;
  margin: 0 auto 14px;
  border: 3px solid var(--line);
  border-top-color: var(--cinnabar);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 页脚锚点 ---------- */
.backtop {
  position: fixed;
  right: 26px; bottom: 30px;
  width: 42px; height: 42px;
  background: var(--ink);
  color: #e6ddca;
  border: 1px solid var(--gold);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transition: all .3s;
  z-index: 99;
}
.backtop.show { opacity: 1; visibility: visible; }
.backtop:hover { background: var(--cinnabar); }

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
  .about-wrap, .article-main { grid-template-columns: 1fr; }
  .teachers { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .courses { grid-template-columns: repeat(2, 1fr); }
  .masonry { columns: 2; }
  .footer-main { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 768px) {
  .grid, .teachers, .stats-grid { grid-template-columns: 1fr; }
  .masonry { columns: 1; }
  .hero { min-height: 440px; }
  .hero h1 { letter-spacing: 6px; }
  .article-content { padding: 24px 20px; }
  .section { padding: 44px 0; }
  .feature-list { grid-template-columns: 1fr; }
}

/* ============================================
   文章正文富文本排版（对齐后台 Quill 编辑器的输出）
   说明：后台工具栏产出的对齐 / 缩进是 ql-align-* / ql-indent-* 类名，
        字号 / 颜色 / 背景色是行内 style —— 前台需要对应的 CSS 才能显示出来。
   ============================================ */
.article-content .body { overflow-wrap: break-word; word-break: break-word; }
.article-content .body img { max-width: 100%; height: auto; }
.article-content .body h1,
.article-content .body h2,
.article-content .body h4,
.article-content .body h5,
.article-content .body h6 {
  font-family: var(--font-kai, "STKaiti", "KaiTi", serif);
  margin: 26px 0 12px;
  color: var(--cinnabar, #a02c2c);
  letter-spacing: 2px;
  line-height: 1.6;
}
.article-content .body h1 { font-size: 26px; }
.article-content .body h2 { font-size: 23px; }
.article-content .body h4 { font-size: 18px; }
.article-content .body h5 { font-size: 16px; }
.article-content .body h6 { font-size: 15px; }
.article-content .body ul { list-style: disc; margin: 0 0 18px; padding-left: 1.7em; }
.article-content .body ol { list-style: decimal; margin: 0 0 18px; padding-left: 1.7em; }
.article-content .body ul ul { list-style: circle; }
.article-content .body li { margin-bottom: 6px; text-indent: 0; }
/* 兼容部分 Quill 版本把列表类型写在 li 上的写法 */
.article-content .body li[data-list="bullet"] { list-style: disc; }
.article-content .body li[data-list="ordered"] { list-style: decimal; }
.article-content .body hr { border: 0; border-top: 1px dashed var(--line, #ddd6c8); margin: 26px 0; }
.article-content .body a { color: var(--cinnabar, #a02c2c); text-decoration: underline; word-break: break-all; }
.article-content .body code {
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 13.5px;
  background: var(--paper, #f7f3ea);
  border: 1px solid var(--line, #ddd6c8);
  border-radius: 3px;
  padding: 1px 5px;
}
.article-content .body pre {
  background: #2f2b26;
  color: #f3ede2;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 13.5px;
  line-height: 1.75;
  padding: 16px 18px;
  border-radius: 5px;
  overflow-x: auto;
  margin: 0 0 18px;
}
.article-content .body pre code { background: none; border: 0; padding: 0; color: inherit; }
/* Quill 对齐（左 / 居中 / 右 / 两端） */
.article-content .body .ql-align-center { text-align: center; }
.article-content .body .ql-align-right { text-align: right; }
.article-content .body .ql-align-justify { text-align: justify; }
/* Quill 缩进 */
.article-content .body .ql-indent-1 { padding-left: 2em; }
.article-content .body .ql-indent-2 { padding-left: 4em; }
.article-content .body .ql-indent-3 { padding-left: 6em; }
.article-content .body .ql-indent-4 { padding-left: 8em; }
.article-content .body .ql-indent-5 { padding-left: 10em; }
/* 已设置对齐的段落不再套用首行缩进，否则居中/右对齐会偏移 */
.article-content .body p.ql-align-center,
.article-content .body p.ql-align-right,
.article-content .body p.ql-align-justify,
.article-content .body h1.ql-align-center, .article-content .body h1.ql-align-right, .article-content .body h1.ql-align-justify,
.article-content .body h2.ql-align-center, .article-content .body h2.ql-align-right, .article-content .body h2.ql-align-justify,
.article-content .body h3.ql-align-center, .article-content .body h3.ql-align-right, .article-content .body h3.ql-align-justify { text-indent: 0; }
/* 内嵌图片（base64）与超长内容不撑破布局 */
.article-content .body table { max-width: 100%; }
/* 图片地址失效时的友好占位（由 article.html 替换生成），避免出现裂图 */
.article-content .body .img-failed {
  display: block;
  margin: 16px auto;
  padding: 22px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--gray, #8b8378);
  background: var(--paper, #f7f3ea);
  border: 1px dashed var(--line, #ddd6c8);
  border-radius: 5px;
}
@media (max-width: 480px) {
  .article-content .body { font-size: 15px; line-height: 1.9; }
  .article-content .body h1 { font-size: 22px; }
  .article-content .body h2 { font-size: 20px; }
  .article-content .body pre { padding: 12px 12px; font-size: 12.5px; }
  .article-content .body .ql-indent-1 { padding-left: 1.2em; }
  .article-content .body .ql-indent-2 { padding-left: 2.4em; }
  .article-content .body .ql-indent-3 { padding-left: 3.6em; }
  .article-content .body .ql-indent-4 { padding-left: 4.8em; }
  .article-content .body .ql-indent-5 { padding-left: 6em; }
}


.footer-bottom a.icp { color: inherit; text-decoration: none; }
.footer-bottom a.icp:hover { color: var(--gold); text-decoration: underline; }
