/* Ellis Clinic mobile header safety patch
   Added 2026-09-14
   Purpose: keep the logo and hamburger inside narrow phone viewports.
*/
@media (max-width: 1000px) {
  .nav {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 14px !important;
    gap: 10px !important;
  }

  .brand-lockup {
    min-width: 0 !important;
    max-width: calc(100% - 58px) !important;
    flex: 1 1 auto !important;
    gap: 8px !important;
  }

  /* The Ellis logo is very wide (262×61). At 58px high it is about
     249px wide, which is enough to push the menu button off a 360px
     CSS viewport when padding/gaps are added. */
  .brand-lockup img,
  .logo img {
    width: auto !important;
    height: 46px !important;
    max-width: min(205px, calc(100vw - 102px)) !important;
    object-fit: contain !important;
  }

  /* The tagline is useful on larger screens, but on a phone it competes
     with the hamburger for horizontal space. */
  .brand-copy {
    display: none !important;
  }

  .menu-toggle {
    display: block !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    border: 1px solid var(--gold, #d7a63b) !important;
    background: #092847 !important;
    color: var(--gold2, #f0c967) !important;
    border-radius: 7px !important;
    font-size: 24px !important;
    line-height: 1 !important;
    padding: 8px 11px !important;
    cursor: pointer !important;
  }

  /* Anchor the opened mobile menu to the navigation bar itself. */
  .links.open {
    position: absolute !important;
    z-index: 1000 !important;
    top: 100% !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
  }
}

@media (max-width: 420px) {
  .identity-inner {
    padding-left: 12px !important;
    padding-right: 12px !important;
    gap: 7px !important;
    font-size: 9px !important;
    letter-spacing: .75px !important;
  }

  .identity-small {
    display: none !important;
  }

  .nav {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}
