/* SPA header parity layer. */
.va-site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

body.home .va-site-header:not(.scrolled):not(.mega-open) {
  color: #fff;
}

body.home .va-site-header:not(.scrolled):not(.mega-open) .va-nav-link {
  color: #fff;
}

body.home .va-site-header:not(.scrolled):not(.mega-open) .va-search-trigger,
body.home .va-site-header:not(.scrolled):not(.mega-open) .va-saved-chip,
body.home .va-site-header:not(.scrolled):not(.mega-open) .va-lang-toggle {
  color: #fff;
  border-color: rgba(255,255,255,0.32);
  background: rgba(0,0,0,0.16);
}

body.home .va-site-header:not(.scrolled):not(.mega-open) .va-chevron {
  color: rgba(255,255,255,0.72);
}

.va-site-header.scrolled,
.va-site-header.mega-open {
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
}

.va-site-header.scrolled {
  box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 6px 24px rgba(0,0,0,0.04);
}

.va-nav-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 18px 32px;
  /* SPA DesktopNav (shared.jsx:815) renders an 18px padding + ~60px tall logo
   * row → 96px total header. WP's smaller logo image only produced ~44px of
   * content height → 80px total, shifting all below-header content up by 16px
   * on every tail page. min-height holds the parity. Paired with -76px hero
   * margins (the SPA-literal value) on all single-* / archive-* templates so
   * heroes still land at top=20. */
  box-sizing: content-box;
}

.va-nav-logo {
  display: flex;
  align-items: center;
  color: inherit;
  line-height: 1;
  text-decoration: none;
}

.va-nav-logo img {
  /* `max-width: none` lifts the WP-core `img { max-width: 100% }` constraint
   * that, combined with the grid `auto` column, collapses the logo into a
   * 32×32 square. SPA Logo (shared.jsx) lets the wordmark size to its
   * natural 1539×419 aspect (height 32.4 → width ≈119). */
  display: block;
  width: auto;
  height: 32.4px;
  max-width: none;
  object-fit: contain;
}

.va-desktop-menu {
  /* min-width: 0 lets the grid 1fr column actually shrink when the full
   * 119px logo leaves under 900px for the nav (the nav's min-content size).
   * Without this, the nav cell stays at min-content and pushes the actions
   * cell past the 1440px viewport, cutting off "Rent a car". */
  min-width: 0;
  justify-self: center;
}

.va-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.va-nav-item {
  display: flex;
  align-items: center;
}

.va-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: normal;
  text-decoration: none;
  white-space: nowrap;
}

.va-nav-link:hover,
.va-nav-item.is-open .va-nav-link {
  color: var(--ink);
}

.va-chevron {
  color: var(--muted);
  flex: 0 0 auto;
}

.va-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

.va-search-trigger,
.va-saved-chip,
.va-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.va-search-trigger {
  padding-inline: 12px;
}

.va-search-trigger span,
.va-saved-chip span {
  font-weight: 600;
}

.va-search-trigger kbd {
  margin-left: 4px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.25;
}

.va-lang-toggle {
  /* SPA renders this button ~44px wide × ~59px tall — `EN` on line 1, `/ SQ`
   * wrapped to line 2. We need `display: inline-block` (overriding the
   * inline-flex from the combined rule above) so the text inside actually
   * wraps; with inline-flex the "EN " text node and `<span>/ SQ</span>` are
   * treated as non-wrapping flex items. width: 44px + padding 6px 10px
   * reproduces SPA's wrap. This narrower lang toggle is what lets the rest
   * of the actions row fit within the 1440px viewport once the full logo is
   * restored. */
  display: inline-flex;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.va-lang-toggle span {
  /* white-space: nowrap keeps "/ SQ" together on a single wrapped line.
   * Without it, the space between "/" and "SQ" breaks too, producing the
   * 3-line "EN / SQ" stack (each token on its own line). */
  opacity: 0.4;
  white-space: nowrap;
}

.va-rent-btn {
  /* Match SPA <button class="btn btn-accent" onClick={() => setRoute('rentacar')}>
   * which inherits .btn padding 12px 20px + text-align center. WP renders <a> so
   * we re-assert both. height kept at 43px so the nav row total height matches. */
  height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  text-align: center;
  box-shadow: 0 10px 22px rgba(204, 83, 54, 0.24);
  white-space: nowrap;
}

.va-megapanel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 90;
  display: none;
  background: var(--paper);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 12px 32px -16px rgba(8,35,56,0.25);
}

