/* nav.css — Nuvo Clinic sticky header + mega-menu navigation */

:root {
  /* Blush accent for the Female Intimate hero specialty (harmonised with the
     warm cream/sand palette — a soft rose tint, not a cool pink). */
  --blush-50:  #FBF1EE;
  --blush-100: #F6E4DE;
  --blush-200: #EFD2C9;
  --blush-500: #C98E80;
  --blush-700: #9E5C4D;
}

/* ── Header shell ───────────────────────────────────────── */
.nuvo-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.nuvo-nav.nav-transparent {
  background: transparent;
  border-bottom: 1px solid transparent;
}
.nuvo-nav.nav-solid {
  background: rgba(254,252,248,.96);
  border-bottom: 1px solid var(--cream-300);
  box-shadow: 0 1px 14px rgba(26,10,5,.06);
  backdrop-filter: blur(12px);
}
/* When a mega panel is open, force the bar to its solid skin so the panel
   reads as one surface with the bar. */
.nuvo-nav.menu-open {
  background: rgba(254,252,248,.99);
  border-bottom: 1px solid var(--cream-300);
  box-shadow: 0 1px 14px rgba(26,10,5,.06);
  backdrop-filter: blur(12px);
}
/* At the very top of the page the bar is transparent; keep it transparent
   even while a mega panel is open (only the panel itself is a solid surface). */
.nuvo-nav.nav-transparent.menu-open {
  background: transparent;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 76px;
  gap: 1.5rem;
}

