/* V4 accessibility and tablet navigation corrections. */
.site-nav__links a[aria-current='location'] {
  color: var(--accent);
}

@media (max-width: 66rem) {
  .nav-shell {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    min-height: 5.25rem;
  }

  .nav-toggle {
    position: relative;
    z-index: 52;
    display: block;
    flex: none;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 51;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.25rem;
    overflow-y: auto;
    padding: 6rem 2rem 2rem;
    background: #00313d;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-1rem);
    transition: opacity var(--transition), transform var(--transition);
  }

  .site-nav__links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .site-nav a {
    font-family: var(--serif);
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 500;
  }

  .site-nav .button {
    font-family: var(--sans);
    font-size: .875rem;
  }

  .nav-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

@media (max-width: 66rem) {
  .site-nav {
    justify-content: flex-start;
    padding: 6.8rem 1.5rem 2rem;
    overscroll-behavior: contain;
  }

  body.nav-open .site-header.is-compact .site-nav,
  body.nav-open .site-header--solid.is-compact .site-nav {
    padding-top: 1.25rem;
  }

  body.nav-open .consent-banner {
    z-index: 50;
  }
}

/* Center the mobile navigation and contact button as one balanced group. */
.mobile-menu-search {
  display: none;
}

@media (max-width: 66rem) {
  body.nav-open .site-header.is-compact .nav-shell,
  body.nav-open .site-header--solid.is-compact .nav-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2.5rem 3rem;
    gap: .5rem;
    align-items: center;
  }

  body.nav-open .site-header.is-compact .brand,
  body.nav-open .site-header--solid.is-compact .brand {
    width: 100%;
    max-width: 12.21rem;
    min-width: 0;
  }

  body.nav-open .mobile-menu-search {
    display: grid;
    z-index: 53;
  }

  body.nav-open .header-actions > .search-toggle {
    display: none;
  }

  body.nav-open .site-header.is-compact .site-nav,
  body.nav-open .site-header--solid.is-compact .site-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto auto minmax(0, 1fr);
    align-items: stretch;
    justify-content: stretch;
    gap: 0;
    padding-block: 1.25rem;
    padding-inline: 0;
  }

  body.nav-open .site-nav__links {
    width: 100%;
    grid-row: 2;
    height: auto;
    align-items: center;
    justify-content: center;
    gap: 26px;
  }

  body.nav-open .site-nav__links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.2;
  }

  body.nav-open .header-actions {
    grid-row: 3;
    align-self: start;
    justify-self: center;
    justify-content: center;
    width: 90%;
    margin-top: 60px;
  }

  body.nav-open .site-nav .header-contact {
    width: 100%;
    min-height: 56px;
    justify-content: center;
    text-align: center;
  }

  body.nav-open .site-nav .header-contact::after {
    content: none;
  }
}
