/* ============================================================
   Pure Massage — Header
   Sticky on scroll (position: sticky). assets/js/header-scroll.js
   toggles .is-scrolled once the page scrolls past a threshold —
   used here for a subtle shadow. The header's own height and the
   logo's size never change on scroll.
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-header-bg);
  color: var(--color-gray-600);
  /* Subtle, permanent separation from whatever follows — mainly for
     pages with no Page Banner, where white body content would
     otherwise butt straight up against the white header with no
     visual break. Barely noticeable on pages with a banner/hero,
     since those already have their own strong separation. */
  box-shadow: 0 1px 6px var(--color-black-a07);
  transition: box-shadow 0.2s ease, padding-block 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 4px 16px var(--color-black-a07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: var(--header-height);
}

/* ============================================================
   LOGO
   Normal flow flex item, contained within the header's own row
   (no overlap outside it) — sized by height, width follows the
   logo image's own aspect ratio.
   ============================================================ */
.header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-logo-img {
  width: clamp(125px, 18vw, 175px);
}

.header-logo-text {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-gray-600);
}

/* ============================================================
   NAV
   Centered in the remaining space between the logo and the
   phone/CTA group. On desktop this only ever holds the menu —
   .header-cta-btn (mobile-panel CTA) stays in the markup for the
   full-screen panel but is hidden here; see the desktop-only rule
   near PHONE + CTA below.
   ============================================================ */
.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  flex: 1;
  justify-content: center;
}

.main-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-menu .top-level-item > a {
  font-family: var(--font-body);
  color: var(--color-gray-600);
  font-weight: 700;
  font-size: 15px;
  line-height: 24px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  opacity: 1;
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

.main-menu .top-level-item > a:hover,
.main-menu .top-level-item > a:focus-visible {
  color: var(--color-teal-900);
  border-bottom-color: var(--color-teal-900);
}

.main-menu .top-level-item.current-menu-item > a,
.main-menu .top-level-item.current-menu-ancestor > a,
.main-menu .top-level-item.current-menu-parent > a {
  font-weight: 700;
  color: var(--color-teal-900);
  border-bottom-color: var(--color-teal-900);
}

/* ============================================================
   DROPDOWN (items with children) — DESKTOP ONLY
   Shown on hover/focus of the top-level item. The parent link
   itself still navigates normally — the dropdown is just a
   quick-links overlay on top. Mobile uses a different
   accordion-style sub-menu — see mobile-menu.css.
   ============================================================ */
@media (min-width: 1200px) {

  .main-menu .top-level-item {
    position: relative;
  }

  .main-menu .has-children > a::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
  }

  .main-menu .has-children:hover > a::after,
  .main-menu .has-children:focus-within > a::after {
    transform: rotate(-135deg) translateY(2px);
  }

  /* .sub-menu-wrap carries the gap (padding-top) between the parent link
     and the dropdown panel — padding stays part of its own hoverable box
     (unlike margin), so crossing it never drops the hover state. */
  .sub-menu-wrap {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    padding-top: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .top-level-item:hover > .sub-menu-wrap,
  .top-level-item:focus-within > .sub-menu-wrap {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .sub-menu {
    min-width: 260px;
    overflow: hidden; /* clips the first/last item's square hover highlight to the panel's rounded corners */
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 12px 28px var(--color-black-a07);
  }

  .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--color-text);
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  .sub-menu a:hover,
  .sub-menu a:focus-visible {
    background-color: var(--color-teal-100);
    color: var(--color-primary);
  }

  .sub-menu .current-menu-item > a {
    background-color: var(--color-teal-100);
    color: var(--color-primary);
  }

  /* Mobile uses the .sub-menu-toggle button instead (mobile-menu.css) */
  .sub-menu-toggle {
    display: none;
  }

}

/* ============================================================
   ACTIONS — phone + CTA, right-aligned, last group in the header.
   The mobile full-screen panel keeps its own separate .header-cta-btn
   (still inside .header-nav) — this desktop group is hidden below
   1200px in mobile-menu.css, and .header-cta-btn is hidden here.
   ============================================================ */
.header-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
}

@media (min-width: 1200px) {
  .header-cta-btn {
    display: none;
  }
}

/* ============================================================
   PHONE — plain text, no box
   ============================================================ */
.header-phone {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.header-phone-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.05em;
  color: var(--color-gray-600);
}

.header-phone-number {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  line-height: 24px;
  letter-spacing: 0.6px;
  color: var(--color-teal-900);
  text-transform: uppercase;
  text-decoration: none;
}

/* ============================================================
   MOBILE HAMBURGER + full-screen panel top row
   Hidden on desktop — mobile-menu.css shows them (and the full
   mobile nav overlay) below the 1199px breakpoint. The duplicate
   logo exists only for that full-screen panel — desktop uses the
   real .header-logo instead.
   ============================================================ */
.mobile-menu-toggle,
.mobile-menu-panel-header {
  display: none;
}
