/* Sticky header — logo + nav left cluster, Book Now right. Desktop text nav from 1100px. */

.glowlab-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: var(--gl-color-white);
  border-bottom: 1px solid rgba(15, 61, 51, 0.12);
}
.glowlab-header.is-stuck {
  box-shadow: 0 6px 18px rgba(15, 61, 51, 0.1);
}

.glowlab-header__inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem 0.85rem;
  min-height: 76px;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.glowlab-header__brand {
  flex: 0 0 auto;
}
.glowlab-header__brand img,
.glowlab-header__brand .custom-logo {
  max-height: 40px;
  width: auto;
}
.glowlab-header__title {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.glowlab-nav--primary {
  display: none;
}

.glowlab-header__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  margin-left: auto;
  z-index: 3;
  background: var(--gl-color-white);
}

/* Phone stays out of the top bar (drawer + footer only). */
.glowlab-header__inner > .glowlab-header__actions .glowlab-header__phone,
.glowlab-header__phone:not(.glowlab-header__phone--mobile) {
  display: none !important;
}

.glowlab-header__actions .glowlab-btn {
  padding: 0.55rem 1.25rem;
  border-radius: var(--gl-radius-btn);
  white-space: nowrap;
  font-size: 0.95rem;
}

.glowlab-nav-toggle,
.glowlab-nav-close {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gl-color-green);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.glowlab-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 61, 51, 0.55);
}

.glowlab-mobile-drawer__panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(100%, 340px);
  background: var(--gl-color-green);
  color: var(--gl-color-cream);
  padding: 1.25rem 1.4rem 2rem;
  overflow-y: auto;
}

.glowlab-nav-close { color: var(--gl-color-cream); }

.glowlab-menu--mobile {
  list-style: none;
  margin: 0;
  padding: 0;
}
.glowlab-menu--mobile > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0;
  font-family: var(--gl-font-ui);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gl-color-cream);
}
.glowlab-menu--mobile .sub-menu {
  list-style: none;
  margin: 0 0 0.35rem;
  padding: 0 0 0.25rem 0.85rem;
  border-left: 1px solid rgba(247, 234, 205, 0.28);
}
.glowlab-menu--mobile .sub-menu a {
  display: block;
  padding: 0.4rem 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--gl-color-cream);
}

.glowlab-header__phone--mobile {
  display: inline-flex;
  margin: 1rem 0 0.75rem;
  color: var(--gl-color-cream);
  font-family: var(--gl-font-ui);
  font-weight: 700;
}

body.glowlab-nav-open { overflow: hidden; }

/* Compact Services flyout — one column, not a mega / not full-width. */
.glowlab-menu--primary {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}
.glowlab-menu--primary > .menu-item-has-children {
  position: relative;
}
.glowlab-menu--primary > .menu-item-has-children > .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  width: 260px;
  max-width: min(280px, 70vw);
  max-height: none;
  margin: 0;
  padding: 0.45rem 0 0.4rem;
  list-style: none;
  background: var(--gl-color-white);
  color: var(--gl-color-green);
  border: 1px solid rgba(15, 61, 51, 0.14);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(15, 61, 51, 0.16);
  overflow: hidden;
}
.glowlab-menu--primary > .menu-item-has-children > .sub-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 0;
}
.glowlab-menu--primary > .menu-item-has-children > .sub-menu a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 1rem;
  font-family: var(--gl-font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--gl-color-green);
  text-decoration: none;
  white-space: normal;
}
.glowlab-menu--primary > .menu-item-has-children > .sub-menu a:hover,
.glowlab-menu--primary > .menu-item-has-children > .sub-menu a:focus-visible {
  background: var(--gl-color-green);
  color: var(--gl-color-cream);
  text-decoration: none;
}
.glowlab-menu--primary > .menu-item-has-children:hover > .sub-menu,
.glowlab-menu--primary > .menu-item-has-children:focus-within > .sub-menu,
.glowlab-menu--primary > .menu-item-has-children.is-open > .sub-menu {
  display: block;
}
.glowlab-menu--primary > .menu-item-has-children.is-flyout-closed > .sub-menu {
  display: none !important;
}
.glowlab-menu__caret {
  display: inline-flex;
  margin-left: 0.28rem;
  opacity: 0.75;
}
.glowlab-menu__caret .glowlab-icon {
  width: 11px;
  height: 11px;
  transform: rotate(90deg);
}

/* The logo is 1736x251 (~6.9:1). At 40px tall it is 277px wide, which pushed the
   Book Now button and the burger past the right edge on phones. Cap the width. */
@media (max-width: 1099px) {
  .glowlab-header__inner.glowlab-header-wrapper {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .glowlab-header__inner {
    min-height: 64px;
    gap: 0.5rem;
  }
  .glowlab-header__brand {
    flex: 0 1 auto;
    min-width: 0;
  }
  .glowlab-header__brand img,
  .glowlab-header__brand .custom-logo {
    max-height: 30px;
    max-width: min(210px, 44vw);
    width: auto;
    height: auto;
    object-fit: contain;
  }
  .glowlab-header__actions {
    gap: 0.35rem;
  }
}

/* Phones already get Book Now from the sticky bottom bar, so the header keeps
   only the logo and the burger. */
@media (max-width: 767px) {
  .glowlab-header__actions > .glowlab-btn {
    display: none;
  }
  .glowlab-header__brand img,
  .glowlab-header__brand .custom-logo {
    max-height: 28px;
    max-width: min(200px, 58vw);
  }
  .glowlab-nav-toggle {
    margin-right: -0.35rem;
  }
}

/* Desktop: 3 columns — logo | nav | Book Now. Button never shares a cell with links. */
@media (min-width: 1100px) {
  .glowlab-header__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 1.35rem;
  }
  .glowlab-nav--primary {
    display: block;
    min-width: 0;
    max-width: 100%;
  }
  .glowlab-header__actions {
    margin-left: 0;
    padding-left: 0.15rem;
  }
  .glowlab-nav-toggle { display: none; }
  .glowlab-mobile-drawer { display: none !important; }

  .glowlab-menu--primary {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: clamp(0.4rem, 0.85vw, 0.95rem);
  }
  .glowlab-menu--primary > .glowlab-menu__item {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
  }
  .glowlab-menu--primary > .glowlab-menu__item > .glowlab-menu__link {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-family: var(--gl-font-ui);
    font-size: clamp(0.92rem, 0.42vw + 0.72rem, 1.1rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    padding: 1.15rem 0.05rem;
    color: var(--gl-color-green);
    text-decoration: none;
  }
  .glowlab-menu--primary > .glowlab-menu__item > .glowlab-menu__link:hover,
  .glowlab-menu--primary > .glowlab-menu__item > .glowlab-menu__link:focus-visible {
    text-decoration: none;
    color: var(--gl-color-green);
    box-shadow: inset 0 -2px 0 var(--gl-color-green);
  }
}
