/* =========================================================================
   Site-wide overrides
   Loaded AFTER Pixfort/Essentials so these win where we need them to.
   Scope everything through .alchblocks-theme on <body> where possible, and
   reach into Pixfort classes only by their stable selectors.
   ========================================================================= */

/* ---------- Typography: Cinzel on ALL headers + hero text ---------- */
/* First: catch everything the theme + ATHS plugin output. Body-scoped so
   specificity > any plugin rule using plain .class { !important }. */
body h1, body h2, body h3, body h4, body h5, body h6,
body .pix-heading h1, body .pix-heading h2, body .pix-heading h3,
body .pix-heading h4, body .pix-heading h5, body .pix-heading h6,
body .pix-hero-title, body .pix-hero-subtitle,
body .pix-btn,
/* ATHS plugin specifics */
body .aths-about-hero-title,
body .aths-hero-title,
body .aths-section-title,
body .aths-service-title,
body [class^="aths-"][class$="-title"],
body [class^="aths-"][class$="-heading"],
body [class^="aths-"][class$="-name"],
body [class*="-hero-title"],
body [class*="-section-title"],
body [class*="-tabs-heading"],
body [class*="-dark-heading"],
body [class*="-section-heading"],
body [class*="-block-heading"],
body [class*="pix-sliding-headline"],
body .pix-sliding-headline-2,
body .pix-animated-headline,
body [class*="pix-animated"] {
  font-family: var(--alch-font-head) !important;
  letter-spacing: 0.02em !important;
}

/* Nuclear fallback: any h1-h6 in the document, scoped by html to trump
   class-only rules from pixfort/aths/essentials. */
html body h1,
html body h2,
html body h3,
html body h4,
html body h5,
html body h6 {
  font-family: var(--alch-font-head) !important;
}

/* Editorial body text */
body,
.pix-text,
p {
  font-family: var(--alch-font-body);
  font-size: 1.075rem;
  line-height: 1.7;
}

/* =========================================================================
   Header / main nav — responsive tuning
   Baseline: Cinzel, uppercase, wide tracking — beautiful wide, cramped narrow.
   We scale tracking + size + padding down smoothly as the viewport tightens,
   and flip to the drawer earlier so the mid-width band (992–1199px) never
   shows overlapping or wrapped link text.
   ========================================================================= */

/* Baseline (>=1280px — full Cinzel treatment) */
.pix-main-menu a {
  font-family: var(--alch-font-head);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  white-space: nowrap;
}

/* Item gap absorbs width changes before tracking does. We use list-item
   margins (not link padding) because the theme also targets link padding
   with !important and would otherwise win. Specificity boosted via
   body.home / body chain so any theme rule short of inline style is beat. */
html body .pix-main-menu > ul > li,
html body .pix-main-menu .navbar-nav > li {
  margin-left: clamp(0.15rem, 0.5vw, 0.55rem) !important;
  margin-right: clamp(0.15rem, 0.5vw, 0.55rem) !important;
}

/* Keep the three header columns (flex-1 trio) from forcing the middle column
   to squeeze into a zero-width lane when the right column has a CTA. */
.pix-header .pixfort-header-col {
  min-width: 0;
}

/* Medium-large (1200–1279px): ease off the tracking so "Diagnostic Labs"
   and "Women's Health" stop looking crammed next to their neighbors. */
@media (max-width: 1279px) {
  .pix-main-menu a {
    letter-spacing: 0.06em;
    font-size: 0.78rem;
  }
}

/* Desktop-tight (992–1199px): a lot of Bootstrap themes leave this band in
   "desktop" mode, which is where the user's complaint mostly lives. Tighten
   further and shave the space between items. */
@media (max-width: 1199px) {
  .pix-main-menu a {
    letter-spacing: 0.045em;
    font-size: 0.74rem;
  }
  .pix-main-menu > ul > li > a,
  .pix-main-menu .navbar-nav > li > a,
  .pix-main-menu .nav-link {
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
  }
  /* Demote the dropdown caret so it doesn't eat a full em of width */
  .pix-main-menu .dropdown-toggle::after {
    margin-left: 0.35em;
    transform: scale(0.9);
  }
}

/* Pixfort ships two complete headers: .pix-header-desktop and
   .pix-header-mobile (which owns the .small-menu-toggle hamburger and its own
   drawer). The theme swaps them at ~992px. We flip earlier — at 1099px —
   because between 992–1099 the desktop horizontal nav was physically
   touching adjacent items. */
@media (max-width: 1099px) {
  .pix-header-desktop {
    display: none !important;
  }
  .pix-header-mobile {
    display: block !important;
  }
}

/* =========================================================================
   Mobile menu: full-screen editorial overlay.
   -------------------------------------------------------------------------
   Pixfort collapses the mobile header into a bootstrap `.navbar-collapse`
   that normally drops down below the header as a small drawer. We reuse
   its existing open/close state (no theme JS changes needed) but re-skin
   it as a full-viewport overlay: fixed inset:0, deep-midnight gradient,
   Cinzel labels at ~1.75rem stacked center, hairline gold separators,
   items stagger-reveal, hamburger flips to visible on cream, body scroll
   is locked while it's open. Breakpoint matches the desktop/mobile swap
   at 1099px (see rule above).
   ========================================================================= */
