/* ==========================================================================
   康通达168建站 ktt1688.cn - 响应式样式表
   完美适配电脑 / 平板 / 手机
   ========================================================================== */

/* ---------- 大屏（>=1200px 默认样式已覆盖） ---------- */

/* ---------- 平板横屏（992px - 1199px） ---------- */
@media (max-width: 1199px) {
  .container { padding: 0 24px; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 32px; }
  .footer-col:last-child { grid-column: 1 / -1; }
  .patch-grid { grid-template-columns: repeat(3, 1fr); }
  .product-matrix { grid-template-columns: repeat(3, 1fr); }
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .join-benefits { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { gap: 40px; }

  /* 导航：隐藏桌面菜单，显示汉堡 */
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
}

/* ---------- 平板竖屏（768px - 991px） ---------- */
@media (max-width: 991px) {
  .section { padding: 72px 0; }
  .section-tight { padding: 48px 0; }

  /* Hero */
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-home { padding: 120px 0 60px; }
  .hero-quilt { max-width: 560px; margin: 0 auto; }

  /* 十字布局变单列 */
  .cross-layout { grid-template-columns: 1fr; }
  .cross-layout::before { display: none; }
  .cross-layout::after {
    top: auto; left: 0; right: 0;
    position: relative;
    height: 1px;
    width: 100%;
  }
  .cross-quadrant { padding: 36px 28px; }

  /* 双格变单列 */
  .split-2 { grid-template-columns: 1fr; }
  .split-2 > div { padding: 32px 24px; }

  /* 流程 */
  .process-track { grid-template-columns: repeat(3, 1fr); }
  .process-step:nth-child(3) { border-right: 0; }
  .process-step:nth-child(4), .process-step:nth-child(5) {
    border-top: 1px dashed var(--line);
  }

  /* 网格 */
  .grid-3, .case-grid, .solution-grid, .docs-grid, .price-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4, .patch-grid, .product-matrix, .team-grid, .stat-band, .sitemap-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-band .stat-item:nth-child(2) { border-right: 0; }
  .stat-band .stat-item:nth-child(3) { border-top: 1px solid rgba(255,255,255,0.1); }

  /* 文章详情 */
  .article-layout { grid-template-columns: 1fr; gap: 32px; }
  .article-side { position: static; }

  /* 联系 */
  .contact-layout { grid-template-columns: 1fr; gap: 32px; }

  /* CTA */
  .cta-banner { grid-template-columns: 1fr; text-align: center; padding: 36px 28px; }
  .cta-banner .flex { justify-content: center !important; }

  /* 页脚 */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-col:first-child { grid-column: 1 / -1; }

  /* 资讯 */
  .news-quilt, .news-list-layout { grid-template-columns: 1fr 1fr; }
  .feature-list { grid-template-columns: 1fr; }

  /* 价格 */
  .price-card.featured { transform: none; }
  .price-card.featured:hover { transform: translateY(-6px); }
}

/* ---------- 手机（<=767px） ---------- */
@media (max-width: 767px) {
  body { font-size: 15px; }
  .container { padding: 0 18px; }
  .section { padding: 56px 0; }
  .section-tight { padding: 36px 0; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }

  /* 导航 */
  .header-bar { height: 64px; }
  .brand { font-size: 1.05rem; }
  .brand img, .brand .brand-mark { width: 36px; height: 36px; }
  .mobile-drawer { top: 64px; height: calc(100vh - 64px); width: 85%; }

  /* Hero */
  .hero-home { padding: 100px 0 48px; }
  .hero-title { font-size: 1.8rem; }
  .hero-desc { font-size: 1rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .hero-stat .num { font-size: 1.5rem; }
  .hero-quilt .q1 { height: 200px; }
  .hero-quilt .q2, .hero-quilt .q3 { height: 100px; padding: 14px; }

  /* 页头 */
  .page-hero { padding: 110px 0 48px; }

  /* 网格全部单列 */
  .grid-2, .grid-3, .grid-4,
  .case-grid, .solution-grid, .docs-grid, .price-grid,
  .patch-grid, .product-matrix, .team-grid, .stat-band,
  .sitemap-grid, .join-benefits, .news-quilt, .news-list-layout,
  .feature-list, .form-grid-2 {
    grid-template-columns: 1fr;
  }

  /* 流程 */
  .process-track { grid-template-columns: 1fr; }
  .process-step { border-right: 0; border-bottom: 1px dashed var(--line); padding: 24px; }
  .process-step:last-child { border-bottom: 0; }

  /* 统计带 */
  .stat-band .stat-item {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 28px 20px;
  }
  .stat-band .stat-item:last-child { border-bottom: 0; }
  .stat-band .stat-item:nth-child(3) { border-top: 0; }

  /* 卡片 */
  .card, .stitch-card { padding: 24px; }
  .card-img img { height: 180px; }
  .patch-cell { padding: 24px 20px; }

  /* 文章 */
  .article-main { padding: 28px 20px; }
  .article-meta { gap: 12px; font-size: 0.82rem; }
  .side-block { padding: 20px; }

  /* 联系 */
  .contact-info-card, .contact-form-card { padding: 28px 20px; }

  /* 页脚 */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* CTA */
  .cta-banner { padding: 28px 20px; }
  .cta-banner h2 { font-size: 1.3rem; }

  /* 价格 */
  .price-card { padding: 32px 24px; }
  .price-amount { font-size: 2.2rem; }

  /* 资讯筛选 */
  .news-filter-bar { gap: 8px; }
  .filter-chip { padding: 6px 14px; font-size: 0.82rem; }

  /* FAQ */
  .faq-q { padding: 18px 20px; font-size: 0.95rem; }
  .faq-item.open .faq-a { padding: 0 20px 18px; }

  /* 404 */
  .error-code { font-size: 5rem; }

  /* 返回顶部 */
  .back-to-top { width: 40px; height: 40px; right: 16px; bottom: 16px; }

  /* 十字象限 */
  .cross-quadrant { padding: 28px 20px; }
  .advantage-cross .ico { width: 44px; height: 44px; }

  /* 按钮 */
  .btn-lg { padding: 12px 24px; font-size: 0.95rem; }
}

/* ---------- 小屏手机（<=480px） ---------- */
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .hero-title { font-size: 1.6rem; }
  .brand-text small { display: none; }
  .section-head { margin-bottom: 36px; }
  .news-foot { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ---------- 打印样式 ---------- */
@media print {
  .site-header, .mobile-drawer, .overlay, .back-to-top, .nav-toggle { display: none !important; }
  .hero-home, .page-hero { padding: 40px 0; }
  .section { padding: 30px 0; }
  body { background: #fff; color: #000; }
}
