:root {
  --zvgn-ink: #071724;
  --zvgn-white: #fff;
  --zvgn-header-height: 82px;
}

/*
 * This is a presentation layer over the existing Astra header. The original
 * logo, WordPress menu locations, Max Mega Menu content and Astra search remain
 * authoritative and continue to be edited in their current admin screens.
 */
body.zvgn-enabled #masthead {
  position: fixed !important;
  inset: 0 0 auto !important;
  z-index: 9998;
  width: 100%;
  background: rgba(255, 255, 255, .975);
  border-bottom: 1px solid rgba(7, 23, 36, .08);
  box-shadow: 0 14px 42px rgba(7, 23, 36, .10);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}

body.admin-bar.zvgn-enabled #masthead { top: 32px !important; }

body.zvgn-enabled #masthead .ast-primary-header-bar,
body.zvgn-enabled #masthead .ast-below-header-bar {
  background: transparent !important;
}

body.zvgn-enabled #masthead .ast-below-header-bar { border: 0 !important; }

/* Solid pages reserve space for the fixed navigation. Overlay pages keep the
   opening hero at the viewport edge, matching the approved homepage design. */
body.zvgn-solid #content.site-content {
  padding-top: var(--zvgn-header-height) !important;
}

@media (min-width: 922px) {
  body.zvgn-enabled #masthead,
  body.zvgn-enabled #ast-desktop-header,
  body.zvgn-enabled #ast-desktop-header .ast-main-header-wrap,
  body.zvgn-enabled #ast-desktop-header .ast-primary-header-bar,
  body.zvgn-enabled #ast-desktop-header .ast-below-header-wrap,
  body.zvgn-enabled #ast-desktop-header .ast-below-header-bar {
    height: 82px !important;
    min-height: 82px !important;
  }

  body.zvgn-enabled #ast-desktop-header { position: relative; }

  body.zvgn-enabled #ast-desktop-header .ast-main-header-wrap,
  body.zvgn-enabled #ast-desktop-header .ast-below-header-wrap {
    position: absolute;
    inset: 0;
  }

  body.zvgn-enabled #ast-desktop-header .ast-main-header-wrap { z-index: 2; }
  body.zvgn-enabled #ast-desktop-header .ast-below-header-wrap {
    z-index: 3;
    pointer-events: none;
  }

  body.zvgn-enabled #ast-desktop-header .site-primary-header-wrap {
    width: 100%;
    max-width: none;
    height: 82px;
    padding-inline: clamp(28px, 5vw, 78px);
  }

  body.zvgn-enabled #ast-desktop-header .site-below-header-wrap {
    display: block;
    width: auto;
    max-width: none;
    height: 82px;
    margin: 0 clamp(104px, 10vw, 160px) 0 clamp(190px, 17vw, 270px);
    padding: 0;
  }

  body.zvgn-enabled #ast-desktop-header .site-below-header-wrap > .ast-builder-grid-row {
    display: flex;
    justify-content: center;
    height: 82px;
  }

  body.zvgn-enabled #ast-desktop-header .site-header-below-section-left { display: none; }

  body.zvgn-enabled #ast-desktop-header .site-header-below-section-right {
    display: flex;
    width: 100%;
    height: 82px;
    justify-content: center;
    pointer-events: auto;
  }

  body.zvgn-enabled #ast-desktop-header .ast-builder-menu-1,
  body.zvgn-enabled #ast-desktop-header .ast-main-header-bar-alignment {
    width: 100%;
    height: 82px;
  }

  body.zvgn-enabled #masthead #mega-menu-wrap-primary {
    width: auto;
    height: 82px;
    background: transparent;
  }

  body.zvgn-enabled #masthead #mega-menu-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 82px;
    white-space: nowrap;
  }

  body.zvgn-enabled #masthead #mega-menu-primary > li.mega-menu-item > a.mega-menu-link {
    height: 82px;
    padding: 0 clamp(5px, .7vw, 11px);
    color: var(--zvgn-ink);
    background: transparent;
    font-size: clamp(11px, 1.05vw, 15px);
    font-weight: 650;
    line-height: 82px;
    letter-spacing: .015em;
    transition: color .25s ease, opacity .25s ease;
  }

  body.zvgn-enabled #masthead #mega-menu-primary > li.mega-menu-item:hover > a.mega-menu-link,
  body.zvgn-enabled #masthead #mega-menu-primary > li.mega-current-menu-item > a.mega-menu-link,
  body.zvgn-enabled #masthead #mega-menu-primary > li.mega-current-menu-ancestor > a.mega-menu-link {
    color: var(--zvgn-ink);
    opacity: .65;
  }

  body.zvgn-enabled #masthead .site-logo-img img {
    filter: none;
    transition: filter .3s ease;
  }

  body.zvgn-enabled #masthead .ast-header-search .ast-icon,
  body.zvgn-enabled #masthead .ast-header-search svg {
    color: var(--zvgn-ink);
    fill: currentColor;
    transition: color .3s ease;
  }

  /* Transparent is reserved for pages that start with dark visual media. */
  body.zvgn-overlay #masthead:not(.zvgn-scrolled) {
    background: rgba(4, 15, 24, .18);
    border-bottom-color: rgba(255, 255, 255, .22);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body.zvgn-overlay #masthead:not(.zvgn-scrolled) #mega-menu-primary > li.mega-menu-item > a.mega-menu-link {
    color: var(--zvgn-white);
  }

  body.zvgn-overlay #masthead:not(.zvgn-scrolled) #mega-menu-primary > li.mega-menu-item:hover > a.mega-menu-link,
  body.zvgn-overlay #masthead:not(.zvgn-scrolled) #mega-menu-primary > li.mega-current-menu-item > a.mega-menu-link,
  body.zvgn-overlay #masthead:not(.zvgn-scrolled) #mega-menu-primary > li.mega-current-menu-ancestor > a.mega-menu-link {
    color: var(--zvgn-white);
  }

  body.zvgn-overlay #masthead:not(.zvgn-scrolled) .site-logo-img img {
    filter: brightness(0) invert(1);
  }

  body.zvgn-overlay #masthead:not(.zvgn-scrolled) .ast-header-search .ast-icon,
  body.zvgn-overlay #masthead:not(.zvgn-scrolled) .ast-header-search svg {
    color: var(--zvgn-white);
  }

  body.zvgn-enabled #masthead a:focus-visible,
  body.zvgn-enabled #masthead button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
  }
}

