/* ============================================================
   白沙起义纪念园官网样式
   设计基调：庄重红色纪念风格 —— 中国红 + 米金 + 墨灰
   移动优先，断点：576 / 768 / 992 / 1200
   ============================================================ */

:root {
  --red-900: #7a1420;
  --red-700: #a61b29;
  --red-600: #c0303d;
  --red-050: #fdf1f0;
  --gold-500: #c8a45c;
  --gold-300: #e3cfa0;
  --ink-900: #2b2320;
  --ink-700: #55483f;
  --ink-500: #8a7d72;
  --paper: #faf7f2;
  --white: #ffffff;
  --border: #e8e0d5;
  --error: #c0392b;
  --ok: #1e7e4e;

  --shadow-sm: 0 2px 8px rgba(43, 35, 32, .08);
  --shadow-md: 0 8px 24px rgba(43, 35, 32, .12);
  --radius: 12px;

  --font-serif: "Noto Serif SC", "Source Han Serif SC", "STZhongsong", "SimSun", serif;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

h1, h2, h3, .brand-text strong { font-family: var(--font-serif); }

/* ---------- 焦点可见性（无障碍） ---------- */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
}

/* ================= 顶部导航 ================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(122, 20, 32, .92);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--gold-500);
  color: var(--red-900);
  font-family: var(--font-serif);
  font-size: 20px; font-weight: 700;
  border-radius: 8px;
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { color: var(--white); font-size: 17px; letter-spacing: 1px; }
.brand-text small { color: var(--gold-300); font-size: 11px; }

.nav-toggle {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 10px; cursor: pointer;
}
.nav-toggle span {
  width: 24px; height: 2px; background: var(--white);
  border-radius: 2px; transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--red-900);
  display: none;
  flex-direction: column;
  padding: 8px 16px 16px;
  box-shadow: var(--shadow-md);
}
.site-nav.open { display: flex; }
.site-nav .nav-link {
  color: var(--white); text-decoration: none;
  padding: 12px 8px; font-size: 15px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.site-nav .nav-link:last-child { border-bottom: 0; }
.site-nav .btn-reserve {
  margin-top: 10px;
  text-align: center;
  background: var(--gold-500); color: var(--red-900);
  border-radius: 8px; font-weight: 600;
}

/* ================= 首屏 ================= */
.hero { position: relative; min-height: 92vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(43,20,15,.25) 0%, rgba(43,20,15,.55) 55%, rgba(60,15,18,.88) 100%);
}
.hero-content { position: relative; z-index: 1; padding: 48px 16px 56px; color: var(--white); }
.hero-eyebrow {
  display: inline-block;
  font-size: 13px; letter-spacing: 4px;
  color: var(--gold-300);
  border: 1px solid rgba(227,207,160,.5);
  padding: 4px 14px; border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 { font-size: 40px; letter-spacing: 6px; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.hero-slogan {
  margin-top: 12px;
  color: var(--gold-300);
  font-family: var(--font-serif);
  font-size: 17px; letter-spacing: 3px;
}
.hero-desc { margin-top: 14px; max-width: 640px; font-size: 15px; color: rgba(255,255,255,.88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ================= 按钮 ================= */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  border: 0;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--red-700); color: var(--white); }
.btn-primary:hover { background: var(--red-600); }
.btn-ghost {
  background: rgba(255,255,255,.12); color: var(--white);
  border: 1px solid rgba(255,255,255,.55);
}
.btn-ghost-light {
  display: inline-block; margin-top: 20px;
  color: var(--gold-300); text-decoration: none;
  border: 1px solid rgba(227,207,160,.5);
  padding: 10px 20px; border-radius: 10px; font-size: 14px;
}
.btn-block { width: 100%; }

/* ================= 数据带 ================= */
.stats-band { background: var(--red-900); color: var(--white); padding: 28px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 12px; text-align: center; }
.stat-item strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 26px; color: var(--gold-300);
}
.stat-item span { font-size: 13px; color: rgba(255,255,255,.75); }

/* ================= 通用区块 ================= */
.section { padding: 64px 0; }
.section-alt { background: var(--white); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-eyebrow {
  color: var(--red-700); font-size: 13px;
  letter-spacing: 4px; margin-bottom: 6px;
}
.section-head h2 { font-size: 26px; letter-spacing: 2px; }
.section-head h2::after {
  content: "";
  display: block; width: 48px; height: 3px;
  background: var(--gold-500);
  margin: 14px auto 0; border-radius: 2px;
}

/* ================= 起义历史 ================= */
.history-layout { display: grid; gap: 28px; }
.history-figure { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.history-figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 4; }
.history-figure figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 10px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: var(--white); font-size: 13px; text-align: center;
}
.history-text p { margin-bottom: 14px; color: var(--ink-700); }
.history-text blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  background: var(--red-050);
  border-left: 4px solid var(--red-700);
  border-radius: 0 8px 8px 0;
  color: var(--ink-900); font-size: 15px;
}
.spirit-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.spirit-tags li {
  padding: 6px 16px;
  background: var(--red-700); color: var(--white);
  border-radius: 999px; font-size: 14px; letter-spacing: 2px;
}

