/* menu.css */
/* =========================================================
   Layout stability
   ========================================================= */
html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

/* One variable controls nav/header row height */
:root {
  --mm-nav-h: 64px;
}

/* =========================================================
   Header base
   ========================================================= */
#header {
  background: #ffffff;
  border-bottom: 1px solid rgba(9, 30, 66, 0.18);
  position: sticky;
  top: 0;
  z-index: 10000;
}

#header-spacer {
  display: none !important;
  height: 0 !important;
}

/* =========================================================
   Nav row sizing + alignment
   ========================================================= */
#header #stuck_container {
  background: #ffffff;
  /* border-bottom: 1px solid rgba(9, 30, 66, 0.12); */
}

#header #stuck_container>.container {
  padding-left: 12px;
  padding-right: 12px;
  max-width: 1200px;
}

#header #stuck_container .grid_12 {
  display: flex;
  align-items: center;
  min-height: var(--mm-nav-h);
}

/* Logo area */
#header .hdr-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  height: var(--mm-nav-h);
}

#header .hdr-brand .logo-text {
  display: inline-flex;
  align-items: center;
  height: var(--mm-nav-h);
  padding: 0 8px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-decoration: none;
  color: #172B4D;
}

/* Nav container */
#header .mm-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  height: var(--mm-nav-h);
}

#header .mm-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}

/* =========================================================
   Top-level links/triggers
   ========================================================= */
#header .mm-menu>li>a,
#header .mm-trigger {
  -webkit-appearance: none;
  appearance: none;

  border: 0;
  background: transparent;
  box-shadow: none;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, "Fira Sans",
    "Droid Sans", "Helvetica Neue", sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #172B4D;
  text-decoration: none;

  box-sizing: border-box;
  margin: 0;

  height: 34px;
  padding: 8px 12px;
  line-height: 18px;

  border-radius: 8px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  position: relative;
  transition: background-color 120ms ease, color 120ms ease;
}

#header .mm-menu>li>a:hover,
#header .mm-trigger:hover {
  background: rgba(9, 30, 66, 0.035);
}

#header .mm-menu>li>a:active,
#header .mm-trigger:active {
  background: rgba(9, 30, 66, 0.06);
}

/* Underline effect */
#header .mm-menu>li>a::after,
#header .mm-trigger::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 5px;

  height: 2px;
  border-radius: 2px;
  background: rgba(12, 102, 228, 0.95);

  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;

  transition: transform 140ms cubic-bezier(0.2, 0, 0, 1), opacity 140ms ease;
}

#header .mm-menu>li>a:hover::after,
#header .mm-trigger:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

#header .mm-chevron {
  display: inline-block;
  line-height: 1;
  opacity: 0.9;
  transition: transform 160ms ease, opacity 160ms ease;
}

/* Open state */
#header .mm-item.is-open .mm-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

#header .mm-item.is-open .mm-trigger::after {
  transform: scaleX(1);
  opacity: 1;
}

/* Focus ring */
#header .mm-menu>li>a:focus-visible,
#header .mm-trigger:focus-visible,
#header .mm-mega-link:focus-visible {
  outline: 2px solid #0C66E4;
  outline-offset: 2px;
}

/* =========================================================
   Backdrop
   ========================================================= */
.mm-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--mm-backdrop-top, 0px);
  bottom: 0;

  z-index: 9998;

  background: rgba(9, 30, 66, 0.28);
  opacity: 0;
  pointer-events: none;

  transition: opacity 160ms cubic-bezier(0.2, 0, 0, 1);
}

.mm-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* =========================================================
   Drawer ✅ shutter down/up (scaleY)
   ========================================================= */
#header .mm-detail {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--mm-drawer-top, 0px);
  z-index: 10001;

  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
  background: #ffffff;

  pointer-events: none;

  transform-origin: top;
  transform: scaleY(0);
  opacity: 0;

  will-change: transform, opacity;
  backface-visibility: hidden;
  transform-style: preserve-3d;

  transition:
    transform 240ms cubic-bezier(0.2, 0, 0, 1),
    opacity 160ms ease;

  box-shadow: none;
}

