/**
 * Blue Ridge Core Theme — Site Header (structural chrome)
 * Simplified in this pass to a single bar per spec: logo + nav + Free
 * Estimate button. No phone number shown (placeholder not yet resolved —
 * see docs/launch-checklist.md) and no separate utility bar.
 *
 * BEM: .site-header is the block; .site-header__inner / __logo / __nav are
 * elements.
 */

.site-header {
  min-height: 112px;
  width: 100%;
  display: flex;
  align-items: center;
  padding-inline: max(24px, var(--container-padding-inline));
  background-color: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--wp--preset--color--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  width: 100%;
  max-width: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--wp--preset--spacing--xl);
  flex-wrap: nowrap;
}

/* Logo — full approved lockup (mountains, trees, sun, snowflake, mini
   split, wordmark + tagline), cropped from the source-of-truth asset in
   assets/images/branding/. Desktop ~275px wide (~17% larger, final polish
   pass), aspect ratio preserved via width + height:auto against the
   image's real intrinsic 1675x496 size. This base rule is superseded at
   both ends by the media-scoped rules below (≤1024px and ≥1025px) — kept
   in sync with the ≥1025px value for anyone reading this file top to
   bottom. */
.site-header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-header__logo img {
  display: block;
  width: 275px;
  height: auto;
}

/* WordPress's nav block only switches to the hamburger overlay below
   600px (its own fixed breakpoint, not one of ours). With 8 nav items
   (Home/About/Mini Split Installation/Mobile Homes/Service Area/
   Financing/FAQ/Contact) the full label set can't coexist with the logo
   anywhere in the 600-1024px band — tightening gap/font-size isn't
   enough without shrinking text below a legible/tappable size. So this
   band forces the hamburger overlay early instead (overriding core's
   two min-width:600px rules that show the inline list / hide the
   toggle button), the same way it already drops the CTA button; every
   section below the fold already carries its own prominent CTA. */
@media (max-width: 1024px) {
  .site-header__logo img {
    width: 130px;
  }

  .site-header .wp-block-buttons {
    display: none;
  }

  .site-header__inner {
    gap: var(--wp--preset--spacing--md);
  }

  .site-header__nav .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none !important;
  }

  .site-header__nav .wp-block-navigation__responsive-container-open {
    display: flex !important;
  }
}

.site-header__nav {
  font-size: var(--wp--preset--font-size--sm);
  font-weight: var(--wp--custom--typography--font-weight-semibold);
  flex-wrap: nowrap;
  white-space: nowrap;
  column-gap: var(--wp--preset--spacing--lg);
  align-items: center;
  flex-shrink: 0;
}

.site-header__nav,
.site-header .wp-block-buttons {
  align-self: center;
}

.site-header__nav a {
  color: var(--brand-navy);
  text-decoration: none;
  position: relative;
  padding-block: var(--wp--preset--spacing--tiny);
  transition: color var(--wp--custom--motion--duration-base) var(--wp--custom--motion--ease-out);
}

.site-header__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background-color: var(--brand-orange);
  transform: scaleX(0);
  transition: transform var(--wp--custom--motion--duration-base) var(--wp--custom--motion--ease-out);
}

.site-header__nav a:hover {
  color: var(--brand-orange);
}

.site-header__nav a:hover::after,
.site-header__nav .is-active a::after {
  transform: scaleX(1);
}

.site-header__nav .is-active a {
  color: var(--brand-orange);
}

@media (max-width: 767px) {
  .site-header {
    min-height: 80px;
  }

  .site-header__logo img {
    width: 165px;
  }
}

/* Homepage reference header proportions — desktop only. Unscoped, these
   sizing rules (esp. the 235px logo) would win over the max-width:1024px
   responsive shrink above regardless of source order vs. media query,
   since equal-specificity + later-in-file wins at any width where both
   apply — reintroducing the 768px header overflow that fix exists to
   prevent. Scoped to min-width:1025px so it only enhances true desktop. */
@media (min-width: 1025px) {
  .site-header {
    min-height: 92px;
    padding-inline: clamp(28px, 6vw, 100px);
    box-shadow: 0 1px 5px rgba(0, 32, 73, .08);
  }

  .site-header__inner {
    max-width: 1340px;
    margin-inline: auto;
    gap: 28px;
  }

  .site-header__logo img {
    width: 275px;
  }

  .site-header__nav {
    font-size: 13px;
    column-gap: 30px;
  }
}

/* Narrow-desktop shoulder (1025-1199px, e.g. small laptop windows):
   logo + full nav + button still don't fit at the ≥1025px values above —
   "Mini Split Installation" is long enough that even 7 items need more
   room to breathe than this width has. Tighten padding/gap/font here
   only; the button and full nav stay visible (no hamburger) since this
   is genuine desktop, not the ≤1024px tablet/mobile band. */
@media (min-width: 1025px) and (max-width: 1199px) {
  .site-header {
    padding-inline: 20px;
  }

  .site-header__inner {
    gap: 16px;
  }

  .site-header__nav {
    font-size: 12px;
    column-gap: 12px;
  }
}

.site-header .wp-block-button__link {
  min-height: 44px;
  padding: 12px 20px;
}

.site-header .wp-block-button__link span {
  display: inline-block;
  margin-left: 7px;
  transition: transform .18s ease;
}

.site-header .wp-block-button__link:hover span {
  transform: translateX(3px);
}
