/* ==========================================================================
   WeePrep — responsive.css
   Mobile-first base lives in styles.css. This file handles breakpoint
   adjustments and the mobile navigation drawer.
   Breakpoints: 1024 (nav collapse), 768 (tablet), 560 (small phone).
   ========================================================================== */

/* -------- Large tablet / small laptop: collapse dense grids ---------- */
@media (max-width: 1080px) {
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer__contact { grid-column: 1 / -1; }
}

/* ==================================================================== */
/*  NAVIGATION — mobile drawer below 1280px                          */
/*  (8 top-level items + CTA need the full horizontal bar only on wide  */
/*   viewports; below this the drawer keeps the header clean.)          */
/* ==================================================================== */
@media (max-width: 1279px) {
  .nav__toggle { display: inline-flex; }
  .nav__cta { display: none; } /* CTA moves into the drawer */

  /* Full-viewport clip layer: `transform` makes it the containing block for
     the fixed menu, and `overflow: hidden` clips the off-canvas portion so it
     never adds horizontal page scroll. `pointer-events: none` keeps the page
     clickable when the drawer is closed. The sticky header is outside this
     layer, so it is unaffected. */
  .nav__drawer {
    display: block;
    position: fixed;
    inset: 0;
    overflow: hidden;
    transform: translateZ(0);
    pointer-events: none;
    z-index: 95;
  }

  .nav__menu {
    position: absolute;
    top: 0; right: 0;
    width: min(340px, 86vw);
    height: 100dvh;
    pointer-events: auto;
    background: #fff;
    border-left: 1px solid var(--weeprep-border);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    margin: 0;
    padding: calc(var(--header-h) + 1rem) 1.1rem 2rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform var(--dur) var(--ease);
    z-index: 95;
  }
  .nav__menu.is-open { transform: translateX(0); }

  .nav__link { padding: 0.85rem 0.75rem; font-size: 1.05rem; border-radius: 12px; }
  .nav__item--current > .nav__link::before { display: none; }
  .nav__item--current > .nav__link { color: var(--weeprep-green); background: var(--surface-soft); }

  /* Dropdowns become inline accordions on mobile */
  .nav__item--has-dropdown { display: flex; flex-direction: column; }
  .nav__dropdown {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-left: 2px solid var(--weeprep-border);
    border-radius: 0; margin: 0 0 0.4rem 0.9rem; padding: 0.1rem 0 0.1rem 0.4rem;
    min-width: 0;
    max-height: 0; overflow: hidden;
    transition: max-height var(--dur) var(--ease);
  }
  .nav__item--has-dropdown[data-open="true"] .nav__dropdown { max-height: 620px; }

  .nav__cta--mobile { display: inline-flex !important; margin-top: 1rem; width: 100%; }
}

@media (min-width: 1280px) {
  .nav__cta--mobile { display: none; }
}

/* ==================================================================== */
/*  TABLET — 768px and below                                            */
/* ==================================================================== */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .featured__facts { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 2rem; }
  .split--media-first .split__media { order: 0; }
  .split__media { max-width: 560px; }

  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { max-width: 560px; }
  .hero .feature-card {
    position: static; max-width: none; margin-top: 1.25rem;
    right: auto; bottom: auto;
  }

  .featured__grid { grid-template-columns: 1fr; }
  .featured__media img { min-height: 240px; }

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

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }

  .fee-table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ==================================================================== */
/*  SMALL PHONE — 560px and below                                       */
/* ==================================================================== */
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .trust-strip { grid-template-columns: 1fr; }
  .featured__facts { grid-template-columns: 1fr; }

  .hero__actions .btn, .featured__actions .btn { flex: 1 1 auto; }
  .btn { padding-inline: 1.1rem; }

  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; }

  .announce__inner { font-size: 0.8rem; }
  .to-top { right: 12px; bottom: 12px; }
  .whatsapp-float { left: 12px; bottom: 12px; width: 50px; height: 50px; }
}

/* ==================================================================== */
/*  PRINT                                                               */
/* ==================================================================== */
@media print {
  .site-header, .announce, .to-top, .whatsapp-float, .nav__overlay,
  .site-footer .footer__social, .filters { display: none !important; }
  body { color: #000; }
  a { color: #000; text-decoration: underline; }
  .card, .la-card, .value-card { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
}

/* ==========================================================================
   V2 RESPONSIVE ADDITIONS
   ========================================================================== */
@media (max-width: 767px) {
  /* Sticky quick-action bar appears only on small screens */
  .sticky-cta { display: flex; }
  body:has(.sticky-cta) { padding-bottom: 4.25rem; }
  body:has(.sticky-cta) .whatsapp-float,
  body:has(.sticky-cta) .to-top { display: none; }

  .steps { flex-direction: column; gap: .5rem; }
  .form-step__nav { flex-direction: column; }
  .form-step__nav .btn { width: 100%; }
}