#header .mm-detail.is-visible {
  pointer-events: auto;
  transform: scaleY(1);
  opacity: 1;
  box-shadow: 0 10px 18px rgba(9, 30, 66, 0.14);
  /* box-shadow: 0 12px 28px rgba(9, 30, 66, 0.14), 0 2px 6px rgba(9, 30, 66, 0.10); */
}

/* Closing: shutter up (same feel, no snap) */
#header .mm-detail.is-closing {
  pointer-events: none;
  transform: scaleY(0);
  opacity: 0;
  transition:
    transform 220ms cubic-bezier(0.4, 0, 1, 1),
    opacity 140ms ease;
}

/* =========================================================
   Edge shadow (under drawer, over page)
   ========================================================= */
.mm-edge-shadow {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 34px;
  pointer-events: none;
  opacity: 0;

  z-index: 10000;

  background: linear-gradient(to bottom, rgba(9, 30, 66, 0.22), rgba(9, 30, 66, 0));
  transition: opacity 160ms cubic-bezier(0.2, 0, 0, 1);
  transform: translateZ(0);
}

.mm-edge-shadow.is-visible {
  opacity: 1;
}

#header .mm-detail__inner.container {
  max-width: 1200px;
  padding-left: 12px;
  padding-right: 12px;
}

/* =========================================================
   Mega menu content styling
   ========================================================= */
#header .mm-panel {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;

  padding: 24px 0 32px;
  max-width: none;

  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 140ms ease, transform 180ms cubic-bezier(0.2, 0, 0, 1);
}

#header .mm-panel[hidden] {
  display: none !important;
}

#header .mm-detail.is-visible .mm-panel.is-active {
  opacity: 1;
  transform: translateY(0);
}

/* content close motion (matches shutter close) */
#header .mm-detail.is-closing .mm-panel.is-active {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 120ms ease, transform 160ms cubic-bezier(0.4, 0, 1, 1);
}

#header .mm-panel__grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 44px;
  align-items: start;
}

@media (max-width: 1020px) {
  #header .mm-panel__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

#header .mm-panel__title {
  margin: 0 0 10px;
  font-weight: 800;
  font-size: 16px;
  line-height: 22px;
  color: #172B4D;
  letter-spacing: -0.2px;
}

#header .mm-panel__title::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 12px;
  background: rgba(9, 30, 66, 0.10);
}

#header .mm-panel__desc {
  margin: 12px 0 18px;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: rgba(23, 43, 77, 0.78);
}

#header .mm-links {
  display: grid;
  gap: 12px;
}

#header .mm-mega-link {
  display: block;
  padding: 12px 10px 10px;
  border-radius: 10px;
  text-decoration: none;
  border: 0;
  background: transparent;
  transition: background-color 140ms ease;
}

#header .mm-mega-link:hover,
#header .mm-mega-link:focus-within {
  background: rgba(9, 30, 66, 0.04);
}

#header .mm-mega-link__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  margin-bottom: 4px;
  padding-bottom: 6px;

  font-weight: 800;
  font-size: 16px;
  line-height: 20px;
  color: #172B4D;

  background-image: linear-gradient(rgba(12, 102, 228, 0.95), rgba(12, 102, 228, 0.95));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0% 100%;
  transition: background-size 160ms cubic-bezier(0.2, 0, 0, 1);
}

#header .mm-mega-link:hover .mm-mega-link__title,
#header .mm-mega-link:focus-within .mm-mega-link__title {
  background-size: 100% 2px;
}

#header .mm-mega-link__desc {
  display: block;
  font-weight: 500;
  font-size: 13px;
  line-height: 18px;
  color: rgba(23, 43, 77, 0.72);
  max-width: 900px;
}

#header .mm-callout {
  background: rgba(101, 84, 192, 0.06);
  border: 1px solid rgba(101, 84, 192, 0.18);
  border-radius: 14px;
  padding: 16px 16px;
}