@media (max-width: 1099px) {

  /* Strip the old cream-drawer chrome off the collapse container so when
     it's hidden (no .show / .collapsing) it inherits no leftover styles. */
  html body .pix-header-mobile .navbar-collapse,
  html body .pix-header .navbar-collapse {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
  }

  /* Full-screen overlay chrome — applied while open AND during Bootstrap's
     `.collapsing` mid-transition, so we never see a height-animating drawer. */
  html body .pix-header-mobile .navbar-collapse.show,
  html body .pix-header-mobile .navbar-collapse.collapsing,
  html body .pix-header .navbar-collapse.show,
  html body .pix-header .navbar-collapse.collapsing {
    display: flex !important;
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;           /* dvh accounts for iOS URL bar */
    max-height: 100dvh !important;
    z-index: 9998 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow-y: auto !important;
    background:
      radial-gradient(900px 600px at 18% -10%, rgba(212, 175, 55, 0.09) 0%, transparent 60%),
      radial-gradient(1200px 800px at 85% 110%, rgba(82, 93, 141, 0.16) 0%, transparent 55%),
      linear-gradient(180deg, #0a0f1f 0%, #05080f 100%) !important;
    -webkit-backdrop-filter: saturate(140%) blur(8px);
    backdrop-filter: saturate(140%) blur(8px);
    animation: alch-mobilenav-in 340ms cubic-bezier(0.2, 0.7, 0.1, 1);
  }

  @keyframes alch-mobilenav-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  /* Inner <ul> becomes the vertical stack, centered in the free space
     below the header. Top padding clears the sticky header area. */
  html body .pix-header-mobile .navbar-collapse.show ul.navbar-nav,
  html body .pix-header-mobile .navbar-collapse.collapsing ul.navbar-nav,
  html body .pix-header-mobile .navbar-collapse.show ul,
  html body .pix-header-mobile .navbar-collapse.collapsing ul,
  html body .pix-header .navbar-collapse.show ul.navbar-nav,
  html body .pix-header .navbar-collapse.collapsing ul.navbar-nav {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 6rem 1.5rem 4rem !important;
    margin: 0 !important;
    list-style: none !important;
    background: transparent !important;
    border: 0 !important;
  }

  /* Menu items: width-capped for readability, hairline divider between
     siblings, stagger-reveal animation. */
  html body .pix-header-mobile .navbar-collapse.show .menu-item,
  html body .pix-header-mobile .navbar-collapse.collapsing .menu-item,
  html body .pix-header .navbar-collapse.show .menu-item,
  html body .pix-header .navbar-collapse.collapsing .menu-item {
    position: relative;
    width: 100% !important;
    max-width: 32rem !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0;
    transform: translateY(14px);
    animation: alch-mobilenav-item-in 540ms cubic-bezier(0.2, 0.7, 0.1, 1) forwards;
  }

  /* Hairline gold divider between items (not before the first). */
  html body .pix-header-mobile .navbar-collapse.show .menu-item + .menu-item::before,
  html body .pix-header-mobile .navbar-collapse.collapsing .menu-item + .menu-item::before,
  html body .pix-header .navbar-collapse.show .menu-item + .menu-item::before,
  html body .pix-header .navbar-collapse.collapsing .menu-item + .menu-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 22%;
    right: 22%;
    height: 1px;
    background: linear-gradient(90deg,
      transparent 0%,
      rgba(212, 175, 55, 0.32) 50%,
      transparent 100%);
  }

  /* Staggered reveal — covers up to 8 top-level items. */
  html body .pix-header-mobile .navbar-collapse.show .menu-item:nth-child(1) { animation-delay: 120ms; }
  html body .pix-header-mobile .navbar-collapse.show .menu-item:nth-child(2) { animation-delay: 180ms; }
  html body .pix-header-mobile .navbar-collapse.show .menu-item:nth-child(3) { animation-delay: 240ms; }
  html body .pix-header-mobile .navbar-collapse.show .menu-item:nth-child(4) { animation-delay: 300ms; }
  html body .pix-header-mobile .navbar-collapse.show .menu-item:nth-child(5) { animation-delay: 360ms; }
  html body .pix-header-mobile .navbar-collapse.show .menu-item:nth-child(6) { animation-delay: 420ms; }
  html body .pix-header-mobile .navbar-collapse.show .menu-item:nth-child(7) { animation-delay: 480ms; }
  html body .pix-header-mobile .navbar-collapse.show .menu-item:nth-child(8) { animation-delay: 540ms; }

  @keyframes alch-mobilenav-item-in {
    to { opacity: 1; transform: translateY(0); }
  }

  /* Anchors: Cinzel, uppercase, centered, airy vertical rhythm. */
  html body .pix-header-mobile .navbar-collapse.show .menu-item > a,
  html body .pix-header-mobile .navbar-collapse.collapsing .menu-item > a,
  html body .pix-header-mobile .navbar-collapse.show .pix-nav-link,
  html body .pix-header-mobile .navbar-collapse.collapsing .pix-nav-link,
  html body .pix-header .navbar-collapse.show .menu-item > a,
  html body .pix-header .navbar-collapse.collapsing .menu-item > a {
    display: block !important;
    width: 100% !important;
    padding: 1.4rem 1rem !important;
    border: 0 !important;
    font-family: 'Cinzel', var(--alch-font-head, serif) !important;
    font-weight: 500 !important;
    font-size: clamp(1.5rem, 5vw, 2rem) !important;
    line-height: 1.15 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    text-align: center !important;
    color: #f4ead6 !important;           /* warm cream against midnight */
    background: transparent !important;
    transition: color 180ms ease, transform 180ms ease !important;
  }

  /* Active / hover / focus: gold shift + subtle lift. */
  html body .pix-header-mobile .navbar-collapse.show .menu-item > a:hover,
  html body .pix-header-mobile .navbar-collapse.show .menu-item > a:focus,
  html body .pix-header-mobile .navbar-collapse.show .menu-item.current-menu-item > a,
  html body .pix-header-mobile .navbar-collapse.show .menu-item.current_page_item > a,
  html body .pix-header .navbar-collapse.show .menu-item > a:hover,
  html body .pix-header .navbar-collapse.show .menu-item > a:focus {
    color: #d4af37 !important;
    transform: translateY(-1px);
  }

  /* Dropdown carets look odd on huge serif labels — hide them. */
  html body .pix-header-mobile .navbar-collapse.show .dropdown-toggle::after,
  html body .pix-header-mobile .navbar-collapse.collapsing .dropdown-toggle::after,
  html body .pix-header .navbar-collapse.show .dropdown-toggle::after,
  html body .pix-header .navbar-collapse.collapsing .dropdown-toggle::after {
    display: none !important;
  }

  /* Submenus inline, indented, quieter. */
  html body .pix-header-mobile .navbar-collapse.show .sub-menu,
  html body .pix-header-mobile .navbar-collapse.show .dropdown-menu,
  html body .pix-header .navbar-collapse.show .sub-menu,
  html body .pix-header .navbar-collapse.show .dropdown-menu {
    position: static !important;
    transform: none !important;
    float: none !important;
    width: 100% !important;
    padding: 0.25rem 0 1rem !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    display: block !important;
  }
  html body .pix-header-mobile .navbar-collapse.show .sub-menu > li > a,
  html body .pix-header-mobile .navbar-collapse.show .dropdown-menu > li > a,
  html body .pix-header .navbar-collapse.show .sub-menu > li > a,
  html body .pix-header .navbar-collapse.show .dropdown-menu > li > a {
    font-size: clamp(0.95rem, 2.8vw, 1.1rem) !important;
    padding: 0.7rem 1rem !important;
    font-family: var(--alch-font-body, inherit) !important;
    letter-spacing: 0.04em !important;
    color: rgba(244, 234, 214, 0.72) !important;
    text-transform: none !important;
  }

  /* Hamburger + logo stay on top so users can always close & orient. */
  .pix-header-mobile .navbar-toggler,
  .pix-header-mobile .small-menu-toggle,
  .pix-header-mobile .hamburger,
  .pix-header-mobile .pix-logo,
  .pix-header-mobile .navbar-brand,
  .pix-header .navbar-toggler,
  .pix-header .hamburger {
    position: relative !important;
    z-index: 9999 !important;
  }

  /* Hamburger color inverts to cream while overlay is open so the
     hamburger→X still reads against the midnight bg. Pixfort toggles
     either `.is-active` or body class `.menu-open`, depending on version —
     cover both. */
  body.menu-open .pix-header-mobile .hamburger-inner,
  body.menu-open .pix-header-mobile .hamburger-inner-before,
  body.menu-open .pix-header-mobile .hamburger-inner-after,
  .pix-header-mobile .hamburger.is-active .hamburger-inner,
  .pix-header-mobile .hamburger.is-active .hamburger-inner-before,
  .pix-header-mobile .hamburger.is-active .hamburger-inner-after,
  .pix-header .hamburger.is-active .hamburger-inner,
  .pix-header .hamburger.is-active .hamburger-inner-before,
  .pix-header .hamburger.is-active .hamburger-inner-after {
    background-color: #f4ead6 !important;
  }

  /* Page-scroll lock while overlay is open (modern browsers via :has). */
  html:has(.pix-header-mobile .navbar-collapse.show),
  html:has(.pix-header .navbar-collapse.show),
  body:has(.pix-header-mobile .navbar-collapse.show),
  body:has(.pix-header .navbar-collapse.show) {
    overflow: hidden !important;
  }

  /* Respect reduced motion — disable staggered reveal + overlay fade. */
  @media (prefers-reduced-motion: reduce) {
    html body .pix-header-mobile .navbar-collapse.show,
    html body .pix-header-mobile .navbar-collapse.collapsing {
      animation: none !important;
    }
    html body .pix-header-mobile .navbar-collapse.show .menu-item {
      animation: none !important;
      opacity: 1 !important;
      transform: none !important;
    }
  }
}

/* =========================================================================
   Mobile header bar — overflow + visibility patch (May 2026)
   -------------------------------------------------------------------------
   Two reported issues:
   1. The closed mobile header bar extended past the right edge of the
      viewport because the .container-fluid + flex-1 columns inherited
      desktop padding/min-widths and no parent had overflow-x:hidden.
   2. Inside the open overlay, menu items styled as Pixfort CTA buttons
      (.pix-btn / .btn) — and items inheriting Bootstrap text-* utility
      colors from the desktop nav — were rendering white-on-cream or
      dark-on-midnight, i.e. invisible.
   Solutions below address both without touching pixfort-core.
   ========================================================================= */
