/**
 * Header Styles
 * Global site header with sticky navigation
 */

/* ===== Site Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  transition: box-shadow 0.25s ease;
}

.site-header.is-stuck {
  box-shadow: 0 8px 24px rgba(15, 42, 67, 0.06);
}

/* Fixed 70px header height */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 70px;
}

/* ===== Brand (Logo + Text) ===== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  height: 45px;
  width: auto;
  display: block;
}

.brand .brand-text {
  font-family: inherit;
  font-weight: 400;
  letter-spacing: normal;
  font-size: 22px;
  line-height: 1;
  color: var(--navy);
  white-space: nowrap;
}

.brand .brand-addition {
  display: inline;
}

@media (max-width: 640px) {
  .brand .brand-addition {
    display: none; /* Mobile: show only "South Bay Life" */
  }
}

/* ===== Hamburger Menu Button ===== */
.hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  border-radius: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease;
}

.hamburger:hover,
.hamburger:focus {
  background: transparent;
  outline: none;
}

.hamburger .icon-burger svg {
  display: block;
  width: 35px;
  height: 35px;
  transition: width 0.12s ease, height 0.12s ease;
}

.hamburger:hover .icon-burger svg,
.hamburger:focus .icon-burger svg {
  width: 37px;
  height: 37px;
}

.hamburger .icon-close {
  display: none;
}

.hamburger[aria-expanded="true"] .icon-burger {
  display: none;
}

.hamburger[aria-expanded="true"] .icon-close {
  display: block;
}

/* ===== Fullscreen Overlay Menu ===== */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 42, 67, 0.98);
  color: #fff;
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
  font-family: inherit;
  z-index: 9999;
}

.menu-overlay[data-open="true"] {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: auto;
}

.menu-modal {
  width: min(92vw, 720px);
  padding: 24px;
  position: relative;
  font-family: inherit;
}

/* Close (X) button */
.menu-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  border-radius: 12px;
  z-index: 11000;
}

.menu-close:hover {
  background: transparent;
}

.menu-close svg {
  width: 24px;
  height: 24px;
}

/* Menu links */
.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  text-align: center;
  font-family: inherit;
  place-items: center;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.menu-list a {
  display: block;
  padding: 12px 16px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(16px, 2.2vw, 20px);
  border-radius: 0;
  transition: all 0.2s ease;
  border-bottom: none;
  text-align: center;
}

.menu-list a:hover,
.menu-list a:focus,
.menu-list a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
  background: transparent;
  outline: none;
}

/* Body lock when nav is open */
body.nav-open {
  overflow: hidden;
}

/* ========================================
   MOBILE MENU: LANDSCAPE SCROLL FIX
   ======================================== */

/* Landscape orientation specific fix */
@media (max-height: 500px) and (orientation: landscape) {
  .menu-overlay[data-open="true"] {
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    align-items: flex-start;
    padding: 20px 0;
  }
  
  .menu-modal {
    padding: 16px;
    margin: 0 auto;
  }
  
  .menu-list {
    gap: 6px;
  }
  
  .menu-list a {
    padding: 10px 14px;
    font-size: 16px;
  }
}

