/* ============================================================
   HEADER STYLES
   Extracted from header.ejs inline <style> block
   ============================================================ */

/* === SHARED (both desktop & mobile) === */

/* Search hint rotator animation (non-blinking) */
.search-rotator-host {
  position: relative;
}

.search-rotator-input {
  position: relative;
  z-index: 2;
}

.search-rotator-text {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.search-rotator-text.is-hidden {
  opacity: 0;
}

.search-rotator-host:focus-within .search-rotator-text {
  display: none !important;
}

.search-rotator-text.is-enter {
  animation: searchWordSlideIn 0.24s ease forwards;
}

.search-rotator-text.is-exit {
  animation: searchWordSlideOut 0.38s ease forwards;
}

.tz-mobile-header-shell {
  display: none;
}

.tz-mobile-call-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.tz-mobile-call-modal.is-active {
  opacity: 1;
  pointer-events: auto;
}

.tz-mobile-call-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 20, 45, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tz-mobile-call-dialog {
  position: relative;
  width: min(100%, 420px);
  padding: 28px 22px 22px;
  border-radius: 28px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 24px 60px rgba(5, 16, 54, 0.28);
  backdrop-filter: blur(16px) saturate(155%);
  -webkit-backdrop-filter: blur(16px) saturate(155%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.tz-mobile-call-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 29, 74, 0.08);
  color: #0b1d4a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tz-mobile-call-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.tz-mobile-call-brand img {
  width: 138px;
  max-width: 100%;
}

.tz-mobile-call-eyebrow {
  margin: 18px 0 8px;
  color: #5fa32e;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tz-mobile-call-title {
  margin: 0;
  color: #0b1d4a;
  font-size: 24px;
  line-height: 1.2;
}

.tz-mobile-call-copy {
  margin: 10px 0 18px;
  color: #5b6782;
  font-size: 14px;
  line-height: 1.6;
}

.tz-mobile-call-number {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #0b1d4a;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
}

.tz-mobile-call-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #5fa32e, #7dc249);
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none !important;
  box-shadow: 0 14px 30px rgba(95, 163, 46, 0.28);
}

body.tz-mobile-call-open {
  overflow: hidden;
}

@keyframes searchWordSlideIn {
  from {
    opacity: 0;
    transform: translate(-10px, -50%);
  }

  to {
    opacity: 0.9;
    transform: translate(0, -50%);
  }
}

@keyframes searchWordSlideOut {
  from {
    opacity: 0.9;
    transform: translate(0, -50%);
  }

  to {
    opacity: 0;
    transform: translate(-14px, -50%);
  }
}

/* Premium Phone Pill Design */
.tz_call_pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 100px;
  padding: 8px 25px 8px 8px;
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.tz_call_pill:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.tz_call_icon_circle {
  width: 38px;
  height: 38px;
  background: #5fa32e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-right: 15px;
  box-shadow: 0 4px 12px rgba(95, 163, 46, 0.3);
}

.tz_call_number {
  color: white;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

@keyframes shiny-glint {
  0% {
    left: -150%;
  }

  50% {
    left: 150%;
  }

  100% {
    left: 150%;
  }
}

/* Header Vertical Alignment Fix */
.header .menu__nav {
  display: flex;
  align-items: center;
  height: 100%;
}

.header .menu__nav > li {
  display: flex;
  align-items: center;
}

.header .menu__nav > li > a {
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
}


/* === DESKTOP ONLY (min-width: 1200px) === */

@media (min-width: 1200px) {
  /* Desktop menu layout */
  .header-menu {
    display: flex;
    align-items: center;
  }

  /* Hide mobile close button on desktop */
  .header .tz-mobile-menu-close-wrap {
    display: none !important;
  }

  /* Vertically center the nav row */
  .header .header-menu .menu__nav > li {
    padding: 0;
  }

  .header .header-menu .menu__nav > li > a {
    min-height: 53px;
    display: flex;
    align-items: center;
  }

  /* Hide mobile icons on desktop */
  .tz-mobile-only {
    display: none !important;
  }

  /* Desktop search box width */
  .custom-search-box {
    width: 300px !important;
  }

  /* Desktop menu dropdown - stays open with delay */
  .menu__nav li:hover > .subnav,
  .menu__nav li:hover > .mega {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
    transition: opacity 0.3s ease 0s, transform 0.3s ease 0s, pointer-events 0s linear 0s !important;
  }

  /* Dropdown default: hidden, closes immediately on mouse leave */
  .header .header-menu .menu .subnav,
  .header .header-menu .menu .mega {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.2s ease 0s, transform 0.2s ease 0s, pointer-events 0s linear 0s !important;
  }

  .header .header-menu .menu li:hover > .subnav,
  .header .header-menu .menu li.-has-mega-menu:hover > .mega,
  .header .header-menu .menu li.tz-dropdown-open > .subnav,
  .header .header-menu .menu li.tz-dropdown-open > .mega {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
    transition: opacity 0.3s ease 0s, transform 0.3s ease 0s, pointer-events 0s linear 0s !important;
  }

  /* Invisible bridge area above dropdown to prevent gap hover-out */
  .header .header-menu .menu .subnav::after,
  .header .header-menu .menu .mega::after {
    content: "";
    position: absolute;
    top: -25px;
    left: 0;
    width: 100%;
    height: 25px;
    background: transparent;
  }

  /* Shiny Animation for Phone Pill */
  .tz_call_pill::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
      to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.6) 50%,
      rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    animation: shiny-glint 3s infinite;
  }
}


