/* The ACF mobile menu is separate from the desktop Bootstrap navigation. */
.mobile-menu-open,
.mobile-menu,
.mobile-menu-backdrop {
  display: none;
}

@media (max-width: 1023px) {
  #header .navbar .navbar-collapse,
  #header .navbar .menu__cls {
    display: none !important;
  }

  #header .navbar .mobile-menu-open {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 2px solid #0d2d77;
    border-radius: 50%;
    background: #0d2d77;
    color: #f3ff03;
    cursor: pointer;
    transition: background-color .25s ease, color .25s ease, transform .25s ease;
  }

  #header .navbar .mobile-menu-open:hover,
  #header .navbar .mobile-menu-open:focus-visible {
    background: #f3ff03;
    color: #0d2d77;
    transform: scale(1.07);
  }

  .mobile-menu-open__icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 18px;
  }

  .mobile-menu-open__icon span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }

  .mobile-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9998;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    background: rgba(5, 20, 54, .55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .35s ease, visibility .35s ease;
  }

  .mobile-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 9999;
    width: min(100%, 430px);
    height: 100vh;
    height: 100dvh;
    background: #fff;
    color: #0d2d77;
    box-shadow: -12px 0 35px rgba(5, 20, 54, .16);
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform .35s ease, visibility .35s ease;
  }

  .mobile-nav-open {
    overflow: hidden;
  }

  .mobile-nav-open .mobile-menu-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-nav-open .mobile-menu {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    min-height: 88px;
    margin: 0 11px;
    padding: 12px 0;
    border-bottom: 1px solid #d9d9d9;
  }

  .mobile-menu__brand {
    display: block;
    width: 106px;
  }

  .mobile-menu__brand img {
    display: block;
    width: 100%;
    height: auto;
  }

  .mobile-menu__close {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 2px solid #0d2d77;
    border-radius: 50%;
    background: #0d2d77;
    color: #f3ff03;
    font: 30px/1 Arial, sans-serif;
    cursor: pointer;
    transition: background-color .25s ease, color .25s ease, transform .25s ease;
  }

  .mobile-menu__close span {
    display: block;
    transition: transform .25s ease;
  }

  .mobile-menu__close:hover,
  .mobile-menu__close:focus-visible {
    background: #f3ff03;
    color: #0d2d77;
    transform: scale(1.07);
  }

  .mobile-menu__close:hover span,
  .mobile-menu__close:focus-visible span {
    transform: rotate(90deg);
  }

  .mobile-menu__nav {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 0 16px;
  }

  .mobile-menu__items,
  .mobile-menu__group {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .mobile-menu__items {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 30px;
    scrollbar-width: thin;
    scrollbar-color: #d9d9d9 transparent;
  }

  .mobile-menu__items::-webkit-scrollbar {
    width: 5px;
  }

  .mobile-menu__items::-webkit-scrollbar-thumb {
    background: #d9d9d9;
  }

  .mobile-menu__item {
    margin: 0;
    border-bottom: 1px solid #d9d9d9;
  }

  .mobile-menu__row {
    display: flex;
    align-items: center;
    min-height: 69px;
  }

  .mobile-menu__link {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-height: 69px;
    padding: 12px 0;
    color: #0d2d77;
    font-size: 23px;
    line-height: 1.2;
    font-weight: 720;
    text-decoration: none;
  }

  button.mobile-menu__link {
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
  }

  .mobile-menu__link:hover,
  .mobile-menu__link:focus-visible,
  .mobile-menu__group a:hover,
  .mobile-menu__group a:focus-visible,
  .mobile-menu__feature:hover,
  .mobile-menu__feature:focus-visible {
    color: #00f;
  }

  .mobile-menu__item:not(.mobile-menu__item--children) .mobile-menu__link::after {
    content: '→';
    margin-left: auto;
    font-size: 22px;
    font-weight: 400;
  }

  .mobile-menu__expand {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 2px solid #0d2d77;
    border-radius: 50%;
    background: transparent;
    color: #0d2d77;
    cursor: pointer;
  }

  .mobile-menu__expand span {
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .2s ease;
  }

  .mobile-menu__expand[aria-expanded="true"] span {
    transform: translateY(2px) rotate(225deg);
  }

  .mobile-menu__children {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows .35s ease, opacity .25s ease;
  }

  .mobile-menu__children.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
  }

  .mobile-menu__children-inner {
    min-height: 0;
    overflow: hidden;
  }

  .mobile-menu__children-content {
    padding: 0 0 16px 8px;
  }

  .mobile-menu__group + .mobile-menu__group,
  .mobile-menu__group + .mobile-menu__feature,
  .mobile-menu__feature + .mobile-menu__group {
    margin-top: 12px;
  }

  .mobile-menu__group a,
  .mobile-menu__feature {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 72px;
    padding: 8px 0;
    color: #0d2d77;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 720;
    text-decoration: none;
  }

  .mobile-menu__group li {
    margin: 0;
  }

  .mobile-menu__group img {
    display: block;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
  }

  .mobile-menu__group small {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.4;
    font-family: "Figtree", sans-serif;
    font-weight: 510;
  }

  .mobile-menu__feature img {
    display: block;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
  }

  .mobile-menu__footer {
    flex: 0 0 auto;
    padding: 20px 0 16px;
  }

  .mobile-menu__cta,
  .mobile-menu__donate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 56px;
    margin-bottom: 12px;
    padding: 10px 18px;
    border: 2px solid #0d2d77;
    border-radius: 100px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 635;
    text-decoration: none;
  }

  .mobile-menu__cta {
    background: #0d2d77;
    color: #fff;
  }

  .mobile-menu__donate {
    color: #0d2d77;
  }

  .mobile-menu__cta:hover,
  .mobile-menu__cta:focus-visible {
    background: #00f;
    border-color: #00f;
    color: #fff;
  }

  .mobile-menu__donate:hover,
  .mobile-menu__donate:focus-visible {
    background: #0d2d77;
    color: #fff;
  }

  .mobile-menu__socials {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 20px 0;
  }

  .mobile-menu__socials a {
    color: #0d2d77;
    font-size: 20px;
  }

  .mobile-menu :focus-visible,
  #header .navbar .mobile-menu-open:focus-visible {
    outline: 3px solid #00f;
    outline-offset: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu,
  .mobile-menu-backdrop,
  .mobile-menu__expand span,
  .mobile-menu__children,
  #header .navbar .mobile-menu-open,
  .mobile-menu__close,
  .mobile-menu__close span {
    transition-duration: .01ms;
  }

  #header .navbar .mobile-menu-open:hover,
  #header .navbar .mobile-menu-open:focus-visible,
  .mobile-menu__close:hover,
  .mobile-menu__close:focus-visible,
  .mobile-menu__close:hover span,
  .mobile-menu__close:focus-visible span {
    transform: none;
  }
}
