/*
 * SASS Innovations — Desktop Zoom / Responsive Navigation Repair
 * Applies after style.min.css and motion-stability.css.
 * The older 1400px rule opened a MOBILE DRAWER on common desktop browsers.
 * Keep full desktop navigation at >=993 CSS px; arrange it on its own row
 * when horizontal space is limited. Tablets / phones retain the mobile drawer.
 */
@media (min-width: 993px) and (max-width: 1500px) {
  body[data-site-refresh="2026-09"] .site-header .nav-container {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: space-between;
    column-gap: 12px;
    row-gap: 0;
    padding-top: 7px;
    padding-bottom: 6px;
    min-height: 111px;
  }
  body[data-site-refresh="2026-09"] .site-header .brand {
    order: 1;
    flex: 0 0 auto;
    margin: 0;
  }
  body[data-site-refresh="2026-09"] .site-header .main-nav {
    order: 3;
    flex: 1 0 100%;
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: clamp(3px, .55vw, 10px);
    width: 100%;
    max-width: none;
    max-height: none;
    min-height: 43px;
    margin: 0;
    padding: 4px 0 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }
  body[data-site-refresh="2026-09"] .site-header .main-nav.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  body[data-site-refresh="2026-09"] .site-header .main-nav > a,
  body[data-site-refresh="2026-09"] .site-header .main-nav .nav-dropdown-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 38px;
    margin: 0;
    padding: 5px 3px !important;
    font-size: clamp(11px, .9vw, 13px) !important;
    line-height: 1.25;
    white-space: nowrap;
    background: transparent !important;
    color: rgba(255,255,255,.9) !important;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
  }
  body[data-site-refresh="2026-09"] .site-header .main-nav .nav-dropdown-btn > span {
    color: #16c7d4;
  }
  body[data-site-refresh="2026-09"] .site-header .main-nav > a:hover,
  body[data-site-refresh="2026-09"] .site-header .main-nav .nav-dropdown-btn:hover,
  body[data-site-refresh="2026-09"] .site-header .main-nav .nav-dropdown-btn.active {
    color: #16c7d4 !important;
  }
  body[data-site-refresh="2026-09"] .site-header .main-nav > a.active::after {
    display: block;
    bottom: -2px;
  }
  body[data-site-refresh="2026-09"] .site-header .main-nav > a.header-expert-cta {
    display: inline-flex;
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    min-height: 34px;
    margin: 0 0 0 4px;
    padding: 7px 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 10px;
    line-height: 1.25;
  }
  body[data-site-refresh="2026-09"] .site-header .mobile-toggle {
    display: none;
  }
  body[data-site-refresh="2026-09"] .site-header .nav-dropdown {
    flex: 0 0 auto;
  }
  body[data-site-refresh="2026-09"] .site-header .main-nav .nav-dropdown > .dropdown-menu {
    position: absolute;
    top: calc(100% + 18px);
    left: 50%;
    display: block;
    width: min(322px, 90vw);
    max-height: min(65vh, 560px);
    margin: 0;
    padding: 12px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 10px) scale(.985);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  }
  body[data-site-refresh="2026-09"] .site-header .main-nav .nav-dropdown:hover > .dropdown-menu,
  body[data-site-refresh="2026-09"] .site-header .main-nav .nav-dropdown:focus-within > .dropdown-menu,
  body[data-site-refresh="2026-09"] .site-header .main-nav .nav-dropdown.js-open > .dropdown-menu {
    display: block !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
  }
  /* Override the old <=1400 drawer's forced static dropdown display. */
  body[data-site-refresh="2026-09"] .site-header .main-nav .nav-dropdown.js-open > .dropdown-menu {
    max-height: min(65vh, 560px);
  }
}

/* Keep edge dropdowns wholly inside a desktop viewport. */
@media (min-width: 993px) {
  body[data-site-refresh="2026-09"] .site-header .main-nav .nav-dropdown:first-child > .dropdown-menu {
    left: 0;
    transform: translate(0, 10px) scale(.985);
  }
  body[data-site-refresh="2026-09"] .site-header .main-nav .nav-dropdown:first-child:hover > .dropdown-menu,
  body[data-site-refresh="2026-09"] .site-header .main-nav .nav-dropdown:first-child:focus-within > .dropdown-menu,
  body[data-site-refresh="2026-09"] .site-header .main-nav .nav-dropdown:first-child.js-open > .dropdown-menu {
    transform: translate(0, 0) scale(1);
  }
}

/* Genuine tablet and mobile widths still use the accessible vertical menu. */
@media (max-width: 992px) {
  body[data-site-refresh="2026-09"] .site-header .mobile-toggle {
    display: flex;
  }
}
