/* ===========================
   CTA Header — FINAL (v1)
   - Fixed header
   - Clean underline (border-bottom)
   - Mobile dropdown (animated)
   - Scroll lock
   - No conflicts with device CSS
   =========================== */

/* ---------- TOKENS / GLOBAL ---------- */
:root{
  --cta-red: #e33a34;
  --nav-height: 84px;          /* single source of truth; changed in MQs */
  --nav-border: #e9e9e9;
}

html { scroll-behavior: smooth; }
html, body {
  min-height: 100% !important;
  overflow-x: hidden;
  background: #fff;            /* prevent gray flashes behind hero */
}

/* When mobile menu is open, lock background scroll */
html.no-scroll,
body.no-scroll {
  overflow: hidden !important;
}

/* Undo builder-imposed locks on typical wrappers */
main, .page_container, .page-wrap, .container, [role="main"]{
  position: static !important;
  height: auto !important;
  overflow: visible !important;
}

/* Anchor targets don't hide under the fixed bar */
section[id]{ scroll-margin-top: calc(var(--nav-height) + 12px); }

/* Push page content below the fixed bar */
/* main{ } */

/* Remove accidental top gaps right under header */
main > *:first-child { margin-top: 0 !important; }
main img:first-child,
main picture:first-child,
main video:first-child { display: block; }

/* ---------- HEADER SHELL (FIXED) ---------- */
.site-header.cta-navbar{
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 9999;
  background: #fff;
  border-bottom: 1px solid var(--nav-border);
  box-shadow: 0 6px 22px rgba(0,0,0,.08);
}

/* Desktop: brand | nav | CTA */
.cta-navbar .nav-inner{
  max-width: 1240px;
  margin: 0 auto;
  height: var(--nav-height);
  display: grid;
  grid-template-columns: auto 1fr auto;       /* 3 columns only */
  align-items: center;
  column-gap: 20px;
  padding: 0 20px;
}

/* Ensure grid children can shrink and stay aligned */
.cta-navbar .nav-inner > * { min-width: 0; }
.menu-desktop { justify-self: center; }

/* ---------- BRAND ---------- */
.cta-navbar .brand{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.cta-navbar .brand img{
  height: 52px;
  width: auto;
  display: block;               /* kill inline baseline gap */
}
.cta-navbar .brand-text{
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: .2px;
  white-space: nowrap;
}

/* ---------- DESKTOP NAV LINKS ---------- */
.menu-desktop{ justify-self: center; }

.cta-navbar .unifiednav__container{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

/* Use border-bottom underline only (no ::after system) */
.cta-navbar .unifiednav__item,
.cta-navbar .unifiednav__item:hover,
.cta-navbar .unifiednav__item:focus,
.cta-navbar .unifiednav__item.dmNavItemSelected {
  position: static;
}
.cta-navbar .unifiednav__item::after { content: none !important; }

.cta-navbar .unifiednav__item{
  text-decoration: none;
  color: #1a1a1a;
  font-weight: 600;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  line-height: 1;                   /* no baseline sag */
  padding: 12px 2px;
  border-bottom-width: 3px;
  border-bottom-style: solid;
  border-bottom-color: transparent;
  transition: color .18s ease, border-color .18s ease;
}

.cta-navbar .unifiednav__item:hover,
.cta-navbar .unifiednav__item:focus{
  color: #000;
  border-bottom-color: #000;
}

/* Active underline */
.cta-navbar .unifiednav__item.dmNavItemSelected{
  border-bottom-color: #000;
}

/* ---------- CALL NOW BUTTON ---------- */
.cta-navbar .cta-call{
  background: var(--cta-red);
  color: #fff !important;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: .3px;
  box-shadow: 0 10px 26px rgba(227,58,52,.35);
  white-space: nowrap;
  display: inline-block;
  transition: transform .06s ease;
}
.cta-call:active{ transform: translateY(1px); }

/* ---------- HAMBURGER ---------- */
/* --- HAMBURGER ICON (works with or without inner spans) --- */
.hamburger{
  display:none !important;
  width:28px;
  height:22px;
  padding:0;
  border:0;
  background:transparent;
  position:relative;
  cursor:pointer;
}

/* 3 bars */
.hamburger::before,
.hamburger::after,
.hamburger .bar{
  content:"";
  position:absolute;
  left:0; right:0;
  height:2px;
  background:#222;          /* change to #000 if you prefer */
  border-radius:2px;
}

/* middle bar */
.hamburger .bar{ top:50%; transform:translateY(-50%); }

/* top/bottom bars */
.hamburger::before{ top:0; }
.hamburger::after{ bottom:0; }

/* make sure it shows on mobile */
@media (max-width:900px){
  .hamburger{ display:inline-block !important; }
}



/* ---------- MOBILE DROPDOWN (ANIMATED) ---------- */
/* Use transform + visibility instead of display:none so it can animate */
.menu-mobile{
  position: absolute;
  top: var(--nav-height);
  left: 0; right: 0;
  background: #fff;
  box-shadow: 0 14px 30px rgba(0,0,0,.12);
  transform-origin: top;
  transform: scaleY(0);
  visibility: hidden;
  pointer-events: none;
  transition: transform .18s ease, visibility 0s linear .18s;
  will-change: transform;
}
.menu-mobile.open{
  transform: scaleY(1);
  visibility: visible;
  pointer-events: auto;
  transition: transform .18s ease, visibility 0s;
}
.menu-mobile ul{ list-style: none; margin: 0; padding: 10px 12px; }
.menu-mobile a{
  display: block;
  padding: 14px 12px;
  text-decoration: none;
  color: #222;
  border-radius: 8px;
}
.menu-mobile a:hover{ background: rgba(0,0,0,.05); }
.menu-mobile .mobile-cta .cta-call{ width: 100%; text-align: center; }

/* ---------- FOCUS VISIBLE (A11Y) ---------- */
.hamburger:focus-visible,
.menu-mobile a:focus-visible,
.menu-desktop a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1200px){
  /* free up room for center nav on mids */
  .cta-navbar .brand-text{ display: none !important; }
}

@media (max-width: 900px){
  :root{ --nav-height: 72px; }

  .menu-desktop{ display: none !important; }
  .cta-call{ display: none !important; }              /* desktop CTA hidden; mobile menu has one */
  .hamburger{ display: inline-flex !important; justify-self: end; align-items: center; }

  .cta-navbar .nav-inner{
    grid-template-columns: auto 1fr auto;            /* brand | spacer | burger */
  }
}

@media (min-width: 900px){
  /* Make sure mobile dropdown is off on desktop */
  .menu-mobile{
    visibility: hidden !important;
    pointer-events: none !important;
    transform: scaleY(0) !important;
  }
}

/* -------- ALIGNMENT STABILIZERS -------- */
.cta-navbar .unifiednav__container,
.cta-navbar .unifiednav__container ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cta-navbar .unifiednav__container li {
  list-style: none;
  margin: 0;
  padding: 0;
}