/* ── Logo (centered) ────────────────────────────────────── */
.nav-logo {
  grid-column: 2;
  display: flex; align-items: center; gap: .5rem;
  text-decoration: none; justify-self: center;
}
.nav-logo-diamond { color: var(--sand-500); font-size: 15px; line-height: 1; }
.nav-logo-text {
  font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 400;
  letter-spacing: .14em; color: var(--espresso-950);
  transition: color .3s; white-space: nowrap;
}
.nav-transparent .nav-logo-text { color: #fff; }
.nav-transparent .nav-logo-diamond { color: var(--sand-400); }

/* Logo image — supplied artwork is white; show it as-is over the dark hero,
   invert to espresso-dark on cream surfaces (solid bar, open menu, mobile head). */
.nav-logo-img {
  height: 46px; width: auto; display: block;
  transition: filter .3s ease;
}
.nuvo-nav.nav-solid .nav-logo-img,
.nuvo-nav.menu-open .nav-logo-img,
.nav-logo-img-dark {
  filter: brightness(0) saturate(0) opacity(.9);
}
/* Transparent-at-top + open: keep the white logo white over the dark hero. */
.nuvo-nav.nav-transparent.menu-open .nav-logo-img {
  filter: none;
}

/* ── Primary nav groups (split either side of the logo) ─── */
.nav-group { display: flex; align-items: center; gap: 1.6rem; }
.nav-group-left  { grid-column: 1; justify-self: start; }
.nav-group-right { grid-column: 3; justify-self: end; }

.nav-item { position: static; }
.nav-item:has(.mega-mini),
.nav-item:has(.mega-flyout) { position: relative; }

.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: 'DM Sans', sans-serif; font-size: .8125rem; font-weight: 500;
  color: var(--espresso-900); text-decoration: none; letter-spacing: .02em;
  background: none; border: none; cursor: pointer; padding: 6px 0;
  opacity: .74; transition: opacity .15s, color .3s;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { opacity: 1; }
.nav-link.active { color: var(--sand-600); }
.nav-link .caret {
  font-size: 9px; opacity: .6; transition: transform .25s var(--ease-out, ease);
  display: inline-block;
}
.nav-item.open .nav-link { opacity: 1; color: var(--sand-600); }
.nav-item.open .nav-link .caret { transform: rotate(180deg); }

.nav-transparent .nav-link { color: rgba(255,255,255,.86); }
.nav-transparent .nav-link.active { color: var(--sand-400); }

/* ── Espresso solid skin (opt-in via .nav-espresso) ─────── */
/* Solid/scrolled bar becomes espresso-800 with light text instead of cream. */
.nuvo-nav.nav-espresso.nav-solid,
.nuvo-nav.nav-espresso.menu-open:not(.nav-transparent) {
  background: var(--espresso-800);
  border-bottom-color: rgba(255,255,255,.12);
  box-shadow: 0 1px 14px rgba(26,10,5,.22);
}
.nav-espresso.nav-solid .nav-link,
.nav-espresso.menu-open:not(.nav-transparent) .nav-link { color: rgba(255,255,255,.86); }
.nav-espresso.nav-solid .nav-link.active,
.nav-espresso.menu-open:not(.nav-transparent) .nav-link.active { color: var(--sand-400); }
.nav-espresso.nav-solid .nav-logo-text { color: #fff; }
.nav-espresso.nav-solid .nav-logo-diamond { color: var(--sand-400); }
/* keep the white logo white (skip the dark-invert applied to .nav-solid) */
.nuvo-nav.nav-espresso.nav-solid .nav-logo-img,
.nuvo-nav.nav-espresso.menu-open:not(.nav-transparent) .nav-logo-img { filter: none; }
.nav-espresso.nav-solid .nav-cta,
.nav-espresso.menu-open:not(.nav-transparent) .nav-cta {
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.45); color: #fff;
}
.nav-espresso.nav-solid .nav-toggle { color: #fff; }

/* ── CTA + hamburger (right cell) ───────────────────────── */
.nav-right-extra { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 1.1rem; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px;
  background: var(--espresso-900); color: #fff;
  border: 1.5px solid var(--espresso-900); border-radius: 9999px;
  font-family: 'DM Sans', sans-serif; font-size: .8125rem; font-weight: 500;
  letter-spacing: .02em; text-decoration: none; white-space: nowrap;
  transition: opacity .15s; flex-shrink: 0;
}
.nav-cta:hover { opacity: .85; }
.nav-transparent .nav-cta {
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.45); color: #fff;
}
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; color: var(--espresso-900); padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-transparent .nav-toggle { color: #fff; }

/* ── Mega panel ─────────────────────────────────────────── */
.mega-wrap {
  position: absolute; left: 0; right: 0; top: 100%;
  display: flex; justify-content: center;
  pointer-events: none;
}
.mega {
  position: relative;
  width: min(1180px, calc(100vw - 3rem));
  background: var(--cream-50);
  border: 1px solid var(--cream-300);
  border-top: none;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 24px 48px -16px rgba(26,10,5,.22);
  padding: 2.25rem 2.5rem 2.5rem;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: transform .2s var(--ease-out, ease);
  pointer-events: none;
}
.nav-item.open .mega { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }

/* blush surface for the Female Intimate specialty menu */
.mega.mega-blush {
  background: linear-gradient(180deg, var(--blush-50), #fff 78%);
  border-color: var(--blush-200);
}

/* ── Two-pane flyout (categories rail + items panel) ────── */
.mega.mega-flyout {
  width: 620px; max-width: calc(100vw - 3rem);
  padding: 0; overflow: hidden;
}
.nav-item:has(.mega-flyout) .mega-wrap { left: 0; right: auto; display: block; }
.mega-flyout-inner { display: flex; align-items: stretch; }

.mega-rail {
  width: 248px; flex-shrink: 0; padding: .6rem;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--cream-100);
  border-right: 1px solid var(--cream-300);
}
.mega-rail-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left; cursor: pointer;
  background: none; border: none; border-radius: 10px;
  padding: 11px 14px;
  font-family: 'DM Sans', sans-serif; font-size: .875rem; font-weight: 500;
  color: var(--espresso-900); letter-spacing: .01em;
  transition: background .14s, color .14s;
}
.mega-rail-item .rail-arr { font-size: 15px; opacity: .35; transition: opacity .14s, transform .14s; }
.mega-rail-item:hover { background: var(--cream-200); }
.mega-rail-item:hover .rail-arr { opacity: .6; transform: translateX(2px); }
.mega-rail-item.active { background: var(--espresso-900); color: #fff; }
.mega-rail-item.active .rail-arr { opacity: .85; }

.mega-panels { flex: 1; min-width: 0; padding: 1.15rem 1.4rem 1.4rem; }
.mega-panel { display: none; }
.mega-panel.active { display: block; animation: megaPanelIn .18s var(--ease-out, ease); }
@media (prefers-reduced-motion: reduce) { .mega-panel.active { animation: none; } }
@keyframes megaPanelIn { from { opacity: 0; transform: translateX(5px); } to { opacity: 1; transform: none; } }
.mega-panel-head {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'DM Sans', sans-serif; font-size: .68rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--sand-600);
  text-decoration: none; margin-bottom: .75rem; padding-bottom: .65rem;
  border-bottom: 1px solid var(--cream-300);
}
.mega-panel-head .arr { font-size: .8rem; opacity: .65; }
.mega-panel-head:hover .arr { opacity: 1; }
.mega-panel-list { display: flex; flex-direction: column; }

/* flyout footer CTA ("Don't know where to start?") */
.mega-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
  padding: .95rem 1.4rem; border-top: 1px solid var(--cream-300);
  background: var(--cream-100);
}
.mega-foot-text {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 1.15rem; color: var(--espresso-900); font-weight: 400;
}
.mega-cta-btn {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 9px 20px; border-radius: 9999px;
  background: var(--espresso-900); color: #fff;
  border: 1.5px solid var(--espresso-900);
  font-family: 'DM Sans', sans-serif; font-size: .8125rem; font-weight: 500;
  letter-spacing: .02em; text-decoration: none; white-space: nowrap;
  transition: opacity .15s;
}
.mega-cta-btn:hover { opacity: .85; }
.mega-foot-actions { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.mega-foot-all {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  font-family: 'DM Sans', sans-serif; font-size: .8125rem; font-weight: 600;
  letter-spacing: .02em; text-decoration: none; color: var(--espresso-900);
  transition: opacity .15s;
}
.mega-foot-all:hover { opacity: .65; }

/* Female Intimate CTA block ("Private, Judgement-Free by Dr. Raine") */
.mega-fi-cta {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between;
  gap: 1.25rem; margin-top: .5rem; padding-top: 1.25rem;
  border-top: 1px solid var(--blush-200);
}
.mega-fi-cta-text {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 1.2rem; color: var(--blush-700); font-weight: 400;
}
.mega-fi-cta-text .dot { color: var(--blush-500); font-size: 12px; font-style: normal; }
.mega-cta-btn.mega-cta-blush {
  background: var(--blush-700); border-color: var(--blush-700);
}

.mega-cols { display: grid; gap: 2rem; }
.mega-col-head {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'DM Sans', sans-serif; font-size: .68rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--sand-600);
  text-decoration: none; margin-bottom: 1rem;
  padding-bottom: .7rem; border-bottom: 1px solid var(--cream-300);
}
.mega-col-head .arr { font-size: .8rem; opacity: 0; transform: translateX(-3px); transition: .18s; }
.mega-col-head:hover .arr { opacity: .7; transform: translateX(0); }
.mega-blush .mega-col-head { color: var(--blush-700); border-bottom-color: var(--blush-200); }

