/* ==========================================================
   Harpenden Taxis — light navigation, replacing dark overlay.
   Top bar remains midnight navy; nav and hero now sit on white.
   ========================================================== */

.ht-site-header {
  --ht-header-height: 86px;
  --ht-header-pill: var(--ht-crimson, #be2039);
  position: sticky;
  top: 0;
  z-index: 90;
  width: 100%;
  isolation: isolate;
  color: var(--ht-navy, #171c42);
  background: #fff;
  /* Subtle separation from the white homepage without changing dimensions. */
  border-bottom: 1px solid #cbd3e3;
  box-shadow: 0 5px 18px rgba(23, 28, 66, .07), 0 2px 5px rgba(23, 28, 66, .02);
  transition: box-shadow 220ms ease, background 220ms ease;
}

/* Important: remove previous negative margin/hero overlay. */
body.home .ht-site-header,
body.home .ht-site-header.is-scrolled,
.ht-site-header.is-scrolled {
  margin-bottom: 0;
  background: #fff;
}
.ht-site-header.is-scrolled,
body.home .ht-site-header.is-scrolled {
  box-shadow: 0 7px 23px rgba(23, 28, 66, .10), 0 2px 6px rgba(23, 28, 66, .03);
}

.ht-site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 60px);
  min-height: var(--ht-header-height);
}
.ht-site-header__brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  max-width: 185px;
}
.ht-site-header__brand-link,
.ht-site-header__brand .custom-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}
.ht-site-header__brand-image,
.ht-site-header__brand .custom-logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: 57px;
  object-fit: contain;
}

.ht-site-header__nav { margin-left: auto; }
.ht-site-header__menu,
.ht-site-header__menu .sub-menu {
  padding: 0;
  margin: 0;
  list-style: none;
}
.ht-site-header__menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: clamp(2px, .35vw, 10px);
}
.ht-site-header__menu > li {
  position: relative;
  padding: 0;
  margin: 0;
}
.ht-site-header__menu > li > a {
  position: relative;
  z-index: 0;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 10px clamp(12px, 1vw, 18px);
  border-radius: 7px;
  font-family: var(--ht-font-body, "IBM Plex Sans", sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .048em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ht-navy, #171c42);
  transition: color 230ms ease;
}
.ht-site-header__menu > li > a::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: var(--ht-header-pill);
  opacity: 0;
  transform: scale(.83, .84);
  transition: opacity 200ms ease, transform 230ms cubic-bezier(.22,.8,.2,1);
}
.ht-site-header__menu > li:hover > a,
.ht-site-header__menu > li:focus-within > a,
.ht-site-header__menu > li > a:hover,
.ht-site-header__menu > li > a:focus-visible,
.ht-site-header__menu > li.current-menu-item > a,
.ht-site-header__menu > li.current_page_item > a,
.ht-site-header__menu > li.current-menu-ancestor > a,
.ht-site-header__menu > li.current-page-ancestor > a { color: #fff; }
.ht-site-header__menu > li:hover > a::before,
.ht-site-header__menu > li:focus-within > a::before,
.ht-site-header__menu > li > a:hover::before,
.ht-site-header__menu > li > a:focus-visible::before,
.ht-site-header__menu > li.current-menu-item > a::before,
.ht-site-header__menu > li.current_page_item > a::before,
.ht-site-header__menu > li.current-menu-ancestor > a::before,
.ht-site-header__menu > li.current-page-ancestor > a::before {
  opacity: 1;
  transform: scale(1);
}
.ht-site-header__menu a:focus-visible,
.ht-site-header__brand a:focus-visible,
.ht-site-header__toggle:focus-visible,
.ht-site-header__mobile-book:focus-visible {
  outline: 2px solid var(--ht-crimson, #be2039);
  outline-offset: 3px;
}

/* Light dropdown panels for Fare Guide and Services. */
.ht-site-header__menu .sub-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 95;
  min-width: 235px;
  padding: 9px;
  border: 1px solid #e2e6ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(23, 28, 66, .14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}
.ht-site-header__menu > li > .sub-menu::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 14px;
}
.ht-site-header__menu li:hover > .sub-menu,
.ht-site-header__menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.ht-site-header__menu .sub-menu a {
  display: block;
  padding: 11px 13px;
  border-radius: 6px;
  color: var(--ht-navy, #171c42);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease;
}
.ht-site-header__menu .sub-menu a:hover,
.ht-site-header__menu .sub-menu a:focus-visible {
  background: var(--ht-header-pill);
  color: #fff;
}
.ht-site-header__actions { display: none; }

@media (max-width: 1120px) {
  .ht-site-header__menu > li > a { padding-inline: 10px; font-size: 11px; }
  .ht-site-header__inner { gap: 18px; }
}
@media (max-width: 1023px) {
  .ht-site-header { --ht-header-height: 74px; }
  .ht-site-header__brand-image,
  .ht-site-header__brand .custom-logo { height: 49px; }
  .ht-site-header__actions {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 10px;
  }
  .ht-site-header__mobile-book {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 15px;
    border-radius: 7px;
    background: var(--ht-header-pill);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
  }
  .ht-site-header__mobile-book:hover { background: var(--ht-crimson-hover, #97192f); color: #fff; }
  .ht-site-header__toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccd3e1;
    border-radius: 7px;
    background: #fff;
    color: var(--ht-navy, #171c42);
  }
  .ht-site-header__toggle-lines { display: flex; width: 19px; flex-direction: column; gap: 4px; }
  .ht-site-header__toggle-lines > span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 200ms ease, opacity 200ms ease;
  }
  .ht-site-header.is-menu-open .ht-site-header__toggle-lines > span:first-child { transform: translateY(6px) rotate(45deg); }
  .ht-site-header.is-menu-open .ht-site-header__toggle-lines > span:nth-child(2) { opacity: 0; }
  .ht-site-header.is-menu-open .ht-site-header__toggle-lines > span:last-child { transform: translateY(-6px) rotate(-45deg); }
  .ht-site-header__nav {
    position: absolute;
    top: calc(100% + 8px);
    right: var(--ht-gutter, 20px);
    left: var(--ht-gutter, 20px);
    z-index: 95;
    max-height: min(72vh, 680px);
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e3e7ef;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 20px 65px rgba(23, 28, 66, .16);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
  }
  .ht-site-header.is-menu-open .ht-site-header__nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .ht-site-header__menu { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
  .ht-site-header__menu > li > a {
    display: flex;
    justify-content: flex-start;
    min-height: 45px;
    padding: 12px 15px;
    font-size: 13px;
  }
  .ht-site-header__menu .sub-menu {
    position: static;
    min-width: 0;
    margin: 0 0 6px 15px;
    padding: 0 0 0 11px;
    border: 0;
    border-left: 1px solid #dbe0ea;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }
  .ht-site-header__menu .sub-menu a { padding: 9px 11px; font-size: 12px; }
  .ht-site-header__menu > li > .sub-menu::before { display: none; }
}
@media (max-width: 400px) {
  .ht-site-header__brand-image,
  .ht-site-header__brand .custom-logo { height: 43px; }
  .ht-site-header__actions { gap: 7px; }
  .ht-site-header__mobile-book { padding-inline: 10px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .ht-site-header,
  .ht-site-header *,
  .ht-site-header *::before,
  .ht-site-header *::after { transition-duration: 0.01ms !important; }
}