@media (max-width: 1099px) {

  /* Hard cap the mobile header bar to viewport width and clip stray flex
     children that try to push past it (Pixfort flex-1 cols + min-width:0
     above set this up, but the nested .container-fluid still leaks). */
  html body .pix-header-mobile,
  html body .pix-header-mobile > .container-fluid,
  html body .pix-header-mobile .pixfort-header-col,
  html body .pix-header-mobile .navbar {
    max-width: 100vw !important;
    overflow-x: clip;
  }
  html body .pix-header-mobile > .container-fluid {
    padding-left: max(env(safe-area-inset-left), 1rem) !important;
    padding-right: max(env(safe-area-inset-right), 1rem) !important;
  }
  /* The body itself shouldn't horizontally scroll at any time. */
  html, body { overflow-x: hidden; }

  /* The CTA button + LOGIN link in the right-most flex column tend to
     overflow. Allow them to wrap or shrink rather than push the bar. */
  html body .pix-header-mobile .pix-btn,
  html body .pix-header-mobile .btn,
  html body .pix-header-mobile .pix-header-cta {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* =========================================================================
   Mobile overlay menu items — universal cream-on-midnight enforcement
   -------------------------------------------------------------------------
   Every link inside the open overlay reads as warm cream (#f4ead6) regardless
   of how Pixfort styled it on desktop:
   • Defeats Bootstrap text-* utilities (text-dark, text-white, text-primary…)
   • Strips any pix-btn / btn fill so a CTA-styled menu item doesn't show as
     a white pill on a midnight overlay.
   • Re-paints icons, captions, badges in the same cream tone.
   ========================================================================= */
@media (max-width: 1099px) {
  html body .pix-header-mobile .navbar-collapse.show *,
  html body .pix-header-mobile .navbar-collapse.collapsing *,
  html body .pix-header .navbar-collapse.show *,
  html body .pix-header .navbar-collapse.collapsing * {
    color: #f4ead6 !important;
  }

  /* Menu items wearing CTA-button styles: drop the fill, drop the border;
     the underline/gold-on-hover treatment from the main rule still applies. */
  html body .pix-header-mobile .navbar-collapse.show .pix-btn,
  html body .pix-header-mobile .navbar-collapse.show .btn,
  html body .pix-header-mobile .navbar-collapse.show .menu-item .pix-btn,
  html body .pix-header-mobile .navbar-collapse.show a.pix-btn,
  html body .pix-header-mobile .navbar-collapse.show a.btn,
  html body .pix-header .navbar-collapse.show .pix-btn,
  html body .pix-header .navbar-collapse.show .btn {
    background: transparent !important;
    background-color: transparent !important;
    border-color: rgba(212, 175, 55, 0.45) !important;
    box-shadow: none !important;
    color: #f4ead6 !important;
    -webkit-text-fill-color: #f4ead6 !important;
  }

  /* Hover/focus on overlay CTAs picks up the gold accent like the rest. */
  html body .pix-header-mobile .navbar-collapse.show .pix-btn:hover,
  html body .pix-header-mobile .navbar-collapse.show .pix-btn:focus,
  html body .pix-header-mobile .navbar-collapse.show .btn:hover,
  html body .pix-header-mobile .navbar-collapse.show .btn:focus {
    color: var(--alch-gold-500) !important;
    -webkit-text-fill-color: var(--alch-gold-500) !important;
    border-color: var(--alch-gold-500) !important;
  }

  /* Active menu item (current page) keeps its gold tone, beating the
     universal selector above. */
  html body .pix-header-mobile .navbar-collapse.show .current-menu-item > a,
  html body .pix-header-mobile .navbar-collapse.show .current_page_item > a,
  html body .pix-header-mobile .navbar-collapse.show .menu-item > a:hover,
  html body .pix-header-mobile .navbar-collapse.show .menu-item > a:focus,
  html body .pix-header .navbar-collapse.show .current-menu-item > a,
  html body .pix-header .navbar-collapse.show .current_page_item > a {
    color: var(--alch-gold-500) !important;
    -webkit-text-fill-color: var(--alch-gold-500) !important;
  }

  /* Pixfort sometimes paints the link's <span> with an inline color. The
     universal cream rule above wins via specificity, but if a developer
     inlines a style, this override of -webkit-text-fill-color forces the
     glyph color even when CSS `color` is overridden. */
  html body .pix-header-mobile .navbar-collapse.show .pix-nav-link,
  html body .pix-header-mobile .navbar-collapse.show .menu-item > a,
  html body .pix-header-mobile .navbar-collapse.show .menu-item > a > span,
  html body .pix-header .navbar-collapse.show .pix-nav-link,
  html body .pix-header .navbar-collapse.show .menu-item > a {
    -webkit-text-fill-color: #f4ead6 !important;
  }
}

/* True mobile (<=600px): smaller logo + compact CTA so the toggler fits. */
@media (max-width: 600px) {
  .pix-header .navbar-brand img,
  .pix-header .pix-logo img {
    max-height: 36px;
    width: auto;
  }
  .pix-header .pix-btn,
  .pix-header .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.72rem;
  }
  /* On small screens hide the "LOGIN" / "GET STARTED" header CTAs entirely
     so only the logo + hamburger remain — they'll appear in the overlay. */
  .pix-header-mobile .pix-header-cta,
  .pix-header-mobile .pixfort-header-col[data-col="m_header_3"] .pix-btn {
    display: none !important;
  }
}

/* ---------- Shadow system on imagery (opt-in via class) ---------- */
/* Apply .alch-shadow on any .pix-img or <img> wrapper you want shadowed.
   This is explicitly opt-in so it does NOT bleed into nav logos,
   icons, SVG badges, or the hero carousel. */
.alch-shadow,
.alch-shadow img,
.alch-shadow .pix-img-holder {
  border-radius: var(--alch-radius);
  box-shadow: var(--alch-shadow-soft);
  transition: box-shadow var(--alch-dur) var(--alch-ease),
              transform var(--alch-dur) var(--alch-ease);
}
.alch-shadow:hover {
  box-shadow: var(--alch-shadow-lift);
  transform: translateY(-2px);
}
/* Stronger variant for hero / product cards */
.alch-shadow-lg,
.alch-shadow-lg img {
  border-radius: var(--alch-radius-lg);
  box-shadow: var(--alch-shadow-lift);
}

/* ---------- Treatment cards: midnight (men) + gold (women) ----------
   Apply .alch-card--mens or .alch-card--womens on Pixfort card wrappers.
   Works with .pix-card, .pix-feature, .pix-promo-box, and our own cards. */
.alch-card--mens,
.alch-card--mens .pix-card-inner,
.alch-card--mens.pix-feature {
  background: var(--alch-grad-midnight) !important;
  color: var(--alch-text-invert) !important;
  border: 1px solid rgba(212,175,55,0.12);
  box-shadow: var(--alch-shadow-lift);
  border-radius: var(--alch-radius);
}
.alch-card--mens * { color: var(--alch-text-invert) !important; }
.alch-card--mens .pix-card-icon,
.alch-card--mens svg { color: var(--alch-gold-500) !important; fill: var(--alch-gold-500) !important; }

.alch-card--womens,
.alch-card--womens .pix-card-inner,
.alch-card--womens.pix-feature {
  background: linear-gradient(150deg, #fff 0%, #fbf7ea 55%, #f3e2a3 100%) !important;
  color: var(--alch-midnight-800) !important;
  border: 1px solid rgba(173,135,38,0.28);
  box-shadow: var(--alch-shadow-gold);
  border-radius: var(--alch-radius);
}
.alch-card--womens .pix-card-title,
.alch-card--womens h3 { color: var(--alch-gold-900) !important; }

/* Alternate pattern variant: every other card uses the solid midnight fill */
.alch-card--womens.alch-card--alt {
  background: var(--alch-grad-midnight) !important;
  color: var(--alch-text-invert) !important;
  border-color: var(--alch-gold-500);
}
.alch-card--womens.alch-card--alt * { color: var(--alch-gold-200) !important; }

/* ---------- Brand page: solid midnight background ----------
   Two selectors: .page-brand (if the custom class is set via Page Attrs)
   and .page-id-314 (WordPress sets this automatically on the Brand page,
   so the theme works even if no extra class is added). */
body.page-brand,
body.page-id-314,
body.page-brand .page-wrap,
body.page-id-314 .page-wrap,
body.page-brand main,
body.page-id-314 main,
body.page-brand #content,
body.page-id-314 #content,
body.page-brand .site-content,
body.page-id-314 .site-content,
body.page-brand #page,
body.page-id-314 #page {
  background: var(--alch-midnight-800) !important;
  color: var(--alch-text-invert);
}
/* Pixfort puts bg-white on #content; explicitly defeat it on the brand page. */
body.page-id-314 #content.bg-white,
body.page-brand #content.bg-white {
  background-color: var(--alch-midnight-800) !important;
}
body.page-brand h1, body.page-brand h2, body.page-brand h3,
body.page-id-314 h1, body.page-id-314 h2, body.page-id-314 h3 {
  color: var(--alch-gold-500);
}

/* ---------- Brand page: full-bleed filled rows ----------
   WPBakery rows with "background color" don't default to stretching full
   viewport width — they honor the row container (min(1200px, 92vw) or the
   bootstrap col). On large monitors the row fill visibly stops short of the
   window edge. We force every `vc_row-has-fill` on the brand page to bleed
   edge-to-edge while keeping the inner content inside the safe container. */
body.page-brand .vc_row-has-fill,
body.page-id-314 .vc_row-has-fill,
body.page-brand .vc_row.vc_row-has-fill.vc_inner,
body.page-id-314 .vc_row.vc_row-has-fill.vc_inner {
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding-left: max(43px, calc(50vw - 600px)) !important;
  padding-right: max(43px, calc(50vw - 600px)) !important;
  box-sizing: border-box !important;
}

/* ---------- Brand page: contrast rules per row fill ----------
   The `.jorge` row (founder bio) is painted white; everything inside should
   read as dark midnight type, not the page-default ivory. Conversely the
   three black fill rows need ivory/gold text — they already do via the
   page-brand default but enforce it here so nested editor choices don't
   wash text out. */
body.page-brand .vc_row-has-fill.jorge,
body.page-id-314 .vc_row-has-fill.jorge {
  background: var(--alch-paper) !important;
  color: var(--alch-midnight-900) !important;
}
body.page-brand .jorge,
body.page-id-314 .jorge,
body.page-brand .jorge *,
body.page-id-314 .jorge * {
  color: var(--alch-midnight-900) !important;
}
body.page-brand .jorge h1,
body.page-brand .jorge h2,
body.page-brand .jorge h3,
body.page-brand .jorge h4,
body.page-id-314 .jorge h1,
body.page-id-314 .jorge h2,
body.page-id-314 .jorge h3,
body.page-id-314 .jorge h4 {
  color: var(--alch-gold-900) !important;
  font-family: var(--alch-font-head) !important;
}
body.page-brand .jorge a,
body.page-id-314 .jorge a {
  color: var(--alch-gold-700) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Every other filled row on brand is treated as a dark editorial panel: keep
   ivory body type + gold headings regardless of what the editor selected. */
body.page-brand .vc_row-has-fill:not(.jorge),
body.page-id-314 .vc_row-has-fill:not(.jorge) {
  color: var(--alch-ivory) !important;
}
body.page-brand .vc_row-has-fill:not(.jorge) p,
body.page-id-314 .vc_row-has-fill:not(.jorge) p,
body.page-brand .vc_row-has-fill:not(.jorge) li,
body.page-id-314 .vc_row-has-fill:not(.jorge) li,
body.page-brand .vc_row-has-fill:not(.jorge) span,
body.page-id-314 .vc_row-has-fill:not(.jorge) span {
  color: var(--alch-ivory) !important;
}
body.page-brand .vc_row-has-fill:not(.jorge) h1,
body.page-brand .vc_row-has-fill:not(.jorge) h2,
body.page-brand .vc_row-has-fill:not(.jorge) h3,
body.page-id-314 .vc_row-has-fill:not(.jorge) h1,
body.page-id-314 .vc_row-has-fill:not(.jorge) h2,
body.page-id-314 .vc_row-has-fill:not(.jorge) h3 {
  color: var(--alch-gold-400) !important;
}

/* Guard: if a .vc_col has its own fill, make sure text contrast still holds.
   Column-level fills in WPBakery are white by default when the editor clicks
   "Background color" — apply midnight text inside white column panels. */
body.page-brand .vc_col-has-fill,
body.page-id-314 .vc_col-has-fill {
  color: var(--alch-midnight-900) !important;
}
body.page-brand .vc_col-has-fill h1,
body.page-brand .vc_col-has-fill h2,
body.page-brand .vc_col-has-fill h3,
body.page-id-314 .vc_col-has-fill h1,
body.page-id-314 .vc_col-has-fill h2,
body.page-id-314 .vc_col-has-fill h3 {
  color: var(--alch-gold-900) !important;
}

/* ---------- FAQ: bold all questions ---------- */
.pix-accordion-title,
.pix-faq .pix-heading,
.pix-faq dt,
.pix-faq .accordion-title {
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ---------- FAQ layout with image (companion shortcode gives you this for free) ---------- */
.alch-faq-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; align-items: flex-start; }
@media (max-width: 820px) { .alch-faq-row { grid-template-columns: 1fr; } }
.alch-faq-row__image { border-radius: var(--alch-radius-lg); overflow: hidden; box-shadow: var(--alch-shadow-lift); }
.alch-faq-row__image img { width: 100%; height: auto; display: block; }

/* ---------- Hero: faded overlay text bottom-center (Good Life Meds pattern) ---------- */
.alch-hero-overlay {
  position: absolute; left: 0; right: 0; bottom: 2.5rem;
  display: flex; justify-content: center; gap: clamp(1rem, 3vw, 3rem);
  padding: 0 1rem;
  font-family: var(--alch-font-head);
  font-size: clamp(0.72rem, 1.2vw, 0.95rem);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(255,255,255,0.78);
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  pointer-events: none;
}
.alch-hero-overlay__item {
  position: relative;
  padding: 0 1rem;
}
.alch-hero-overlay__item + .alch-hero-overlay__item::before {
  content: "—"; position: absolute; left: -0.8rem; top: 0; opacity: 0.55;
}

/* Parent hero wrappers need relative positioning. Add .alch-hero on the pix section. */
.alch-hero, .pix-section.alch-hero { position: relative; }

/* ---------- Blood work: make square labels pop ---------- */
.alch-bloodwork-tile {
  background: var(--alch-grad-midnight);
  color: var(--alch-text-invert);
  border-radius: var(--alch-radius);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--alch-shadow-lift);
}
.alch-bloodwork-tile__title {
  font-family: var(--alch-font-head);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}
.alch-bloodwork-tile__sub {
  color: var(--alch-gold-400);
  font-family: var(--alch-font-head);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}
.alch-bloodwork-tile__icon {
  position: absolute; top: 1.25rem; right: 1.25rem;
  width: 34px; height: 34px; color: var(--alch-gold-500);
}
.alch-bloodwork-tier--entry   { background: #000; color: #fff; }
.alch-bloodwork-tier--complete{ background: var(--alch-grad-midnight); color: #fff; }
.alch-bloodwork-tier--premium {
  background: var(--alch-grad-gold);
  color: var(--alch-midnight-900);
}
.alch-bloodwork-tier--premium * { color: var(--alch-midnight-900) !important; }

/* ---------- Catalogue: 2-column mega menu (copy of Maximus structure) ---------- */
.alch-catalogue {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 3rem;
  max-width: var(--alch-container);
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
}
@media (max-width: 720px) { .alch-catalogue { grid-template-columns: 1fr; gap: 1.75rem; } }
.alch-catalogue__col h4 {
  font-family: var(--alch-font-head);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--alch-slate);
  margin-bottom: 1rem;
}
.alch-catalogue__col ul { list-style: none; padding: 0; margin: 0; }
.alch-catalogue__col li { padding: 0.45rem 0; border-bottom: 1px solid var(--alch-border); }
.alch-catalogue__col a {
  color: var(--alch-midnight-800);
  font-family: var(--alch-font-head);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  display: flex; justify-content: space-between; align-items: center;
  transition: color var(--alch-dur) var(--alch-ease);
}
.alch-catalogue__col a:hover { color: var(--alch-gold-700); }
.alch-catalogue__col a::after {
  content: "→"; opacity: 0.5; transition: transform var(--alch-dur) var(--alch-ease);
}
.alch-catalogue__col a:hover::after { transform: translateX(4px); opacity: 1; }

/* ---------- Hero: kill the glitchy distortion on load ---------- */
.pix-hero img,
.pix-slider img,
.revslider .tp-bgimg,
.rev_slider .tp-bgimg {
  image-rendering: auto !important;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* ---------- Closing CTA photos: stable sizing, never distort (already not, preserve) ---------- */
.alch-cta-photo img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  transform: translateZ(0);
}

/* Hero video CSS overrides removed — the theme's own jarallax + pix video
   background handles sizing correctly on its own. Any sizing/layout rules
   here were fighting pixfort's layout math and causing the half-width
   crop. If a hero-video issue reappears, debug it in DevTools on a clean
   slate rather than re-adding overrides.

   The ONE exception: the overlay text needs to stack above the video
   layer. Without this, jarallax's absolutely-positioned video container
   paints over the headline/CTAs. Pure stacking only — no sizing, no
   overflow, no isolation — so the width bug can't sneak back in. Uses
   !important because pixfort's own row/column rules have high specificity
   and sometimes ship with !important of their own. */
.servicehero > .vc_row,
.vc_video-bg-container2 > .vc_row,
[class*="video-bg-container"] > .vc_row {
  position: relative !important;
  z-index: 5 !important;
}
.servicehero .wpb_column,
.vc_video-bg-container2 .wpb_column,
[class*="video-bg-container"] .wpb_column {
  position: relative !important;
  z-index: 6 !important;
}

/* =========================================================================
   Header nav: force top-level labels onto a single line.
   -------------------------------------------------------------------------
   Pixfort's three-column header gives the left menu NAV 1/3 of the row.
   With our label lengths (Men's Health, Women's Health, Diagnostic Labs,
   Brand) the anchor text wraps inside each <a> to two lines, which reads
   as "menu items on two rows". Fixed by:
     - white-space: nowrap on the label span AND the anchor
     - tighten horizontal padding so all four items still fit comfortably
     - let the left nav grow to its content width so nothing is clipped
   ========================================================================= */
.pix-header .navbar-nav > li.menu-item > a,
.pix-header .navbar-nav > li.menu-item > a .pix-dropdown-title {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

/* Slightly tighter horizontal padding on primary menu anchors so the four
   items fit in the available track without losing air. */
.pix-header .pix-main-menu .navbar-nav > li.menu-item > a {
  padding-left: 12px !important;
  padding-right: 12px !important;
}

/* =========================================================================
   Three-column header: left menu — centered logo — right CTAs.
   -------------------------------------------------------------------------
   Pixfort ships the three slots as sibling `.pixfort-header-col` divs
   (not <nav> elements), inside a .pix-row.d-flex.justify-content-between.
   Two problems we're fixing here:

     1. Logo column (middle) renders at the natural 48px height of the
        logo image, while the header row is 69px — logo floats above
        center. Force the middle col to span the full header height with
        top/bottom:0 and use flex alignment to center the image.

     2. With our nav labels (Men's Health, Women's Health, Diagnostic
        Labs, Brand) the left col grows past the 50% mark at 1440px and
        the word "Brand" physically overlaps the centered logo. Cap
        each outer col's max-width at (50% − half-logo − gap) so a
        protected lane is reserved around viewport center, and tighten
        top-level menu padding so the four labels still fit in the
        narrower track without wrapping.

   Selectors cover both the old Pixfort shape (direct <nav> children) and
   the current shape (.pixfort-header-col wrappers) for resilience.
   ========================================================================= */
.pix-header .pix-row.d-flex {
  position: relative !important;
}

/* Left and right columns — reserve a no-go lane around the centered logo.
   Half-logo ≈ 86px, plus a ~18px visual gap = 104px each side. */
.pix-header .pix-row.d-flex > nav.pix-main-menu:first-child,
.pix-header .pix-row.d-flex > .pixfort-header-col:first-child {
  flex: 0 0 auto !important;
  min-width: 0;
  max-width: calc(50% - 104px) !important;
}
.pix-header .pix-row.d-flex > nav:last-child,
.pix-header .pix-row.d-flex > .pixfort-header-col:last-child {
  flex: 1 0 auto !important;
  min-width: 0;
  max-width: calc(50% - 104px) !important;
  margin-left: auto !important;
  justify-content: flex-end !important;
}

/* Middle column (logo) — absolutely-centered, full header height so the
   logo is vertically aligned with the menus on either side. */
.pix-header .pix-row.d-flex > nav:nth-child(2),
.pix-header .pix-row.d-flex > .pixfort-header-col:nth-child(2) {
  position: absolute !important;
  left: 50% !important;
  top: 0 !important;
  bottom: 0 !important;
  height: auto !important;
  transform: translateX(-50%) !important;
  flex: 0 0 auto !important;
  width: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: auto;
  z-index: 2;
}
/* Pin the logo image itself to the vertical center of its column. */
.pix-header .pix-row.d-flex > .pixfort-header-col:nth-child(2) img,
.pix-header .pix-row.d-flex > nav:nth-child(2) img {
  margin-top: auto !important;
  margin-bottom: auto !important;
  display: block;
}

/* Tighten top-level nav-item padding so the four-label left menu still
   fits inside the narrower (50% − 104px) track at 1280–1440px widths,
   and so the labels visually cluster as a group instead of four islands
   drifting in whitespace. 4px per side keeps a readable tap gutter while
   pulling the items noticeably closer. */
.pix-header .pix-main-menu .navbar-nav > li.menu-item > a {
  padding-left: 6px !important;
  padding-right: 6px !important;
}

/* Restore a tiny bit of breathing room BETWEEN items via margin on the
   list item so neighboring anchors don't kiss. Total inter-label gap =
   margin(2px) + padding(4px) + padding(4px) + margin(2px) = 12px, down
   from 16-24px previously. */
.pix-header .pix-main-menu .navbar-nav > li.menu-item {
  margin-left: 2px !important;
  margin-right: 2px !important;
}

/* =========================================================================
   Legal pages (Privacy Policy, HIPAA, Terms & Conditions, Accessibility)
   -------------------------------------------------------------------------
   These pages arrived as raw Gutenberg blocks (default template, no hero,
   no container), so headings stretched the full viewport and the pages
   looked nothing like the rest of the site. We wrap them in a branded
   hero + constrained body container and apply site-consistent typography.
   Applied by body-class so if the 4 pages are edited in the block editor
   later, they still pick up the same shell.
   ========================================================================= */

/* Hero strip: midnight gradient, gold eyebrow rule, Cinzel title. */
.alch-legal-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 88px 24px 72px;
  text-align: center;
  color: var(--alch-ivory, #f6f1e5);
  background:
    radial-gradient(1100px 520px at 50% 120%, rgba(217, 178, 106, 0.18) 0%, rgba(217, 178, 106, 0) 62%),
    linear-gradient(180deg, #0a0f1f 0%, #13192c 55%, #0a0f1f 100%);
  overflow: hidden;
}
.alch-legal-hero::before,
.alch-legal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.alch-legal-hero::before {
  /* fine alchemical noise overlay */
  background-image:
    radial-gradient(circle at 12% 18%, rgba(217, 178, 106, 0.07) 0%, transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(217, 178, 106, 0.05) 0%, transparent 48%);
  mix-blend-mode: screen;
}
.alch-legal-hero::after {
  /* hairline gold bottom border */
  top: auto;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(217, 178, 106, 0.55) 22%,
    rgba(217, 178, 106, 0.75) 50%,
    rgba(217, 178, 106, 0.55) 78%,
    transparent 100%
  );
}

.alch-legal-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
}

.alch-legal-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  font-family: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--alch-gold-400, #d9b26a);
}
.alch-legal-hero__rule {
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 178, 106, 0.85) 40%, rgba(217, 178, 106, 0.85) 60%, transparent);
}
.alch-legal-hero__kicker {
  position: relative;
  padding: 0 6px;
}
.alch-legal-hero__kicker::before,
.alch-legal-hero__kicker::after {
  /* tiny diamond flourishes flanking the kicker */
  content: "\25C6";
  font-size: 6px;
  opacity: 0.6;
  vertical-align: middle;
  margin: 0 8px;
}