/* ================= 景点卡片 ================= */
.scenic-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.scenic-card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.scenic-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.scenic-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.scenic-body { padding: 18px; }
.scenic-body h3 { font-size: 18px; margin-bottom: 8px; color: var(--red-900); }
.scenic-body p { font-size: 14px; color: var(--ink-500); }

/* ================= 图集 ================= */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery-item {
  border: 0; padding: 0; cursor: pointer;
  border-radius: 10px; overflow: hidden;
  background: none;
  position: relative;
}
.gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .3s ease; }
.gallery-item:hover img { transform: scale(1.05); }

/* ================= 参观指南 ================= */
.guide-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.guide-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.guide-card h3 { font-size: 16px; margin-bottom: 8px; color: var(--red-900); }
.guide-card p { font-size: 14px; color: var(--ink-700); }

/* ================= 预约区块 ================= */
.reserve-section {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(200,164,92,.25), transparent),
    linear-gradient(160deg, var(--red-900), var(--red-700));
  color: var(--white);
}
.reserve-layout { display: grid; gap: 32px; }
.reserve-intro h2 { font-size: 26px; letter-spacing: 2px; margin-bottom: 14px; }
.reserve-intro > p { color: rgba(255,255,255,.85); font-size: 15px; }
.reserve-tips { list-style: none; margin-top: 16px; }
.reserve-tips li {
  padding: 6px 0 6px 26px;
  position: relative;
  font-size: 14px; color: rgba(255,255,255,.85);
}
.reserve-tips li::before {
  content: "✓";
  position: absolute; left: 0;
  color: var(--gold-300); font-weight: 700;
}
.reserve-intro .section-eyebrow { color: var(--gold-300); }

.reserve-form {
  background: var(--white);
  color: var(--ink-900);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow-md);
}
.reserve-form h3 { font-size: 18px; color: var(--red-900); margin-bottom: 18px; text-align: center; }

