/* ============================================================
   XX党支部 — 党建展示网页样式
   设计原则：简约大气，红色点缀，大面积留白
   ============================================================ */

/* ======================== 设计令牌 ======================== */
:root {
  /* 色彩 */
  --red: #C41E24;
  --red-dark: #8B1A1A;
  --red-light: #E84C51;
  --red-muted: rgba(196, 30, 36, 0.08);
  --gold: #D4A843;
  --gold-light: #F0D68A;

  --bg-white: #FFFFFF;
  --bg-light: #FAFAFA;
  --bg-warm: #F8F4F0;

  --text-primary: #2D2D2D;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-color: #E8E8E8;

  /* 阴影 */
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-nav: 0 2px 20px rgba(0, 0, 0, 0.06);

  /* 圆角 */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  /* 过渡 */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.35s var(--ease);

  /* 字体 */
  --font-serif: 'Noto Serif SC', 'Songti SC', serif;
  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  /* 布局 */
  --container: 1140px;
  --nav-height: 72px;
}

/* ======================== 基础重置 ======================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-white);
  line-height: 1.75;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

/* ======================== 通用 ======================== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section--light {
  background: var(--bg-light);
}

.section--warm {
  background: var(--bg-warm);
}

/* 区域标题 */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--red);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 12px;
  position: relative;
}

.section-tag::before,
.section-tag::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 24px;
  height: 1px;
  background: var(--red);
  opacity: 0.4;
}

.section-tag::before { right: calc(100% + 12px); }
.section-tag::after  { left:  calc(100% + 12px); }

.section-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

/* 淡入动画 */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ======================== 导航栏 ======================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-nav);
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  transition: color var(--transition);
}

.navbar.scrolled .nav-logo {
  color: var(--text-primary);
}

.nav-emblem {
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.navbar.scrolled .nav-link {
  color: var(--text-secondary);
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
  color: var(--red);
  background: var(--red-muted);
}

/* 移动端汉堡菜单 */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.navbar.scrolled .nav-toggle span {
  background: var(--text-primary);
}

.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);
}

/* ======================== Hero 首屏 ======================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--red) 0%, var(--red-dark) 60%, #5C0F14 100%);
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.2) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30Z' fill='none' stroke='%23fff' stroke-width='0.5'/%3E%3C/svg%3E");
  background-size: cover, cover, 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 0 24px;
  animation: heroFadeIn 1.2s var(--ease);
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-emblem {
  margin-bottom: 28px;
  animation: emblemGlow 3s ease-in-out infinite alternate;
}

@keyframes emblemGlow {
  from { filter: drop-shadow(0 0 12px rgba(212, 168, 67, 0.3)); }
  to   { filter: drop-shadow(0 0 24px rgba(212, 168, 67, 0.6)); }
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 20px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.hero-divider span {
  display: block;
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.hero-divider span:last-child {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.hero-slogan {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.3em;
  margin-bottom: 8px;
  opacity: 0.95;
}

.hero-sub {
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  opacity: 0.6;
}

/* 向下滚动提示 */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  animation: scrollBounce 2s ease-in-out infinite;
  z-index: 2;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(10px); }
}

/* ======================== 理论学习 ======================== */
.study-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 40px;
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 5px;
  box-shadow: var(--shadow-xs);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.tab {
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color 0.3s ease;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.tab:hover {
  color: var(--red);
}

.tab.active {
  color: #fff;
}

/* 滑动指示器 */
.tab-indicator {
  position: absolute;
  top: 5px;
  left: 5px;
  height: calc(100% - 10px);
  background: var(--red);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 10px rgba(196, 30, 36, 0.35);
  transition: left 0.35s cubic-bezier(0.4, 0, 0.15, 1),
              width 0.3s cubic-bezier(0.4, 0, 0.15, 1);
  z-index: 0;
  pointer-events: none;
}

.study-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* 学习卡片 */
.study-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--red);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: cardSlideIn 0.35s ease both;
  animation-delay: calc(var(--card-i, 0) * 0.08s);
}

.study-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.study-card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--red);
  background: var(--red-muted);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.study-card h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.5;
  color: var(--text-primary);
}

.study-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 卡片内图片 */
.card-image {
  margin: 10px 0 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-height: 180px;
}

