/* =========================================
   金田学苑 · responsive.css
   移动优先响应式
   ========================================= */

/* =========================================
   移动端通用
   ========================================= */
@media (max-width: 767px) {
  :root {
    --container-padding: 1rem;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.15rem; }

  /* 底部导航显示 */
  .bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }

  .wechat-float {
    display: flex;
  }

  .site-footer {
    padding-bottom: calc(var(--space-2xl) + 60px);
  }

  /* 顶部导航隐藏，显示汉堡 */
  .top-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  /* Hero 调整 */
  .hero {
    min-height: 85vh;
    padding: var(--space-xl) 0;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* 理解卡片单列 */
  .understand-grid {
    grid-template-columns: 1fr;
  }

  /* 方法卡片单列 */
  .method-cards {
    grid-template-columns: 1fr;
  }

  /* 信任区单列 */
  .trust-content {
    grid-template-columns: 1fr;
  }

  .trust-image {
    margin: 0 auto;
  }

  .placeholder-photo {
    width: 200px;
    height: 260px;
    margin: 0 auto;
  }

  /* 数据验证 */
  .method-proven {
    gap: var(--space-lg);
    flex-wrap: wrap;
  }

  /* 联系页 */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* 诊断选项 */
  .diagnose-options {
    grid-template-columns: 1fr;
  }

  /* 强制所有双列布局在移动端变单列（覆盖内联样式） */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* CTA */
  .cta-box {
    padding: var(--space-lg);
  }

  /* 页脚 */
  .site-footer .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  /* 移动端导航抽屉 */
  .mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }

  .mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: white;
    z-index: 301;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: var(--space-lg);
    overflow-y: auto;
    box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  }

  .mobile-nav-drawer.open {
    transform: translateX(0);
  }

  .mobile-nav-drawer .drawer-close {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--space-md);
  }

  .mobile-nav-drawer .drawer-close button {
    font-size: 1.5rem;
    color: var(--color-text-light);
    padding: 0.5rem;
    line-height: 1;
  }

  .mobile-nav-drawer nav a {
    display: block;
    padding: 0.9rem 0;
    font-size: 1.05rem;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    transition: color 0.2s;
  }

  .mobile-nav-drawer nav a:hover,
  .mobile-nav-drawer nav a.active {
    color: var(--color-primary);
  }

  .mobile-nav-drawer .drawer-cta {
    margin-top: var(--space-lg);
    text-align: center;
  }

  .mobile-nav-drawer .drawer-cta .btn {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================
   平板
   ========================================= */
@media (min-width: 576px) and (max-width: 1023px) {
  .understand-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .trust-content {
    grid-template-columns: 1fr;
  }

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

/* =========================================
   桌面
   ========================================= */
@media (min-width: 768px) {
  /* 桌面端顶部导航 */
  .top-nav {
    display: flex !important;
  }

  .mobile-menu-btn {
    display: none;
  }

  /* PC端移动端抽屉不渲染 */
  .mobile-nav-overlay,
  .mobile-nav-drawer {
    display: none !important;
  }
}

/* =========================================
   大屏
   ========================================= */
@media (min-width: 1200px) {
  :root {
    --container-max: 1100px;
    --container-padding: 2rem;
  }
}

/* =========================================
   打印
   ========================================= */
@media print {
  .top-header,
  .bottom-nav,
  .wechat-float,
  .mobile-nav-overlay,
  .mobile-nav-drawer {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
  }
}
