/* Source-defined mega menu family. Header spacing and its breakpoint stay owned by style.css. */
.mega-menu[hidden], .mega-menu__panel[hidden], .mega-menu-backdrop[hidden] { display: none !important; }
.mega-menu { --control-padding: 21px; --control-height: 74px; --arrow-width: 41.74px; position: fixed; top: var(--menu-top); left: 0; width: 100%; padding-top: 80px; box-sizing: border-box; max-height: calc(100dvh - var(--menu-top)); overflow-y: auto; overscroll-behavior: contain; background: #fff; color: #000; z-index: 1002; text-align: left; }
.mega-menu__inner { --choice-copy-gap: clamp(32px, 4.946809vw, 93px); max-width: 1880px; margin-inline: auto; padding: 0 80px 136px; display: grid; grid-template-columns: 339px minmax(0, 1fr); gap: var(--choice-copy-gap); }
.mega-menu--services .mega-menu__inner { --choice-copy-gap: clamp(32px, 4.521277vw, 85px); grid-template-columns: 339px minmax(0, 1fr); padding-bottom: 80px; }
.mega-menu__choices { display: flex; flex-direction: column; gap: 30px; align-items: stretch; }
.mega-menu:not(.mega-menu--services) .mega-menu__choices > :last-child { margin-top: auto; }
.mega-menu__choice > span, .mega-menu__cta > span { white-space: nowrap; }
.mega-menu.is-exiting { pointer-events: none; }
.mega-menu.is-transitioning, .mega-menu__panels.is-transitioning { overflow: clip; }
.mega-menu__choice { appearance: none; box-sizing: border-box; width: 100%; border: 1px solid #000; border-radius: 0; background: #fff; color: #000; font: 400 20px/1.5 'Instrument Sans', sans-serif; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.mega-menu__choice svg, .mega-menu__cta svg { width: var(--arrow-width); height: 30px; flex: 0 0 var(--arrow-width); fill: none; stroke: currentColor; stroke-width: 1; overflow: visible; }
.mega-menu__choice:hover, .mega-menu__choice[aria-selected="true"] { background: #ddebf9; }
.mega-menu__choice--emergency { background: #e8d3d6; color: #a01725; border-color: #a01725; }
.mega-menu__choice--emergency:hover, .mega-menu__choice--emergency[aria-selected="true"] { background: #a01725; color: #fff; }
.mega-menu__choice:focus-visible, .mega-menu a:focus-visible, .mega-menu__panel:focus-visible, .mega-menu-trigger:focus-visible { outline: 2px solid #a6192e; outline-offset: 4px; }
.mega-menu__panels { min-width: 0; display: grid; }
/* Figma copy/image ratio: 505:756, with a 78px gap at source width.
   Preserve the selector gap with the approved longer labels; both content
   tracks share the remaining width. The hospital crop stays right-aligned. */
.mega-menu__panel { display: grid; grid-template-columns: minmax(0, 505fr) minmax(0, 756fr); column-gap: clamp(40px, 4.148936vw, 78px); align-items: stretch; }
.mega-menu__copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.mega-menu__copy h2 { font: 500 32px/1.2 'Instrument Sans', sans-serif; color: #000; margin: 0 0 30px; }
.mega-menu__copy p, .mega-menu__services { font: 400 20px/1.5 'Instrument Sans', sans-serif; color: #000; margin: 0; }
.mega-menu__phones { margin: 0 0 30px; }
.mega-menu .mega-menu__phones a { font: inherit; color: inherit !important; display: inline; padding: 0; }
.mega-menu .mega-menu__phones a::after { content: none; }
.mega-menu .mega-menu__cta { --button-width: 357px; margin-top: auto; display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 100%; font: 400 20px/1.5 'Instrument Sans', sans-serif; color: var(--color-white) !important; background: #051622; border: 1px solid #051622; border-radius: 0; white-space: normal; text-decoration: none; animation: none; opacity: 1; transform: none; transition: background-color .3s ease, color .3s ease; }
.mega-menu__copy > p:last-of-type { margin-bottom: 30px; }
.mega-menu .mega-menu__cta { width: var(--button-width); }
.mega-menu__panel--services .mega-menu__cta { --button-width: 367px; background: var(--color-black); border-color: var(--color-black); }
.mega-menu__cta::after { content: none !important; }
.mega-menu .mega-menu__cta:hover, .mega-menu .mega-menu__cta:focus-visible { background: var(--color-white); color: var(--color-black) !important; }
.mega-menu .mega-menu__image { width: min(var(--image-track-width, 100%), var(--image-width)); max-width: 100%; height: auto; justify-self: end; align-self: start; display: block; }
.mega-menu__panel--services { grid-template-columns: minmax(0, 515px) minmax(0, 563px); gap: 115px; }
.mega-menu__panel--services .mega-menu__copy { min-height: 0; padding-bottom: 0; }
.mega-menu .mega-menu__service-image { width: 100%; height: auto; display: block; margin-bottom: 30px; }
.mega-menu__panel--services h2 { margin-bottom: 20px; }
.mega-menu__panel--services .mega-menu__cta { margin-top: 0; }
.mega-menu__services { padding: 0; list-style: none; }
.mega-menu__services li { margin: 0; padding: 20px 0 19px; border-bottom: 1px solid #bfbfbf; }
.mega-menu__services li > span { display: block; max-width: 409px; }
.mega-menu__services li:first-child { padding-top: 0; }
.mega-menu__services li:last-child { border-bottom: 0; padding-bottom: 0; }
.mega-menu-backdrop { position: fixed; inset: var(--backdrop-top, 0px) 0 0; backdrop-filter: blur(11.1px); -webkit-backdrop-filter: blur(11.1px); z-index: 98; background: transparent; }
.main-header.has-mega-menu { isolation: isolate; }
/* The menu owns the bridge below the navbar, so its white surface and content
   fade together. The header surface ends exactly where that menu begins. */
.main-header::before { content: ''; position: absolute; inset: 0 0 auto; height: var(--menu-header-height, 100%); background: #fff; z-index: -1; opacity: 0; pointer-events: none; transition: opacity 200ms cubic-bezier(.2,.7,.2,1); }
#hidden_header::before { content: none; }
.main-header.has-mega-menu::before { opacity: 1; }
/* Only the top header's theme transitions; the navbar itself never fades.
   Its surface and foreground use the panel's timing, not a completion callback. */
.main-header:has([data-mega-menu]) .nav-links > li > a { transition: color 200ms cubic-bezier(.2,.7,.2,1); }
.main-header:has([data-mega-menu]) .logo img, .main-header:has([data-mega-menu]) .open-search img { transition: filter 200ms cubic-bezier(.2,.7,.2,1); }
.main-header.has-mega-menu .nav-links > li > a { color: #000 !important; }
.main-header.has-mega-menu .nav-links > li > a::after { background: #000; }
.main-header.has-mega-menu .logo img, .main-header.has-mega-menu .open-search img { filter: brightness(0); }
.main-header.has-mega-menu .desktop-contact-btn { color: #fff; background: #000; border-color: #000; }
.main-header.has-mega-menu .mega-menu-trigger[aria-expanded="true"]::after { width: 100%; }
.mega-menu-trigger[aria-expanded="true"] .webnet-menu-arrow { transform: rotate(180deg); }
.main-nav .mega-menu-owner:has([aria-expanded="true"])::before { content: ''; position: absolute; top: 100%; left: -30px; right: -30px; height: var(--menu-bridge, 80px); }
@media (max-width: 1600px) and (min-width: 1051px) {
  .mega-menu { --control-padding: 16px; --control-height: 60px; --arrow-width: 32px; }
  .mega-menu__inner { padding-inline: 60px; grid-template-columns: 280px minmax(0, 1fr); padding-bottom: 60px; }
  .mega-menu--services .mega-menu__inner { grid-template-columns: 280px minmax(0, 1fr); padding-bottom: 60px; }
  .mega-menu__panel { grid-template-columns: minmax(280px, 505fr) minmax(0, 756fr); }
  .mega-menu__panel--services { grid-template-columns: minmax(280px, 515fr) minmax(0, 563fr); gap: clamp(40px, 6.117021vw, 115px); }
  .mega-menu__choice, .mega-menu__copy p, .mega-menu__services, .mega-menu .mega-menu__cta { font-size: 16px; }
  .mega-menu__choices { gap: 20px; }
  .mega-menu__copy h2 { font-size: 26px; }
  .mega-menu__services li { padding-block: 14px; }
}
@media (max-width: 1050px) {
  .mobile-menu:has([data-mega-menu]) { width: min(440px, 100vw); left: 0; transform: translateX(-100%); transition: transform .35s ease; background: #fff; overflow-y: auto; overscroll-behavior: contain; }
  .mobile-menu:has([data-mega-menu]).active { transform: translateX(0); }
  .mobile-menu:has([data-mega-menu]) > ul > li > a, .mobile-menu:has([data-mega-menu]) .close-mobile { color: #000; }
  .mobile-menu:has([data-mega-menu]) .open-search img { filter: brightness(0); }
  .mobile-menu .mega-menu { --control-padding: 12px; --control-height: 48px; --arrow-width: 28px; position: static; width: 100%; padding-top: 0; max-height: none; overflow: visible; background: transparent; }
  .mobile-menu .mega-menu__inner, .mobile-menu .mega-menu--services .mega-menu__inner { display: flex; flex-direction: column; gap: 24px; padding: 12px 0 30px; }
  .mobile-menu .mega-menu__choices { gap: 10px; }
  .mobile-menu .mega-menu__choices > :last-child { margin-top: 0; }
  .mobile-menu .mega-menu__choice { font-size: 16px; }
  .mobile-menu .mega-menu__panel, .mobile-menu .mega-menu__panel--services { display: flex; flex-direction: column; gap: 24px; min-height: 0; }
  .mobile-menu .mega-menu__copy { min-height: 0; width: 100%; padding-bottom: 0; }
  .mobile-menu .mega-menu__copy h2 { font-size: 24px; margin-bottom: 16px; }
  .mobile-menu .mega-menu__copy p, .mobile-menu .mega-menu__services { font-size: 16px; }
  .mobile-menu .mega-menu__copy > p:last-of-type, .mobile-menu .mega-menu__phones { margin-bottom: 24px; }
  .mobile-menu .mega-menu__cta { --button-width: fit-content; margin-top: 0; font-size: 16px; gap: 10px; }
  .mobile-menu .mega-menu__service-image { margin-bottom: 20px; }
  .mobile-menu .mega-menu__image { width: 100%; }
  .mobile-menu .mega-menu__services { width: 100%; }
  .mobile-menu .mega-menu__services li { padding: 14px 0; margin: 0; }
}
/* One control geometry for selectors and destination buttons at every width. */
.mega-menu .mega-menu__choice, .mega-menu .mega-menu__cta { box-sizing: border-box; padding: var(--control-padding); min-height: var(--control-height); }
/* Legacy mobile .btn padding is important; override only its vertical sizing,
   retaining the existing compact horizontal padding and intrinsic widths. */
.mega-menu .mega-menu__cta { padding-block: var(--control-padding) !important; }
@media (prefers-reduced-motion: reduce) {
  .main-header:has([data-mega-menu]) .nav-links > li > a, .main-header:has([data-mega-menu]) .logo img, .main-header:has([data-mega-menu]) .open-search img { transition: none; }
  .mega-menu__choice, .mega-menu__cta, .mega-menu-trigger .webnet-menu-arrow, .mobile-menu:has([data-mega-menu]), .main-header::before { transition: none; }
}
