/* Shared mobile navigation: reset the legacy desktop dropdown geometry. */
#masthead .amt-overview { display: none; }
@media (min-width: 922px) {
  #masthead .main-header-menu > .menu-item:last-child { align-items: center; }
  #masthead .main-header-menu > .menu-item:last-child > .menu-link {
    height: auto;
    min-height: 44px;
    align-self: center;
    display: inline-flex;
    align-items: center;
    line-height: 1.4;
    padding: 12px 22px;
    border-radius: 8px;
  }
}
@media (max-width: 921px) {
  #masthead .main-header-bar { background: #fff; line-height: 1.4; }
  #masthead .main-header-bar .ast-container { padding: 0 20px; }
  #masthead .main-header-container { min-height: 80px; align-items: center; }
  #masthead .ast-site-identity { padding: 16px 0; }
  #masthead .custom-logo-link img { width: 180px; max-width: 55vw; }
  #masthead .main-header-menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; border: 1px solid #cce9e4;
    border-radius: 12px; background: #edf8f5; color: #007f77; box-shadow: none;
  }
  #masthead .main-header-menu-toggle:focus-visible,
  #masthead .ast-menu-toggle:focus-visible,
  #masthead .menu-link:focus-visible { outline: 3px solid #007f77; outline-offset: -3px; }
  #masthead .main-header-bar-navigation {
    display: none; position: static; width: calc(100% + 40px); margin: 0 -20px;
    padding: 0; max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px);
    overflow-y: auto; overscroll-behavior: contain; background: #fff;
    border-top: 1px solid #e2eeeb; box-shadow: 0 12px 22px #1d23660a;
  }
  #masthead .main-header-bar-navigation.toggle-on { display: block; }
  #masthead #site-navigation { height: auto; padding: 0; }
  #masthead .main-header-menu { display: block; margin: 0; padding: 12px 16px 20px; border: 0; background: #fff; }
  #masthead .main-header-menu > .menu-item { display: block; position: relative; width: 100%; height: auto; }
  #masthead .main-header-menu > .menu-item > .menu-link {
    display: block; width: 100%; height: auto; margin: 0; padding: 16px 12px;
    border: 0; border-bottom: 1px solid #edf3f2; border-radius: 0;
    font-size: 16px; font-weight: 600; line-height: 1.4; color: #1d2366;
  }
  #masthead .main-header-menu > .menu-item-has-children > .menu-link { padding-right: 60px; }
  #masthead .main-header-menu > .menu-item-has-children > .menu-link::after { display: none; }
  #masthead .main-header-menu > .menu-item-has-children > .ast-menu-toggle {
    display: grid; place-items: center; position: absolute; top: 5px; right: 4px;
    width: 44px; height: 44px; margin: 0; padding: 0; border: 0;
    background: #edf8f5; border-radius: 10px; color: #007f77; box-shadow: none;
    line-height: 1; cursor: pointer;
  }
  #masthead .ast-menu-toggle::before {
    content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg);
  }
  #masthead .ast-submenu-expanded > .ast-menu-toggle::before { transform: translateY(2px) rotate(225deg); }
  #masthead .main-header-menu .sub-menu {
    display: none !important; position: static !important; inset: auto !important;
    visibility: visible !important; opacity: 1 !important; transform: none !important;
    float: none; width: auto; height: auto; min-height: 0; max-height: none;
    margin: 6px 0 12px; padding: 8px; border: 1px solid #dceee8;
    border-radius: 12px; background: #f0f9f6; box-shadow: none;
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
  }
  #masthead .main-header-menu .ast-submenu-expanded > .sub-menu { display: grid !important; }
  #masthead .sub-menu::before, #masthead .sub-menu::after { display: none; }
  #masthead .main-header-menu .sub-menu .menu-item { width: auto; min-width: 0; margin: 0; }
  #masthead .main-header-menu .sub-menu .menu-link {
    display: flex; align-items: center; min-height: 44px; height: 100%; width: 100%;
    padding: 10px; border: 0; border-radius: 8px; background: #fff;
    font-size: 13px; font-weight: 500; line-height: 1.4; color: #33445a;
    white-space: normal; overflow-wrap: anywhere;
  }
  #masthead .main-header-menu .sub-menu .menu-link::before { display: none; }
  #masthead .sub-menu .amt-overview { display: block; grid-column: 1 / -1; }
  #masthead .sub-menu .amt-overview .menu-link { background: transparent; color: #007f77; font-weight: 700; }
  #masthead .main-header-menu > .menu-item:last-child > .menu-link {
    margin: 14px 0 0; width: 100%; padding: 15px 18px;
    border: 0; border-radius: 10px; text-align: center; color: #fff; background: #007f77;
  }
  #masthead .menu-link:hover { color: #007f77; }
  body.ast-main-header-nav-open .wa-bubble { visibility: hidden; }
}