.card-image img {
  width: 100%;
  height: 100%;
  max-height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.study-card:hover .card-image img,
.timeline-card:hover .card-image img {
  transform: scale(1.03);
}

.study-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.study-card-read {
  color: var(--red);
  font-weight: 500;
  transition: opacity var(--transition);
}

.study-card:hover .study-card-read {
  opacity: 0.8;
}

/* ======================== 工作风采（时间轴） ======================== */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

/* 中线 */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--red), var(--gold), var(--red));
  transform: translateX(-50%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  width: 46%;
  padding: 0 0 60px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:nth-child(odd) {
  margin-left: 0;
  text-align: right;
  padding-right: 40px;
}

.timeline-item:nth-child(even) {
  margin-left: auto;
  text-align: left;
  padding-left: 40px;
}

/* 时间轴圆点 */
.timeline-dot {
  position: absolute;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red);
  border: 3px solid var(--bg-warm);
  box-shadow: 0 0 0 3px var(--red);
  z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -7px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -7px;
}

.timeline-date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--red);
  background: var(--red-muted);
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.timeline-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.timeline-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  cursor: pointer;
}

.card-read-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--red);
  margin-top: 10px;
  opacity: 0;
  transition: opacity var(--transition);
}

.timeline-card:hover .card-read-hint {
  opacity: 0.8;
}

.timeline-card h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: left;
  color: var(--text-primary);
}

.timeline-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: left;
}

.timeline-card-tag {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--gold);
  background: rgba(212, 168, 67, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 10px;
  font-weight: 500;
}

/* ======================== 信息看板 ======================== */
.board-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.board-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.board-card:hover {
  box-shadow: var(--shadow-md);
}

.board-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.board-icon {
  font-size: 1.3rem;
}

.board-card-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* 公告列表 */
.announcement-list li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: background var(--transition);
}

.announcement-list li:last-child {
  border-bottom: none;
}

.announcement-list li:hover {
  background: var(--red-muted);
  margin: 0 -12px;
  padding: 12px 12px;
  border-radius: var(--radius-sm);
}

.announcement-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.announcement-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 8px;
}

.announcement-dot.new {
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 30, 36, 0.4); }
  50%      { box-shadow: 0 0 0 4px rgba(196, 30, 36, 0); }
}

.announcement-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  padding-left: 14px;
}

/* 活动卡片 */
.activity-item {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-light);
  margin-bottom: 12px;
  transition: background var(--transition);
}

.activity-item:last-child {
  margin-bottom: 0;
}

.activity-item:hover {
  background: var(--red-muted);
  cursor: pointer;
}

.activity-item-date {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--red);
  margin-bottom: 4px;
}

.activity-item h5 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.activity-item p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* 数据统计 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stat-item {
  text-align: center;
  padding: 20px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-light);
  transition: background var(--transition);
}

.stat-item:hover {
  background: var(--red-muted);
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--red);
  line-height: 1.2;
}

.stat-unit {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ======================== 模态框 ======================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  padding: 24px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--text-muted);
  border-radius: 50%;
  transition: background var(--transition), color var(--transition);
}

.modal-close:hover {
  background: var(--red-muted);
  color: var(--red);
}

.modal-body h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
  padding-right: 36px;
}

.modal-body .modal-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.modal-body .modal-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

/* 富文本内容排版 */
.modal-text h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 20px 0 8px;
}

.modal-text h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 16px 0 6px;
}

.modal-text p {
  margin-bottom: 10px;
}

.modal-text ul,
.modal-text ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.modal-text li {
  margin-bottom: 4px;
  list-style: disc;
}

.modal-text ol li {
  list-style: decimal;
}

.modal-text blockquote {
  border-left: 3px solid var(--red);
  padding: 10px 16px;
  margin: 12px 0;
  background: var(--red-muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-primary);
  font-style: italic;
}

.modal-text strong {
  font-weight: 600;
  color: var(--text-primary);
}

.modal-text em {
  font-style: italic;
}

/* 模态框图片画廊 */
.modal-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0 20px;
}

.modal-gallery-img {
  width: 100%;
  border-radius: var(--radius-sm);
  object-fit: cover;
  max-height: 400px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.modal-gallery-img:hover {
  transform: scale(1.01);
}

.modal-body .modal-tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--red);
  background: var(--red-muted);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* ======================== 页脚 ======================== */