#header .mm-callout__title {
  margin: 0 0 8px;
  font-weight: 900;
  font-size: 13px;
  line-height: 18px;
  color: #172B4D;
  letter-spacing: -0.15px;
  text-transform: uppercase;
}

#header .mm-callout__desc {
  margin: 0;
  font-weight: 500;
  font-size: 13px;
  line-height: 18px;
  color: rgba(23, 43, 77, 0.75);
}

/* Override theme padding on stuck_container */
#header #stuck_container.stuck_container {
  padding: 20px 0 23px !important;
}

/* =========================================================
   Shadows (single-source + no doubling)
   ========================================================= */

/* Real shadow that does NOT reveal the hero image behind */
#header:hover,
#header.mm-drawer-open {
  box-shadow: 0 10px 18px rgba(9, 30, 66, 0.14);
}

/* Turn OFF the original header gradient shadow (it can reveal slider) */
#header::after {
  opacity: 0 !important;
}

/* Top-of-drawer shadow (used only when mega is OPEN) */
.mm-top-shadow {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--mm-backdrop-top, 0px);
  height: 18px;
  pointer-events: none;
  opacity: 0;
  z-index: 10002;
  background: linear-gradient(to bottom, rgba(9, 30, 66, 0.20), rgba(9, 30, 66, 0.00));
  transition: opacity 160ms cubic-bezier(0.2, 0, 0, 1);
}

/* Show ONLY when mega is open */
body:has(.mm-backdrop.is-visible) .mm-top-shadow {
  opacity: 0.8;
}

/* Sticky hover shadow (when header is sticky + mega CLOSED) */
#header #stuck_container.isStuck {
  position: relative;
}

#header #stuck_container.isStuck::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 18px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to bottom, rgba(9, 30, 66, 0.20), rgba(9, 30, 66, 0.00));
  transition: opacity 160ms cubic-bezier(0.2, 0, 0, 1);
}

/* show shadow on hover ONLY when mega is closed */
#header.mm-stuck-active:not(.mm-drawer-open) #stuck_container.isStuck:hover::after {
  opacity: 0.8;
}

#header.mm-drawer-open #stuck_container.isStuck::after {
  opacity: 0 !important;
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {

  #header .mm-detail,
  #header .mm-panel,
  .mm-backdrop,
  .mm-edge-shadow,
  .mm-top-shadow {
    transition: none !important;
  }
}

.cc-cookies {
  z-index: 20000 !important;
}

/* =========================================================
   TABLET STICKY FALLBACK (581px..979px)
   Theme sticky often doesn't run here, so we pin #stuck_container ourselves.
   ========================================================= */
@media (max-width: 979px) and (min-width: 581px) {

  /* default */
  #header #stuck_container {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    transform: none !important;
    z-index: auto !important;
    background: #fff !important;
  }

  /* stuck state (JS toggles) */
  #header #stuck_container.mm-tablet-stuck {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
    background: #fff !important;
    box-shadow: 0 10px 18px rgba(9, 30, 66, 0.14);
  }

  /* prevent jump only when stuck */
  body.mm-tablet-pad {
    padding-top: var(--mm-header-h, 92px) !important;
  }
}

/* =========================================================
   FIX: Tablet sticky fallback must NEVER be hidden by theme clone logic
   Range: 581..979
   ========================================================= */
@media (max-width: 979px) and (min-width: 581px) {

  /* If we are using our own tablet sticky, force the real container visible */
  #header #stuck_container.mm-tablet-stuck {
    visibility: visible !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    display: block !important;
  }

  /* Also ensure the non-clone container is not hidden by mm-stuck-active rules */
  #header.mm-stuck-active #stuck_container.stuck_container:not(.isStuck) {
    visibility: visible !important;
    pointer-events: auto !important;
  }

  /* And prevent any hidden clone from blocking clicks */
  #header #stuck_container.isStuck {
    pointer-events: none !important;
  }
}