/* ============================================================================
   GLOBAL HEADER — the homepage "floating pill" nav, shared on EVERY page.
   Source of truth = the homepage header (index.html inline #home-redesign-2026).
   This file re-scopes that exact design off `.home-luxury` onto the plain
   header component classes (.nav / .utility-bar / .mobile-nav / .nav-dropdown /
   .nav-mobile-projects) so it renders identically regardless of the page's body
   theme (.city-luxury, .blog-immersive, .about-immersive, etc.).

   Loaded LAST and uses !important on layout props so it wins over header-dark.css
   (which is !important) and the body-scoped `.city-luxury .nav` rules.

   Header-only — touches the top utility bar, the main nav pill, the desktop
   dropdowns' theme, and the mobile "Our Projects" pill link. Does NOT change the
   open mobile-menu overlay (.mobile-nav.open), page bodies, footers, or copy.
   The homepage keeps its own inline copy (the design origin); this file drives
   the other 190 pages to match it 1:1.
   ============================================================================ */
:root{
  --hr-gold:#FACC15;
  --hr-gold-deep:#D4A50F;
  --hr-gold-soft:#FFE07A;
  --hr-line:rgba(250,204,21,0.30);
  --hr-line-soft:rgba(250,204,21,0.16);
  --hr-ink:#0B0B0C;
  --hr-text:rgba(255,255,255,0.86);
}

/* ---------- 1) Hide the top utility strip (homepage has no utility bar) ----- */
.utility-bar{ display:none !important; }

/* ---------- 2) Floating pill nav — desktop --------------------------------- */
.nav{
  position:sticky !important; top:14px !important;
  background:transparent !important;
  border-bottom:none !important;
  padding:0 18px !important;
  z-index:60 !important;
  pointer-events:none !important;     /* the transparent gutters don't catch clicks */
}
.nav > .container{
  pointer-events:auto !important;     /* the pill itself is interactive */
  background:linear-gradient(180deg, rgba(14,14,16,0.78) 0%, rgba(8,8,10,0.78) 100%) !important;
  -webkit-backdrop-filter:saturate(160%) blur(20px); backdrop-filter:saturate(160%) blur(20px);
  border:1px solid var(--hr-line-soft) !important;
  border-radius:18px !important;
  box-shadow:
    0 1px 0 rgba(250,204,21,0.06) inset,
    0 24px 60px rgba(0,0,0,0.55),
    0 6px 18px rgba(0,0,0,0.35) !important;
  padding:10px 14px 10px 18px !important;
  max-width:min(1240px, calc(100% - 8px)) !important;
}
.nav > .container.row{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  flex-wrap:nowrap !important;
  min-height:64px !important;
  gap:24px !important;
}

/* Logo: cream chip + a thin gold divider after it */
.nav .brand{
  display:flex !important;
  align-items:center !important;
  padding-right:18px !important;
  margin-right:4px !important;
  position:relative !important;
}
.nav .brand::after{
  content:"" !important;
  position:absolute !important; right:0; top:14%; bottom:14%;
  width:1px !important;
  background:linear-gradient(180deg,
    rgba(250,204,21,0) 0%,
    rgba(250,204,21,0.42) 50%,
    rgba(250,204,21,0) 100%) !important;
}
.nav .brand img{
  height:40px !important;
  width:auto !important;
  background:#F6F2EA !important;
  padding:4px 9px !important;
  border-radius:9px !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 2px 8px rgba(0,0,0,0.28) !important;
}

/* Nav links — centered cluster, uppercase, premium tracking, gold hover */
.nav .links{
  display:flex !important;
  align-items:center !important;
  flex:1 !important;
  justify-content:center !important;
  gap:32px !important;
}
.nav .links a{
  color:var(--hr-text) !important;
  font-family:"Inter", system-ui, sans-serif !important;
  font-size:0.78rem !important;
  font-weight:600 !important;
  letter-spacing:0.14em !important;
  text-transform:uppercase !important;
  padding:8px 2px !important;
  position:relative !important;
}
.nav .links a:hover{ color:var(--hr-gold) !important; }
.nav .links a.has-menu::after{
  content:"\25BE";
  margin-left:6px;
  font-size:9px;
  opacity:0.7;
  display:inline-block;
  transform:translateY(-1px);
}

