/* ============================================================
   雪山之书 — 响应式样式 (media.css)
   断点：<1024px 平板 / <768px 移动 / <480px 小屏
   ============================================================ */

/* ===== 平板 (768px - 1023px) ===== */
@media (max-width: 1023px) {
  :root {
    --section-gap: 64px;
    --container-padding: 20px;
  }

  .nav { display: none; }
  .hamburger { display: flex; }

  .hero__title { font-size: 2.25rem; max-width: 100%; }
  .hero__subtitle { font-size: 1rem; }
  .hero__content { padding-bottom: 80px; }

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

  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .stat-item__number { font-size: 2.25rem; }

  .footer__grid { grid-template-columns: 1fr 1fr; gap: 48px; }

  .climate-grid { grid-template-columns: 1fr; gap: 40px; }

  .page-layout {
    grid-template-columns: 160px 1fr;
    gap: 28px;
  }

  .inner-banner { height: 260px; }
  .inner-banner__title { font-size: 1.75rem; }

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

/* ===== 移动端 (< 768px) ===== */
@media (max-width: 767px) {
  :root {
    --section-gap: 48px;
    --container-padding: 16px;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }

  .section-title h2 { font-size: 1.5rem; }
  .section-title { margin-bottom: 40px; }

  /* Hero — switch video to fallback image on mobile */
  .hero {
    height: 75vh;
    min-height: 480px;
  }
  .hero__video { display: none; }
  .hero__fallback { display: block; }

  .hero__title { font-size: 1.75rem; }
  .hero__subtitle { font-size: 0.9rem; }
  .hero__content { padding-bottom: 60px; }
  .hero__scroll { display: none; }

  /* Grids */
  .grid-cols-2, .grid-cols-3, .grid-cols-4 {
    grid-template-columns: 1fr;
  }
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .stat-item__number { font-size: 1.75rem; }
  .stat-item__label { font-size: 0.72rem; }

  /* Climate */
  .climate-visual { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Page layout — sidebar on top */
  .page-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .filter-sidebar { position: static; }
  .filter-sidebar a {
    display: inline-block;
    padding: 6px 14px;
    margin: 0 4px 8px 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
  }
  .filter-sidebar a.active {
    border-color: var(--color-primary);
    padding-left: 14px;
    border-left: 1px solid var(--color-primary);
  }
  .filter-sidebar__title { display: none; }

  /* Footer */
  .footer__grid { grid-template-columns: 1fr; gap: 36px; }
  .footer__bottom { flex-direction: column; gap: 8px; text-align: center; }
  .footer__bottom-links { flex-wrap: wrap; justify-content: center; }

  /* Search */
  .search-form { flex-direction: column; }
  .search-form .btn { width: 100%; justify-content: center; }
  .search-result-item__image { width: 80px; height: 70px; }

  /* CTA */
  .cta-section { padding: 64px 0; }
  .cta-section h2 { font-size: 1.5rem; }
  .cta-section .btn-group { flex-direction: column; align-items: center; }
  .cta-section .btn-group .btn { width: 100%; max-width: 280px; justify-content: center; }

  /* Detail */
  .detail-header h1 { font-size: 1.5rem; }
  .detail-meta { gap: 10px; font-size: 0.78rem; }
  .prev-next { flex-direction: column; gap: 8px; }
  .param-grid { grid-template-columns: 1fr 1fr; }

  /* Quote */
  .quote-section blockquote { font-size: 1.15rem; }
  .quote-section blockquote::before { font-size: 3rem; top: -28px; }

  /* Form */
  .form-input, .form-textarea, .form-select { font-size: 16px; }

  .back-top { right: 12px; bottom: 56px; }

  .pagination a, .pagination .page-num { min-width: 34px; height: 34px; font-size: 0.78rem; }

  .btn--lg { padding: 13px 28px; font-size: 0.9rem; }

  .inner-banner { height: 220px; }
  .inner-banner__title { font-size: 1.4rem; }

  .header { height: 64px; }
  .header__logo-name { font-size: 1rem; }

  .peak-card__body { padding: 16px 18px 20px; }
  .peak-card__title { font-size: 1.05rem; }

  .gallery-grid-item { aspect-ratio: 4/3; }

  .search-section { padding: 36px 0; }
}

/* ===== 小屏手机 (< 480px) ===== */
@media (max-width: 479px) {
  .hero { height: 60vh; min-height: 380px; }
  .hero__title { font-size: 1.5rem; }
  .hero__subtitle { font-size: 0.85rem; }

  .stats-grid { gap: 12px; }
  .stat-item__number { font-size: 1.5rem; }
  .stat-item__label { font-size: 0.68rem; }
  .stat-item__icon { font-size: 1.25rem; }

  .climate-visual { grid-template-columns: 1fr 1fr; }

  .section-title h2 { font-size: 1.35rem; }

  .inner-banner { height: 180px; }
  .inner-banner__title { font-size: 1.25rem; }

  .btn { padding: 10px 20px; font-size: 0.85rem; }
}