.footer {
  background: var(--text-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 0;
}

.footer-line {
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--red));
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 40px 0;
  gap: 48px;
}

.footer-brand {
  flex: 1;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-logo h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.footer-brand p {
  font-size: 0.85rem;
  margin-bottom: 4px;
  opacity: 0.7;
}

.footer-phone-sub {
  padding-left: 5.2em;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.footer-nav a {
  font-size: 0.85rem;
  opacity: 0.6;
  transition: opacity var(--transition);
}

.footer-nav a:hover {
  opacity: 1;
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  opacity: 0.5;
}

/* ======================== 响应式设计 ======================== */

/* 平板 */
@media (max-width: 960px) {
  .container {
    padding: 0 20px;
  }

  .board-grid {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    text-align: left !important;
    padding-left: 52px !important;
    padding-right: 0 !important;
  }

  .timeline-item:nth-child(even) {
    margin-left: 0;
  }

  .timeline-dot {
    left: 13px !important;
    right: auto !important;
  }

  .footer-content {
    flex-direction: column;
    gap: 28px;
  }
}

/* 手机 */
@media (max-width: 640px) {
  :root {
    --nav-height: 56px;
  }

  .container {
    padding: 0 16px;
  }

  .section {
    padding: 48px 0;
  }

  .section-title {
    font-size: 1.45rem;
    letter-spacing: 0.03em;
  }

  .section-tag {
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    margin-bottom: 8px;
  }

  .section-tag::before,
  .section-tag::after {
    width: 16px;
  }

  .section-header {
    margin-bottom: 28px;
  }

  .section-desc {
    font-size: 0.85rem;
  }

  /* ---- 导航 ---- */
  .nav-container {
    padding: 0 16px;
  }

  .nav-logo {
    font-size: 1rem;
    gap: 8px;
  }

  .nav-logo svg {
    width: 26px;
    height: 26px;
  }

  .nav-toggle {
    display: flex;
    gap: 4px;
  }

  .nav-toggle span {
    width: 20px;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 16px;
    gap: 2px;
    box-shadow: var(--shadow-md);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links .nav-link {
    color: var(--text-primary);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    text-align: center;
  }

  .nav-links .nav-link:hover,
  .nav-links .nav-link.active {
    color: var(--red);
    background: var(--red-muted);
  }

  /* ---- Hero 首屏 ---- */
  .hero {
    min-height: 100svh;
  }

  .hero-content {
    padding: 0 20px;
  }

  .hero-emblem {
    margin-bottom: 20px;
  }

  .hero-emblem svg {
    width: 56px;
    height: 56px;
  }

  .hero-title {
    font-size: 1.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 14px;
  }

  .hero-divider {
    gap: 12px;
    margin-bottom: 14px;
  }

  .hero-divider span {
    width: 28px;
  }

  .hero-slogan {
    font-size: 1rem;
    letter-spacing: 0.2em;
    margin-bottom: 6px;
  }

  .hero-sub {
    font-size: 0.78rem;
    letter-spacing: 0.15em;
  }

  .scroll-indicator {
    bottom: 24px;
  }

  .scroll-indicator svg {
    width: 22px;
    height: 22px;
  }

  /* ---- 理论学习 Tab 栏 ---- */
  .study-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 2px;
    margin-bottom: 24px;
    padding: 4px;
    max-width: 100%;
  }

  .study-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    padding: 8px 14px;
    font-size: 0.8rem;
    flex-shrink: 0;
  }

  .study-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* ---- 学习卡片 ---- */
  .study-card {
    padding: 20px 16px;
    border-left-width: 2px;
  }

  .study-card h4 {
    font-size: 0.95rem;
    margin-bottom: 6px;
  }

  .study-card p {
    font-size: 0.82rem;
    margin-bottom: 10px;
    -webkit-line-clamp: 2;
  }

  .study-card-tag {
    font-size: 0.68rem;
    padding: 2px 8px;
    margin-bottom: 8px;
  }

  .study-card-footer {
    font-size: 0.75rem;
  }

  .card-image {
    max-height: 140px;
    margin: 8px 0 10px;
  }

  .card-image img {
    max-height: 140px;
  }

  /* ---- 时间轴 ---- */
  .timeline::before {
    left: 12px;
  }

  .timeline-item {
    padding-left: 36px !important;
    padding-right: 0 !important;
    padding-bottom: 36px;
  }

  .timeline-dot {
    left: 5px !important;
    width: 12px;
    height: 12px;
    border-width: 2px;
  }

  .timeline-date {
    font-size: 0.72rem;
    padding: 2px 10px;
  }

  .timeline-card {
    padding: 16px;
  }

  .timeline-card h4 {
    font-size: 0.95rem;
  }

  .timeline-card p {
    font-size: 0.82rem;
  }

  .timeline-card-tag {
    font-size: 0.68rem;
  }

  .card-read-hint {
    font-size: 0.72rem;
  }

  /* ---- 信息看板 ---- */
  .board-grid {
    gap: 16px;
  }

  .board-card {
    padding: 20px 16px;
  }

  .board-card-header {
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .board-card-header h3 {
    font-size: 0.95rem;
  }

  .board-icon {
    font-size: 1.1rem;
  }

  .announcement-title {
    font-size: 0.85rem;
  }

  .announcement-date {
    font-size: 0.72rem;
  }

  .announcement-list li {
    padding: 10px 0;
  }

  .activity-item {
    padding: 12px;
    margin-bottom: 8px;
  }

  .activity-item-date {
    font-size: 0.72rem;
  }

  .activity-item h5 {
    font-size: 0.85rem;
  }

  .activity-item p {
    font-size: 0.78rem;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .stat-unit {
    font-size: 0.78rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .stat-item {
    padding: 14px 8px;
  }

  /* ---- 模态框 ---- */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    max-height: 92vh;
    padding: 24px 18px 32px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-width: 100%;
  }

  .modal-overlay.open .modal {
    transform: translateY(0) scale(1);
  }

  .modal-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    background: var(--bg-light);
    border-radius: 50%;
  }

  .modal-body h2 {
    font-size: 1.15rem;
    padding-right: 40px;
    line-height: 1.5;
  }

  .modal-body .modal-meta {
    font-size: 0.78rem;
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .modal-body .modal-text {
    font-size: 0.88rem;
    line-height: 1.8;
  }

  .modal-body .modal-tag {
    font-size: 0.7rem;
    padding: 3px 10px;
    margin-bottom: 12px;
  }

  .modal-gallery {
    gap: 8px;
    margin: 12px 0 16px;
  }

  .modal-gallery-img {
    max-height: 240px;
    border-radius: var(--radius-sm);
  }

  .modal-text h3 {
    font-size: 1rem;
    margin: 16px 0 6px;
  }

  .modal-text h4 {
    font-size: 0.92rem;
    margin: 12px 0 4px;
  }

  .modal-text blockquote {
    padding: 8px 12px;
    margin: 8px 0;
    font-size: 0.85rem;
  }

  /* ---- 页脚 ---- */
  .footer {
    padding: 36px 0 0;
  }

  .footer-content {
    flex-direction: column;
    gap: 24px;
    padding: 28px 0;
    text-align: center;
  }

  .footer-logo {
    justify-content: center;
    margin-bottom: 12px;
  }

  .footer-logo h3 {
    font-size: 1rem;
  }

  .footer-brand p {
    font-size: 0.8rem;
    margin-bottom: 2px;
  }

  .footer-phone-sub {
    padding-left: 0 !important;
  }

  .footer-nav {
    align-items: center;
    gap: 6px;
  }

  .footer-nav h4 {
    font-size: 0.85rem;
  }

  .footer-nav a {
    font-size: 0.8rem;
  }

  .footer-bottom {
    padding: 16px 0;
  }

  .footer-bottom p {
    font-size: 0.72rem;
  }
}

/* 超小屏手机 (SE, 5s 等) */
@media (max-width: 375px) {
  .hero-title {
    font-size: 1.5rem;
  }

  .hero-slogan {
    font-size: 0.9rem;
    letter-spacing: 0.12em;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .tab {
    padding: 7px 10px;
    font-size: 0.75rem;
  }

  .study-card {
    padding: 16px 14px;
  }

  .modal {
    padding: 20px 14px 28px;
  }

  .stat-number {
    font-size: 1.4rem;
  }
}