@media (max-width: 921px) {
  /* Shared mobile surface for every public Astra header, including the homepage. */
  :root { --zvgn-header-height: 64px; }
  body.zvgn-enabled header#masthead {
    min-height: 64px !important;
    background: #1d1d1f !important;
    border-bottom-color: rgba(255,255,255,.12) !important;
    box-shadow: none !important;
  }
  body.zvgn-enabled #masthead #ast-mobile-header,
  body.zvgn-enabled #masthead #ast-mobile-header .ast-primary-header-bar,
  body.zvgn-enabled #masthead #ast-mobile-header .site-header-primary-section-left,
  body.zvgn-enabled #masthead #ast-mobile-header .site-header-primary-section-right {
    min-height: 64px !important;
  }
  body.zvgn-enabled #masthead #ast-mobile-header .site-logo-img img {
    filter: brightness(0) invert(1) !important;
  }
  body.zvgn-enabled #masthead #ast-mobile-header .site-branding { padding-block: 10px; }
  body.zvgn-enabled #masthead #ast-mobile-header .ast-header-search .ast-icon,
  body.zvgn-enabled #masthead #ast-mobile-header .ast-header-search svg,
  body.zvgn-enabled #masthead #ast-mobile-header .mobile-menu-toggle-icon,
  body.zvgn-enabled #masthead #ast-mobile-header .ast-mobile-svg {
    color: #f5f5f7 !important;
    fill: currentColor !important;
  }
  body.zvgn-enabled #masthead #ast-mobile-header .ast-mobile-svg { width: 22px; height: 22px; }
  body.zvgn-enabled #masthead #ast-mobile-header .main-header-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
    background: transparent !important;
    border: 0;
    border-radius: 4px;
    box-shadow: none;
  }
  body.zvgn-enabled #masthead #ast-mobile-header .astra-search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    color: #f5f5f7;
  }
  body.zvgn-enabled #masthead #ast-mobile-header .search-form,
  body.zvgn-enabled #masthead #ast-mobile-header .search-field {
    background: #29292c;
    color: #f5f5f7;
    border-color: #707075;
  }
  body.zvgn-enabled #masthead #ast-mobile-header .search-field::placeholder { color: #c7c7cc; }
  body.zvgn-enabled #masthead #ast-mobile-header .ast-dropdown-active .search-form { max-width: calc(100vw - 100px); }
  body.zvgn-enabled #masthead #ast-mobile-header .search-field { max-width: 100%; box-sizing: border-box; }
  body.zvgn-enabled #masthead #ast-mobile-header .ast-mobile-header-content {
    max-height: calc(100svh - 66px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body.admin-bar.zvgn-enabled #masthead #ast-mobile-header .ast-mobile-header-content { max-height: calc(100svh - 112px); }
  body.zvgn-enabled #masthead #ast-mobile-header .ast-mobile-header-content,
  body.zvgn-enabled #masthead #ast-mobile-header .main-header-menu,
  body.zvgn-enabled #masthead #ast-mobile-header .sub-menu,
  body.zvgn-enabled #masthead #ast-mobile-header .menu-link,
  body.zvgn-enabled #masthead #ast-mobile-header .ast-menu-toggle {
    background: #1d1d1f;
    color: #f5f5f7;
    border-color: rgba(255,255,255,.12);
  }
  body.zvgn-enabled #masthead #ast-mobile-header .menu-link:hover,
  body.zvgn-enabled #masthead #ast-mobile-header .main-header-menu-toggle:hover,
  body.zvgn-enabled #masthead #ast-mobile-header .ast-menu-toggle:hover { background: #333336 !important; }
  body.zvgn-enabled #masthead #ast-mobile-header a:focus-visible,
  body.zvgn-enabled #masthead #ast-mobile-header button:focus-visible,
  body.zvgn-enabled #masthead #ast-mobile-header input:focus-visible {
    outline: 2px solid #f5f5f7;
    outline-offset: -3px;
  }
}

@media (max-width: 782px) {
  body.admin-bar.zvgn-enabled #masthead { top: 46px !important; }
}

@media (prefers-reduced-motion: reduce) {
  body.zvgn-enabled #masthead,
  body.zvgn-enabled #masthead * {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  body.zvgn-enabled #masthead {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

