/* ==========================================================================
   侨批数字展馆 · 样式表（参考博物馆模板配色与结构，零外部依赖）
   ========================================================================== */

:root {
  --bg-page: #f7f4ee;        /* 宣纸米白色背景 */
  --bg-dark: #1c1917;        /* 展馆深墨色背景 */
  --bg-card: #ffffff;        /* 展品卡片白 */
  --text-main: #292524;      /* 正文深灰 */
  --text-muted: #57534e;     /* 次要文字 */
  --accent-red: #9e2a2b;     /* 印章朱红色（点缀色） */
  --accent-gold: #b08968;    /* 复古铜金色 */
  --border-light: #e7e2d8;   /* 细边框 */
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.7;
}

.container {
  width: 92%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 1. 顶部导航栏 */
.navbar {
  background-color: var(--bg-dark);
  color: #f5f5f4;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: #d6d3d1;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #ffffff;
}

/* 2. 首屏主视觉（Hero） */
.hero {
  background:
    linear-gradient(rgba(20, 18, 16, 0.58), rgba(20, 18, 16, 0.72)),
    url("assets/images/hero-bg.jpg") center / cover no-repeat;
  background-color: var(--bg-dark);
  color: #f5f5f4;
  padding: 64px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-tag {
  display: inline-block;
  padding: 4px 12px;
  background-color: rgba(158, 42, 43, 0.25);
  border: 1px solid var(--accent-red);
  color: #fca5a5;
  font-size: 0.85rem;
  border-radius: 4px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 2.5rem;
  line-height: 1.25;
  margin-bottom: 18px;
  font-weight: 700;
}

.hero-desc {
  color: #d6d3d1;
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-primary {
  background-color: var(--accent-red);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #b83233;
}

.btn-outline {
  border: 1px solid #a8a29e;
  color: #f5f5f4;
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* 重点展品卡片 */
.featured-card {
  background-color: #292524;
  border: 1px solid #44403c;
  border-radius: 10px;
  overflow: hidden;
}

.featured-label {
  background-color: var(--accent-red);
  color: #ffffff;
  font-size: 0.8rem;
  padding: 6px 14px;
  letter-spacing: 1px;
}

.featured-thumb {
  height: 190px;
}

.featured-body {
  padding: 18px;
}

.featured-body h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #ffffff;
}

.featured-body p {
  font-size: 0.9rem;
  color: #d6d3d1;
}

/* 3. 数据概览条 */
.stats-bar {
  background-color: #efeae0;
  border-bottom: 1px solid var(--border-light);
  padding: 24px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}

.stat-item strong {
  display: block;
  font-size: 1.5rem;
  color: var(--accent-red);
}

.stat-item span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* 4. 通用展区排版 */
.section {
  padding: 64px 0;
}

.section-dark {
  background-color: #231f1d;
  color: #f5f5f4;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.section-eyebrow {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--accent-red);
  font-weight: 700;
  margin-bottom: 6px;
}

.section-dark .section-eyebrow {
  color: #fca5a5;
}

.section-header h2 {
  font-size: 1.85rem;
  margin-bottom: 6px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.96rem;
}

.section-dark .section-sub {
  color: #d6d3d1;
}

/* 筛选按钮 */
.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 7px 14px;
  border: 1px solid var(--border-light);
  background-color: #ffffff;
  color: var(--text-main);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
  background-color: var(--accent-red);
  color: #ffffff;
  border-color: var(--accent-red);
}

/* 侨批展品卡片网格（根据屏幕宽度自动排布，宽屏可一排 4 张） */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}

.exhibit-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.exhibit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.exhibit-card.hidden {
  display: none;
}

.card-img {
  height: 200px;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 占位图样式（方便没有真实图片时也能看清版面） */
.placeholder-art {
  background: linear-gradient(135deg, #e7dfd1 0%, #d5c7b2 100%);
  color: #5c4d3c;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  font-weight: 600;
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: block;
  font-size: 0.82rem;
  color: var(--accent-red);
  margin-bottom: 6px;
  font-weight: 600;
}

.card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.card-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-red);
}

/* 5. 访谈录像区 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.video-card {
  background-color: #2e2926;
  border: 1px solid #44403c;
  border-radius: 10px;
  overflow: hidden;
}

.video-wrapper {
  position: relative;
  background-color: #000000;
}

.video-wrapper video {
  width: 100%;
  height: 250px;
  display: block;
  object-fit: cover;
}

.video-placeholder-tip {
  padding: 10px 14px;
  background-color: #1c1917;
  color: #d6d3d1;
  font-size: 0.82rem;
  border-top: 1px solid #44403c;
}

.video-placeholder-tip code {
  color: #fca5a5;
}

.video-info {
  padding: 20px;
}

.video-tag {
  display: inline-block;
  font-size: 0.8rem;
  color: #fca5a5;
  margin-bottom: 6px;
}

.video-info h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: #ffffff;
}

.video-info p {
  font-size: 0.92rem;
  color: #d6d3d1;
}

/* 6. 页脚 */
.footer {
  background-color: #141210;
  color: #a8a29e;
  padding: 32px 0;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer strong {
  color: #f5f5f4;
}

/* 7. 详情弹窗 */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.72);
}

.modal-dialog {
  position: relative;
  background-color: var(--bg-page);
  max-width: 860px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  z-index: 2;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.modal-content-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
}

.modal-image-box {
  min-height: 320px;
}

.modal-image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #292524;
}

.modal-text-box {
  padding: 28px;
}

.modal-meta {
  font-size: 0.85rem;
  color: var(--accent-red);
  font-weight: 600;
  margin-bottom: 6px;
}

.modal-text-box h3 {
  font-size: 1.35rem;
  margin-bottom: 18px;
}

.modal-block {
  margin-bottom: 16px;
}

.modal-block h4 {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.transcript-box {
  background-color: #efeae0;
  padding: 12px 14px;
  border-left: 3px solid var(--accent-red);
  border-radius: 4px;
  font-size: 0.95rem;
}

/* 响应式适配（手机/平板） */
@media (max-width: 860px) {
  .hero-grid,
  .gallery-grid,
  .video-grid,
  .modal-content-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: 1.9rem;
  }
}
