.menu-backdrop { position: fixed; inset: 75px 0 0; z-index: 20; background: rgb(34 43 57 / 27%); }
.nav-item-mega { position: static; }
.dropdown { position: absolute; top: 91px; background: white; border-radius: 5px; color: #141929; }
.dropdown::before { content: ''; position: absolute; top: -8px; left: calc(var(--arrow-x, 50%) - 9px); width: 18px; height: 18px; background: white; transform: rotate(45deg); }
/* This transparent bridge keeps the menu open while crossing the 16px gap. */
.dropdown::after { content: ''; position: absolute; inset: -16px 0 auto; height: 16px; }
.dropdown-scroll { position: relative; max-height: calc(100dvh - 109px); overflow-y: auto; overscroll-behavior: contain; border-radius: inherit; scrollbar-width: thin; }
.dropdown-standard { position: fixed; width: 366px; }
.dropdown-standard .dropdown-scroll { padding: 16px; }
.menu-card-list, .mega-group ul { margin: 0; padding: 0; list-style: none; }
.menu-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0; width: 100%; min-height: 74px; padding: 12px 16px; border: 0; border-radius: 5px; background: transparent; text-align: right; }
.menu-title { color: #323234; font-size: 14px; font-weight: 500; line-height: 1.625; }
.menu-description { color: #95969d; font-size: 14px; font-weight: 400; line-height: 1.625; }
.menu-card:hover, .menu-card:focus-visible, .menu-text-link:hover, .menu-text-link:focus-visible { background: #f2f7fd; }
.menu-card:hover .menu-title, .menu-text-link:hover { color: var(--color-primary); }
.menu-card:focus-visible, .menu-text-link:focus-visible { outline-offset: -2px; }
.menu-badge { display: inline-block; margin-inline-start: 7px; padding: 0 5px; border-radius: 3px; background: #d3f5df; color: #207b43; font-size: 11px; }
.dropdown-mega { inset-inline: 0; }
.dropdown-mega .dropdown-scroll { display: grid; grid-template-columns: 366px repeat(3, minmax(0, 1fr)) 172px; min-height: 528px; background: #fafafa; }
.dropdown-mega .menu-card-list { padding: 16px; background: white; display: flex; flex-direction: column; justify-content: space-between; }
.mega-group { padding: 32px 24px; }
.mega-group h2 { margin: 0 0 12px; font-size: 14px; font-weight: 700; line-height: 1.625; white-space: nowrap; }
.menu-text-link { display: block; width: 100%; padding: 6px 0; border: 0; border-radius: 4px; background: transparent; text-align: right; color: #25334a; }
.menu-text-link .menu-title { font-weight: 400; }
.mega-related { border-inline-start: 1px solid #d9d9df; }
.mega-related .menu-title { color: #4c4c52; }

@media (max-width: 1200px) and (min-width: 1051px) {
  .dropdown-mega .dropdown-scroll { grid-template-columns: 1.4fr repeat(3, 1fr) .8fr; }
  .mega-group { padding-inline: 16px; }
  .dropdown-mega .menu-card-list { padding-inline: 12px; }
}

@media (max-width: 1050px) {
  .primary-navigation { top: 75px; right: 0; left: 0; }
  .nav-item-mega { position: relative; }
  .dropdown, .dropdown-standard { position: static; width: 100%; margin: 0 0 10px; background: #fafaff; }
  .dropdown::before, .dropdown::after { display: none; }
  .dropdown-scroll { max-height: none; overflow: visible; }
  .dropdown-standard .dropdown-scroll { padding: 4px; }
  .dropdown-mega .dropdown-scroll { min-height: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dropdown-mega .menu-card-list { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 6px; background: #fafaff; }
  .mega-group { padding: 18px 14px; border-top: 1px solid var(--color-border); }
  .mega-related { border-inline-start: 0; }
  .menu-card { min-height: 0; padding-block: 12px; }
}

@media (max-width: 540px) {
  .dropdown-mega .menu-card-list { grid-template-columns: 1fr; }
  .mega-group { padding-inline: 8px; }
  .mega-group h2 { white-space: normal; }
  .menu-text-link .menu-title { font-size: 12px; }
}
