/* ==========================================================================
   DIZIGOO GYM — RESPONSIVE LAYER
   --------------------------------------------------------------------------
   Breakpoints (max-width, desktop-first refinement of a fluid base):
     1440  large desktop
     1280  desktop
     1080  small desktop / large laptop
     1024  laptop  → navigation collapses here
      900  small laptop / large tablet
      768  tablet
      600  large phone
      480  phone
      390  small phone
      360  very small phone

   The mobile layout is NOT a shrunk desktop: navigation, hero, membership,
   gallery and the conversion bar are all specified separately below.
   ========================================================================== */

/* ==========================================================================
   ≤ 1440px
   ========================================================================== */
@media (max-width: 1440px) {
  :root { --maxw: 1240px; }
}

/* ==========================================================================
   ≤ 1280px
   ========================================================================== */
@media (max-width: 1280px) {
  :root { --space-gutter: clamp(1.25rem, 3.5vw, 2.5rem); }

  .footer__grid { grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr)); }
}

/* ==========================================================================
   ≤ 1080px
   ========================================================================== */
@media (max-width: 1080px) {
  .programs  { grid-template-columns: repeat(2, 1fr); }
  .trainers  { grid-template-columns: repeat(2, 1fr); }
  .plans     { grid-template-columns: repeat(2, 1fr); }
  .why       { grid-template-columns: repeat(2, 1fr); }
  .transforms{ grid-template-columns: repeat(2, 1fr); }
  .quotes    { grid-template-columns: repeat(2, 1fr); }

  .facilities { grid-template-columns: repeat(2, 1fr); }
  .fac--hero  { grid-column: span 2; grid-row: span 2; }
  .fac--wide  { grid-column: span 2; }
  .fac--tall  { grid-row: span 1; }
}

/* ==========================================================================
   ≤ 1024px — NAVIGATION COLLAPSES
   ========================================================================== */
@media (max-width: 1024px) {
  :root { --header-h: 74px; }

  .nav { display: none; }
  .nav-toggle { display: grid; }
  .header__actions .btn--desktop-only { display: none; }

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

  .editorial { grid-template-columns: 1fr; gap: 2.25rem; }
  .editorial--reverse .editorial__media { order: 0; }
  .editorial__media img { aspect-ratio: 16 / 11; }

  .sec-head--split { grid-template-columns: 1fr; align-items: start; }
  .sec-head--split .sec-head__aside { padding-bottom: 0; }

  .journey { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
  .journey::before { display: none; }

  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
}

/* ==========================================================================
   ≤ 900px
   ========================================================================== */
@media (max-width: 900px) {
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .quotes { grid-template-columns: 1fr; }
}

/* ==========================================================================
   ≤ 768px — TABLET / MOBILE
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --space-section: clamp(3.25rem, 11vw, 4.75rem);
    --fs-display: clamp(2.6rem, 12vw, 4.2rem);
  }

  /* --- Hero rebuilt for mobile: taller type, no side-weighted scrim --- */
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 3rem);
    padding-bottom: 3.5rem;
  }
  .hero__scrim {
    background:
      linear-gradient(to top, var(--black) 8%, rgba(5,5,5,.72) 45%, rgba(5,5,5,.6) 100%);
  }
  .hero__mid img { object-position: 70% center; }
  .hero__title .l2 { padding-left: 0; }
  .hero__content { max-width: none; }
  .hero__actions .btn { flex: 1 1 100%; }
  .scroll-cue { display: none; }

  .programs   { grid-template-columns: 1fr; }
  .trainers   { grid-template-columns: repeat(2, 1fr); }
  .plans      { grid-template-columns: 1fr; }
  .transforms { grid-template-columns: 1fr; }
  .why        { grid-template-columns: 1fr; }

  /* Program cards: reveal copy by default — hover does not exist here */
  .program__body p { max-height: none; opacity: 1; margin-top: .3rem; }
  .program__more   { opacity: 1; transform: none; }
  .program__body   { margin-top: -4.5rem; }

  .facilities { grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(150px, auto); }
  .fac { min-height: 150px; }
  .fac--hero { grid-column: span 2; grid-row: span 1; min-height: 220px; }

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

  .footer__bottom { flex-direction: column; align-items: flex-start; text-align: left; }

  .prose h2 { margin-top: 2.25rem; padding-top: 1.35rem; }
  .faq__a p { padding-right: 1rem; }

  /* Reserve room for the sticky conversion bar */
  body.has-sticky-cta { padding-bottom: 72px; }
  .sticky-cta { display: flex; }
  .float-wa { bottom: calc(72px + env(safe-area-inset-bottom)); width: 52px; height: 52px; }
  .float-wa svg { width: 25px; height: 25px; }
  .to-top { bottom: calc(132px + env(safe-area-inset-bottom)); }
}

/* ==========================================================================
   ≤ 600px
   ========================================================================== */
@media (max-width: 600px) {
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .hero__stat  { padding: 1.05rem .95rem; }

  .stats { grid-template-columns: repeat(2, 1fr); }

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

  .modal { padding: 0; place-items: end stretch; }
  .modal__panel {
    width: 100%;
    max-height: 92svh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    border-bottom: 0;
    transform: translateY(40px);
  }

  .footer__grid { grid-template-columns: 1fr; gap: 2.25rem; }

  .gal { flex: 0 0 76vw; }

  .transform__facts { gap: 1rem; }
}

