
/* =========================================================
   STICKY WORDPRESS HEADER WRAPPER
   ========================================================= */

html body .wp-site-blocks .va-sticky-group:has(#va-site-header) {
  --va-custom-header-height: 54px;
  --va-custom-gradient-height: 110px;

  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;

  width: 100% !important;
  max-width: none !important;
  height: var(--va-custom-header-height) !important;
  min-height: var(--va-custom-header-height) !important;

  margin: 0 !important;
  padding: 0 !important;

  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;

  isolation: isolate;
  z-index: 999999 !important;
  pointer-events: none !important;
}

/* =========================================================
   HEADER GRADIENT
   ========================================================= */

html body
  .wp-site-blocks
  .va-sticky-group:has(#va-site-header)::before {
  content: "" !important;
  display: block !important;

  position: absolute !important;
  top: 0 !important;
  left: 0 !important;

  width: 100% !important;
  height: var(--va-custom-gradient-height) !important;

  margin: 0 !important;
  padding: 0 !important;

  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.58) 22%,
    rgba(0, 0, 0, 0.34) 48%,
    rgba(0, 0, 0, 0.14) 72%,
    rgba(0, 0, 0, 0.04) 90%,
    rgba(0, 0, 0, 0) 100%
  ) !important;

  box-shadow: none !important;

  z-index: 0 !important;
  pointer-events: none !important;
}

/* Prevent a second overlay */
html body
  .wp-site-blocks
  .va-sticky-group:has(#va-site-header)::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

/* WordPress admin bar */
body.admin-bar
  .wp-site-blocks
  .va-sticky-group:has(#va-site-header) {
  top: 32px !important;
}

/* Reset WordPress header containers */
header.wp-block-template-part:has(#va-site-header),
header.wp-block-template-part:has(#va-site-header) > .wp-block-group {
  position: relative !important;

  width: 100% !important;
  max-width: none !important;
  height: var(--va-custom-header-height, 54px) !important;
  min-height: var(--va-custom-header-height, 54px) !important;

  margin: 0 !important;
  padding: 0 !important;

  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;

  z-index: 1 !important;
}

/* =========================================================
   HEADER
   ========================================================= */

#va-site-header,
#va-site-header * {
  box-sizing: border-box;
}

#va-site-header {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;

  width: 100% !important;
  max-width: none !important;
  height: 54px !important;

  margin: 0 !important;
  padding: 0 !important;

  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;

  z-index: 2 !important;
  pointer-events: none !important;
}

/* =========================================================
   STANDARD HEADER LINKS
   ========================================================= */

#va-site-header .va-header-link,
#va-site-header .va-header-link:hover,
#va-site-header .va-header-link:focus,
#va-site-header .va-header-link:focus-visible,
#va-site-header .va-header-link:active,
#va-site-header .va-header-link:visited {
  position: absolute;
  display: block;

  margin: 0;
  padding: 0;

  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;

  line-height: 0;
  text-decoration: none !important;

  opacity: 1 !important;
  transition: none !important;

  z-index: 2;
  pointer-events: auto !important;

  -webkit-tap-highlight-color: transparent;
}

/* SVG images */
#va-site-header img {
  display: block !important;

  width: 100% !important;
  max-width: none !important;
  height: auto !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;

  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none !important;
}

/* =========================================================
   VISUAL ADVICE LOGO — DESKTOP
   ========================================================= */

#va-site-header .va-header-logo {
  top: 50%;
  left: 10px;

  width: 302.4px;
  transform: translateY(-50%);
}

/* =========================================================
   DESKTOP ABOUT US SVG
   ========================================================= */

#va-site-header .va-header-about-desktop {
  position: absolute;
  display: block;

  top: 12px;
  right: 10px;

  width: 152px;
  height: auto;

  margin: 0;
  padding: 0;

  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;

  line-height: 0;
  z-index: 2;
  pointer-events: none !important;
}

/* Desktop L links disabled by default */
#va-site-header .va-about-l-hitbox {
  display: none;
  pointer-events: none;
}

/* =========================================================
   DESKTOP-ONLY L-SHAPED CLICK AREA
   ========================================================= */

@media (min-width: 1025px) {
  #va-site-header .va-about-l-hitbox,
  #va-site-header .va-about-l-hitbox:hover,
  #va-site-header .va-about-l-hitbox:focus,
  #va-site-header .va-about-l-hitbox:focus-visible,
  #va-site-header .va-about-l-hitbox:active,
  #va-site-header .va-about-l-hitbox:visited {
    position: absolute;
    display: block;

    margin: 0;
    padding: 0;

    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;

    text-decoration: none !important;
    cursor: pointer;

    z-index: 4;
    pointer-events: auto !important;

    -webkit-tap-highlight-color: transparent;
  }

  /*
   * HORIZONTAL PART OF THE L
   *
   * Provides a large 48px-high clickable area
   * around the horizontal ABOUT US text.
   */
  #va-site-header .va-about-l-top {
    top: -8px;
    left: -8px;

    width: calc(100% + 16px);
    height: 48px;
  }

  /*
   * UPPER VERTICAL PART OF THE L
   *
   * The bottom 88px of the SVG remains click-through.
   * This prevents the About Us link from blocking
   * the carousel's right arrow.
   */
  #va-site-header .va-about-l-side {
    top: 32px;
    right: -6px;
    bottom: 88px;

    width: 40px;
    height: auto;
  }
}

/* Mobile About Us hidden on desktop */
#va-site-header .va-header-about-mobile {
  display: none;
}

/* =========================================================
   TABLET + MOBILE
   ========================================================= */

@media (max-width: 1024px) {
  /*
   * MOBILE LOGO:
   * Previous responsive width: 37.8vw
   * New responsive width: 49.14vw
   */
  #va-site-header .va-header-logo {
    left: 10px;
    width: min(393.12px, 49.14vw);
  }

  #va-site-header .va-header-about-desktop {
    display: none;
  }

  /*
   * MOBILE ABOUT US:
   * Previous responsive width: 39vw
   * New responsive width: 27.3vw
   */
  #va-site-header .va-header-about-mobile {
    display: block;

    top: 50%;
    right: 10px;

    width: min(196px, 27.3vw);
    transform: translateY(-50%);
  }
}

/* Mobile WordPress admin bar */
@media (max-width: 782px) {
  body.admin-bar
    .wp-site-blocks
    .va-sticky-group:has(#va-site-header) {
    top: 46px !important;
  }
}
