/* ==========================================================================
   Foreviva Navigation — menu, mega-menu and mobile drawer
   Full desktop menu from 1280px; hamburger + drawer below 1280px (as in the approved prototype).
   Menu item CSS classes (Appearance → Menus → Screen Options → CSS Classes):
     fv-menu-pill     lavender pill (Endometriosis Care)
     fv-sep-before    thin gold separator before the item
     fv-mega          top-level item whose submenu opens as a multi-column panel
     fv-menu-heading  group title inside a mega panel
   ========================================================================== */

.fv-menu {
  --fvn-purple: #845BAA; --fvn-plum: #5C3A7D; --fvn-lav: #DFD0EB; --fvn-lav2: #E7DBF1;
  --fvn-bg1: #F6F0F6; --fvn-bg2: #FBF6FF; --fvn-gold: #E8BE6F;
  --fvn-shadow: 0 2px 4px rgba(92,58,125,.05), 0 22px 44px -18px rgba(92,58,125,.28);
  display: flex; align-items: center; justify-content: center; width: 100%;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.fv-menu ul, .fv-drawer ul { list-style: none; margin: 0; padding: 0; }
.fv-menu li, .fv-drawer li { margin: 0; }
.fv-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fv-menu a, .fv-drawer a { text-decoration: none; }
.fv-menu a:focus-visible, .fv-menu button:focus-visible,
.fv-drawer a:focus-visible, .fv-drawer button:focus-visible { outline: 2px solid var(--fvn-purple, #845BAA); outline-offset: 2px; border-radius: 6px; }
.fv-menu-notice { margin: 0; padding: 8px 12px; border: 1px dashed #845BAA; border-radius: 8px; font-size: 13px; color: #5C3A7D; background: #FBF6FF; }

/* ---------- Desktop ---------- */
.fv-menu__desktop .fv-menu__list { position: relative; display: flex; align-items: center; flex-wrap: nowrap; gap: 2px; }
.fv-menu__desktop .fv-menu__item--d0 { position: relative; display: flex; align-items: center; }
.fv-menu__row { display: flex; align-items: center; }
.fv-menu__desktop .fv-menu__item--d0 > .fv-menu__row > .fv-menu__link {
  display: block; padding: 8px 7px; border-radius: 6px; white-space: nowrap;
  font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--fvn-plum);
  transition: color .2s ease, background-color .2s ease;
}
.fv-menu__desktop .fv-menu__item--d0.has-children > .fv-menu__row > .fv-menu__link { padding-right: 2px; }
.fv-menu__desktop .fv-menu__item--d0 > .fv-menu__row > .fv-menu__link:hover,
.fv-menu__desktop .fv-menu__item--d0.is-open > .fv-menu__row > .fv-menu__link,
.fv-menu__desktop .fv-menu__item--d0:hover > .fv-menu__row > .fv-menu__link,
.fv-menu .current-menu-item > .fv-menu__row > .fv-menu__link,
.fv-menu .current-menu-ancestor > .fv-menu__row > .fv-menu__link { color: var(--fvn-purple); }
.fv-menu__desktop .fv-menu__toggle {
  -webkit-appearance: none; appearance: none; display: inline-grid; place-items: center;
  min-width: 20px; min-height: 34px; margin: 0; padding: 0 2px; border: 0; border-radius: 6px;
  background: transparent; color: inherit; cursor: pointer; line-height: 1;
}
.fv-menu__desktop .fv-menu__toggle:hover { background: transparent; color: var(--fvn-purple, #845BAA); }
.fv-menu__toggle svg { transition: transform .2s ease; }
.is-open > .fv-menu__row > .fv-menu__toggle svg { transform: rotate(180deg); }

/* Pill + separators */
.fv-menu__desktop .fv-menu-pill > .fv-menu__row > .fv-menu__link {
  padding: 8px 13px; border-radius: 999px; background: var(--fvn-lav2); font-weight: 600; color: var(--fvn-plum);
}
.fv-menu__desktop .fv-menu-pill > .fv-menu__row > .fv-menu__link:hover { background: var(--fvn-lav); color: var(--fvn-plum); }
.fv-menu__desktop .fv-menu__item--d0.fv-sep-before::before {
  content: ""; flex: none; width: 1px; height: 20px; margin: 0 5px; background: var(--fvn-gold);
}

/* Laptops 1280–1365px: a little tighter so logo, menu and booking button share one row */
@media (min-width: 1280px) and (max-width: 1365px) {
  .fv-menu__desktop .fv-menu__item--d0 > .fv-menu__row > .fv-menu__link { padding-left: 6px; padding-right: 6px; font-size: 13.5px; }
  .fv-menu__desktop .fv-menu-pill > .fv-menu__row > .fv-menu__link { padding: 8px 11px; }
}

/* Standard dropdown */
.fv-menu__desktop .fv-menu__sub--d1 {
  position: absolute; z-index: 1000; top: calc(100% + 14px); left: 0; min-width: 240px; padding: 10px 0;
  background: #fff; border: 1px solid var(--fvn-lav2); border-radius: 0 0 12px 12px; box-shadow: var(--fvn-shadow);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.fv-menu__desktop .fv-menu__sub--d1::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.fv-menu__desktop .fv-menu__item--d0:hover > .fv-menu__sub--d1,
.fv-menu__desktop .fv-menu__item--d0.is-open > .fv-menu__sub--d1 { opacity: 1; visibility: visible; transform: none; }
.fv-menu__desktop .fv-menu__sub .fv-menu__link {
  display: block; padding: 9px 20px; font-size: 14.5px; line-height: 1.4; color: var(--fvn-plum); width: 100%;
}
.fv-menu__desktop .fv-menu__sub .fv-menu__link:hover { background: var(--fvn-bg1); color: var(--fvn-purple); }
.fv-menu__desktop .fv-menu__sub .fv-menu__toggle { display: none; }
.fv-menu__desktop .fv-menu__sub--d2 { position: static; padding: 0; }

/* Mega panel: group titles become columns, their children are listed beneath */
.fv-menu__desktop .fv-menu__item--d0.fv-mega { position: static; }
.fv-menu__desktop .fv-mega > .fv-menu__sub--d1 {
  left: 50%; top: calc(100% + 24px); transform: translate(-50%, -6px);
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 210px); gap: 0 28px;
  width: max-content; max-width: 92vw; padding: 28px 32px 24px; border-radius: 0 0 16px 16px;
}
.fv-menu__desktop .fv-mega > .fv-menu__sub--d1::before { top: -26px; height: 26px; }
.fv-menu__desktop .fv-menu__item--d0.fv-mega:hover > .fv-menu__sub--d1,
.fv-menu__desktop .fv-menu__item--d0.fv-mega.is-open > .fv-menu__sub--d1 { transform: translate(-50%, 0); }
.fv-menu__desktop .fv-mega .fv-menu__item--d1 > .fv-menu__row > .fv-menu__link {
  padding: 0 0 4px; font-family: "Cormorant Garamond", Georgia, serif; font-size: 19px; font-weight: 600; line-height: 1.2; color: var(--fvn-plum);
}
.fv-menu__desktop .fv-mega .fv-menu__item--d1 > .fv-menu__row > .fv-menu__link:hover { background: transparent; color: var(--fvn-purple); }
.fv-menu__desktop .fv-mega .fv-menu__item--d1 > .fv-menu__row > .fv-menu__link::after {
  content: ""; display: block; width: 28px; height: 1px; margin-top: 10px; background: var(--fvn-gold);
}
.fv-menu__desktop .fv-mega .fv-menu__sub--d2 { margin-top: 8px; }
.fv-menu__desktop .fv-mega .fv-menu__sub--d2 .fv-menu__link { margin: 0 -8px; padding: 6px 8px; border-radius: 6px; color: rgba(92,58,125,.88); }

/* ---------- Hamburger ---------- */
.fv-menu__burger {
  display: none; -webkit-appearance: none; appearance: none; place-items: center; flex: none;
  width: 44px; height: 44px; margin: 0; padding: 0; border: 1px solid var(--fvn-lav, #DFD0EB); border-radius: 999px;
  background: transparent; color: var(--fvn-plum, #5C3A7D); cursor: pointer;
}
.fv-menu__burger:hover, .fv-menu__burger:focus { background: var(--fvn-lav2, #E7DBF1); color: var(--fvn-plum, #5C3A7D); }
.fv-menu__burger-lines, .fv-menu__burger-lines::before, .fv-menu__burger-lines::after {
  display: block; width: 18px; height: 1.6px; border-radius: 2px; background: currentColor;
}
.fv-menu__burger-lines { position: relative; }
.fv-menu__burger-lines::before, .fv-menu__burger-lines::after { content: ""; position: absolute; left: 0; }
.fv-menu__burger-lines::before { top: -6px; }
.fv-menu__burger-lines::after { top: 6px; }

@media (max-width: 1279px) {
  .fv-menu { justify-content: flex-end; }
  .fv-menu__desktop { display: none; }
  .fv-menu__burger { display: inline-grid; }
}

/* ---------- Drawer ---------- */
.fv-drawer { position: fixed; inset: 0; z-index: 100000; }
.fv-drawer[hidden] { display: none; }
.fv-drawer__overlay { position: absolute; inset: 0; background: rgba(92,58,125,.4); opacity: 0; transition: opacity .25s ease; }
.fv-drawer__panel {
  position: absolute; top: 0; right: 0; display: flex; flex-direction: column; width: min(90%, 400px); height: 100%;
  background: #FBF6FF; box-shadow: 0 22px 44px -18px rgba(92,58,125,.28);
  transform: translateX(100%); transition: transform .25s ease; font-family: "DM Sans", system-ui, sans-serif; color: #5C3A7D;
}
.fv-drawer.is-open .fv-drawer__overlay { opacity: 1; }
.fv-drawer.is-open .fv-drawer__panel { transform: none; }
.admin-bar .fv-drawer__panel { top: var(--fv-fixed-top, 0px); height: calc(100% - var(--fv-fixed-top, 0px)); }
.fv-drawer__head {
  display: flex; align-items: center; justify-content: space-between; flex: none; height: 68px; padding: 0 20px;
  border-bottom: 1px solid #E7DBF1;
}
.fv-drawer__brand { font-family: "Cormorant Garamond", Georgia, serif; font-size: 26px; font-weight: 600; line-height: 1; color: #5C3A7D; }
.fv-drawer__close {
  -webkit-appearance: none; appearance: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid #DFD0EB; border-radius: 999px; background: transparent; color: #5C3A7D; cursor: pointer;
}
.fv-drawer__close:hover, .fv-drawer__close:focus { background: #E7DBF1; color: #5C3A7D; }
.fv-drawer__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 20px 24px; }
.fv-drawer .fv-menu__item--d0 { border-bottom: 1px solid #E7DBF1; }
.fv-drawer .fv-menu__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fv-drawer .fv-menu__link { flex: 1; display: block; padding: 14px 0; font-size: 16px; font-weight: 600; line-height: 1.35; color: #5C3A7D; }
.fv-drawer .fv-menu__toggle {
  -webkit-appearance: none; appearance: none; display: grid; place-items: center; flex: none; width: 44px; height: 44px;
  margin: 0; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #5C3A7D; cursor: pointer;
}
.fv-drawer .fv-menu__toggle:hover, .fv-drawer .fv-menu__toggle:focus { background: #E7DBF1; color: #5C3A7D; }
.fv-drawer .fv-menu__toggle svg { width: 20px; height: 20px; transition: transform .2s ease; }
.fv-drawer .fv-menu__sub { display: none; padding: 0 0 10px 12px; }
.fv-drawer .is-open > .fv-menu__sub { display: block; }
.fv-drawer .fv-menu__sub .fv-menu__link { padding: 10px 0; font-size: 15px; font-weight: 500; }
.fv-drawer .fv-menu__sub--d2 .fv-menu__link { font-weight: 400; color: rgba(92,58,125,.88); }
.fv-drawer .fv-menu-heading > .fv-menu__row > .fv-menu__link {
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #845BAA;
}
.fv-drawer .fv-menu-pill > .fv-menu__row > .fv-menu__link {
  flex: 0 0 auto; margin: 12px 0; padding: 8px 16px; border-radius: 999px; background: #E7DBF1; font-size: 15px;
}
.fv-drawer .fv-menu-pill { border-bottom: 0; }
.fv-drawer .current-menu-item > .fv-menu__row > .fv-menu__link { color: #845BAA; }
.fv-drawer__phones { margin-top: 20px !important; font-size: 14px; }
.fv-drawer__phones li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.fv-drawer__phones span { font-weight: 600; }
.fv-drawer__phones a { color: #845BAA; }
.fv-drawer__phones em { font-style: normal; color: rgba(92,58,125,.75); }
.fv-drawer__foot { flex: none; padding: 16px 20px; border-top: 1px solid #E7DBF1; }
.fv-drawer__book {
  display: flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; border-radius: 999px;
  background: #845BAA; color: #fff !important; font-size: 15px; font-weight: 600; transition: background-color .2s ease;
}
.fv-drawer__book:hover, .fv-drawer__book:focus { background: #5C3A7D; color: #fff; }
html.fv-drawer-open, html.fv-drawer-open body { overflow: hidden; }

/* Header layout helpers for the Elementor header container below 1280px */
@media (max-width: 1279px) {
  .e-con .fv-nav { flex-grow: 0 !important; width: auto !important; }
  .fv-mainnav .fv-logo { margin-right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .fv-menu *, .fv-drawer, .fv-drawer * { transition: none !important; }
}