/* ==========================================================================
   ≤ 480px — PHONE
   ========================================================================== */
@media (max-width: 480px) {
  :root {
    --space-gutter: 1.15rem;
    --fs-h2: clamp(1.75rem, 8.5vw, 2.3rem);
    --header-h: 68px;
  }

  .btn { width: 100%; padding-inline: 1.25rem; }
  .btn--sm, .sticky-cta .btn, .cluster .btn--text { width: auto; }
  .cluster { gap: .75rem; }

  .hero__badge { font-size: .62rem; letter-spacing: .18em; padding: .45rem .85rem; }

  .facilities { grid-template-columns: 1fr; }
  .fac--wide, .fac--hero { grid-column: span 1; }
  .fac { min-height: 200px; }

  .faq__q { font-size: 1rem; padding-block: 1.25rem; gap: 1rem; }
  .faq__a p { padding-right: 0; }

  .plan { padding: 1.6rem 1.25rem; }

  .quote::before { font-size: 4rem; }

  .info { padding: 1rem; }

  .form-card { padding: 1.35rem 1.15rem; }

  .modal__panel { padding: 1.5rem 1.15rem 2rem; }
  .modal__head { padding-right: 2.5rem; }
}

/* ==========================================================================
   ≤ 390px
   ========================================================================== */
@media (max-width: 390px) {
  :root { --fs-display: clamp(2.2rem, 13vw, 3rem); }

  .hero__stat b    { font-size: .66rem; }
  .hero__stat span { font-size: .68rem; }

  .brand img { height: 34px; }

  .sticky-cta .btn { font-size: .64rem; letter-spacing: .1em; padding-inline: .5rem; }
}

/* ==========================================================================
   ≤ 360px — very small phones, keep everything reachable
   ========================================================================== */
@media (max-width: 360px) {
  :root { --space-gutter: 1rem; }
  .hero__stats { grid-template-columns: 1fr; }
  .mobile-nav__list a { font-size: 1.4rem; padding-block: .7rem; }
}

/* ==========================================================================
   TOUCH DEVICES — no hover states, larger targets
   ========================================================================== */
@media (hover: none) {
  .program:hover, .trainer:hover, .plan:hover, .quote:hover, .gal:hover,
  .fac:hover, .info:hover { transform: none; }
  .program:hover .program__media img,
  .trainer:hover .trainer__media img,
  .fac:hover img, .gal:hover img { transform: none; }

  .program__body p { max-height: none; opacity: 1; }
  .program__more   { opacity: 1; transform: none; }
  .trainer__media img { filter: grayscale(0) brightness(.85); }

  .cursor-dot, .cursor-ring { display: none !important; }

  /* WCAG 2.5.5 — every interactive control at least 44 × 44 CSS px */
  .nav__link, .footer__links a, .breadcrumb a, .footer__legal a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .footer__links a { min-height: 40px; }
  .socials a, .trainer__social a { width: 44px; height: 44px; }
}

/* ==========================================================================
   LANDSCAPE PHONES — the hero must never trap the user
   ========================================================================== */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 2rem); padding-bottom: 2.5rem; }
  .hero__stats { margin-top: 1.75rem; grid-template-columns: repeat(4, 1fr); }
  .hero__stat { padding: .8rem .7rem; }
  .scroll-cue { display: none; }
  .mobile-nav { padding-top: calc(var(--header-h) + 1rem); }
  .mobile-nav__list a { font-size: 1.15rem; padding-block: .5rem; }
}

/* ==========================================================================
   WIDE SCREENS
   ========================================================================== */
@media (min-width: 1700px) {
  :root { --maxw: 1440px; --fs-display: 7.6rem; }
  .gal { flex: 0 0 380px; }
}

/* ==========================================================================
   HIGH CONTRAST / FORCED COLORS
   ========================================================================== */
@media (forced-colors: active) {
  .btn, .plan, .program, .trainer, .info, .quote, .faq__item { border: 1px solid CanvasText; }
  .gold-text, .stat__value, .err__code, .hero__title em {
    -webkit-text-fill-color: CanvasText;
    color: CanvasText;
    background: none;
  }
  .hero__scrim, .hero__light, .fac::after, .gal::after { display: none; }
}

/* ==========================================================================
   PRINT
   ========================================================================== */
@media print {
  .header, .mobile-nav, .preloader, .float-wa, .to-top, .sticky-cta,
  .scroll-cue, .cursor-dot, .cursor-ring, .modal, .gallery, .scroll-progress,
  .trust, .page-fade { display: none !important; }

  body { background: #fff; color: #000; }
  body::after { display: none; }

  .section { padding-block: 1.5rem; break-inside: avoid; }
  h1, h2, h3 { color: #000; }
  p, li { color: #222; }
  .gold-text, .stat__value { -webkit-text-fill-color: #000; color: #000; background: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .75em; color: #555; }
  img { max-height: 280px; }
}
