/* ============================================================
   RESPONSIVE.CSS — Halal. Halal Certification Agency
   Mobile-first breakpoints on top of style.css
   ============================================================ */

/* ─────────────────────────────────────────────
   1. LARGE DESKTOPS  (≥ 1280 px)
───────────────────────────────────────────── */
@media (min-width: 1280px) {
  .container { max-width: 1220px; }

  .hero__inner {
    grid-template-columns: 1fr 420px;
    gap: 80px;
  }

  .categories-grid { grid-template-columns: repeat(3, 1fr); }

  .team-grid { grid-template-columns: repeat(4, 1fr); }

  .testi-grid { grid-template-columns: repeat(3, 1fr); }

  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─────────────────────────────────────────────
   2. STANDARD DESKTOP / LAPTOP  (1024 px – 1279 px)
───────────────────────────────────────────── */
@media (max-width: 1279px) and (min-width: 1024px) {
  .hero__inner { gap: 48px; }

  .team-grid { grid-template-columns: repeat(4, 1fr); }

  .testi-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─────────────────────────────────────────────
   3. TABLETS LANDSCAPE  (900 px – 1023 px)
───────────────────────────────────────────── */
@media (max-width: 1023px) {

  /* Navbar — hamburger layout */
  .navbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
  }

  .navbar__links {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(9,28,48,.96);
    backdrop-filter: blur(12px);
    z-index: 9998;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .navbar__links.is-open {
    display: flex;
  }

  .navbar__links a {
    font-size: 20px;
    color: rgba(255,255,255,.85);
    padding: 12px 24px;
    border-radius: 8px;
  }

  .navbar__links a::after { display: none; }

  .navbar__hamburger {
    display: flex;
  }

  .navbar__lang-switch {
    /* keep it visible next to hamburger */
  }

  /* Hero */
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero__visual {
    display: flex;
    justify-content: center;
  }

  .cert-card { max-width: 400px; }

  /* Categories */
  .categories-grid { grid-template-columns: repeat(2, 1fr); }

  /* Path cards */
  .path-cards { grid-template-columns: 1fr; gap: 28px; }

  /* Steps */
  .steps { flex-direction: row; flex-wrap: wrap; }
  .steps > * { flex: 1 1 30%; }

  /* Team */
  .team-grid { grid-template-columns: repeat(2, 1fr); }

  /* Testimonials */
  .testi-grid { grid-template-columns: repeat(2, 1fr); }

  /* Blog */
  .blog-grid { grid-template-columns: repeat(2, 1fr); }

  /* Lead form */
  .leadgen__inner { grid-template-columns: 1fr; }

  /* Form row */
  .form__row { grid-template-columns: 1fr 1fr; }
}

/* ─────────────────────────────────────────────
   4. TABLETS PORTRAIT  (600 px – 899 px)
───────────────────────────────────────────── */
@media (max-width: 899px) {

  /* Typography scale-down */
  .section__title { font-size: clamp(22px, 5vw, 32px); }

  /* Sticky CTA bar */
  .sticky-cta__inner {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .sticky-cta__btn { margin-left: 0; }

  /* Hero */
  .hero { padding: 60px 0 48px; }

  .hero__badge { font-size: 13px; }

  .hero__title { font-size: clamp(28px, 7vw, 44px); }

  .hero__actions { flex-direction: column; align-items: flex-start; }

  /* Proof bar */
  .proof-bar__inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 12px;
  }

  .proof-stat__num { font-size: 28px; }

  /* Categories */
  .categories-grid { grid-template-columns: 1fr 1fr; gap: 16px; }

  /* Path cards */
  .path-cards { grid-template-columns: 1fr; gap: 24px; }

  /* Steps */
  .steps > * { flex: 1 1 45%; }

  /* Team */
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }

  /* Group note in footer brand */
  .footer__group-note {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }

  /* Testimonials */
  .testi-grid { grid-template-columns: 1fr; }

  /* FAQ */
  .faq-list { max-width: 100%; }

  /* Blog */
  .blog-grid { grid-template-columns: 1fr; }

  /* Lead form */
  .form__row { grid-template-columns: 1fr; }

  /* Footer */
  .footer__top { grid-template-columns: 1fr 1fr; gap: 32px; }

  .footer__brand { grid-column: 1 / -1; }
}

/* ─────────────────────────────────────────────
   5. MOBILE  (≤ 599 px)
───────────────────────────────────────────── */
@media (max-width: 599px) {

  /* ── Remove top banners + fix white gap ── */
  .sticky-cta { display: none !important; }
  body { padding-top: 0 !important; }
  .navbar { top: 0 !important; position: sticky !important; }

  /* ── Base ── */
  html, body { overflow-x: hidden; max-width: 100%; }
  section { padding: 36px 0; }
  .container { padding-left: 16px; padding-right: 16px; max-width: 100%; }
  .section__header { margin-bottom: 20px; }
  /* section__sub — keep visible; they support conversion on mobile too */

  /* ── Navbar ── */
  .navbar { height: 56px; }
  .navbar__logo { font-size: 20px; }
  /* lang-switch — compact but visible; Indonesian market is primary audience */
  .lang-switch {
    display: flex;
    gap: 4px;
    order: -1; /* show before hamburger so it's reachable */
  }
  .lang-btn {
    font-size: 11px;
    padding: 4px 7px;
    min-height: 32px;
    min-width: 44px; /* touch target */
  }

  /* ── Hero — compact ── */
  .hero { padding: 32px 0 28px; }
  .hero__inner { grid-template-columns: 1fr; gap: 0; }
  .hero__title { font-size: 24px; line-height: 1.2; }
  .hero__sub { font-size: 14px; line-height: 1.5; }
  .hero__badge { font-size: 11px; }
  .hero__trust--bullets { font-size: 13px; }
  .hero__trust--bullets li { margin-bottom: 2px; }
  .hero__visual { display: none; } /* hide cert card on mobile */
  .hero__actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero__actions .btn { font-size: 13px; padding: 12px 16px; text-align: center; }

  .cert-card { display: none; }

  /* ── Proof bar — compact inline ── */
  .proof-bar { padding: 20px 0; }
  .proof-bar__inner { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
  .proof-stat__num { font-size: 20px; }
  .proof-stat__label { font-size: 10px; }
  .proof-bar__divider { display: none; }
  .proof-bar__label { display: none; }

  /* ── Sections: show sales-critical content; hide only layout-heavy decoration ── */
  .photo-strip { display: none; }          /* decorative strip — safe to hide */
  /* #consequences — keep heading + intro text; hide cards grid + bottom CTA btn */
  #consequences .consequences-grid { display: none; }
  #consequences .text-center.mt-48 { display: none; } /* "Start Certification Now — Before the Deadline" btn */
  /* #license-holding — KEPT VISIBLE: explains legal need for certification */
  #pri-services { display: none; }         /* PRI cross-sell — secondary upsell */
  .process-photo-block { display: none; }  /* audit photo collage — decorative */
  #post-certification { display: none; }   /* After Certification section — hidden per mobile UX decision */
  #blog { display: none; }                 /* Guides & Insights — hidden per mobile UX decision */
  #process { display: none; }             /* "From first contact to BPJPH certificate" steps — hidden on mobile */
  #categories .text-center.mt-48 { display: none; } /* "Check if Your Product Needs Halal Certification" btn */
  .countdown-wrap { display: none; }       /* countdown timer duplicates sticky bar */

  /* ── Categories — only show first 3 ── */
  .categories-grid { grid-template-columns: 1fr; gap: 10px; }
  .cat-card { flex-direction: row; align-items: center; gap: 12px; padding: 14px; }
  .cat-card__icon { font-size: 24px; flex-shrink: 0; }
  .cat-card__name { font-size: 14px; }
  .cat-card__desc { display: none; } /* hide descriptions */
  .cat-card__tag { font-size: 10px; }
  .cat-card:nth-child(n+7) { display: none; } /* show up to 6 (was 4) */

  /* ── Path cards — compact ── */
  .path-cards { grid-template-columns: 1fr; gap: 16px; }
  .path-card { padding: 20px 16px 16px; gap: 12px; }
  .path-card__desc { font-size: 13px; display: none; } /* hide desc on mobile */
  .path-card__meta { gap: 16px; padding: 10px 0; }
  .path-card__stat-val { font-size: 14px; }
  .path-card__actions { gap: 8px; }
  .path-card__actions .btn { font-size: 12px; padding: 8px 14px; min-height: 40px; }

  /* ── Steps — simplified ── */
  .steps { gap: 20px; flex-direction: column; }
  .steps > * { flex: 1 1 100%; }
  .step { padding: 16px 0; }
  .step__title { font-size: 15px; }
  .step__desc { font-size: 13px; }

  /* ── Team — 2-column compact ── */
  .team-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .team-card { padding: 14px 10px; }
  .team-card__photo-wrap { width: 56px; height: 56px; margin-bottom: 8px; }
  .team-card__avatar { width: 56px; height: 56px; font-size: 18px; margin-bottom: 8px; }
  .team-card__name { font-size: 12px; }
  .team-card__role { font-size: 10px; margin-bottom: 6px; }
  .team-card__bio { display: none; } /* hide bios on mobile */

  /* ── Testimonials — show up to 3 (was 1; more social proof = more trust) ── */
  .testi-grid { grid-template-columns: 1fr; }
  .testi-card:nth-child(n+4) { display: none; }
  .testi-card__quote { font-size: 14px; }

  /* ── FAQ — tighter ── */
  .faq-q { font-size: 14px; padding: 14px 40px 14px 0; }
  .faq-item:nth-child(n+9) { display: none; } /* show max 8 FAQs (was 4) */

  /* ── Lead form — compact ── */
  .leadgen { padding: 36px 0; }
  .leadgen__title { font-size: 22px; }
  .leadgen__sub { font-size: 13px; }
  .leadgen__checks { display: none; }
  .leadgen__note { font-size: 11px; }
  .leadgen__copy h2 { font-size: 22px; }
  .form__row { grid-template-columns: 1fr; }
  .btn--full { width: 100%; }

  /* ── Footer — single column; hide nav columns, keep brand + contact ── */
  .footer { padding: 36px 0 20px; }
  .footer__top { grid-template-columns: 1fr; gap: 20px; }
  .footer__top > div:nth-child(2),
  .footer__top > div:nth-child(3) { display: none; } /* Certification Services + Product Categories */
  .footer__brand { grid-column: auto; }
  .footer__col-title { font-size: 13px; }
  .footer__links { font-size: 13px; }
  .footer__desc { font-size: 12px; }
  .footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: 6px;
    font-size: 11px;
  }
  .footer__bottom-right { flex-wrap: wrap; justify-content: center; gap: 10px; }

  /* ── Exit popup ── */
  .exit-popup__box { margin: 16px; padding: 24px 20px; }
}

/* ─────────────────────────────────────────────
   6. TOUCH / HOVER OVERRIDES
───────────────────────────────────────────── */
@media (hover: none) {
  /* Remove hover-only states that feel sticky on touch */
  .cat-card:hover,
  .testi-card:hover,
  .blog-card:hover {
    transform: none;
    box-shadow: none;
  }

  .navbar__links a::after { display: none; }
}

/* ─────────────────────────────────────────────
   7. PRINT
───────────────────────────────────────────── */
@media print {
  .navbar,
  .urgency-banner,
  .navbar__hamburger,
  .leadgen,
  .footer__bottom { display: none !important; }

  body { color: #000; background: #fff; }

  .container { max-width: 100%; padding: 0 16px; }

  a[href]::after { content: " (" attr(href) ")"; font-size: 11px; }

  .pathway--primary   { background: #f0f8f3 !important; }
  .pathway--secondary { background: #f5f0fa !important; }
  .pathway--tertiary  { background: #fef9ee !important; }
}
