/* Shared header navigation: full row on desktop, hamburger + dropdown on small screens.
   !important is needed on the home page, where the nav carries inline styles. */
.site-header { position: relative; z-index: 50; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 1px solid #C3CEDF; border-radius: 8px;
  background: #FFFFFF; color: #172B5C; cursor: pointer;
}
.nav-toggle:hover { border-color: #172B5C; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* tighten the full row before it would wrap */
@media (max-width: 1100px) {
  .main-nav { gap: 14px 18px !important; font-size: 14px !important; }
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }

  .main-nav {
    display: none !important;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch !important; gap: 0 !important;
    padding: 8px 20px 20px; background: #FFFFFF;
    border-bottom: 1px solid #E3E8F0; box-shadow: 0 12px 24px rgba(21, 34, 63, 0.12);
    font-size: 16px !important;
  }
  .main-nav.open { display: flex !important; }

  .main-nav a:not(:last-child) {
    display: block; padding: 14px 4px !important; border-bottom: 1px solid #E3E8F0 !important;
  }
  .main-nav a[aria-current="page"] { border-left: 3px solid #1A4F96; padding-left: 10px !important; }
  /* portal login button: full width at the bottom of the panel */
  .main-nav a:last-child { justify-content: center; margin-top: 16px; min-height: 48px !important; }
}
