/* =====================================================
   케이캠핑카연구소 — 모바일 반응형 보완
   common.css 다음에 로드 (모든 HTML 페이지)
   대상: index, about, products, consulting, blog
===================================================== */

/* ─────────────────────────────────────────────────
   태블릿 이하 (900px)
───────────────────────────────────────────────── */
@media (max-width: 900px) {

  /* 2컬럼 그리드 → 1컬럼 */
  .layout-2col {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  /* 통계 flex 행 줄바꿈 */
  .stats-flex-row {
    flex-wrap: wrap !important;
    gap: 20px !important;
    justify-content: center !important;
  }
  .stats-flex-row > div {
    flex: 1 1 calc(50% - 10px);
    min-width: 80px;
    text-align: center;
  }

}

/* ─────────────────────────────────────────────────
   모바일 (768px 이하)
───────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* ── 공통: 2컬럼 레이아웃 ── */
  .layout-2col {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* ── 공통: 섹션 여백 ── */
  .section        { padding: 56px 0 !important; }
  .section-sm     { padding: 40px 0 !important; }
  .section-header { margin-bottom: 36px !important; }
  .section-header h2 { font-size: clamp(1.35rem, 5vw, 1.7rem) !important; }
  .section-header p  { font-size: 0.95rem !important; }

  /* ── index.html: Hero ── */
  .hero {
    min-height: auto !important;
    padding: 60px 0 48px !important;
  }
  .hero h1 {
    font-size: clamp(1.8rem, 7vw, 2.4rem) !important;
    line-height: 1.3 !important;
  }
  .hero-desc {
    font-size: 0.95rem !important;
    line-height: 1.75 !important;
  }
  .hero-actions {
    gap: 10px !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .hero-actions .btn { justify-content: center !important; }

  /* 히어로 AI 카드 */
  .hero-card {
    padding: 20px 18px !important;
    column-gap: 16px !important;
  }
  .hero-card .card-body {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 20px !important;
  }
  .hero-card .stat-row {
    justify-content: space-between;
  }
  .hero-card .stat-box {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 10px 8px !important;
  }
  .hero-card .feature-list li {
    white-space: normal !important;
    font-size: 0.84rem !important;
  }
  .hero-card .btn-full {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    display: block !important;
  }

  /* 히어로 통계 */
  .hero-stats {
    gap: 20px !important;
    padding-top: 28px !important;
  }
  .hero-stat-item .num { font-size: 1.4rem !important; }

  /* ── 공통: 페이지 히어로 (about, products, consulting) ── */
  .page-hero {
    padding: 48px 0 40px !important;
  }
  .page-hero h1 {
    font-size: clamp(1.55rem, 5.5vw, 2rem) !important;
  }
  .page-hero p {
    font-size: 0.95rem !important;
    max-width: 100% !important;
  }

  /* ── about.html: 타임라인 ── */
  .timeline {
    padding-left: 24px !important;
  }
  .tl-year::before {
    left: -31px !important;
  }

  /* ── products.html: 통계 flex 행 ── */
  .stats-flex-row {
    gap: 12px !important;
    padding: 16px !important;
  }
  .stats-flex-row > div {
    flex: 1 1 calc(50% - 6px);
  }

  /* ── products.html: 설치 프로세스 ── */
  .process-steps {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px !important;
  }
  .process-steps::before {
    display: none !important;
  }

  /* ── 공통: CTA 배너 ── */
  .cta-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 36px 24px !important;
    gap: 24px !important;
  }
  .cta-banner h2 {
    font-size: clamp(1.2rem, 4.5vw, 1.6rem) !important;
  }
  .cta-banner-actions {
    width: 100% !important;
    flex-direction: column !important;
  }
  .cta-banner-actions .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* ── 공통: 카드 ── */
  .card { padding: 24px 20px !important; }

  /* ── 공통: advantage-item (products) ── */
  .advantage-item { padding: 20px 16px !important; }

  /* ── 공통: target-card (products) ── */
  .target-card { padding: 24px 20px !important; }

  /* ── 공통: 푸터 ── */
  /* .footer-top이 container와 같은 div에 있어 가로 padding이 0으로 덮임 → 보정 */
  .footer-top {
    padding: 40px 16px 28px !important;
    gap: 28px !important;
  }

}

/* ─────────────────────────────────────────────────
   소형 모바일 (480px 이하)
───────────────────────────────────────────────── */
@media (max-width: 480px) {

  .container { padding: 0 14px !important; }

  .hero h1 { font-size: 1.65rem !important; }

  .page-hero h1 { font-size: 1.45rem !important; }

  .btn {
    padding: 12px 18px !important;
    font-size: 0.88rem !important;
  }

  .section-header h2 { font-size: 1.25rem !important; }

  /* products.html: 설치 프로세스 1컬럼 */
  .process-steps {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* 히어로 AI 카드 통계 줄 */
  .hero-card .stat-row {
    gap: 8px !important;
  }

  /* consulting.html: 폼 그리드 (이미 consulting.html에 있지만 보강) */
  .form-row {
    grid-template-columns: 1fr !important;
  }

}