/* Right cluster: phone (subtle, gold icon), Free Quote (gold pill + arrow) */
.nav .right{ display:flex !important; align-items:center !important; gap:18px !important; }
.nav .right .phone-link{
  display:inline-flex !important;
  align-items:center !important;
  gap:8px !important;
  color:#fff !important;
  font-family:"Inter", system-ui, sans-serif !important;
  font-size:0.86rem !important;
  font-weight:700 !important;
  letter-spacing:0.02em !important;
  white-space:nowrap !important;
}
.nav .right .phone-link::before{
  content:"" !important;
  display:inline-block !important;
  width:20px; height:20px;
  background-color:var(--hr-gold) !important;
  -webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.86 19.86 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.86 19.86 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.37 1.9.72 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.35 1.85.59 2.81.72A2 2 0 0 1 22 16.92z'/></svg>") center / contain no-repeat;
          mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.86 19.86 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.86 19.86 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.37 1.9.72 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.35 1.85.59 2.81.72A2 2 0 0 1 22 16.92z'/></svg>") center / contain no-repeat;
}
.nav .right .phone-link:hover{ color:var(--hr-gold) !important; }
.nav .right .btn-primary{
  padding:13px 22px !important;
  font-size:0.78rem !important;
  font-weight:800 !important;
  letter-spacing:0.14em !important;
  text-transform:uppercase !important;
  background:linear-gradient(180deg, var(--hr-gold) 0%, var(--hr-gold-deep) 100%) !important;
  color:var(--hr-ink) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 8px 20px rgba(250,204,21,0.25) !important;
  border-radius:999px !important;
}
.nav .right .btn-primary::after{
  content:"\203A";
  display:inline-block;
  margin-left:8px;
  font-size:1.2em;
  line-height:0.6;
  font-weight:700;
  transform:translateY(1px);
}
.nav .right .btn-primary:hover{
  background:linear-gradient(180deg, #FFD843 0%, var(--hr-gold) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    0 12px 28px rgba(250,204,21,0.40) !important;
}

/* Desktop dropdown panels — retheme to match the pill (layout/grid stays from
   service-page.css / city-luxury.css canonical 5-column mega-menu). */
.nav .nav-dropdown .dropdown-menu{
  background:rgba(14,14,16,0.96) !important;
  -webkit-backdrop-filter:blur(18px); backdrop-filter:blur(18px);
  border:1px solid var(--hr-line-soft) !important;
  border-radius:14px !important;
  box-shadow:0 24px 60px rgba(0,0,0,0.6) !important;
  margin-top:10px !important;
}
/* Hover bridge — fills the transparent ~18px gap between the nav item and the
   dropdown panel (created by the panel's top offset + this margin-top) so the
   menu stays open while the cursor travels down to it. Purely a transparent
   hover surface (no background, no visual change); it is only interactive while
   the menu is shown, since it inherits the panel's visibility. This is the
   root-cause fix for the dropdown closing mid-transit on desktop. */
.nav .nav-dropdown .dropdown-menu::before{
  content:"";
  position:absolute;
  left:0; right:0;
  bottom:100%;          /* directly above the panel */
  height:22px;          /* spans the gap + a few px into the nav item (no seam) */
}

/* SERVICES dropdown only: its labels are the longest on the site (e.g.
   "Chimney Liner Installation") and overflow/overlap in 5 narrow uppercase
   columns. Give the FIRST dropdown (Services) 3 wide columns so every name fits
   on one line — same dark-glass panel, gold dots, spacing and uppercase type as
   Cities, just wider columns. Cities (the 2nd dropdown) is untouched. */
@media (min-width:1025px){
  .nav .links .nav-dropdown:first-of-type .dropdown-menu{
    grid-template-columns:repeat(3, minmax(0,1fr)) !important;
  }
}

/* ---------- 3) Floating pill nav — tablet / mobile (<=1024px) -------------- */
@media (max-width:1024px){
  .nav{ top:10px !important; padding:0 12px !important; }
  .nav > .container{
    padding:8px 10px 8px 12px !important;
    border-radius:16px !important;
    max-width:calc(100% - 4px) !important;
  }
  .nav > .container.row{ min-height:58px !important; gap:12px !important; row-gap:8px !important; }
  .nav .brand{ order:1 !important; padding-right:0 !important; margin-right:0 !important; }
  .nav .brand::after{ display:none !important; }
  .nav .brand img{ height:38px !important; padding:4px 8px !important; border-radius:8px !important; }
  /* The inline link row is replaced by the hamburger menu on mobile. */
  .nav .links{ display:none !important; }
  .nav .right{ order:3 !important; gap:8px !important; }
  .nav .right .phone-link{ display:none !important; }
  .nav .right .btn-primary{
    padding:11px 16px !important;
    font-size:0.72rem !important;
    letter-spacing:0.12em !important;
  }
  .nav .hamburger{
    background:rgba(255,255,255,0.08) !important;
    border-radius:10px !important;
    width:42px !important; height:42px !important;
  }
}

@media (max-width:560px){
  .nav{ top:8px !important; padding:0 8px !important; }
  .nav > .container{ padding:6px 8px 6px 10px !important; border-radius:14px !important; }
  .nav .brand img{ height:34px !important; padding:3px 7px !important; }
  .nav .right .btn-primary{ padding:10px 14px !important; font-size:0.68rem !important; }
  .nav .right .btn-primary::after{ display:none !important; }   /* arrow off on tiny screens */
}

/* ---------- 4) Mobile-only "Our Projects" pill link ------------------------ */
/* Fills the space between the logo and Free Quote inside the floating pill.
   Hidden on desktop (>1024px), where the full nav already has Projects. */
.nav .nav-mobile-projects{ display:none; }
@media (max-width:1024px){
  .nav .nav-mobile-projects{
    display:inline-flex !important; align-items:center !important; flex:0 0 auto !important;
    order:2 !important;              /* logo (1) · Our Projects (2) · right cluster (3) */
    padding:8px 14px !important;
    font-family:'Inter',sans-serif !important; font-size:0.78rem !important; font-weight:600 !important; letter-spacing:0.02em !important;
    color:var(--hr-gold-soft) !important; text-decoration:none !important; white-space:nowrap !important;
    border:1px solid var(--hr-line) !important; border-radius:999px !important;
    background:rgba(255,255,255,0.05) !important;
    -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
    -webkit-tap-highlight-color:transparent;
    transition:background .2s ease, border-color .2s ease, color .2s ease;
  }
  .nav .nav-mobile-projects:hover,
  .nav .nav-mobile-projects:focus-visible{
    background:rgba(250,204,21,0.12) !important; border-color:var(--hr-line-soft) !important; color:#fff !important;
  }
}
@media (max-width:560px){
  .nav .nav-mobile-projects{ padding:7px 12px !important; font-size:0.72rem !important; }
}

/* ---------- 5) Smooth-in animation for the floating pill on load ----------- */
@keyframes hr-nav-in{
  from{ opacity:0; transform:translateY(-6px); }
  to  { opacity:1; transform:translateY(0); }
}
.nav > .container{ animation:hr-nav-in 600ms cubic-bezier(.2,.7,.2,1) both; }
@media (prefers-reduced-motion: reduce){
  .nav > .container{ animation:none !important; }
}
