/* ============================================================
   红色征程 · 党史历程 —— 全局样式 base.css
   兼容目标：Edge 90+ / Chrome 90+ / Firefox 88+ / Safari 14+
   ============================================================ */

/* ---------- 基础变量 ---------- */
:root {
  --red:        #c7000b;   /* 主色 · 中国红 */
  --red-dark:   #9a0008;   /* 深红 */
  --red-deep:   #6d0005;   /* 重红（页脚/导航底） */
  --gold:       #d9a036;   /* 金色点缀 */
  --gold-light: #f3d9a4;   /* 浅金 */
  --paper:      #faf6ef;   /* 米白宣纸底 */
  --paper-2:    #f3ecdd;   /* 深一度米白 */
  --ink:        #33302b;   /* 正文墨色 */
  --ink-light:  #6f6a60;   /* 次级文字 */
  --line:       #e5dcc8;   /* 分隔线 */
  --shadow:     0 6px 24px rgba(109, 0, 5, .10);
  --shadow-lg:  0 14px 40px rgba(109, 0, 5, .18);
  --serif: "STZhongsong", "SimSun", "Songti SC", "Noto Serif SC", serif;
  --sans:  "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Heiti SC", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; border: 0; }
a { text-decoration: none; color: inherit; transition: color .25s; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
table { border-collapse: collapse; width: 100%; }

::selection { background: var(--red); color: #fff; }

/* ---------- 通用布局 ---------- */
.container { width: 90%; max-width: 1200px; margin: 0 auto; }

.page-main { padding-bottom: 70px; }

.section { padding: 64px 0; }
.section-alt { background: var(--paper-2); }

/* 区块标题 */
.sec-head { text-align: center; margin-bottom: 44px; }
.sec-head .sec-eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 6px;
  color: var(--gold);
  margin-bottom: 6px;
}
.sec-head h2 {
  font-family: var(--serif);
  font-size: 34px;
  color: var(--red-dark);
  letter-spacing: 4px;
}
.sec-head .sec-line {
  width: 72px; height: 3px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 2px;
}
.sec-head p.sec-desc { color: var(--ink-light); margin-top: 12px; font-size: 15px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: linear-gradient(135deg, var(--red-deep) 0%, var(--red-dark) 55%, var(--red) 100%);
  box-shadow: 0 2px 14px rgba(109, 0, 5, .35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-star {
  width: 36px; height: 36px;
  fill: var(--gold);
  filter: drop-shadow(0 0 6px rgba(243, 217, 164, .55));
  animation: starGlow 3s ease-in-out infinite alternate;
}
@keyframes starGlow {
  from { filter: drop-shadow(0 0 3px rgba(243, 217, 164, .35)); }
  to   { filter: drop-shadow(0 0 9px rgba(243, 217, 164, .75)); }
}
.brand-name {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: 4px;
  color: #fff;
}
.brand-name small {
  display: block;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--gold-light);
  font-family: var(--sans);
}

.main-nav ul { display: flex; }
.main-nav a {
  position: relative;
  display: block;
  padding: 0 20px;
  line-height: 68px;
  color: rgba(255, 255, 255, .88);
  font-size: 16px;
  letter-spacing: 2px;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 12px;
  width: 0; height: 3px;
  background: var(--gold);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width .3s;
}
.main-nav a:hover { color: #fff; }
.main-nav a:hover::after { width: 60%; }
.main-nav a.active { color: var(--gold-light); font-weight: bold; }
.main-nav a.active::after { width: 60%; }

/* 移动端汉堡按钮 */
.nav-toggle { display: none; width: 42px; height: 42px; position: relative; }
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  margin: 5px auto;
  background: #fff;
  transition: transform .3s, opacity .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 页脚 ---------- */
.site-footer {
  background: linear-gradient(135deg, var(--red-deep), var(--red-dark));
  color: rgba(255, 255, 255, .85);
  padding: 36px 0 28px;
  text-align: center;
}
.site-footer .foot-slogan {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 6px;
  color: var(--gold-light);
  margin-bottom: 10px;
}
.site-footer .foot-line {
  width: 60px; height: 2px;
  background: var(--gold);
  margin: 0 auto 14px;
}
.site-footer p { font-size: 13px; line-height: 2; }
.site-footer a { color: var(--gold-light); }

/* ---------- 返回顶部 ---------- */
.back-top {
  position: fixed;
  right: 26px; bottom: 30px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 20px;
  line-height: 46px;
  text-align: center;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all .35s;
  z-index: 950;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--red-dark); transform: translateY(-3px); }

/* ---------- 滚动渐入动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: .12s; }
.reveal-d2 { transition-delay: .24s; }
.reveal-d3 { transition-delay: .36s; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-block;
  padding: 10px 34px;
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: 3px;
  transition: all .3s;
}
.btn-red {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  box-shadow: 0 6px 16px rgba(199, 0, 11, .3);
}
.btn-red:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(199, 0, 11, .4); color: #fff; }
.btn-ghost {
  border: 1px solid var(--gold);
  color: var(--gold);
}
.btn-ghost:hover { background: var(--gold); color: #fff; }

/* ---------- 面包屑 ---------- */
.crumb {
  padding: 14px 0 0;
  font-size: 13px;
  color: var(--ink-light);
}
.crumb a { color: var(--ink-light); }
.crumb a:hover { color: var(--red); }
.crumb .cur { color: var(--red); }

/* ---------- 内页顶部横幅 ---------- */
.page-hero {
  position: relative;
  padding: 58px 0 50px;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(109, 0, 5, .92), rgba(154, 0, 8, .85)),
    url("../images/gallery/star.jpg") center/cover no-repeat;
}
.page-hero h1 {
  font-family: var(--serif);
  font-size: 40px;
  letter-spacing: 8px;
}
.page-hero .ph-sub {
  margin-top: 10px;
  font-size: 15px;
  letter-spacing: 3px;
  color: var(--gold-light);
}
.page-hero .ph-deco {
  margin-top: 16px;
  display: flex; justify-content: center; gap: 8px;
}
.page-hero .ph-deco i {
  width: 8px; height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: .8;
}

/* ---------- 模态框 / 灯箱通用 ---------- */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(20, 8, 8, .78);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-mask.open { display: flex; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .main-nav {
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--red-dark);
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,.25);
  }
  .main-nav.open { max-height: 480px; }
  .main-nav ul { flex-direction: column; padding: 8px 0; }
  .main-nav a { line-height: 48px; padding: 0 26px; }
  .nav-toggle { display: block; }
  .brand-name { font-size: 20px; }
  .sec-head h2 { font-size: 26px; }
  .page-hero h1 { font-size: 30px; letter-spacing: 5px; }
  .section { padding: 44px 0; }
}