.va-megapanel.is-open {
  display: block;
}

.va-megapanel-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 56px;
}

.va-mega-eyebrow {
  margin-bottom: 10px;
}

.va-mega-col ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.va-mega-col a {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 21px;
  text-decoration: none;
}

.va-mega-col a:hover {
  color: var(--terracotta);
}

.va-mega-feature {
  align-self: start;
  background: var(--paper-warm);
  padding: 24px;
}

.va-mega-feature-btn {
  width: 100%;
  display: inline-flex;
  justify-content: space-between;
  margin-top: 14px;
  color: var(--ink);
  text-decoration: none;
}

.va-mobile-nav-bar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
}

.va-mobile-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.va-mobile-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 6px;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
}

.va-mobile-rent {
  padding: 8px 12px;
  font-size: 12px;
}

.va-nav-drawer {
  z-index: 200;
  width: min(360px, 85vw);
  padding: 24px;
  display: none;
}

.va-nav-drawer.open {
  display: flex;
}

.va-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.va-drawer-links {
  margin-top: 0;
}

.va-drawer-links a,
.va-drawer-links button {
  color: var(--ink);
  text-decoration: none;
}

.drawer-expand-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.02em;
}

.drawer-sub {
  display: none;
  flex-direction: column;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0 0 12px 8px;
}

.drawer-sub.open {
  display: flex;
}

.drawer-sub a {
  display: block;
  padding: 7px 0;
  border: 0;
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0;
}

.drawer-sub li:first-child a {
  color: var(--terracotta);
  font-weight: 600;
}

.va-drawer-foot {
  margin-top: auto;
  padding-top: 32px;
}

.va-drawer-lang {
  display: block;
  width: 100%;
  padding: 12px 18px;
  background: var(--ink);
  border-radius: 2px;
  color: var(--paper);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: center;
  text-decoration: none;
}

.va-drawer-foot div {
  margin-top: 16px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.va-search-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 96px 24px 24px;
}

.va-search-modal.is-open {
  display: flex;
}

.va-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 35, 56, 0.35);
}

.va-search-card {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  background: var(--paper);
  border: 1px solid var(--line-soft);
  box-shadow: 0 28px 70px rgba(8,35,56,0.22);
  padding: 24px;
}

.va-search-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.va-search-top label {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
}

.va-search-top button {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.va-search-card input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.va-search-hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

body.va-search-lock,
body.va-drawer-lock {
  overflow: hidden;
}

@media (max-width: 1180px) {
  .va-nav-inner {
    gap: 20px;
  }

  .va-nav-links {
    gap: 18px;
  }

  .va-nav-actions {
    gap: 8px;
  }
}

@media (max-width: 1100px) {
  .va-nav-links {
    gap: 14px;
  }

  .va-nav-link {
    font-size: 12px;
  }
}

/* Desktop nav is shown from 1281px up — but until ~1440px there isn't quite
 * enough room for the natural 28px gaps. Tighten everything in this band so
 * "Connectivity" and the actions cell don't collide. */
@media (min-width: 1281px) and (max-width: 1440px) {
  .va-nav-inner {
    gap: 18px;
  }

  .va-nav-links {
    gap: 14px;
  }

  .va-nav-link {
    font-size: 12px;
  }

  .va-nav-actions {
    gap: 6px;
  }

  .va-search-trigger,
  .va-saved-chip,
  .va-lang-toggle {
    padding: 6px 8px;
  }
}

@media (max-width: 1280px) {
  .desktop-nav {
    display: none;
  }

  .va-mobile-nav-bar {
    display: flex;
  }
}

@media (min-width: 1281px) {
  .va-nav-drawer,
  .nav-drawer-backdrop,
  .va-mobile-nav-bar {
    display: none;
  }
}