.alch-legal-hero__title {
  font-family: 'Cinzel', 'Cormorant Garamond', Georgia, serif !important;
  font-weight: 500 !important;
  font-size: clamp(34px, 4.6vw, 58px) !important;
  line-height: 1.08 !important;
  letter-spacing: 0.02em !important;
  color: var(--alch-ivory, #f6f1e5) !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  text-transform: none !important;
}
.alch-legal-hero__title em {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--alch-gold-400, #d9b26a);
}

.alch-legal-hero__meta {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-style: italic;
  font-size: 16px !important;
  font-weight: 400 !important;
  letter-spacing: 0.04em;
  color: rgba(246, 241, 229, 0.78) !important;
  margin: 0 !important;
}

/* Body container: centered, max-width, site-consistent typography. */
.alch-legal {
  max-width: 780px;
  margin: 0 auto;
  padding: 72px 24px 96px;
  color: var(--alch-midnight-900, #1a1f33);
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.75;
}

.alch-legal h1,
.alch-legal h2,
.alch-legal h3,
.alch-legal h4 {
  font-family: 'Cinzel', 'Cormorant Garamond', Georgia, serif !important;
  font-weight: 500 !important;
  color: var(--alch-midnight-900, #1a1f33) !important;
  letter-spacing: 0.015em !important;
  line-height: 1.25 !important;
  text-transform: none !important;
}

.alch-legal h2 {
  font-size: 26px !important;
  margin: 56px 0 18px !important;
  padding: 0 !important;
  position: relative;
  padding-left: 18px !important;
}
.alch-legal h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  bottom: 0.32em;
  width: 3px;
  background: linear-gradient(180deg, var(--alch-gold-400, #d9b26a) 0%, rgba(217, 178, 106, 0.35) 100%);
  border-radius: 2px;
}
.alch-legal h2:first-child {
  margin-top: 0 !important;
}

.alch-legal h3 {
  font-size: 20px !important;
  margin: 36px 0 12px !important;
  padding: 0 !important;
  color: var(--alch-midnight-700, #2c324a) !important;
}

.alch-legal h4 {
  font-size: 17px !important;
  margin: 28px 0 10px !important;
  padding: 0 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.14em !important;
  color: var(--alch-gold-700, #a37d3e) !important;
}

.alch-legal p {
  margin: 0 0 1.15em !important;
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif !important;
  font-size: 18px !important;
  line-height: 1.75 !important;
  color: var(--alch-midnight-700, #2c324a) !important;
}
.alch-legal p em {
  color: var(--alch-gold-700, #a37d3e);
  font-style: italic;
}

.alch-legal ul,
.alch-legal ol {
  margin: 0 0 1.25em 1.25em !important;
  padding: 0 0 0 12px !important;
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 18px !important;
  line-height: 1.7;
  color: var(--alch-midnight-700, #2c324a);
}
.alch-legal li {
  margin: 0.35em 0;
  padding-left: 4px;
}
.alch-legal ul li::marker {
  color: var(--alch-gold-400, #d9b26a);
  font-size: 0.9em;
}
.alch-legal ol li::marker {
  color: var(--alch-gold-700, #a37d3e);
  font-family: 'Cinzel', serif;
  font-weight: 500;
}

.alch-legal a {
  color: var(--alch-gold-700, #a37d3e);
  text-decoration: none;
  border-bottom: 1px solid rgba(163, 125, 62, 0.35);
  transition: color 200ms var(--alch-ease, ease), border-color 200ms var(--alch-ease, ease);
}
.alch-legal a:hover {
  color: var(--alch-gold-900, #6f4e16);
  border-bottom-color: var(--alch-gold-700, #a37d3e);
}

.alch-legal strong,
.alch-legal b {
  font-weight: 600;
  color: var(--alch-midnight-900, #1a1f33);
}

.alch-legal blockquote {
  margin: 24px 0 !important;
  padding: 18px 28px !important;
  border-left: 3px solid var(--alch-gold-400, #d9b26a);
  background: rgba(217, 178, 106, 0.07);
  font-style: italic;
  color: var(--alch-midnight-700, #2c324a);
  border-radius: 0 6px 6px 0;
}

.alch-legal hr {
  border: 0 !important;
  height: 1px !important;
  margin: 48px auto !important;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(217, 178, 106, 0.45) 50%,
    transparent 100%
  ) !important;
  max-width: 60% !important;
}

/* The default WP template has no hero, so push our hero flush against the
   header and remove any `#content` top padding on these pages. */
body.page-id-3 #content,
body.page-id-894 #content,
body.page-id-896 #content,
body.page-id-898 #content {
  padding-top: 0 !important;
  background: var(--alch-ivory, #f6f1e5);
}

/* On these pages the default container is useless — kill its padding so our
   hero can go full-bleed. */
body.page-id-3 #content > .container,
body.page-id-894 #content > .container,
body.page-id-896 #content > .container,
body.page-id-898 #content > .container {
  max-width: none !important;
  padding: 0 !important;
}

@media (max-width: 640px) {
  .alch-legal-hero { padding: 64px 20px 52px; }
  .alch-legal-hero__title { font-size: clamp(28px, 8vw, 40px) !important; }
  .alch-legal-hero__eyebrow { font-size: 10px; letter-spacing: 0.32em; gap: 10px; }
  .alch-legal-hero__rule { width: 28px; }
  .alch-legal { padding: 48px 20px 72px; font-size: 17px; }
  .alch-legal p { font-size: 17px !important; }
  .alch-legal h2 { font-size: 22px !important; }
  .alch-legal h3 { font-size: 18px !important; }
}

/* ------------------------------------------------------------------
 * Popular Treatments — Men/Women toggle fix
 *
 * The shortcode's CSS ships `.treatment-group { display: flex !important; }`
 * which clobbers the JS toggle that sets `style="display: none"` on the
 * inactive gender. We re-assert the inline-hidden state with matching
 * specificity so only the active group renders.
 * ------------------------------------------------------------------ */
.aths-popular-treatments .treatment-group[style*="display: none"],
.aths-popular-treatments .treatment-group[style*="display:none"] {
  display: none !important;
}

/* ------------------------------------------------------------------
 * Therapy Carousel cards (Featured Treatments) — vertical rhythm
 *
 * Ships with description->badge->buttons stacked tight (badge sits on
 * top of buttons). Reassert consistent breathing room between each
 * block and keep the badge at its natural pill width (not stretched
 * by the column flex layout).
 * ------------------------------------------------------------------ */
.aths-therapy-item .aths-therapy-title {
  margin: 0 0 10px 0 !important;
}
.aths-therapy-item .aths-therapy-description {
  margin: 0 0 18px 0 !important;
}
.aths-therapy-item .aths-therapy-badge {
  align-self: flex-start !important;
  margin: 0 0 18px 0 !important;
  display: inline-block !important;
}
.aths-therapy-item .aths-therapy-buttons {
  margin-top: 8px !important;
}

/* =========================================================================
   Therapy carousel: bidirectional scroll arrows.
   -------------------------------------------------------------------------
   The shortcode ships only a right arrow. `pixfort-patches.js` injects a
   matching left arrow (`.aths-carousel-arrow-prev`) + tags the original
   with `.aths-carousel-arrow-next` so we can position them independently.
   The base `.aths-carousel-arrow` rule from the Archive-1 plugin handles
   the white pill + shadow; we only override position and mirror the hover
   reveal so the prev arrow behaves like the next arrow.
   ========================================================================= */
.aths-carousel-arrow-prev {
  left: 20px !important;
  right: auto !important;
}
.aths-carousel-arrow-next {
  right: 20px;
  left: auto;
}

/* Vendor CSS reveals the next arrow on carousel hover or direct hover.
   Match the prev arrow's reveal so both show together. */
.aths-therapy-carousel:hover .aths-carousel-arrow-prev,
.aths-carousel-arrow-prev:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.05);
}

/* On touch devices there's no hover state — always show both arrows
   when content is scrollable (JS manages the opacity/pointer-events
   at the scroll boundaries, so this is just a visibility fallback). */
@media (hover: none) {
  .aths-carousel-arrow-prev,
  .aths-carousel-arrow-next,
  .aths-carousel-arrow {
    opacity: 1 !important;
  }
}


/* =========================================================================
   #7  Important Safety Information modal — text sizing fix (May 2026)
   -------------------------------------------------------------------------
   When pixpopup post content is loaded into the modal (or iframe for the
   builder preview), the body's global Cinzel rule combined with theme hero-
   scale heading sizes makes h1/h2 render at ~4–5rem inside a ~600px modal
   column. Each word ends up on its own line.
   We scope a heading-size cap to all popup containers: pixfort builder
   wrapper (.pix-popup-edit, .pix-popup-builder-content), inline
   .pix-popup, Bootstrap .modal-dialog, and the popup body class .render.
   We DO NOT change font-family (Cinzel still applies).
   ========================================================================= */
/* RESCOPED: dropped body.render — it's added by Pixfort on every frontend
   page, not just popup contexts, and was over-applying to the homepage.
   Now we only target actual popup containers. */
.pix-popup-edit h1, .pix-popup-edit h2, .pix-popup-edit h3, .pix-popup-edit h4,
.pix-popup-builder-content h1, .pix-popup-builder-content h2,
.pix-popup-builder-content h3, .pix-popup-builder-content h4,
.pix-popup h1, .pix-popup h2, .pix-popup h3, .pix-popup h4,
.modal-dialog h1, .modal-dialog h2, .modal-dialog h3, .modal-dialog h4 {
  letter-spacing: 0.02em !important;
  word-break: normal !important;
  hyphens: auto;
}
.pix-popup-edit h1,
.pix-popup-builder-content h1,
.pix-popup h1,
.modal-dialog h1 {
  font-size: clamp(1.4rem, 2.8vw, 1.9rem) !important;
  line-height: 1.15 !important;
  margin: 0 0 0.6rem !important;
  font-weight: 500 !important;
}
.pix-popup-edit h2,
.pix-popup-builder-content h2,
.pix-popup h2,
.modal-dialog h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem) !important;
  line-height: 1.2 !important;
  margin: 1.25rem 0 0.5rem !important;
  font-weight: 500 !important;
}
.pix-popup-edit h3, .pix-popup-edit h4,
.pix-popup-builder-content h3, .pix-popup-builder-content h4,
.pix-popup h3, .pix-popup h4,
.modal-dialog h3, .modal-dialog h4 {
  font-size: clamp(1rem, 1.6vw, 1.2rem) !important;
  line-height: 1.25 !important;
  margin: 1rem 0 0.4rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase;
}
.pix-popup-edit p,
.pix-popup-builder-content p,
.pix-popup p,
.modal-dialog p {
  font-size: 0.95rem !important;
  line-height: 1.65 !important;
  margin: 0 0 0.85rem !important;
}
.pix-popup-edit ul, .pix-popup-edit ol {
  padding-left: 1.25rem !important;
  font-size: 0.92rem !important;
}
/* Generous, clean modal padding so the content has breathing room. */
.pix-popup-builder-content { padding: 1.75rem clamp(1rem, 4vw, 2.5rem) 2rem !important; }
/* Constrain the modal column itself on tablets so headings don't single-word
   wrap on iPads — use 92vw to keep edge breathing on phones. */
@media (max-width: 992px) {
  .pix-popup-builder-content { max-width: min(720px, 92vw) !important; margin-inline: auto; }
}

/* =========================================================================
   Sheet #25: ISI modal opens BEHIND content when triggered low on page
   -------------------------------------------------------------------------
   Pixfort renders the popup overlay inside the page DOM at the position
   the trigger lives. WPBakery rows higher up sometimes establish their
   own stacking context (transform/filter/will-change), trapping the
   popup beneath them. We:
     1. Force the popup overlay to a top-of-document z-index.
     2. Lock body scroll while open so the modal stays viewport-centered.
     3. Neutralize stacking contexts on rows above the trigger (inside
        WPBakery's vc_row, transform:none stops the trap).
   ========================================================================= */
body.modal-open,
body.pix-modal-open,
body:has(.pix-popup.show),
body:has(.modal.show),
body:has(.pix-popup-modal--open) {
  overflow: hidden !important;
}
.pix-popup,
.pix-popup-modal,
.modal,
.modal-backdrop,
.pixfort-popup,
[id^="pixfortPopup"],
[id^="pix-popup-"] {
  z-index: 99999 !important;
}
.modal-backdrop { z-index: 99998 !important; }

/* RESCOPED: previously this set transform:none on every vc_row to defeat
   stacking-context traps. That broke parallax + sticky everywhere. Now we
   only neutralize stacking on rows that contain a popup trigger, opted-in
   via a body class added by JS when a popup is opened. The z-index bump
   above is enough on its own for the simple cases. */
body.alch-popup-open .vc_row,
body.alch-popup-open .vc_section {
  transform: none !important;
  filter: none !important;
  will-change: auto !important;
}

/* Modal positioning: only center actual popups, not arbitrary modals. */
.pix-popup-builder-content,
.pix-popup-edit,
.pix-popup.show .pix-popup-modal {
  max-height: 90vh !important;
  overflow-y: auto !important;
}

/* =========================================================================
   Sheet #41: Remove circle photo avatars on marker group headers
   ========================================================================= */
.aths-marker-group-header .aths-marker-avatar,
.aths-blood-markers .aths-marker-group .aths-group-photo,
.aths-blood-marker-group [class*="-avatar"],
[class*="marker-group"] [class*="-avatar-circle"],
[class*="marker-group"] [class*="circle-photo"] {
  display: none !important;
}

/* =========================================================================
   Sheet #81: Defensive CSS for "all sexual health pages glitched"
   -------------------------------------------------------------------------
   Without site access I can't see the exact glitch. These rules cover the
   most common "page looks broken" causes on Pixfort+ATHS template pages:
     • iframe / video block overflow on narrow viewports
     • images without explicit aspect-ratio collapsing the row
     • z-index battles between sticky header and hero overlay
     • broken WPBakery columns missing min-width
     • old jarallax containers swallowing pointer events
   Scoped to body classes that match the sexual-health URL family.
   ========================================================================= */
body[class*="sexual-health"],
body[class*="sexual-wellness"],
body[class*="erectile"],
body[class*="libido"] {
  /* Stop horizontal overflow on weird embeds/iframes. */
  overflow-x: hidden;
}
body[class*="sexual-health"] iframe,
body[class*="sexual-wellness"] iframe,
body[class*="erectile"] iframe,
body[class*="libido"] iframe {
  max-width: 100% !important;
}
body[class*="sexual-health"] img,
body[class*="sexual-wellness"] img,
body[class*="erectile"] img,
body[class*="libido"] img {
  max-width: 100% !important;
  height: auto !important;
}
/* Keep WPBakery columns from collapsing to 0 width when a child has
   min-content larger than the column width. */
body[class*="sexual-health"] .vc_column_container > .vc_column-inner,
body[class*="sexual-wellness"] .vc_column_container > .vc_column-inner,
body[class*="erectile"] .vc_column_container > .vc_column-inner,
body[class*="libido"] .vc_column_container > .vc_column-inner {
  min-width: 0;
}
/* Jarallax containers that lose pointer-events when stuck in a
   transformed row — re-enable. */
body[class*="sexual-health"] .jarallax,
body[class*="sexual-wellness"] .jarallax,
body[class*="erectile"] .jarallax,
body[class*="libido"] .jarallax {
  pointer-events: auto !important;
}
/* If the hero / header is sitting under a sticky nav, give it room. */
body[class*="sexual-health"] .pix-main-intro,
body[class*="sexual-wellness"] .pix-main-intro,
body[class*="erectile"] .pix-main-intro,
body[class*="libido"] .pix-main-intro {
  padding-top: clamp(2rem, 5vw, 4rem) !important;
}
/* As a last resort, normalize the hero background painting to NOT cover
   the sticky header on these pages. */
body[class*="sexual-health"] .pix-hero,
body[class*="sexual-wellness"] .pix-hero,
body[class*="erectile"] .pix-hero,
body[class*="libido"] .pix-hero {
  isolation: isolate;
}

/* =========================================================================
   MOBILE NAV — final overlay + submenu fixes (Nov 2026)
   -------------------------------------------------------------------------
   1. Overlay was rendering offset (midnight bg extended past right edge).
      Hard-pin to inset:0 / width:100vw / left:0 with !important on every
      coordinate.
   2. Tapping MEN / WOMEN didn't expand their submenus — sub-menu <ul>
      was hidden by Bootstrap's dropdown JS. Force every sub-menu inside
      the open overlay to display:block, with visible/opacity overrides
      for the items.
   ========================================================================= */
@media (max-width: 1099px) {

  /* Overlay container — kill any inherited margin/padding/transform/inset
     that might push the bg off-center. */
  html body .pix-header-mobile .navbar-collapse.show,
  html body .pix-header-mobile .navbar-collapse.collapsing,
  html body .pix-header .navbar-collapse.show,
  html body .pix-header .navbar-collapse.collapsing {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    transform: none !important;
    inset: 0 !important;
  }
  /* Inner ul/menu — full width, no inherited side padding pushing it. */
  html body .pix-header-mobile .navbar-collapse.show > *,
  html body .pix-header-mobile .navbar-collapse.show ul.navbar-nav,
  html body .pix-header .navbar-collapse.show > *,
  html body .pix-header .navbar-collapse.show ul.navbar-nav {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Submenus: ALWAYS expanded when overlay is open. Bootstrap's
     dropdown JS toggles them; we force display:block so all children
     are visible without an extra tap. */
  html body .pix-header-mobile .navbar-collapse.show .sub-menu,
  html body .pix-header-mobile .navbar-collapse.show .dropdown-menu,
  html body .pix-header-mobile .navbar-collapse.show .menu-item .sub-menu,
  html body .pix-header-mobile .navbar-collapse.show .menu-item-has-children > .dropdown-menu,
  html body .pix-header .navbar-collapse.show .sub-menu,
  html body .pix-header .navbar-collapse.show .dropdown-menu {
    display: block !important;
    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0.25rem 0 1rem !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
    overflow: visible !important;
  }
  /* Submenu items — visible, full-width, dimmer color than top-level. */
  html body .pix-header-mobile .navbar-collapse.show .sub-menu > li,
  html body .pix-header-mobile .navbar-collapse.show .dropdown-menu > li,
  html body .pix-header .navbar-collapse.show .sub-menu > li,
  html body .pix-header .navbar-collapse.show .dropdown-menu > li {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: 32rem;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    transform: none !important;
    animation: none !important;
  }
  html body .pix-header-mobile .navbar-collapse.show .sub-menu > li > a,
  html body .pix-header-mobile .navbar-collapse.show .dropdown-menu > li > a,
  html body .pix-header .navbar-collapse.show .sub-menu > li > a,
  html body .pix-header .navbar-collapse.show .dropdown-menu > li > a {
    display: block !important;
    width: 100% !important;
    padding: 0.7rem 1rem !important;
    text-align: center !important;
    font-family: var(--alch-font-body) !important;
    font-size: clamp(0.95rem, 2.8vw, 1.1rem) !important;
    letter-spacing: 0.04em !important;
    text-transform: none !important;
    color: rgba(244, 234, 214, 0.78) !important;
    -webkit-text-fill-color: rgba(244, 234, 214, 0.78) !important;
    text-decoration: none !important;
    background: transparent !important;
    border: 0 !important;
  }
  html body .pix-header-mobile .navbar-collapse.show .sub-menu > li > a:hover,
  html body .pix-header-mobile .navbar-collapse.show .sub-menu > li > a:focus,
  html body .pix-header-mobile .navbar-collapse.show .dropdown-menu > li > a:hover {
    color: var(--alch-gold-400) !important;
    -webkit-text-fill-color: var(--alch-gold-400) !important;
  }

  /* Hide the dropdown caret since submenus are always expanded — the
     caret was a tap target for the toggle that we no longer need. */
  html body .pix-header-mobile .navbar-collapse.show .dropdown-toggle::after,
  html body .pix-header .navbar-collapse.show .dropdown-toggle::after {
    display: none !important;
  }

  /* Defensive: kill any horizontal overflow at <html> / <body> level
     while the overlay is open so iOS rubber-banding doesn't expose the
     midnight bg shifting. */
  html:has(.pix-header-mobile .navbar-collapse.show),
  body:has(.pix-header-mobile .navbar-collapse.show) {
    overflow-x: hidden !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
  }
}

/* =========================================================================
   MOBILE NAV — close button visibility (Nov 2026)
   -------------------------------------------------------------------------
   When the overlay opens it covers the original header at z-index 9998,
   which means the hamburger-toggler (which lives INSIDE the original
   header) sits beneath the overlay and can't be tapped to close.
   Pin the hamburger as fixed at top-right ABOVE the overlay so it's
   always tappable.
   ========================================================================= */
@media (max-width: 1099px) {
  html body .pix-header-mobile .navbar-toggler.small-menu-toggle,
  html body .pix-header-mobile .small-menu-toggle,
  html body .pix-header-mobile .hamburger,
  html body .pix-header .navbar-toggler,
  html body .pix-header .hamburger {
    position: fixed !important;
    top: 1rem !important;
    right: 1rem !important;
    z-index: 100000 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
  }
  /* Hamburger — no gold ring. Bare icon on transparent. */
  html body .pix-header-mobile .navbar-toggler,
  html body .pix-header-mobile .hamburger {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    width: 44px !important;
    height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  /* When overlay is open, X-mark color is cream so it reads on midnight bg. */
  body:has(.pix-header-mobile .navbar-collapse.show) .hamburger-inner,
  body:has(.pix-header-mobile .navbar-collapse.show) .hamburger-inner-before,
  body:has(.pix-header-mobile .navbar-collapse.show) .hamburger-inner-after {
    background-color: var(--alch-ivory) !important;
  }
}

/* =========================================================================
   Comment form Post Comment button — white text
   -------------------------------------------------------------------------
   The submit button on a single post's comment form was rendering with
   midnight or invisible text. Force white text on a midnight pill so it
   reads like a primary CTA.
   ========================================================================= */
body.single-post #commentform input[type="submit"],
body.single-post .comment-form input[type="submit"],
body.single-post #submit,
body.single-post .submit,
body.single-post .comment-form .submit,
body.single-post .form-submit input[type="submit"],
body.single-post .form-submit button[type="submit"] {
  background: var(--alch-midnight-900) !important;
  background-color: var(--alch-midnight-900) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 0.85rem 1.6rem !important;
  font-family: var(--alch-font-head) !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: background-color 240ms ease;
}
body.single-post #commentform input[type="submit"]:hover,
body.single-post .comment-form input[type="submit"]:hover,
body.single-post #submit:hover {
  background: var(--alch-gold-700) !important;
  background-color: var(--alch-gold-700) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* =========================================================================
   Treatment / product page header → don't crash into the product image on mobile.
   -------------------------------------------------------------------------
   The sticky pill nav sits on top of the page; on a product/treatment
   page the hero packshot image starts at y=0 and is partially obscured
   by the nav. Add top padding to the hero on mobile so the photo
   starts below the sticky nav.
   ========================================================================= */
@media (max-width: 1099px) {
  .aths-product-hero,
  .aths-product-hero .hero,
  body[class*="single-portfolio"] .aths-product-hero,
  body.single .aths-product-hero,
  body[class*="page-template"] .aths-product-hero {
    padding-top: clamp(5rem, 14vw, 7rem) !important;
  }
  .aths-product-hero .packshot,
  .aths-product-hero .product-info,
  .aths-product-hero .hero-content {
    padding-top: clamp(1rem, 3vw, 2rem);
  }
}

@media (max-width: 720px) {
  /* Single-column product hero on phones. */
  .aths-product-hero .hero {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
  }
  .aths-product-hero .packshot {
    margin-bottom: 1.5rem;
  }
}
