/* ===================================================================
   RESPONSIVE LAYER - phones (320px+), tablets, laptops, large screens
   Loaded last so it can refine every page without touching the
   component files. Mobile-first fixes live here.
   =================================================================== */

/* ---- Safe defaults ---- */
img, video, svg { max-width: 100%; height: auto; }
.container { padding-left: clamp(16px, 4vw, 28px); padding-right: clamp(16px, 4vw, 28px); }
p, li, h1, h2, h3, h4, blockquote, label, td, th { overflow-wrap: break-word; }
.btn { max-width: 100%; }

/* ---- Header ---- */
.header-inner { height: 76px; }
.header-actions .btn-sm { white-space: nowrap; }
@media (max-width: 560px) {
  .header-inner { height: 68px; gap: 10px; }
  .header-actions .btn-pill.btn-sm { display: none; }       /* the drawer carries the Apply button */
  .brand-icon { height: 30px; }
  .brand-link { gap: 9px; min-width: 0; }
  .brand-text .bt-main { font-size: .7rem; letter-spacing: .1em; }
  .brand-text .bt-sub { font-size: .66rem; }
}
@media (max-width: 360px) {
  .brand-icon { height: 26px; }
  .brand-text .bt-main { font-size: .6rem; letter-spacing: .06em; }
}
.site-header > .container { max-width: 1440px; }

/* Buttons may wrap on narrow screens instead of forcing the page wider */
@media (max-width: 520px) {
  .btn { white-space: normal; padding-left: 20px; padding-right: 20px; }
  .btn-lg { padding: 17px 22px; }
}
.card, .pricing-card, .pillar-card, .approach-card { min-width: 0; }
@media (max-width: 520px) {
  .card { padding: var(--space-lg); }
  .pricing-card { padding: var(--space-xl) var(--space-lg); }
}

/* ---- Headline / paragraph rhythm ---- */
h1 + p, h2 + p, h1 + .lead-text, h2 + .lead-text, .heading-display + p, .heading-section + p { margin-top: var(--space-md); }
.section-header h1, .section-header h2 { margin-top: var(--space-xs); }

/* ---- Slideshows on phones: arrows tuck to the top, captions clear the dots ---- */
@media (max-width: 640px) {
  .slideshow-standard, .slideshow-portrait { aspect-ratio: 4 / 5; min-height: 400px; }
  .slideshow-nav-btn { top: 14px; transform: none; width: 34px; height: 34px; }
  .slideshow-nav-btn:hover, .slideshow-nav-btn:active { transform: none; }
  .slideshow-prev { left: auto; right: 54px; }
  .slideshow-next { right: 12px; }
  .slide-caption { padding: var(--space-lg) var(--space-md) 58px; }
  .slide-title { font-size: clamp(1.45rem, 7vw, 1.9rem); }
  .slide-description { font-size: .84rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .slideshow-dots { bottom: 14px; padding: 5px 12px; }
  .slideshow-pause-badge { display: none; }
}
@media (hover: none) { .slideshow-pause-badge { display: none; } }

/* ---- Large / ultra-wide screens ---- */
@media (min-width: 1600px) {
  :root { --container-max: 1360px; }
  html { font-size: 17px; }
}

/* ---- Calculator readouts on narrow screens ---- */
@media (max-width: 520px) {
  .calc-macro-val { font-size: 1.5rem; }
  .calc-macro-name { font-size: .6rem; letter-spacing: .4px; }
  .calc-cal-number { font-size: 3.6rem; }
}

/* ---- App simulator tab pills (were inheriting the 44px phone-dock width) ---- */
.sim-tab-pill.phone-nav-btn, .sim-tab-pill.phone-nav-btn.active {
  width: auto; height: auto; padding: 10px 16px; white-space: nowrap;
  font-family: var(--font-label); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 400;
}
@media (max-width: 420px) { .sim-nav-tabs { gap: 8px; } .sim-tab-pill.phone-nav-btn { padding: 9px 12px; font-size: .62rem; } }

/* ---- Smallest phones ---- */
@media (max-width: 360px) {
  h1, .heading-display { font-size: 2.6rem; }
  h2, .heading-section { font-size: 1.85rem; }
  .hero-title { font-size: 2.5rem; }
}

@media (max-width: 340px) { h2, .heading-section { font-size: 1.65rem; } }

/* ---- Eight-item navigation on narrower desktops ---- */
.desktop-nav .nav-link { white-space: nowrap; }
@media (min-width: 1180px) and (max-width: 1399px) {
  .desktop-nav .nav-link { padding-left: 6px; padding-right: 6px; font-size: 0.9rem; }
  .header-actions .btn-pill.btn-sm { display: none; }
}

/* ---- Two coaching routes (pricing and contact) ---- */
.route-grid,
.pricing-grid.pricing-grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-lg);
  max-width: 900px;
  margin: 0 auto;
}
@media (min-width: 820px) {
  .route-grid,
  .pricing-grid.pricing-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pricing-grid-two .pricing-card { scroll-margin-top: 110px; }

/* ---- Trust strip, media card, route cards, store buttons ---- */
.trust-strip { border-block: 1px solid var(--border-subtle); background: #0C1019; padding: 16px 0; }
.trust-strip ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 0; margin: 0; padding: 0;
  font-family: var(--font-label); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-secondary); }
