/* ═══════════════════════════════════════════════════════════════
   Custom site header — responsive-header.html design.
   Navy sticky bar, gold accents, right-hand mobile drawer + backdrop.
   Also adds desktop hover dropdowns for the Primary menu sub-levels.
   Classes are prefixed "sh-" so they cannot clash with Astra.
   Desktop = ≥1025px shows desktop nav; ≤1024px shows the drawer.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --sh-navy: #16253b;
  --sh-navy-2: #1f3552;
  --sh-gold: #c7973a;
  --sh-gold-light: #e4c077;
  --sh-cream: #f7f4ee;
  --sh-ink: #22262b;
  --sh-muted: #6b7280;
  --sh-header-h: 84px;
}

/* ── Sticky header bar ─────────────────────── */
.sh-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--sh-header-h);
  /*background: rgba(22, 37, 59, 0.97); */
  background: #292929;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.12);
}

.sh-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* ── Brand (logo or mark + text) ───────────── */
.sh-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.sh-brand .custom-logo,
.sh-brand img.custom-logo {
  height: 42px;
  width: auto;
  display: block;
}

.sh-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sh-gold-light), var(--sh-gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--sh-navy);
  font-size: 18px;
  flex-shrink: 0;
}

.sh-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.sh-brand-text strong {
  color: #fff;
  font-size: 16px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.sh-brand-text > span {
  color: var(--sh-gold-light);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ── Right group: nav + actions (kept together on the right) ── */
.sh-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

/* ── Desktop nav (Primary menu, with dropdowns) ── */
.sh-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.sh-nav > .menu-item {
  position: relative;
  list-style: none;
  margin: 0;
}

.sh-nav > .menu-item > a {
  position: relative;
  display: inline-block;
  color: #eaedf1;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.25s ease;
}

/* Animated gold underline (top level only) */
.sh-nav > .menu-item > a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  background: var(--sh-gold-light);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.sh-nav > .menu-item > a:hover,
.sh-nav > .menu-item > a:focus-visible,
.sh-nav > .menu-item.current-menu-item > a,
.sh-nav > .menu-item.current-menu-ancestor > a {
  color: var(--sh-gold-light);
  outline: none;
}

.sh-nav > .menu-item > a:hover::after,
.sh-nav > .menu-item > a:focus-visible::after,
.sh-nav > .menu-item.current-menu-item > a::after,
.sh-nav > .menu-item.current-menu-ancestor > a::after {
  transform: scaleX(1);
}

/* Dropdown panel */
.sh-nav > .menu-item > .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--sh-navy-2);
  border-radius: 10px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0s linear 0.2s;
  z-index: 1001;
  display: flex;
  flex-direction: column;
}

.sh-nav > .menu-item:hover > .sub-menu,
.sh-nav > .menu-item:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.sh-nav .sub-menu .menu-item {
  position: relative;
  list-style: none;
  margin: 0;
}

.sh-nav .sub-menu .menu-item > a {
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  color: #eaedf1;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.sh-nav .sub-menu .menu-item > a:hover,
.sh-nav .sub-menu .menu-item > a:focus-visible,
.sh-nav .sub-menu .current-menu-item > a {
  background: rgba(255, 255, 255, 0.06);
  color: var(--sh-gold-light);
}

/* ── Right actions: phone + CTA + toggle ───── */
.sh-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.sh-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #eaedf1;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.sh-phone svg {
  flex-shrink: 0;
}

.sh-phone:hover {
  color: var(--sh-gold-light);
}

.sh-cta {
  background: linear-gradient(135deg, var(--sh-gold-light), var(--sh-gold));
  color: var(--sh-navy);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(199, 151, 58, 0.35);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.sh-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(199, 151, 58, 0.45);
}

/* ── Hamburger (hidden on desktop) ─────────── */
.sh-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
}

.sh-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.sh-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.sh-toggle.open span:nth-child(2) {
  opacity: 0;
}

.sh-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile drawer (slides in from the right) ─ */
.sh-drawer {
  position: fixed;
  top: var(--sh-header-h);
  right: 0;
  width: min(320px, 84vw);
  height: calc(100vh - var(--sh-header-h));
  background: var(--sh-navy-2);
  transform: translateX(100%);
  transition: transform 0.32s ease;
  z-index: 999;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.25);
  overflow-y: auto;
}

.sh-drawer.open {
  transform: translateX(0);
}

.sh-drawer .menu-item {
  list-style: none;
  margin: 0;
  width: 100%;
}

.sh-drawer .menu-item > a {
  display: block;
  color: #eaedf1;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 14px 12px;
  border-radius: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sh-drawer .menu-item > a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--sh-gold-light);
}

/* Indented sub-levels inside the drawer (always visible) */
.sh-drawer .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0 0 0 16px;
}

.sh-drawer .sub-menu .menu-item {
  width: 100%;
}

.sh-drawer .sub-menu .menu-item > a {
  padding-left: 20px;
  font-size: 15px;
  color: #b8c0ca;
  border-bottom-color: rgba(255, 255, 255, 0.04);
}

.sh-drawer .sub-menu .menu-item > a:hover {
  color: var(--sh-gold-light);
}

.sh-drawer .sh-phone {
  margin-top: 18px;
  padding: 12px;
  font-size: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sh-drawer .sh-cta {
  margin-top: 10px;
  text-align: center;
  display: block;
}

/* ── Backdrop behind the drawer ────────────── */
.sh-backdrop {
  position: fixed;
  inset: 0;
  top: var(--sh-header-h);
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 998;
}

.sh-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Breakpoints ───────────────────────────── */
@media (max-width: 1024px) {
  .sh-nav {
    display: none;
  }
  .sh-phone.desktop-only {
    display: none;
  }
  .sh-toggle {
    display: flex;
  }
}

@media (min-width: 1025px) {
  .sh-drawer,
  .sh-backdrop,
  .sh-toggle {
    display: none;
  }
}

/* Tablet / narrow-desktop comfort range: tighten spacing so the
   nav + phone + CTA never wrap or bunch between 1025px and 1280px. */
@media (min-width: 1025px) and (max-width: 1279px) {
  .sh-inner {
    padding: 0 16px;
    gap: 16px;
  }
  .sh-right {
    gap: 16px;
  }
  .sh-nav {
    gap: 4px;
  }
  .sh-nav > .menu-item > a {
    font-size: 14px;
    padding: 10px 10px;
  }
  .sh-nav > .menu-item > a::after {
    left: 10px;
    right: 10px;
  }
  .sh-actions {
    gap: 10px;
  }
  .sh-phone {
    font-size: 13px;
  }
  .sh-cta {
    font-size: 13px;
    padding: 10px 16px;
  }
}

@media (max-width: 480px) {
  .sh-brand-text > span {
    display: none;
  }
  .sh-cta.desktop-only {
    display: none;
  }
}

/* Reduced motion: keep it functional but effectively instant */
@media (prefers-reduced-motion: reduce) {
  .sh-header,
  .sh-nav > .menu-item > a,
  .sh-nav > .menu-item > a::after,
  .sh-nav > .menu-item > .sub-menu,
  .sh-cta,
  .sh-toggle span,
  .sh-drawer,
  .sh-backdrop {
    transition-duration: 1ms !important;
  }
}