.mega-link {
  display: block;
  font-family: 'DM Sans', sans-serif; font-size: .8125rem; font-weight: 500;
  color: var(--espresso-800); text-decoration: none;
  padding: 7px 10px; margin: 0 -10px; border-radius: 8px;
  line-height: 1.35; transition: background .14s, color .14s;
}
.mega-link:hover { background: var(--cream-200); color: var(--espresso-950); }
.mega-blush .mega-link:hover { background: var(--blush-100); color: var(--blush-700); }

.mega-sublink {
  font-size: .75rem; color: var(--sand-600); padding-left: 22px; opacity: .9;
}
.mega-sublink:hover { background: var(--cream-200); }

/* ── Nested third-layer sub-menu (collapsed dropdown) ───── */
.mega-sub { margin-top: .6rem; }
.mega-sub-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; background: none; border: none; cursor: pointer; text-align: left;
  font-family: 'DM Sans', sans-serif; font-size: .8125rem; font-weight: 600;
  color: var(--espresso-800); padding: 7px 10px; margin: 0 -10px;
  border-radius: 8px; line-height: 1.35; transition: background .14s, color .14s;
}
.mega-sub-head:hover { background: var(--cream-200); color: var(--espresso-950); }
.mega-sub-head .sub-caret {
  font-size: 8px; opacity: .55; flex-shrink: 0;
  transition: transform .25s var(--ease-out, ease);
}
.mega-sub.open .mega-sub-head { color: var(--sand-600); }
.mega-sub.open .mega-sub-head .sub-caret { transform: rotate(180deg); }
.mega-sub-items {
  overflow: hidden; max-height: 0;
  transition: max-height .25s var(--ease-out, ease);
}
.mega-sub.open .mega-sub-items { max-height: 320px; }
.mega-sub-all {
  font-weight: 600; color: var(--sand-600); padding-left: 22px;
  text-transform: none; letter-spacing: normal;
}