.trust-strip li:not(:last-child)::after { content: '\00B7'; margin: 0 12px; color: var(--cyan-accent); }
.media-feature { padding: var(--space-xl) 0 0; }
.media-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-md);
  max-width: 900px; margin: 0 auto; padding: var(--space-lg) var(--space-xl); background: var(--bg-card);
  border: 1px solid var(--border-card); border-radius: var(--radius-lg); }
.media-card h2 { font-size: 1.15rem; margin: 0 0 4px; }
.media-card p { color: var(--text-secondary); font-size: .9rem; margin: 0; }
.choose-card { display: flex; flex-direction: column; gap: var(--space-lg); padding: var(--space-xl); }
.choose-card .btn { margin-top: auto; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-center { justify-content: center; }
.store-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.store-row .btn-app { flex: 0 1 auto; min-width: 150px; min-height: 48px; }
.store-center { justify-content: center; }
.store-row .btn-app.is-platform { border-color: var(--cyan-accent); }
.mobile-drawer-footer .store-row .btn-app { flex: 1 1 120px; min-width: 0; }

/* ---- Dedicated pages ---- */
.step-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--space-md); padding: 0; margin: 0; }
.step-grid-three { max-width: 960px; margin-inline: auto; }
.step-card h3 { font-size: 1.1rem; margin: 8px 0; }
.step-card p { color: var(--text-secondary); font-size: .92rem; line-height: 1.6; margin: 0; }
.page-photo { display: block; width: 100%; max-width: 980px; max-height: 460px; object-fit: cover; margin: var(--space-xl) auto 0; border-radius: var(--radius-lg); border: 1px solid var(--border-card); }
#pillars, #online, #dubai { scroll-margin-top: 100px; }

/* ---- Social icons and sticky WhatsApp ---- */
.social-row { display: flex; gap: 12px; margin-top: 18px; }
.social-link { display: inline-flex; padding: 2px; border-radius: 12px; }
.social-link img { width: 40px; height: 40px; }
.social-link:focus-visible, .wa-sticky:focus-visible { outline: 2px solid var(--cyan-accent); outline-offset: 3px; }
.wa-sticky { position: fixed; z-index: 89; right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  width: 52px; height: 52px; transition: opacity .25s ease, transform .25s ease; filter: drop-shadow(0 8px 18px rgba(0,0,0,.5)); }
.wa-sticky.is-hidden { opacity: 0; transform: translateY(8px); pointer-events: none; visibility: hidden; }
@media (min-width: 861px) { .wa-sticky { display: none; } }

/* ---- Phone refinements ---- */
main, .site-footer { overflow-x: clip; }
.route-grid > *, .step-grid > *, .hero-routes > *, .pricing-grid > * { min-width: 0; }
@media (max-width: 620px) {
  .trust-strip ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; text-align: center; }
  .trust-strip li::after { display: none; }
  .trust-strip li:last-child { grid-column: 1 / -1; }
  .media-card { flex-direction: column; align-items: stretch; text-align: center; padding: var(--space-lg); }
}
@media (max-width: 520px) {
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { width: 100%; text-align: center; justify-content: center; }
  .store-row .btn-app { flex: 1 1 140px; min-width: 0; padding-left: 12px; padding-right: 12px; }
  .social-row.cta-center { flex-direction: row; justify-content: center; }
  .choose-card { padding: var(--space-lg); }
}
