/* ==========================================================================
   nav.css — header / navigation (shared by every page)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Plain frosted glass: a soft blur and a thin colourless veil. No
     brightness or saturation tricks — they burnt out whatever passed under. */
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.site-header.is-stuck {
  border-bottom-color: var(--paper-edge);
  box-shadow: 0 8px 24px -20px rgba(28, 27, 25, 0.6);
}

/* Full window width: the wordmark sits at the left gutter, the phone at the
   right, with nothing boxed into a centered container. */
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-height: 74px;
  padding-block: var(--sp-2);
  padding-inline: var(--gutter);
}

/* --- Wordmark (placeholder until the real logo file arrives) ----------- */
.wordmark {
  display: block;
  text-decoration: none;
  margin-right: auto;
  line-height: 1;
}

.wordmark__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--ink);
}

.wordmark__name em {
  font-style: normal;
  font-weight: 500;
  text-transform: none;
  color: var(--ink-mute);
}

.wordmark__sub {
  display: block;
  margin-top: 0.32rem;
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red-ink);
}

/* --- Links ------------------------------------------------------------- */
.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 1.8vw, 1.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Red underline draws itself in from the left on hover */
.site-nav__link {
  position: relative;
  display: inline-block;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding-block: 0.35rem;
  transition: color 0.2s var(--ease);
}

.site-nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s var(--ease);
}

.site-nav__link:hover { color: var(--ink); }
.site-nav__link:hover::after { transform: scaleX(1); }

/* --- Phone in the header: never more than one tap away ----------------- */
.header-call {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background-color 0.18s var(--ease), transform 0.18s var(--ease),
              box-shadow 0.18s var(--ease);
}

.header-call:hover {
  background: var(--red-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 20px -12px rgba(164, 22, 31, 0.8);
}

.header-call svg {
  width: 15px;
  height: 15px;
  flex: none;
  transition: transform 0.25s var(--ease);
}

.header-call:hover svg { transform: rotate(-12deg) scale(1.06); }

/* --- Mobile menu toggle ------------------------------------------------ */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  position: relative;
  width: 17px;
  height: 1.5px;
  background: currentColor;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 17px;
  height: 1.5px;
  background: currentColor;
}

.nav-toggle span::before { top: -5.5px; }
.nav-toggle span::after { top: 5.5px; }

@media (max-width: 900px) {
  .site-header__inner { gap: var(--sp-3); min-height: 66px; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--paper-edge);
    box-shadow: var(--shadow-soft);
  }

  .site-nav.is-open { display: block; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--sp-2) var(--gutter) var(--sp-4);
  }

  .site-nav__link {
    display: block;
    padding: 0.9rem 0;
    font-size: 1.0625rem;
    border-bottom: 1px solid var(--paper-edge);
  }

  .header-call__number { display: none; }

  .header-call {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
  }

  .header-call svg { width: 17px; height: 17px; }
}

/* --- Sticky call bar: click-to-call at every scroll depth on mobile ----- */
.call-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: none;
  gap: 1px;
  background: var(--paper-edge);
  border-top: 1px solid var(--paper-edge);
}

.call-bar a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.95rem 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
}

.call-bar__call { background: var(--red); color: var(--white); }
.call-bar__book { background: var(--white); color: var(--ink); }
.call-bar svg { width: 15px; height: 15px; }

@media (max-width: 760px) {
  .call-bar { display: flex; }
  body { padding-bottom: 56px; }

  /* The bar at the bottom is already a call button, so the header drops its
     own; between 761 and 900px the round one in the header is still needed. */
  .header-call { display: none; }
}

/* ==========================================================================
   Dropdown submenus (Services, Trailer Types, Locations)
   Desktop: open on hover / keyboard focus. Mobile: tap the chevron to expand.
   ========================================================================== */
.site-nav__item { position: relative; }

/* Active top-level link (hub pages) picks up the same red underline as hover */
.site-nav__link[aria-current="page"] { color: var(--ink); }
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }

.site-nav__sub-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 1px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--ink-mute);
  cursor: pointer;
  vertical-align: middle;
}

.site-nav__chev { width: 13px; height: 13px; transition: transform 0.25s var(--ease); }

.site-nav__sub {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 232px;
  margin: 0;
  padding: var(--sp-2);
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s var(--ease);
  z-index: 60;
}

.has-sub:hover > .site-nav__sub,
.has-sub:focus-within > .site-nav__sub,
.has-sub.is-open > .site-nav__sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.has-sub:hover .site-nav__chev,
.has-sub.is-open .site-nav__chev { transform: rotate(180deg); }

.site-nav__sub li { margin: 0; }

.site-nav__sub a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__sub a:hover { background: var(--paper-tint); color: var(--ink); }
.site-nav__sub a[aria-current="page"] { color: var(--red-ink); }

/* Parent stays marked while you're on one of its sub-pages */
.site-nav__item.is-current > .site-nav__link { color: var(--ink); }
.site-nav__item.is-current > .site-nav__link::after { transform: scaleX(1); }

/* Desktop: the chevron is a hover/keyboard affordance; mouse clicks fall
   through to the hover behaviour, so ignore pointer events on it there. */
@media (min-width: 901px) {
  .site-nav__sub-toggle { pointer-events: none; }
}

/* Mobile: submenus become inline accordions inside the drop panel */
@media (max-width: 900px) {
  .site-nav__item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    border-bottom: 1px solid var(--paper-edge);
  }

  .site-nav__item > .site-nav__link {
    flex: 1;
    border-bottom: 0;
  }

  .site-nav__sub-toggle { width: 46px; height: 46px; color: var(--ink-soft); }

  .site-nav__sub {
    flex-basis: 100%;
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    margin: 0 0 var(--sp-2);
    padding: var(--sp-1) 0 var(--sp-2);
    background: var(--paper-tint);
    border: 0;
    border-radius: var(--radius);
    box-shadow: none;
  }

  .site-nav__item.is-open > .site-nav__sub { display: block; }
  .site-nav__sub a { padding: 0.7rem var(--sp-4); font-size: 1rem; }
}

/* Group labels inside the Trailer Types dropdown (Recreational / Work) */
.site-nav__sub-group {
  padding: 0.5rem 0.7rem 0.25rem;
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-mute);
  pointer-events: none;
}

/* Divider before the second group */
.site-nav__sub-group ~ .site-nav__sub-group {
  margin-top: var(--sp-1);
  padding-top: 0.6rem;
  border-top: 1px solid var(--paper-edge);
}

/* Plain (non-link) submenu entries: pages not built yet, shown for structure */
.site-nav__sub-plain {
  display: block;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-mute);
  cursor: default;
}