/* small "About" dropdown — anchored under its trigger on the left */
.nav-item:has(.mega-mini) .mega-wrap { left: 0; right: auto; display: block; }
.mega.mega-mini {
  width: 240px;
  border-radius: 0 0 14px 14px;
  padding: .65rem;
}
.mega-mini .mega-link { font-size: .85rem; padding: 9px 12px; margin: 0; }

/* Female Intimate two-column blush layout */
.mega-fi { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.mega-fi-note {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 10px;
  margin-bottom: .25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--blush-200);
}
.mega-fi-note .dot { color: var(--blush-500); font-size: 13px; }
.mega-fi-note span {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 1.2rem; color: var(--blush-700); font-weight: 400;
}

/* column-count helpers */
.cols-7 { grid-template-columns: repeat(7, 1fr); }
.cols-5 { grid-template-columns: repeat(5, 1fr); }

/* ── Mobile panel ───────────────────────────────────────── */
.nav-mobile {
  position: fixed; inset: 0; top: 0; z-index: 300;
  display: none; flex-direction: column;
  background: var(--cream-50);
  transform: translateX(100%);
  transition: transform .32s var(--ease-out, ease);
}
.nav-mobile.show { display: flex; transform: translateX(0); }
.nav-mobile-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; padding: 0 1.25rem; flex-shrink: 0;
  border-bottom: 1px solid var(--cream-300);
}
.nav-mobile-scroll { flex: 1; overflow-y: auto; padding: .5rem 1.25rem 2rem; -webkit-overflow-scrolling: touch; }

.macc { border-bottom: 1px solid var(--cream-200); }
.macc-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; cursor: pointer;
  padding: 1.05rem .25rem; text-align: left;
  font-family: 'DM Sans', sans-serif; font-size: 1.0625rem; font-weight: 500;
  color: var(--espresso-950);
}
.macc-head .pm {
  font-size: 20px; color: var(--sand-600); line-height: 1;
  transition: transform .25s var(--ease-out, ease); font-weight: 400;
}
.macc.open .macc-head .pm { transform: rotate(45deg); }
.macc-body {
  overflow: hidden; max-height: 0;
}
.macc.open .macc-body { max-height: none; }
.macc-inner { padding: 0 .25rem 1rem; }

.macc-group { margin-bottom: 1rem; }
.macc-group-head {
  display: block; font-family: 'DM Sans', sans-serif; font-size: .68rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--sand-600);
  text-decoration: none; margin: .5rem 0 .5rem;
}
.macc-link {
  display: block; padding: .5rem .25rem .5rem 1rem;
  font-family: 'DM Sans', sans-serif; font-size: .9375rem; font-weight: 400;
  color: var(--espresso-800); text-decoration: none;
  border-left: 2px solid var(--cream-300);
}
.macc-link:active { color: var(--sand-600); }

.macc-blush { background: var(--blush-50); margin: 0 -1.25rem; padding: 0 1.25rem; }
.macc-blush .macc-group-head { color: var(--blush-700); }
.macc-blush .macc-link { border-left-color: var(--blush-200); }

