/* ============================================================
 * EPP MOBILE OVERLAY — v6.3
 * ------------------------------------------------------------
 * VERSION MARKER for cache verification:
 * If you see this comment in your live CSS source, v6.3 is
 * deployed. Visit /assets/mobile.css directly in browser to
 * verify version.
 *
 * Includes nuclear-specificity rules at the END of the file
 * to override anything that might be slipping through.
 * ============================================================ */


/* ============================================================
 * GLOBAL — applies up to tablet
 * ============================================================ */
@media (max-width: 900px) {

  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  html body img,
  html body video,
  html body iframe,
  html body picture {
    max-width: 100% !important;
    height: auto !important;
  }

  html body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Force flex-wrap on inline-styled flex containers — but NOT on
     navs or their direct children, which need to stay single-row. */
  html body [style*="display:flex"]:not([style*="flex-wrap"]):not([style*="wrap"]) {
    flex-wrap: wrap !important;
  }
  /* Explicitly override the wrap for nav and logo anchor to prevent
     stacking that creates white gaps below the nav. */
  html body nav,
  html body nav > a,
  html body nav > a > div {
    flex-wrap: nowrap !important;
  }
}


/* ============================================================
 * MOBILE NAV — hamburger + slide-in menu
 * ============================================================ */
@media (max-width: 900px) {

  /* Hide desktop nav UL and right-side group on the broken complex nav.
     The hamburger button replaces them. */
  html body nav.epp-mobile-nav > ul,
  html body nav.epp-mobile-nav > div {
    display: none !important;
  }

  /* The nav itself becomes a simple logo + hamburger row */
  html body nav.epp-mobile-nav {
    padding: 0 16px !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    overflow: hidden !important;
    background: #0d0f12 !important;
  }

  /* Logo inside mobile nav must not wrap and must fit */
  html body nav.epp-mobile-nav > a {
    flex-wrap: nowrap !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
  html body nav.epp-mobile-nav > a img {
    flex-shrink: 0 !important;
    width: 36px !important;
    height: 36px !important;
  }
  html body nav.epp-mobile-nav > a > div {
    flex-shrink: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* Hamburger button */
  html body .epp-hamburger {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    gap: 5px;
    flex-shrink: 0;
    position: relative;
    z-index: 1001;
  }

  html body .epp-hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
  }

  /* Hamburger animates to X when menu is open */
  html body.epp-menu-open .epp-hamburger .epp-hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  html body.epp-menu-open .epp-hamburger .epp-hamburger-line:nth-child(2) {
    opacity: 0;
  }
  html body.epp-menu-open .epp-hamburger .epp-hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Backdrop */
  html body .epp-mobile-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 998;
  }

  html body.epp-menu-open .epp-mobile-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  /* Slide-in menu panel */
  html body .epp-mobile-menu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: 85% !important;
    max-width: 360px !important;
    height: 100vh !important;
    height: 100dvh !important; /* dynamic viewport height for iOS */
    background: #0d0f12 !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 999 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4) !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  html body.epp-menu-open .epp-mobile-menu {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  html body .epp-mobile-menu-inner {
    padding: 80px 24px 40px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  /* Menu UL */
  html body .epp-mobile-menu-ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  html body .epp-mobile-menu-ul li {
    list-style: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  html body .epp-mobile-menu-ul > li > a {
    display: block !important;
    padding: 18px 4px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    height: auto !important;
    line-height: 1.4 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  html body .epp-mobile-menu-ul > li > a:hover,
  html body .epp-mobile-menu-ul > li > a:focus {
    color: #02b5ff !important;
  }

  /* Expandable dropdowns (Services, By Sport) */
  html body .epp-mobile-drop {
    margin: 0;
  }

  html body .epp-mobile-drop > summary {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 18px 4px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer;
    list-style: none;
    user-select: none;
  }

  html body .epp-mobile-drop > summary::-webkit-details-marker {
    display: none;
  }

  html body .epp-mobile-drop > summary::after {
    content: '+';
    font-size: 22px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.2s;
  }

  html body .epp-mobile-drop[open] > summary::after {
    content: '−';
  }

  html body .epp-mobile-drop > ul {
    list-style: none !important;
    padding: 0 0 8px 16px !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    position: static !important;
    display: block !important;
    box-shadow: none !important;
    min-width: 0 !important;
  }

  html body .epp-mobile-drop > ul li {
    border-bottom: none !important;
  }

  html body .epp-mobile-drop > ul a {
    display: block !important;
    padding: 12px 4px !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
  }

  html body .epp-mobile-drop > ul a:hover {
    color: #02b5ff !important;
  }

  /* Right-side group cloned into mobile menu */
  html body .epp-mobile-menu-right {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    align-items: stretch !important;
  }

  html body .epp-mobile-menu-right a,
  html body .epp-mobile-menu-right span {
    display: block !important;
    text-align: center !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 14px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    padding: 0 !important;
    height: auto !important;
    width: auto !important;
  }

  html body .epp-mobile-menu-right a:last-child {
    background: #02b5ff !important;
    color: #0d0f12 !important;
    padding: 14px 20px !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-top: 8px !important;
  }
}


/* ============================================================
 * Hide hamburger on desktop
 * ============================================================ */
@media (min-width: 901px) {
  html body .epp-hamburger,
  html body .epp-mobile-menu,
  html body .epp-mobile-backdrop {
    display: none !important;
  }
}


/* ============================================================
 * 600px AND BELOW — phone territory
 * ============================================================ */
@media (max-width: 600px) {

  /* ── EXACT INLINE GRID PATTERNS ───────────────────────── */

  html body [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  html body [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  html body [style*="grid-template-columns:1fr 420px"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  html body [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
  }

  html body [style*="grid-template-columns:1fr 360px"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  html body [style*="grid-template-columns:repeat(2"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  html body [style*="grid-template-columns:1fr 400px"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  html body [style*="grid-template-columns:1fr 480px"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  html body [style*="grid-template-columns:200px 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    padding: 24px !important;
  }
  html body [style*="grid-template-columns:200px 1fr"] > div:first-child {
    text-align: center !important;
  }
  html body [style*="grid-template-columns:200px 1fr"] > div:first-child > div {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* ── FLOATING CTA + PROMO BANNER — HIDE ON MOBILE ────── */
  html body #quiz-float {
    display: none !important;
    visibility: hidden !important;
  }

  html body #promo-banner {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  html body [id*="countdown"],
  html body [id*="promo"],
  html body [class*="countdown"],
  html body [class*="promo-banner"] {
    display: none !important;
  }

  /* ── TEAM .tc-featured CARD ───────────────────────────── */
  html body .tc-featured {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    padding: 24px !important;
  }
  html body .tc-featured-photo,
  html body .tc-featured-photo img {
    width: 100% !important;
    max-width: 280px !important;
    margin: 0 auto !important;
  }

  /* ── HERO-RIGHT — hide booking card panel on mobile ───── */
  /* The hero-right contains an absolute-positioned image and
     a booking card. On mobile when hero collapses to 1fr, this
     creates an empty white-showing gap because the image is
     absolutely positioned and the .hero-right has no height.
     Hide hero-right entirely on mobile — the "Book Assessment"
     CTA in hero-left provides the same booking functionality. */
  html body .hero-right,
  html body .hero-right-photo,
  html body .hero-right-overlay,
  html body .booking-card {
    display: none !important;
  }

  /* Belt-and-braces: ensure hero collapses cleanly to single column */
  html body .hero,
  html body .hero-section {
    grid-template-columns: 1fr !important;
    background: #0d0f12 !important;
  }
  html body h1,
  html body .hero h1,
  html body .blog-hero h1,
  html body .section-h,
  html body .planner-h1 {
    font-size: clamp(28px, 7vw, 40px) !important;
    line-height: 1.1 !important;
  }

  html body h2,
  html body .section-h {
    font-size: clamp(22px, 5.5vw, 32px) !important;
    line-height: 1.15 !important;
  }

  html body [style*="font-size:48px"],
  html body [style*="font-size:56px"],
  html body [style*="font-size:64px"],
  html body [style*="font-size:72px"] {
    font-size: clamp(28px, 7vw, 40px) !important;
    line-height: 1.1 !important;
  }

  html body [style*="font-size:34px"],
  html body [style*="font-size:36px"],
  html body [style*="font-size:40px"] {
    font-size: clamp(22px, 5.5vw, 30px) !important;
    line-height: 1.15 !important;
  }

  html body p,
  html body li {
    font-size: 16px !important;
    line-height: 1.65 !important;
  }

  /* ── SECTION PADDING ──────────────────────────────────── */
  html body .section,
  html body .blog-hero,
  html body .bottom-cta,
  html body [style*="padding:64px 0"],
  html body [style*="padding:80px 0"],
  html body [style*="padding:96px 0"],
  html body [style*="padding:120px 0"],
  html body [style*="padding:56px 0"] {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }

  html body [style*="padding:0 52px"] {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  html body .container,
  html body .wrap,
  html body .article-wrap {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* ── HEADER / NAV (general — non-mobile-nav cases) ─────── */
  html body header,
  html body .nav:not(.epp-mobile-nav),
  html body [style*="position:sticky"][style*="z-index:100"]:not(.epp-mobile-nav) {
    height: 56px !important;
    padding: 0 16px !important;
  }

  /* ── GRIDS — class-based ──────────────────────────────── */
  html body .who-grid,
  html body .svc-grid,
  html body .team-grid,
  html body .team-cards,
  html body .testi-grid,
  html body .blog-grid,
  html body .related-grid,
  html body .grid-2,
  html body .grid-3,
  html body .grid-4,
  html body .footer-grid,
  html body .stats-band,
  html body .journey-grid,
  html body .who-photos,
  html body .disc-grid,
  html body .pos-grid,
  html body .venues-grid,
  html body .stat-row,
  html body .fb-col {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  html body .stat-strip,
  html body .stats-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  /* ── VENUE CARDS ──────────────────────────────────────── */
  html body .venues-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  html body .venue-card,
  html body .venue-card[style*="grid-column"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    grid-column: auto !important;
  }
  html body .venue-photo,
  html body .venue-photo img {
    width: 100% !important;
    height: auto !important;
  }

  /* ── BUTTONS & CTAS ───────────────────────────────────── */
  html body .btn,
  html body .btn-primary,
  html body .nav-cta,
  html body [class*="btn-"]:not(.nav-cta) {
    min-height: 48px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    font-size: 13px !important;
    text-align: center !important;
    justify-content: center !important;
  }

  html body .hero-actions,
  html body .plan-actions,
  html body [style*="display:flex"][style*="gap:10px"],
  html body [style*="display:flex"][style*="gap:12px"],
  html body [style*="display:flex"][style*="gap:16px"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  html body .hero-actions > *,
  html body .hero-actions a,
  html body .plan-actions > *,
  html body .plan-actions button {
    width: 100% !important;
  }

  /* ── FORMS ────────────────────────────────────────────── */
  html body input[type="text"],
  html body input[type="email"],
  html body input[type="tel"],
  html body input[type="number"],
  html body input[type="search"],
  html body textarea,
  html body select,
  html body .form-input,
  html body .field-input {
    width: 100% !important;
    font-size: 16px !important;
    min-height: 48px !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
  }
  html body textarea {
    min-height: 100px !important;
  }
  html body .field-row {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  html body #nl-form input,
  html body #nl-form select,
  html body #nl-form button {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* ── ARTICLE BODY ─────────────────────────────────────── */
  html body .article-wrap {
    padding: 24px 16px 48px !important;
    font-size: 17px !important;
    line-height: 1.7 !important;
  }
  html body .article-wrap h2 {
    font-size: clamp(22px, 5.5vw, 28px) !important;
    margin-top: 32px !important;
    margin-bottom: 12px !important;
  }
  html body .article-wrap h3 {
    font-size: clamp(18px, 4.5vw, 22px) !important;
  }
  html body .article-wrap table {
    font-size: 14px;
    margin: 16px -16px;
    width: calc(100% + 32px);
  }

  /* ── SPACING ──────────────────────────────────────────── */
  html body [style*="gap:40px"],
  html body [style*="gap:48px"],
  html body [style*="gap:56px"],
  html body [style*="gap:64px"] {
    gap: 16px !important;
  }

  /* ── CARDS ────────────────────────────────────────────── */
  html body .card,
  html body .testi-card,
  html body .svc-card,
  html body .blog-card,
  html body .team-card,
  html body .venue-card,
  html body [style*="padding:32px"][style*="background:"],
  html body [style*="padding:36px"],
  html body [style*="padding:40px"][style*="background:"] {
    padding: 20px !important;
  }

  /* ── FOOTER ───────────────────────────────────────────── */
  html body footer {
    padding: 32px 16px 24px !important;
  }
}


/* ============================================================
 * 480px — STANDARD PHONES
 * ============================================================ */
@media (max-width: 480px) {

  html body h1,
  html body .hero h1,
  html body .blog-hero h1,
  html body .section-h {
    font-size: clamp(24px, 7vw, 32px) !important;
  }
  html body h2 {
    font-size: clamp(20px, 6vw, 26px) !important;
  }

  html body .section,
  html body .blog-hero,
  html body .bottom-cta {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }

  html body footer .footer-grid {
    grid-template-columns: 1fr !important;
  }
  html body .stat-strip {
    grid-template-columns: 1fr !important;
  }

  html body [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: 1fr !important;
  }
}


/* ============================================================
 * 380px — SMALL PHONES
 * ============================================================ */
@media (max-width: 380px) {

  html body h1,
  html body .hero h1,
  html body .blog-hero h1 {
    font-size: clamp(22px, 7vw, 28px) !important;
  }

  html body .container,
  html body .wrap,
  html body .article-wrap {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  html body header,
  html body .nav:not(.epp-mobile-nav) {
    padding: 0 12px !important;
  }

  html body .btn,
  html body .btn-primary {
    padding-left: 14px !important;
    padding-right: 14px !important;
    font-size: 12px !important;
    letter-spacing: 0.04em !important;
  }
}


/* ============================================================
 * iOS-SPECIFIC
 * ============================================================ */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 600px) {
    html body input,
    html body select,
    html body textarea {
      font-size: 16px !important;
    }
  }
}


/* ============================================================
 * TOUCH DEVICE
 * ============================================================ */
@media (max-width: 900px) and (hover: none) {
  html body *:hover {
    transition: none;
  }
  html body a:not(.epp-mobile-menu-right a):not(.epp-mobile-menu-ul a),
  html body button,
  html body [role="button"],
  html body input[type="submit"],
  html body input[type="button"] {
    min-height: 44px;
  }
  html body nav:not(.epp-mobile-nav) a {
    padding: 12px 16px !important;
  }
}


/* ============================================================
 * REDUCED MOTION
 * ============================================================ */
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  html body *,
  html body *::before,
  html body *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html body .epp-mobile-menu,
  html body .epp-mobile-backdrop,
  html body .epp-hamburger-line {
    transition: none !important;
  }
}


/* ============================================================
 * PRINT
 * ============================================================ */
@media print {
  header, nav, footer, .bottom-cta, .nav-cta,
  #quiz-float, #promo-banner,
  .epp-hamburger, .epp-mobile-menu, .epp-mobile-backdrop,
  .countdown-banner, .floating-cta,
  [class*="cookieyes"] {
    display: none !important;
  }
  body {
    color: #000 !important;
    background: #fff !important;
  }
}


/* ============================================================
 * NUCLEAR OVERRIDES — guaranteed to apply via maximum specificity
 * Loaded at the END of the file so they win the cascade order.
 * ============================================================ */
@media (max-width: 600px) {

  /* Promo banner: hide it three ways simultaneously */
  html body div#promo-banner,
  html body[class] #promo-banner,
  html#fff body #promo-banner {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Hero-right: hide every element inside */
  html body section#hero .hero-right,
  html body section.hero .hero-right,
  html body[class] .hero-right,
  html body[class] .hero-right *,
  html body[class] .booking-card,
  html body[class] .hero-right-photo,
  html body[class] .hero-right-overlay {
    display: none !important;
    visibility: hidden !important;
  }

  /* Force mobile-nav to compact, single-row, dark, fixed-height */
  html body nav.epp-mobile-nav,
  html body[class] nav.epp-mobile-nav {
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    padding: 0 16px !important;
    background: #0d0f12 !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  /* Constrain logo */
  html body nav.epp-mobile-nav > a,
  html body[class] nav.epp-mobile-nav > a {
    flex-shrink: 1 !important;
    min-width: 0 !important;
    max-width: calc(100% - 60px) !important;
    overflow: hidden !important;
    flex-wrap: nowrap !important;
  }

  html body nav.epp-mobile-nav > a img,
  html body[class] nav.epp-mobile-nav > a img {
    width: 36px !important;
    height: 36px !important;
    flex-shrink: 0 !important;
  }

  html body nav.epp-mobile-nav > a > div,
  html body[class] nav.epp-mobile-nav > a > div {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
  }
}