/* === MOBILE ONLY (max-width: 1199px) === */

@media (max-width: 1199px) {
  .header {
    transition: none !important;
  }

  .header .header__container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .header .tz-header-main-col {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }

  .header .tz-header-main-row {
    width: 100%;
  }

  .header .tz-header-side-col {
    display: none;
  }

  .header .header-logo {
    display: none;
  }

  .tz-desktop-call-pill {
    display: none !important;
  }

  .tz-mobile-header-shell {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }

  .tz-mobile-header-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 60px;
    padding: 10px 12px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: linear-gradient(135deg, rgba(7, 24, 58, 0.48), rgba(25, 54, 106, 0.22));
    box-shadow: 0 20px 34px rgba(5, 16, 54, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px) saturate(165%);
    -webkit-backdrop-filter: blur(18px) saturate(165%);
  }

  .header.is-menu-opened .tz-mobile-header-bar,
  .header.is-sticky .tz-mobile-header-bar {
    border-color: rgba(255, 255, 255, 0.45) !important;
    background: rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 15px 35px rgba(5, 16, 54, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(25px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(200%) !important;
    
    /* Hardware acceleration triggers to force browser compositor to render parent layers blurred underneath */
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
  }

  .tz-mobile-header-left,
  .tz-mobile-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .tz-mobile-header-left {
    min-width: 0;
    flex: 1 1 auto;
  }

  .tz-mobile-header-right {
    flex-shrink: 0;
  }

  .tz-mobile-header-action.d-none {
    display: none !important;
  }

  .tz-mobile-icon-button {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .header.is-menu-opened .tz-mobile-icon-button,
  .header.is-sticky .tz-mobile-icon-button {
    border-color: rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.3) !important;
    color: #102341 !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  }

  .tz-mobile-hamburger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  .tz-mobile-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: currentColor;
  }

  .tz-mobile-header-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 0;
  }

  .tz-mobile-header-logo img {
    width: 126px;
    max-width: 100%;
    transition: opacity 0.2s ease;
  }

  .tz-mobile-header-logo img:nth-child(1) {
    transform: translateY(4px);
  }

  .tz-mobile-header-logo img:nth-child(2) {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
  }

  .header.is-menu-opened .tz-mobile-header-logo img:nth-child(1),
  .header.is-sticky .tz-mobile-header-logo img:nth-child(1) {
    opacity: 0;
  }

  .header.is-menu-opened .tz-mobile-header-logo img:nth-child(2),
  .header.is-sticky .tz-mobile-header-logo img:nth-child(2) {
    opacity: 1;
  }

  /* Mobile menu slide-in animation */
  .header .header-menu {
    transform: translateY(-50px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease !important;
  }

  .header .header-menu.is-menu-active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .header .header-menu__content {
    position: relative;
    overflow: hidden;
    border-radius: 28px 28px 0 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(233, 242, 255, 0.08));
    box-shadow: 0 28px 65px rgba(5, 16, 54, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(34px) saturate(180%);
    -webkit-backdrop-filter: blur(34px) saturate(180%);
    isolation: isolate;
  }
  
  .header .header-menu .mobile-overlay {
    display: block;
    background: rgba(7, 18, 44, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .header .header-menu .mobile-bg {
    background:
      radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0) 32%),
      radial-gradient(circle at 82% 6%, rgba(183, 205, 255, 0.4), rgba(183, 205, 255, 0) 28%),
      linear-gradient(180deg, rgba(248, 251, 255, 0.9), rgba(232, 241, 252, 0.78) 36%, rgba(223, 235, 249, 0.66));
    border-top: 1px solid rgba(255, 255, 255, 0.82);
    opacity: 0.98;
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
  }

  .header .header-menu .menu {
    padding: 18px 14px 28px;
    padding-top: 18px;
  }

  .header .header-menu .menu a {
    min-height: 48px;
    padding: 0 18px;
    border-radius: 18px;
    border: 1px solid rgba(136, 150, 176, 0.18);
    background: rgba(255, 255, 255, 0.58);
    color: #0f2240;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  }

  .header .header-menu .menu__nav > li > a {
    font-size: 17px;
    font-weight: 600;
  }

  .header .header-menu .menu .subnav {
    padding-top: 18px;
  }

  .header .header-menu .menu .subnav li {
    padding: 0 8px;
  }

  .header .header-menu .menu .subnav a {
    font-size: 14px;
  }

  .header .header-menu .menu .subnav__backBtn a {
    color: #0f2240;
    background: rgba(95, 163, 46, 0.12) !important;
  }

  .header .tz-mobile-menu-close-wrap {
    display: flex;
    justify-content: flex-end;
    padding: 16px 16px 0;
  }

  .header .tz-mobile-menu-close {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: rgba(255, 255, 255, 0.72);
    color: #0b1d4a;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(5, 16, 54, 0.08);
  }

  .header .tz-mobile-menu-close i {
    font-size: 12px;
  }

  .custom-search-results {
    position: fixed;
    top: 14px;
    right: 12px;
    left: 12px;
    z-index: 1150;
    margin: 0;
    padding: 16px 14px 14px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: linear-gradient(145deg, rgba(8, 24, 56, 0.72), rgba(29, 66, 126, 0.34));
    box-shadow: 0 28px 60px rgba(5, 16, 54, 0.24);
    backdrop-filter: blur(22px) saturate(165%);
    -webkit-backdrop-filter: blur(22px) saturate(165%);
    max-height: calc(100vh - 28px);
    overflow-y: auto;
  }

  .custom-search-results::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.02));
    pointer-events: none;
  }

  .custom-search-results > * {
    position: relative;
    z-index: 1;
  }

  .tz-search-exit-mobile {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 10px;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
  }

  .tz-mobile-search-input-wrap {
    margin-bottom: 14px;
  }

  .tz-mobile-search-input-wrap.search-rotator-host {
    width: 100%;
  }

  input.mobile-search-input {
    width: 100%;
    min-height: 50px;
    padding: 0 18px 0 22px;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    caret-color: #ffffff;
    font-size: 16px;
    appearance: none;
    -webkit-appearance: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  input.mobile-search-input:focus,
  input.mobile-search-input:active {
    outline: none;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.36) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.12);
    color: #ffffff;
  }

  input.mobile-search-input::-webkit-search-decoration,
  input.mobile-search-input::-webkit-search-cancel-button,
  input.mobile-search-input::-webkit-search-results-button,
  input.mobile-search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
  }

  .tz-mobile-search-input-wrap .search-rotator-text {
    left: 22px;
    right: 22px;
    max-width: calc(100% - 44px);
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0.01em;
    z-index: 3;
    text-shadow: none;
    filter: none;
    -webkit-filter: none;
  }

  input.mobile-search-input::placeholder {
    color: rgba(255, 255, 255, 0.82);
  }

  .tz-mobile-search-input-wrap:focus-within .search-rotator-text {
    display: none !important;
  }

  .tz-search-panel {
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 22px !important;
    padding: 16px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
  }

  .tz-search-panel h5 {
    color: #0f2240;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 0;
  }

  .tz-search-panel .popular-result {
    margin-top: 16px;
  }

  .tz-search-panel .row.pt-40 {
    padding-top: 18px !important;
  }

  .tz-search-panel .button.-sm {
    border-radius: 999px;
    padding: 8px 16px;
  }
}

@media (max-width: 575px) {
  .header .header__container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .tz-mobile-header-bar {
    min-height: 56px;
    padding: 8px 10px;
    border-radius: 20px;
  }

  .tz-mobile-header-logo img {
    width: 126px;
  }

  .tz-mobile-icon-button {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .custom-search-results {
    top: 10px;
    right: 10px;
    left: 10px;
    padding: 14px 12px 12px;
    max-height: calc(100vh - 20px);
    border-radius: 24px;
  }

  .tz-search-panel {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  .tz-mobile-call-dialog {
    border-radius: 22px;
    padding: 24px 18px 18px;
  }

  .tz-mobile-call-title {
    font-size: 22px;
  }

  .tz-mobile-call-number {
    font-size: 20px;
  }

  .tz_call_pill {
    padding: 6px 18px 6px 6px;
  }

  .tz_call_icon_circle {
    width: 32px;
    height: 32px;
    margin-right: 10px;
  }

  .tz_call_number {
    font-size: 14px;
  }
}
