/* ============================================
   Responsive Design - 优先移动端
   ============================================ */

/* Tablet: 768-1023px */
@media (max-width: 1023px) {
  .features-grid,
  .tests-grid,
  .listing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: var(--text-4xl);
  }

  .stat-number {
    font-size: var(--text-3xl);
  }
}

/* Mobile: <768px */
@media (max-width: 767px) {
  /* --- 导航栏 --- */
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-4);
    background: var(--color-bg);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    overflow-y: auto;
    z-index: 99;
  }

  .nav-menu.is-open {
    transform: translateX(0);
  }

  .nav-link {
    padding: var(--space-4);
    font-size: var(--text-lg);
    border-bottom: 1px solid var(--color-border-light);
  }

  /* --- Hero --- */
  .hero-section {
    padding: var(--space-12) 0;
  }

  .hero-title {
    font-size: var(--text-3xl);
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats {
    gap: var(--space-6);
  }

  .stat-number {
    font-size: var(--text-2xl);
  }

  /* --- Grids 单列 --- */
  .features-grid,
  .tests-grid,
  .listing-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  /* --- 间距 --- */
  .features-section,
  .tests-section {
    padding: var(--space-10) 0;
  }

  .cta-section {
    padding: var(--space-12) 0;
  }

  .section-header {
    margin-bottom: var(--space-8);
  }

  .section-title {
    font-size: var(--text-2xl);
  }

  /* --- 页面标题 --- */
  .page-title {
    font-size: var(--text-3xl);
  }

  .page-header {
    padding: var(--space-8) var(--space-4) var(--space-6);
  }

  /* --- 页脚 --- */
  .footer-links {
    gap: var(--space-8);
    flex-direction: column;
  }

  .site-footer {
    padding: var(--space-10) 0 var(--space-6);
  }

  /* --- 容器 --- */
  .container,
  .container-narrow {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* Small mobile: <420px */
@media (max-width: 419px) {
  .hero-title {
    font-size: var(--text-2xl);
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-4);
  }

  .stat-number {
    font-size: var(--text-xl);
  }
}

/* Print */
@media print {
  .site-header,
  .site-footer,
  .theme-toggle,
  .nav-toggle {
    display: none !important;
  }

  .main-content {
    padding-top: 0;
  }

  body {
    background: white;
    color: black;
  }
}
