/* ============================================================
   GLOBAL HEADER — Top Bar + Main Navigation
   ============================================================ */

.skip-link {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 1000;
  transform: translate(-50%, -150%);
  padding: 0.75rem 1rem;
  border-radius: 0 0 8px 8px;
  background: var(--navy);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  transition: transform 160ms ease;
}
.skip-link:focus {
  transform: translate(-50%, 0);
  color: white;
}

/* ---- Top Bar ---- */
.top-bar {
  background: var(--navy-deep);
  color: rgba(255,255,255,.75);
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
}
.top-bar-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0; padding: 0;
}
.top-bar-links a {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  transition: color 200ms;
}
.top-bar-links a:hover { color: white; }

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.top-bar-social {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.top-bar-social a {
  color: rgba(255,255,255,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transition: color 200ms;
}
.top-bar-social a:hover { color: white; }
.top-bar-phone {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(255,255,255,.85);
  font-weight: 600;
  font-size: 0.8rem;
}
.top-bar-phone svg { color: var(--blue-light); }
.top-bar-phone a { display: inline-flex; align-items: center; min-height: 28px; }

@media (max-width: 860px) {
  .top-bar { display: none; }
}

/* ---- Main Nav ---- */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.main-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.main-nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0; padding: 0;
}
.main-nav-menu > li {
  position: relative;
}
.main-nav-menu > li > a,
.main-nav-menu > li > button {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-2);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  border: none;
  background: none;
  cursor: pointer;
  transition: all 200ms;
  white-space: nowrap;
}
.main-nav-menu > li > a:hover,
.main-nav-menu > li > button:hover,
.main-nav-menu > li.open > button {
  color: var(--navy);
  background: rgba(3,105,161,.05);
}
.main-nav-menu > li > button .chevron {
  transition: transform 200ms;
  color: var(--text-muted);
  font-size: 0.65rem;
}
.main-nav-menu > li.open > button .chevron { transform: rotate(180deg); }

/* ---- Dropdown ---- */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 36px -8px rgba(15,23,42,.15), 0 4px 12px -4px rgba(15,23,42,.08);
  padding: 0.5rem;
  min-width: 260px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(4px);
  transition: all 200ms cubic-bezier(.2,.7,.2,1);
  z-index: 60;
}
.main-nav-menu > li.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-2);
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 0.88rem;
  transition: all 150ms;
}
.nav-dropdown a:hover {
  background: rgba(3,105,161,.06);
  color: var(--navy);
}
.nav-dropdown-icon {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: rgba(3,105,161,.08);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-dropdown-text { display: flex; flex-direction: column; }
.nav-dropdown-text span { font-size: 1rem; }
.nav-dropdown-text span:first-child { font-weight: 600; color: var(--navy); }
.nav-dropdown-text span:last-child { color: var(--text-muted); margin-top: 1px; }

.nav-dropdown-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 0.35rem 0.5rem;
}

/* ---- Two-column dropdown variant (for long lists) ---- */
.nav-dropdown.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 0.25rem;
  row-gap: 0;
  min-width: 800px;
  padding: 0.6rem;
}
.nav-dropdown.two-col .nav-dropdown-divider {
  grid-column: 1 / -1;
  margin: 0.45rem 0.5rem;
}
.nav-dropdown.two-col a {
  font-size: 0.85rem;
  padding: 0.55rem 0.7rem;
}

/* Alignment helpers — override the default centered positioning so wide
   dropdowns stay within the viewport edges */
.nav-dropdown.align-left {
  left: 0;
  transform: translateY(4px);
}
.main-nav-menu > li.open .nav-dropdown.align-left {
  transform: translateY(0);
}
.nav-dropdown.align-right {
  left: auto;
  right: 0;
  transform: translateY(4px);
}
.main-nav-menu > li.open .nav-dropdown.align-right {
  transform: translateY(0);
}

/* On narrower viewports, fall back to single column so the dropdown still fits */
@media (max-width: 700px) {
  .nav-dropdown.two-col {
    grid-template-columns: 1fr;
    min-width: 280px;
  }
}

/* ---- Nav CTA ---- */
.main-nav-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---- Mobile toggle ---- */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--navy);
}

/* ---- Compact menu spacing (Option A — dense nav with inline vehicle items) ---- */
.main-nav-menu.compact-menu > li > a,
.main-nav-menu.compact-menu > li > button {
  padding: 0.5rem 0.6rem;
  font-size: 0.86rem;
}
.main-nav-menu.compact-menu .inline-item > a {
  display: flex;
  align-items: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--text-2);
  text-decoration: none;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  transition: all 200ms;
  white-space: nowrap;
}
.main-nav-menu.compact-menu .inline-item > a:hover {
  color: var(--navy);
  background: rgba(3,105,161,.05);
}

/* ---- Active page link highlight ---- */
.main-nav-menu a.active-link,
.main-nav-menu .inline-item > a.active-link {
  color: var(--blue);
  background: rgba(3,105,161,.08);
}
.nav-dropdown a.active-link {
  background: rgba(3,105,161,.08);
}
.nav-dropdown a.active-link .nav-dropdown-text span:first-child {
  color: var(--blue);
}

@media (max-width: 1240px) {
  .main-nav-menu.compact-menu > li > a,
  .main-nav-menu.compact-menu > li > button,
  .main-nav-menu.compact-menu .inline-item > a {
    padding: 0.5rem 0.45rem;
    font-size: 0.8rem;
  }
}
@media (max-width: 1080px) {
  .main-nav-menu > li > a,
  .main-nav-menu > li > button { font-size: 0.84rem; padding: 0.5rem 0.55rem; }
}

@media (max-width: 1000px) {
  .main-nav-inner { position: relative; }
  .main-nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    max-height: calc(100vh - 69px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    padding: .75rem;
    background: white;
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 18px 36px -20px rgba(15,23,42,.35);
  }
  .main-nav-menu.mobile-open { display: flex; }
  .main-nav-menu > li { width: 100%; }
  .main-nav-menu > li > a,
  .main-nav-menu > li > button,
  .main-nav-menu.compact-menu .inline-item > a {
    width: 100%;
    justify-content: space-between;
    padding: .8rem .75rem;
    font-size: .9rem;
    text-align: left;
  }
  .nav-dropdown,
  .nav-dropdown.align-left,
  .nav-dropdown.align-right {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    margin: .15rem 0 .5rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: var(--surface, #f8fafc);
  }
  .main-nav-menu > li.open .nav-dropdown,
  .main-nav-menu > li.open .nav-dropdown.align-left,
  .main-nav-menu > li.open .nav-dropdown.align-right {
    display: grid;
    transform: none;
  }
  .mobile-toggle { display: flex; }
  .main-nav-cta .nav-phone-main { display: none; }
  html.nav-open { overflow: hidden; }
}
@media (max-width: 860px) {
  .main-nav-menu.mobile-open { display: flex; }
  .mobile-toggle { display: flex; }
}
