/* =============================================================
   GVEC.net — Consolidated Header styles
   Layout per approved comp: Logo | Primary Nav | Search | Phone | Secondary Nav
   Applies desktop only (≥992px); mobile header is untouched.
   Wrapper/sticky classes from theme-3 are preserved; these styles
   only shape the new .gvx-header internals.
   ============================================================= */

.gvx-header {
  background: #fff;
}

.gvx-header__inner {
  max-width: 1760px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.gvx-header__logo { flex: 0 0 auto; }
.gvx-header__logo .header__logo-img { display: block; }

/* Primary nav — center-left, natural spacing like the comp */
.gvx-header__primary { flex: 1 1 auto; min-width: 0; }

.gvx-header__primary-menu {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: clamp(14px, 2vw, 34px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.gvx-header__primary-menu > li { position: relative; }

.gvx-header__primary-menu > li > a {
  font-family: "Whitney", sans-serif;
  font-weight: 500;
  font-size: 1.1rem;
  color: #000;
  text-decoration: none;
  padding: 10px 2px;
  display: inline-block;
  transition: color 0.15s ease;
}
.gvx-header__primary-menu > li > a:hover,
.gvx-header__primary-menu > li > a:focus-visible { color: #ed1c24; }

/* Dropdowns — reuse theme mega/sub menu markup from CSS_Menu_Walker */
.gvx-header__primary-menu li ul {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.14);
  list-style: none;
  margin: 0;
  padding: 12px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 60;
}
.gvx-header__primary-menu li:hover > ul,
.gvx-header__primary-menu li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.gvx-header__primary-menu li ul li ul { /* third level flies right */
  top: 0;
  left: 100%;
  transform: translateX(8px);
}
.gvx-header__primary-menu li ul li:hover > ul,
.gvx-header__primary-menu li ul li:focus-within > ul { transform: translateX(0); }

.gvx-header__primary-menu li ul a {
  display: block;
  font-family: "Whitney Book", Arial, sans-serif;
  font-size: 1rem;
  color: #000;
  text-decoration: none;
  padding: 9px 22px;
}
.gvx-header__primary-menu li ul a:hover,
.gvx-header__primary-menu li ul a:focus-visible {
  color: #ed1c24;
  background: #f2f2f2;
}

/* Utility cluster: search / phone / secondary nav */
.gvx-header__utility {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 28px);
}

.gvx-header__search { position: relative; }

.gvx-header__search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #000;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.gvx-header__search-toggle:hover,
.gvx-header__search-toggle[aria-expanded="true"] {
  color: #ed1c24;
  background: #f2f2f2;
}
.gvx-header__search-toggle:focus-visible {
  outline: 2px solid #ed1c24;
  outline-offset: 2px;
}

.gvx-header__search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 340px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.16);
  padding: 12px;
  z-index: 70;
}
.gvx-header__search-panel[hidden] { display: none; }

/* Reuse theme search-form inside the panel; neutralize its hide state */
.gvx-header__search-panel .search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gvx-header__search-panel .search-input,
.gvx-header__search-panel .search-input--hide {
  display: block !important;
  width: 100% !important;
  opacity: 1 !important;
  visibility: visible !important;
  border: 1px solid #dbdbdb;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: "Whitney Book", Arial, sans-serif;
  font-size: 1rem;
}
.gvx-header__search-panel .search-submit {
  border: 0;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
}

/* Phone — plain red number per comp (no lottie in the bar) */
.gvx-header__phone {
  font-family: "Whitney", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #ed1c24 !important;
  text-decoration: none;
  white-space: nowrap;
}
.gvx-header__phone:hover { color: #ba1015 !important; }

/* Secondary nav (Top Bar menu: Account / Business etc.) */
.gvx-header__secondary-menu {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.4vw, 24px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.gvx-header__secondary-menu > li { position: relative; }
.gvx-header__secondary-menu > li > a {
  font-family: "Whitney Book", Arial, sans-serif;
  font-size: 1.05rem;
  color: #000;
  text-decoration: none;
  padding: 10px 0;
  display: inline-block;
}
.gvx-header__secondary-menu > li > a:hover,
.gvx-header__secondary-menu > li > a:focus-visible { color: #ed1c24; }

.gvx-header__secondary-menu li ul {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.14);
  list-style: none;
  margin: 0;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 60;
}
.gvx-header__secondary-menu li:hover > ul,
.gvx-header__secondary-menu li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.gvx-header__secondary-menu li ul a {
  display: block;
  font-family: "Whitney Book", Arial, sans-serif;
  font-size: 0.98rem;
  color: #000;
  text-decoration: none;
  padding: 8px 20px;
}
.gvx-header__secondary-menu li ul a:hover { color: #ed1c24; background: #f2f2f2; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .gvx-header__primary-menu li ul,
  .gvx-header__secondary-menu li ul,
  .gvx-header__search-toggle { transition: none; }
}
