/* Shared site header (build_header.py, 11-05): big top menu + flag language links (flag + language name in its own
   language). Desktop >= 1100px: inline menu with dropdowns. Below: hamburger -> full-height panel. */
header.site.hdr{position:sticky; top:0; z-index:40; background:var(--navy,#0F1E3D); border-bottom:1px solid rgba(255,255,255,.1);
  font-family:var(--font-body,'Libre Franklin',system-ui,sans-serif);}
html.hdr-open header.site.hdr{z-index:60;}
.hdr-bar{display:flex; align-items:center; gap:10px; max-width:1200px; margin:0 auto; padding:8px 16px; min-height:60px; box-sizing:border-box;}
.hdr-brand{display:flex; align-items:center; flex:none; background:#fff; border-radius:12px; padding:4px 10px; min-height:44px; text-decoration:none;}
.hdr-brand img{height:34px; width:auto; max-width:84px; object-fit:contain; display:block;}
.hdr-actions{display:flex; align-items:center; gap:8px; margin-left:auto;}
.hdr-vh{position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; color:inherit;}
#hdr-nav-l{color:#fff;}

/* language (2026-11-10, English-first): flag switch "EN [switch] ES" = ONE link to the other language (build_header.switch).
   The white track shows the CURRENT language's flag, and the navy knob sits on that language's side (data-on="en|es").
   On click the knob slides ~150 ms before the link is followed (header JS); no slide with reduced motion. */
.hdr-lang{display:flex; align-items:center;}
.hdr-switch{display:inline-flex; align-items:center; gap:7px; min-height:44px; padding:0 4px; color:#fff; text-decoration:none;
  font-weight:700; font-size:.85rem; letter-spacing:.06em; border-radius:999px; -webkit-tap-highlight-color:transparent;}
.hdr-switch:focus-visible{outline:3px solid #FFD166; outline-offset:3px;}
.hdr-sw-lbl{opacity:.72; transition:opacity .15s;}
.hdr-switch[data-on="en"] .hdr-sw-en, .hdr-switch[data-on="es"] .hdr-sw-es{opacity:1;}
.hdr-sw-track{position:relative; display:inline-block; flex:none; width:66px; height:32px; border-radius:999px; background:#fff;
  box-shadow:inset 0 0 0 1px rgba(15,30,61,.25);}
.hdr-switch:hover .hdr-sw-track{box-shadow:inset 0 0 0 2px rgba(15,30,61,.45);}
.hdr-sw-flag{position:absolute; top:6px; width:30px; height:20px; border-radius:3px; overflow:hidden;
  box-shadow:0 0 0 1px rgba(15,30,61,.3); transition:opacity .15s;}
.hdr-sw-flag svg{display:block; width:100%; height:100%;}
.hdr-sw-us{right:5px;}
.hdr-sw-mx{left:5px;}
.hdr-switch[data-on="en"] .hdr-sw-mx, .hdr-switch[data-on="es"] .hdr-sw-us{opacity:0;}
.hdr-sw-knob{position:absolute; top:3px; left:3px; width:26px; height:26px; border-radius:50%; background:var(--navy,#0F1E3D);
  box-shadow:0 1px 3px rgba(0,0,0,.35); transition:left .15s ease;}
.hdr-switch[data-on="es"] .hdr-sw-knob{left:37px;}
@media (prefers-reduced-motion: reduce){.hdr-sw-knob, .hdr-sw-flag, .hdr-sw-lbl{transition:none;}}
/* older flag links (pages cached before 11-10) */
.hdr-flag{display:inline-flex; align-items:center; gap:8px; min-height:44px; min-width:44px; justify-content:center; padding:0 8px;
  border-radius:999px; color:#fff; text-decoration:none; font-weight:700; font-size:.9rem; box-sizing:border-box;}
.hdr-flag svg{width:28px; height:19px; flex:none; border-radius:3px; box-shadow:0 0 0 1px rgba(255,255,255,.55);}
.hdr-flag.active{background:#fff; color:var(--navy,#0F1E3D);}
.hdr-flag.active svg{box-shadow:0 0 0 1px rgba(15,30,61,.35);}
.hdr-flag:not(.active):hover{background:rgba(255,255,255,.18);}
.hdr-flag-txt{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}
@media(min-width:1360px){.hdr-flag-txt{position:static; width:auto; height:auto; overflow:visible; clip:auto;} .hdr-flag{padding:0 12px;}}

.hdr-phone{display:inline-flex; align-items:center; gap:8px; min-height:44px; min-width:44px; justify-content:center; padding:0 12px;
  border-radius:999px; background:var(--orange,#FF7A00); color:var(--navy,#0F1E3D); font-weight:800; text-decoration:none; box-sizing:border-box;}
.hdr-phone:hover{background:var(--orange-deep,#E66D00);}
.hdr-phone svg{width:20px; height:20px; flex:none;}
.hdr-phone-num{display:none; white-space:nowrap;}
@media(min-width:600px){.hdr-phone-num{display:inline;}}

.hdr-burger{display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:12px; border:1px solid rgba(255,255,255,.35);
  background:transparent; color:#fff; cursor:pointer; padding:0;}
.hdr-burger svg{width:24px; height:24px;}
.hdr-burger .hdr-x{display:none;}
.hdr-burger[aria-expanded="true"] .hdr-bars{display:none;}
.hdr-burger[aria-expanded="true"] .hdr-x{display:block;}

/* menu (phone/tablet = panel) */
.hdr-nav{display:none;}
.hdr-nav.open{display:block; position:fixed; left:0; right:0; top:61px; bottom:0; overflow-y:auto; background:var(--navy,#0F1E3D);
  padding:16px 16px 120px; border-top:1px solid rgba(255,255,255,.12); box-sizing:border-box;}
.hdr-menu{list-style:none; margin:0; padding:0;}
.hdr-menu > li{border-bottom:1px solid rgba(255,255,255,.12);}
.hdr-menu a, .hdr-dd-btn{display:flex; align-items:center; justify-content:space-between; width:100%; min-height:52px; padding:0 4px; box-sizing:border-box;
  color:#fff; text-decoration:none; font:700 1.05rem var(--font-body,'Libre Franklin',system-ui,sans-serif); background:none; border:0; cursor:pointer; text-align:left;}
.hdr-dd-btn svg{width:18px; height:18px; transition:transform .15s;}
.hdr-dd-btn[aria-expanded="true"] svg{transform:rotate(180deg);}
.hdr-sub{display:none; list-style:none; margin:0 0 8px; padding:0 0 0 12px;}
.hdr-dd-btn[aria-expanded="true"] + .hdr-sub{display:block;}
.hdr-sub a{min-height:46px; font-weight:600; font-size:1rem; color:#e3e9f6;}
.hdr-menu a[aria-current="page"]{color:var(--orange-soft,#FF9F43);}
.hdr-panel-top{display:flex; flex-wrap:wrap; gap:10px; margin-bottom:12px;}
.hdr-panel-top .hdr-flag{background:rgba(255,255,255,.12); padding:0 16px;}
.hdr-panel-top .hdr-flag.active{background:#fff;}
.hdr-panel-top .hdr-flag-txt{position:static; width:auto; height:auto; overflow:visible; clip:auto;}
.hdr-panel-call{display:flex !important; justify-content:center !important; align-items:center; min-height:56px; margin-top:18px; border-radius:14px;
  text-decoration:none !important; font-size:1.1rem;
  background:var(--orange,#FF7A00) !important; color:var(--navy,#0F1E3D) !important; font-weight:800 !important;}
html.hdr-open, html.hdr-open body{overflow:hidden;}
header.site.hdr :focus-visible{outline:3px solid var(--orange,#FF7A00); outline-offset:2px;}

/* desktop: inline menu with dropdowns */
@media(min-width:1100px){
  .hdr-burger{display:none;}
  .hdr-nav, .hdr-nav.open{display:block; position:static; padding:0; border:0; overflow:visible; background:none; margin:0 auto;}
  .hdr-panel-top, .hdr-panel-call{display:none !important;}
  .hdr-menu{display:flex; align-items:center; gap:4px;}
  .hdr-menu > li{border:0; position:relative;}
  .hdr-menu > li > a, .hdr-dd-btn{min-height:44px; padding:0 10px; font-size:.95rem; font-weight:600; gap:4px; border-radius:10px; width:auto; justify-content:center;}
  .hdr-menu > li > a:hover, .hdr-dd-btn:hover{background:rgba(255,255,255,.1);}
  .hdr-dd-btn svg{width:14px; height:14px;}
  .hdr-sub{position:absolute; top:calc(100% + 6px); left:0; min-width:240px; padding:8px; margin:0; background:#fff; border-radius:14px;
    box-shadow:0 18px 40px -16px rgba(0,0,0,.55); z-index:5;}
  .hdr-sub a{color:var(--navy,#0F1E3D); min-height:44px; padding:0 12px; border-radius:10px; font-size:.95rem;}
  .hdr-sub a:hover{background:#f3f5fa;}
  .hdr-sub a[aria-current="page"]{color:var(--red,#C8102E);}
  .hdr-sub :focus-visible{outline-color:var(--navy,#0F1E3D);}
  .hdr-actions{margin-left:0;}
}
@media(max-width:350px){.hdr-bar{gap:6px; padding:8px;} .hdr-brand{padding:4px 6px;} .hdr-brand img{max-width:64px;} .hdr-actions{gap:4px;}}
@media(prefers-reduced-motion:reduce){.hdr-dd-btn svg{transition:none;}}