.nav-mobile-direct {
  display: block; padding: 1.05rem .25rem;
  font-family: 'DM Sans', sans-serif; font-size: 1.0625rem; font-weight: 500;
  color: var(--espresso-950); text-decoration: none;
  border-bottom: 1px solid var(--cream-200);
}
.nav-mobile-foot {
  flex-shrink: 0; padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--cream-300); background: var(--cream-50);
}
.nav-mobile-cta {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 15px 24px; background: var(--espresso-900); color: #fff;
  border-radius: 9999px; text-decoration: none;
  font-family: 'DM Sans', sans-serif; font-size: 1rem; font-weight: 500;
}

/* ── Responsive switch ──────────────────────────────────── */
@media (max-width: 1080px) {
  .nav-group, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-inner { grid-template-columns: 1fr auto 1fr; }
  .nav-logo { justify-self: center; }
  .nav-right-extra { justify-self: end; }
}
@media (min-width: 1081px) {
  .nav-mobile { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .mega, .nav-mobile, .macc-body, .macc-head .pm, .nav-link .caret, .mega-sub-items, .mega-sub-head .sub-caret { transition: none !important; }
}

/* ── Bright theme header (body[data-bright]) ────────────── */
/* Forces the cream solid skin on the bar regardless of the transparent/
   scroll state nuvo-nav.js toggles — so the header stays readable over the
   bright cream hero. Warm theme (no data-bright) keeps the original behaviour. */
body[data-bright] .nuvo-nav {
  background: rgba(254,252,248,.96) !important;
  border-bottom: 1px solid var(--cream-300) !important;
  box-shadow: 0 1px 14px rgba(26,10,5,.06);
  backdrop-filter: blur(12px);
}
body[data-bright] .nuvo-nav.menu-open { background: rgba(254,252,248,.99) !important; }
body[data-bright] .nuvo-nav .nav-link { color: var(--espresso-900) !important; opacity: .74; }
body[data-bright] .nuvo-nav .nav-link:hover,
body[data-bright] .nuvo-nav .nav-item.open .nav-link { opacity: 1; }
body[data-bright] .nuvo-nav .nav-link.active,
body[data-bright] .nuvo-nav .nav-item.open .nav-link { color: var(--sand-600) !important; }
body[data-bright] .nuvo-nav .nav-logo-text { color: var(--espresso-950) !important; }
body[data-bright] .nuvo-nav .nav-logo-diamond { color: var(--sand-500) !important; }
body[data-bright] .nuvo-nav .nav-logo-img { filter: brightness(0) saturate(0) opacity(.9) !important; }
body[data-bright] .nuvo-nav .nav-cta {
  background: var(--espresso-900) !important; border-color: var(--espresso-900) !important; color: #fff !important;
}
body[data-bright] .nuvo-nav .nav-toggle { color: var(--espresso-900) !important; }

/* ── Floating action buttons (WhatsApp + back-to-top) ───── */
#nuvo-floaters {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
#nuvo-floaters .nuvo-wa,
#nuvo-floaters .nuvo-top {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none;
  box-shadow: 0 6px 20px rgba(26, 10, 5, .28);
  transition: opacity .2s ease, transform .25s ease, visibility .25s ease;
}
#nuvo-floaters .nuvo-wa {
  background: #25D366; color: #fff; text-decoration: none;
}
#nuvo-floaters .nuvo-wa:hover { opacity: .9; }
#nuvo-floaters .nuvo-wa svg { width: 30px; height: 30px; fill: currentColor; }
#nuvo-floaters .nuvo-top {
  background: var(--espresso-900); color: #fff;
  opacity: 0; visibility: hidden; transform: translateY(8px) scale(.9);
}
#nuvo-floaters .nuvo-top svg { width: 22px; height: 22px; }
#nuvo-floaters .nuvo-top:hover { opacity: .88; }
#nuvo-floaters.show-top .nuvo-top {
  opacity: 1; visibility: visible; transform: translateY(0) scale(1);
}
@media (max-width: 560px) {
  #nuvo-floaters { right: 16px; bottom: 16px; }
  #nuvo-floaters .nuvo-wa,
  #nuvo-floaters .nuvo-top { width: 48px; height: 48px; }
}
