/* ==========================================================================
   策影智图 ciemap.com - 响应式适配样式表
   完美适配电脑、平板、手机
   ========================================================================== */

/* ---------- 大屏适配 ---------- */
@media (max-width: 1280px) {
  :root { --container: 1100px; }
  .main-nav > li > a { padding: 10px 12px; font-size: 0.9rem; }
}

/* ---------- 平板适配 ---------- */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .section { padding: 72px 0; }

  /* 导航：隐藏桌面菜单，显示汉堡 */
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }

  /* 英雄区 */
  .hero-home .hero-grid { grid-template-columns: 1fr; gap: 40px; padding-bottom: 60px; }
  .hero-quilt { max-width: 560px; margin: 0 auto; }
  .hero-stats { gap: 28px; }

  /* 首页优势错位 */
  .advantage-mosaic .adv-cell:nth-child(1),
  .advantage-mosaic .adv-cell:nth-child(2),
  .advantage-mosaic .adv-cell:nth-child(3),
  .advantage-mosaic .adv-cell:nth-child(4) {
    grid-column: span 12; margin-top: 0;
  }

  /* 流程 */
  .process-wave { grid-template-columns: repeat(3, 1fr); gap: 30px 0; }
  .process-wave .process-step:nth-child(even) { margin-top: 0; }
  .process-wave .process-step::before { display: none; }

  /* 网格 */
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .patch-grid { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .case-grid .case-card:nth-child(3n+2) { margin-top: 0; }
  .news-quilt, .news-list-layout { grid-template-columns: repeat(2, 1fr); }
  .news-quilt .news-card:nth-child(3n+2) { margin-top: 0; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .price-card.featured { transform: none; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .partner-grid { grid-template-columns: repeat(4, 1fr); }
  .portfolio-masonry { columns: 2; }

  /* 关于 */
  .about-story { grid-template-columns: 1fr; gap: 36px; }
  .about-story .story-img img { height: 360px; }

  /* 解决方案 */
  .solution-list .sol-row { grid-template-columns: 1fr; gap: 28px; }
  .solution-list .sol-row.reverse .sol-img { order: 0; }
  .solution-list .sol-img img { height: 280px; }

  /* 详情页 */
  .article-layout { grid-template-columns: 1fr; }
  .article-side { position: static; }
  .case-show-layout { grid-template-columns: 1fr; }
  .case-show-side { position: static; }
  .service-detail-layout { grid-template-columns: 1fr; }
  .service-side-nav { position: static; }

  /* 联系 */
  .contact-layout { grid-template-columns: 1fr; }

  /* 页脚 */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: span 2; }

  /* CTA */
  .cta-banner { grid-template-columns: 1fr; text-align: center; }
  .cta-banner .flex { justify-content: center !important; }

  /* 统计带 */
  .stat-band { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
  .stat-band .stat-item { border-right: 0; border-bottom: 2px dashed var(--line); padding-bottom: 20px; }
  .stat-band .stat-item:nth-last-child(-n+2) { border-bottom: 0; padding-bottom: 0; }

  /* 错位行 */
  .offset-row { grid-template-columns: 1fr; }
  .offset-row > *:nth-child(2),
  .offset-row > *:nth-child(3) { margin-top: 0; }

  /* 对角双栏 */
  .diagonal-split { grid-template-columns: 1fr; }
  .diagonal-split > div:first-child { border-right: 0; border-bottom: var(--stitch); padding: 0 0 36px; }
  .diagonal-split > div:last-child { padding: 36px 0 0; margin-top: 0; }

  /* 站点地图 */
  .sitemap-grid { grid-template-columns: repeat(2, 1fr); }

  /* 加入我们 */
  .job-grid { grid-template-columns: 1fr; }

  /* 特性列表 */
  .feature-list { grid-template-columns: 1fr; }

  /* 表单 */
  .form-grid-2 { grid-template-columns: 1fr; }
}

/* ---------- 手机适配 ---------- */
@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .section { padding: 56px 0; }
  .section-tight { padding: 40px 0; }

  body { font-size: 15px; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.15rem; }

  /* 导航 */
  .header-bar { height: 68px; }
  .brand { font-size: 1.1rem; gap: 8px; }
  .brand .brand-mark { width: 38px; height: 38px; font-size: 1rem; }
  .brand-text small { font-size: 0.6rem; }
  .mobile-drawer { top: 68px; height: calc(100vh - 68px); }

  /* 英雄区 */
  .hero-home { padding: 110px 0 0; }
  .hero-home .hero-grid { gap: 32px; padding-bottom: 48px; }
  .hero-title { font-size: 1.9rem; }
  .hero-desc { font-size: 1rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { flex-direction: column; gap: 20px; padding-top: 24px; }
  .hero-stat .num { font-size: 1.8rem; }
  .hero-quilt .q1 { height: 180px; }
  .hero-quilt .q2, .hero-quilt .q3 { height: 110px; }

  /* 网格 */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .patch-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .news-quilt, .news-list-layout { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .partner-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-masonry { columns: 1; }
  .sitemap-grid { grid-template-columns: 1fr; }

  /* 流程 */
  .process-wave { grid-template-columns: 1fr; gap: 28px; }

  /* 页头 */
  .page-hero { padding: 120px 0 50px; }
  .page-hero::before { display: none; }

  /* 文章 */
  .article-main { padding: 28px 22px; }
  .article-meta { gap: 12px; font-size: 0.82rem; }

  /* 卡片 */
  .card, .soft-card, .stitch-card { padding: 24px; }
  .service-block { padding: 28px 24px; }

  /* 页脚 */
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-brand { grid-column: span 1; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* CTA */
  .cta-banner { padding: 36px 24px; }
  .cta-banner .btn { width: 100%; justify-content: center; }

  /* 统计带 */
  .stat-band { grid-template-columns: 1fr; padding: 28px 20px; }
  .stat-band .stat-item { border-bottom: 2px dashed var(--line); padding-bottom: 20px; }
  .stat-band .stat-item:last-child { border-bottom: 0; padding-bottom: 0; }
  .stat-band .stat-num { font-size: 2rem; }

  /* 联系 */
  .contact-info-block, .contact-form-block { padding: 28px 24px; }

  /* 价格 */
  .price-card { padding: 32px 24px; }

  /* 案例详情 */
  .case-show-main .case-hero-img img { height: 260px; }

  /* 关于 */
  .about-story .story-img img { height: 260px; }
  .timeline { padding-left: 32px; }

  /* 返回顶部 */
  .back-to-top { width: 42px; height: 42px; right: 16px; bottom: 16px; }

  /* 筛选条 */
  .news-filter-bar { padding: 16px; }
  .news-filter-bar .filter-chip { padding: 6px 14px; font-size: 0.82rem; }
}

/* ---------- 超小屏 ---------- */
@media (max-width: 380px) {
  .container { padding: 0 14px; }
  .hero-title { font-size: 1.7rem; }
  .brand-text { display: none; }
}

/* ---------- 横屏手机 ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .mobile-drawer { overflow-y: auto; }
}

/* ---------- 打印样式 ---------- */
@media print {
  .site-header, .mobile-drawer, .overlay, .back-to-top, .nav-toggle { display: none !important; }
  .hero-home { padding-top: 0; }
  .page-hero { padding-top: 0; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
}