.form-row { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
.form-field { margin-bottom: 16px; }
.form-field label {
  display: block;
  font-size: 14px; font-weight: 600;
  margin-bottom: 6px;
}
.form-field label span { color: var(--error); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 11px 12px;
  font-size: 15px; font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink-900);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--red-600);
  box-shadow: 0 0 0 3px rgba(192, 48, 61, .15);
  outline: none;
}
.form-field textarea { resize: vertical; }
.field-error { margin-top: 5px; font-size: 13px; color: var(--error); }
.form-field.invalid input,
.form-field.invalid select { border-color: var(--error); }
.form-privacy { margin-top: 12px; font-size: 12px; color: var(--ink-500); text-align: center; }
#submitBtn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ================= 页脚 ================= */
.site-footer { background: #241417; color: rgba(255,255,255,.75); padding: 36px 0; font-size: 14px; }
.footer-inner { display: grid; gap: 20px; }
.footer-brand strong { display: block; color: var(--white); font-family: var(--font-serif); font-size: 18px; margin-bottom: 8px; letter-spacing: 2px; }
.footer-info p { margin: 3px 0; }

/* ================= 弹窗 ================= */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(20, 10, 10, .6); }
.modal-card {
  position: relative;
  background: var(--white);
  border-radius: 16px;
  padding: 32px 24px 24px;
  max-width: 380px; width: 100%;
  text-align: center;
  box-shadow: var(--shadow-md);
  animation: popIn .25s ease;
}
@keyframes popIn { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-icon {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  background: #e7f5ee; color: var(--ok);
  font-size: 32px; font-weight: 700;
  border-radius: 50%;
}
.modal-card h3 { font-size: 20px; color: var(--red-900); margin-bottom: 8px; }
.modal-card p { font-size: 14px; color: var(--ink-700); }
.modal-no { margin-top: 8px; font-weight: 700; color: var(--red-700) !important; letter-spacing: 1px; }
.modal-card .btn { margin-top: 20px; }

.lightbox-body { position: relative; max-width: min(920px, 94vw); }
.lightbox-body img { width: 100%; max-height: 82vh; object-fit: contain; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: -44px; right: 0;
  background: none; border: 0;
  color: var(--white); font-size: 34px;
  cursor: pointer; line-height: 1;
}

/* ================= 荣誉资质带 ================= */
.honor-band { background: var(--white); border-bottom: 1px solid var(--border); padding: 22px 0; }
.honor-list {
  list-style: none;
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 10px;
}
.honor-list li {
  font-size: 13px; color: var(--red-900);
  background: var(--red-050);
  border: 1px solid rgba(166, 27, 41, .18);
  padding: 6px 16px; border-radius: 999px;
  letter-spacing: 1px;
}

/* ================= 历史沿革时间线 ================= */
.sub-title {
  font-family: var(--font-serif);
  font-size: 20px; color: var(--red-900);
  letter-spacing: 2px;
  margin: 52px 0 26px;
  padding-left: 12px;
  border-left: 4px solid var(--gold-500);
}
/* 桌面端：中轴时间线，条目左右交替对齐 */
.timeline { list-style: none; position: relative; padding: 6px 0; }
.timeline::before {
  content: "";
  position: absolute; left: 50%; top: 6px; bottom: 6px;
  width: 2px; transform: translateX(-50%);
  background: linear-gradient(var(--red-700), var(--gold-500));
  border-radius: 2px;
}
.timeline-item { position: relative; width: 50%; padding: 0 40px 30px 0; text-align: right; }
.timeline-item:nth-child(even) { margin-left: 50%; padding: 0 0 30px 40px; text-align: left; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute; top: 6px; right: -8px;
  width: 12px; height: 12px;
  background: var(--red-700);
  border: 3px solid var(--paper);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--red-700);
}
.timeline-item:nth-child(even)::before { right: auto; left: -8px; }
.timeline-item strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 16px; color: var(--red-900);
}
.timeline-item span { font-size: 14px; color: var(--ink-700); }

@media (max-width: 767px) {
  /* 手机端：退回左侧单列时间线 */
  .timeline { padding-left: 26px; }
  .timeline::before { left: 7px; transform: none; }
  .timeline-item,
  .timeline-item:nth-child(even) {
    width: auto; margin-left: 0;
    padding: 0 0 20px 12px; text-align: left;
  }
  .timeline-item::before,
  .timeline-item:nth-child(even)::before { right: auto; left: -26px; }
}

/* ================= 人物版块 ================= */
.person-layout .history-figure img { aspect-ratio: 4 / 3; }

/* ================= 馆藏 / 研学网格微调 ================= */
@media (min-width: 768px) {
  .collection-grid { grid-template-columns: repeat(3, 1fr); }
  .research-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .research-grid { grid-template-columns: repeat(4, 1fr); }
  .research-grid .scenic-body p { font-size: 13px; }
}

/* ================= 断点增强 ================= */
@media (min-width: 576px) {
  .hero h1 { font-size: 48px; }
  .form-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
  .section { padding: 88px 0; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .section-head h2 { font-size: 30px; }
  .history-layout { grid-template-columns: 5fr 7fr; align-items: start; }
  .history-figure img { aspect-ratio: 3 / 3.6; }
  .scenic-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .reserve-layout { grid-template-columns: 5fr 7fr; align-items: start; }
  .reserve-form { padding: 32px; }
}

@media (min-width: 992px) {
  .hero { min-height: 100vh; align-items: center; }
  .hero-content { padding-bottom: 96px; }
  .hero h1 { font-size: 60px; }
  .scenic-grid { grid-template-columns: repeat(3, 1fr); }
  .guide-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1200px) {
  .gallery-grid { grid-template-columns: repeat(6, 1fr); }
  .gallery-item img { aspect-ratio: 3 / 4; }
}

/* 桌面端导航（≥768 显示横向菜单） */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    background: none;
    padding: 0;
    box-shadow: none;
  }
  .site-nav .nav-link {
    border-bottom: 0;
    padding: 8px 14px;
    border-radius: 8px;
    position: relative;
  }
  .site-nav .nav-link:hover { background: rgba(255,255,255,.12); }
  .site-nav .btn-reserve { margin: 0 0 0 8px; padding: 9px 20px; }
}
