/* ─────────────────────────────────────────────────────
   BrandYou234 — site-header.css
   Session 57 — Hamburger consolidated, always right-aligned
   NO raw hex, all var() tokens
   ───────────────────────────────────────────────────── */

/* ── Fixed bar ──────────────────────────────────────── */
.by234-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  z-index: var(--z-sticky);
  background: var(--primary);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.25s ease, box-shadow 0.2s ease;
}
.by234-header.is-scrolled {
  background: var(--primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.28);
  border-bottom-color: rgba(255,255,255,0.12);
}

/* ── Inner ──────────────────────────────────────────── */
.by234-header__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
/* Hide Free Consultation button from header everywhere */
.by234-header__actions { display: none !important; }

/* ── Logo ────────────────────────────────────────────── */
.by234-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  max-width: 280px;
  min-width: 0;
  flex-shrink: 0;
  transition: opacity var(--transition-fast);
}
.by234-logo:hover { opacity: 0.85; }
.by234-logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}
.by234-logo__img {
  height: 40px;
  width: auto;
  display: block;
  max-width: 200px;
}
.by234-logo__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
}
.by234-logo__first {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.by234-logo__rest {
  font-family: var(--font-display);
  font-size: 1.0rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.1;
  white-space: normal;
  overflow: visible;
}
.by234-logo__single {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.by234-logo__tagline {
  font-family: var(--font-body);
  font-size: 0.52rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.26);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Desktop nav ────────────────────────────────────── */
.by234-nav {
  margin-left: auto;
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}
.by234-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  padding: 0; margin: 0;
  white-space: nowrap;
}
.by234-header .by234-nav__link,
.by234-header .by234-nav .by234-nav__link {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.78) !important;
  text-decoration: none !important;
  border-radius: var(--radius-sm);
  position: relative;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.by234-nav__link::after {
  content: '';
  position: absolute;
  bottom: 3px; left: 14px; right: 14px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  border-radius: 1px;
  transition: transform 0.22s ease;
}
.by234-header .by234-nav__link:hover,
.by234-header .by234-nav__item--active .by234-nav__link {
  color: var(--accent) !important;
  background: rgba(255,255,255,0.07);
}
.by234-header .by234-nav__item--active .by234-nav__link::after,
.by234-header .by234-nav__link:hover::after { transform: scaleX(1); }
.by234-header .by234-nav__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── CTA actions ─────────────────────────────────────── */
.by234-header__actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.by234-hbtn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-5);
  height: 40px;
  min-height: 44px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  touch-action: manipulation;
}
.by234-hbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.by234-hbtn svg { flex-shrink: 0; }
.by234-hbtn--wa {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
  box-shadow: 0 2px 8px rgba(37,211,102,0.25);
}
.by234-hbtn--wa:hover {
  background: #20C05C;
  border-color: #20C05C;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37,211,102,0.35);
}

/* ── Hamburger — SINGLE consolidated rule ────────────── */
/* Base: hidden on desktop, always right-aligned when shown */
.by234-hamburger {
  display: none;            /* hidden by default (desktop) */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px; height: 44px;
  min-width: 44px; min-height: 44px;  /* 44px touch target */
  background: none; border: none; cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  flex-shrink: 0;
  margin-left: auto;        /* always pushes to far right */
  position: relative;
  z-index: calc(var(--z-sticky) + 1);
}
.by234-hamburger:hover { background: rgba(255,255,255,0.08); }
.by234-hamburger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.by234-hamburger__line {
  display: block;
  width: 22px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
  transform-origin: center;
}
.by234-hamburger[aria-expanded="true"] .by234-hamburger__line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.by234-hamburger[aria-expanded="true"] .by234-hamburger__line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.by234-hamburger[aria-expanded="true"] .by234-hamburger__line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile drawer ──────────────────────────────────── */
.by234-mobile-nav {
  position: fixed;
  top: 72px; left: 0; right: 0;
  background: rgba(8,18,30,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,0.06);
  z-index: calc(var(--z-sticky) - 1);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition-base), opacity var(--transition-base);
  display: none;
}
.by234-mobile-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.by234-mobile-nav__list {
  list-style: none; padding: var(--space-3) 0; margin: 0;
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
}
.by234-mobile-nav__link {
  display: flex;
  align-items: center;
  padding: var(--space-4) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: rgba(255,255,255,0.85) !important;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: color var(--transition-fast), background var(--transition-fast), padding-left var(--transition-fast);
}
.by234-mobile-nav__link:visited,
.by234-mobile-nav__link:link {
  color: rgba(255,255,255,0.85) !important;
}
.by234-mobile-nav__link:hover,
.by234-mobile-nav__link--active,
.by234-mobile-nav__link:focus {
  color: #ffffff !important;
  background: rgba(255,255,255,0.03);
  padding-left: var(--space-8);
}
.by234-mobile-nav__ctas {
  padding: var(--space-4) var(--space-6) var(--space-8);
}
.by234-mobile-nav__ctas .by234-hbtn {
  justify-content: center;
  height: 48px; min-height: 48px;
  width: 100%;
  padding: 0 var(--space-5);
  font-size: var(--text-base);
}

/* ── Spacer (pushes content below fixed header) ─────── */
.by234-header-spacer { height: 72px; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1200px) {
  .by234-nav__link { padding: 6px 10px; }
  .by234-nav__link::after { left: 10px; right: 10px; }
}
/* Hamburger shows, nav hides, below 1100px */
@media (max-width: 1100px) {
  .by234-nav        { display: none !important; }
  .by234-hamburger  { display: flex; }
  .by234-mobile-nav { display: block; }
}
@media (max-width: 640px) {
  .by234-header__inner { padding: 0 var(--space-4); }
  .by234-logo { max-width: 200px; }
}

/* ── Reduced motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .by234-header, .by234-logo, .by234-nav__link, .by234-nav__link::after,
  .by234-hbtn, .by234-hamburger, .by234-hamburger__line,
  .by234-mobile-nav, .by234-mobile-nav__link { transition: none; }
  .by234-hbtn--wa:hover { transform: none; }
}

/* ── Mobile: keep header always visible even when browser chrome shrinks ── */
@media (max-width: 1100px) {
  .by234-header {
    /* Use dvh-aware positioning so header stays pinned even as
       mobile browser address bar collapses/expands on scroll    */
    position: fixed;
    top: 0;
    /* Raise z-index above any sticky sidebar or stacking contexts
       that pure-PHP templates create on mobile                   */
    z-index: 9999;
  }
  .by234-mobile-nav {
    /* Drawer must track the header's z-index */
    z-index: 9998;
  }
}
