/* Extracted from header.php style block 1. */
.legalia-header-scope{--lh-bg:#030a08;--lh-panel:#07110e;--lh-gold:#d4af37;--lh-gold-2:#f5e2a2;--lh-green:#1fb383;--lh-text:#f7fbf9;--lh-muted:rgba(255,255,255,.68);--lh-border:rgba(255,255,255,.12);position:relative;z-index:10000;font-family:'Inter',Arial,Helvetica,sans-serif}.legalia-header-scope *,.legalia-header-scope *::before,.legalia-header-scope *::after{box-sizing:border-box}.legalia-header-scope .skip-link{position:absolute;top:-52px;left:16px;z-index:10050;padding:10px 14px;border-radius:12px;background:#f7fbf9;color:#030a08;font-weight:900;text-decoration:none;box-shadow:0 18px 45px rgba(0,0,0,.35);transition:top .2s ease}.legalia-header-scope .skip-link:focus{top:16px}.legalia-header-scope .site-header{position:sticky;top:0;z-index:10000;display:flex;align-items:center;justify-content:space-between;gap:18px;width:100%;min-height:72px;padding:12px clamp(18px,4vw,54px);background:radial-gradient(circle at 18% 0%,rgba(31,179,131,.15),transparent 30%),linear-gradient(180deg,rgba(7,17,14,.97) 0%,rgba(3,10,8,.97) 100%);border-bottom:1px solid var(--lh-border);box-shadow:none;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);color:var(--lh-text);flex-wrap:nowrap}.legalia-header-scope .brand{display:inline-flex;flex-direction:column;gap:3px;flex:0 0 auto;min-width:188px;color:var(--lh-text)!important;text-decoration:none!important;line-height:1.02}.legalia-header-scope .brand-main{font-size:clamp(20px,1.7vw,26px);font-weight:950;letter-spacing:-.045em;white-space:nowrap}.legalia-header-scope .brand-main strong{color:var(--lh-gold)}.legalia-header-scope .brand-sub{color:var(--lh-muted);font-size:9px;font-weight:850;letter-spacing:.11em;text-transform:uppercase;white-space:nowrap}.legalia-header-scope .main-nav{display:flex;align-items:center;justify-content:center;gap:4px;flex:1 1 auto;min-width:0}.legalia-header-scope .nav-link,.legalia-header-scope .nav-dropdown-toggle{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:9px 12px;border:0;border-radius:999px;background:transparent;color:rgba(255,255,255,.78)!important;font:inherit;font-size:13.5px;font-weight:850;line-height:1;text-decoration:none!important;white-space:nowrap;cursor:pointer;transition:background .2s ease,color .2s ease,transform .2s ease}.legalia-header-scope .nav-link:hover,.legalia-header-scope .nav-link:focus-visible,.legalia-header-scope .nav-link.is-current,.legalia-header-scope .nav-dropdown-toggle:hover,.legalia-header-scope .nav-dropdown-toggle:focus-visible,.legalia-header-scope .nav-item.is-current>.nav-dropdown-toggle,.legalia-header-scope .nav-item.open>.nav-dropdown-toggle{background:rgba(255,255,255,.08);color:#fff!important;transform:translateY(-1px);outline:none}.legalia-header-scope .nav-link.is-current::after,.legalia-header-scope .nav-item.is-current>.nav-dropdown-toggle::before{content:"";position:absolute;left:17px;right:17px;bottom:6px;height:2px;border-radius:999px;background:linear-gradient(90deg,var(--lh-gold),var(--lh-gold-2))}.legalia-header-scope .nav-dropdown-toggle::after{content:"";width:7px;height:7px;margin-left:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform .18s ease}.legalia-header-scope .nav-item.open>.nav-dropdown-toggle::after{transform:translateY(1px) rotate(225deg)}.legalia-header-scope .nav-item{position:relative;display:inline-flex}.legalia-header-scope .nav-flyout{position:absolute;top:100%;left:50%;width:min(88vw,360px);padding-top:18px;transform:translateX(-50%) translateY(8px);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s ease,transform .18s ease,visibility .18s ease}.legalia-header-scope .nav-item.open .nav-flyout,.legalia-header-scope .nav-item:hover .nav-flyout,.legalia-header-scope .nav-item:focus-within .nav-flyout{opacity:1;visibility:visible;pointer-events:auto;transform:translateX(-50%) translateY(0)}.legalia-header-scope .nav-flyout::before{content:"";position:absolute;top:0;left:0;right:0;height:20px;background:transparent}.legalia-header-scope .nav-flyout-box{padding:12px;border-radius:20px;border:1px solid rgba(255,255,255,.12);background:linear-gradient(180deg,rgba(7,16,13,.985) 0%,rgba(3,10,8,.985) 100%);box-shadow:0 24px 70px rgba(0,0,0,.48);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}.legalia-header-scope .nav-flyout-title{margin:0 0 8px;padding:0 2px;color:var(--lh-gold);font-size:11px;font-weight:950;letter-spacing:.14em;text-transform:uppercase}.legalia-header-scope .nav-flyout-grid{display:grid;grid-template-columns:1fr;gap:2px}.legalia-header-scope .nav-flyout a{display:flex;align-items:flex-start;gap:10px;width:100%;padding:10px 11px;border-radius:14px;color:rgba(255,255,255,.86)!important;text-decoration:none!important;font-size:13.5px;font-weight:820;line-height:1.25;transition:background .18s ease,color .18s ease,transform .18s ease}.legalia-header-scope .nav-flyout a::before{content:"";flex:0 0 auto;width:7px;height:7px;margin-top:4px;border-radius:99px;background:linear-gradient(135deg,var(--lh-gold),var(--lh-green));box-shadow:0 0 0 4px rgba(212,175,55,.08)}.legalia-header-scope .nav-flyout a:hover,.legalia-header-scope .nav-flyout a:focus-visible{background:rgba(255,255,255,.08);color:#fff!important;transform:translateX(2px);outline:none}.legalia-header-scope .nav-flyout-note{display:block;margin-top:3px;color:rgba(255,255,255,.50);font-size:12px;font-weight:650;line-height:1.35}.legalia-header-scope .header-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex:0 0 auto}.legalia-header-scope .phone,.legalia-header-scope .header-wa,.legalia-header-scope .header-cta{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:9px 13px;border-radius:999px;font-size:13.5px;font-weight:950;text-decoration:none!important;white-space:nowrap}.legalia-header-scope .phone{color:var(--lh-gold-2)!important;border:1px solid rgba(212,175,55,.35);background:rgba(212,175,55,.08)}.legalia-header-scope .header-wa{color:#dffdf1!important;border:1px solid rgba(31,179,131,.42);background:rgba(31,179,131,.12);box-shadow:0 10px 26px rgba(31,179,131,.12);transition:transform .2s ease,box-shadow .2s ease,background .2s ease}.legalia-header-scope .header-wa:hover,.legalia-header-scope .header-wa:focus-visible{transform:translateY(-1px);background:rgba(31,179,131,.18);box-shadow:0 14px 34px rgba(31,179,131,.18);outline:none}.legalia-header-scope .header-cta{color:#03100c!important;background:linear-gradient(135deg,var(--lh-gold) 0%,var(--lh-gold-2) 52%,var(--lh-gold) 100%);box-shadow:0 12px 32px rgba(212,175,55,.24);transition:transform .2s ease,box-shadow .2s ease}.legalia-header-scope .header-cta:hover,.legalia-header-scope .header-cta:focus-visible{transform:translateY(-1px);box-shadow:0 16px 42px rgba(212,175,55,.34);outline:none}.legalia-header-scope .mobile-nav-toggle{display:none;width:46px;height:46px;margin-left:auto;border:1px solid rgba(255,255,255,.16);border-radius:15px;background:rgba(255,255,255,.08);color:#fff;cursor:pointer}.legalia-header-scope .mobile-nav-toggle span,.legalia-header-scope .mobile-nav-toggle::before,.legalia-header-scope .mobile-nav-toggle::after{content:"";display:block;width:19px;height:2px;margin:4px auto;border-radius:99px;background:currentColor;transition:transform .2s ease,opacity .2s ease}.legalia-header-scope .site-header.nav-open .mobile-nav-toggle::before{transform:translateY(6px) rotate(45deg)}.legalia-header-scope .site-header.nav-open .mobile-nav-toggle span{opacity:0}.legalia-header-scope .site-header.nav-open .mobile-nav-toggle::after{transform:translateY(-6px) rotate(-45deg)}@media(max-width:1320px){.legalia-header-scope .phone{display:none}.legalia-header-scope .brand{min-width:176px}.legalia-header-scope .nav-link,.legalia-header-scope .nav-dropdown-toggle{padding-left:10px;padding-right:10px;font-size:13px}}@media(max-width:1120px){.legalia-header-scope .header-wa{display:none}.legalia-header-scope .site-header{gap:12px;padding-left:18px;padding-right:18px}.legalia-header-scope .brand-sub{display:none}}@media(max-width:980px){.legalia-header-scope .site-header{flex-wrap:wrap;padding:12px 16px;min-height:70px}.legalia-header-scope .brand{min-width:0;max-width:calc(100% - 58px)}.legalia-header-scope .brand-sub{display:block;font-size:8.7px;letter-spacing:.08em}.legalia-header-scope .mobile-nav-toggle{display:block}.legalia-header-scope .main-nav,.legalia-header-scope .header-actions{display:none;flex:0 0 100%;width:100%}.legalia-header-scope .site-header.nav-open .main-nav,.legalia-header-scope .site-header.nav-open .header-actions{display:flex}.legalia-header-scope .main-nav{order:3;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:7px;padding-top:12px;border-top:1px solid rgba(255,255,255,.12)}.legalia-header-scope .nav-link,.legalia-header-scope .nav-dropdown-toggle{justify-content:space-between;width:100%;min-height:46px;padding:0 14px;border-radius:15px;background:rgba(255,255,255,.08);font-size:14px}.legalia-header-scope .nav-link.is-current::after,.legalia-header-scope .nav-item.is-current>.nav-dropdown-toggle::before{display:none}.legalia-header-scope .nav-item{display:block;width:100%}.legalia-header-scope .nav-flyout{position:static;width:100%;transform:none;opacity:1;visibility:visible;pointer-events:auto;display:none;padding-top:7px;transition:none}.legalia-header-scope .nav-item.open .nav-flyout,.legalia-header-scope .nav-item:focus-within .nav-flyout{display:block;transform:none}.legalia-header-scope .nav-flyout-box{border-radius:16px;box-shadow:none;background:rgba(3,10,8,.48)}.legalia-header-scope .header-actions{order:4;flex-direction:column;align-items:stretch;gap:9px;padding-top:10px}.legalia-header-scope .header-actions .phone,.legalia-header-scope .header-actions .header-wa{display:flex}.legalia-header-scope .header-wa,.legalia-header-scope .header-cta{width:100%;min-height:46px}}@media(max-width:420px){.legalia-header-scope .brand-main{font-size:20px}.legalia-header-scope .brand-sub{max-width:250px;white-space:normal;line-height:1.25}.legalia-header-scope .nav-flyout a{font-size:13px}}


  /* LOGO REAL LEGALIA - no sustituir por texto */
  .legalia-header-scope .brand.brand-logo{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex-direction:row!important;
    gap:0!important;
    flex:0 0 auto!important;
    min-width:0!important;
    width:clamp(104px,10vw,146px)!important;
    max-width:146px!important;
    min-height:42px!important;
    padding:4px 8px!important;
    line-height:1!important;
    border-radius:999px!important;
    background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(242,247,245,.88))!important;
    border:1px solid rgba(245,226,162,.38)!important;
    box-shadow:0 10px 26px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.90)!important;
    transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease,background .2s ease!important;
  }
  .legalia-header-scope .brand.brand-logo:hover,
  .legalia-header-scope .brand.brand-logo:focus-visible{
    transform:translateY(-1px)!important;
    border-color:rgba(245,226,162,.70)!important;
    background:linear-gradient(180deg,rgba(255,255,255,1),rgba(248,251,250,.94))!important;
    box-shadow:0 14px 34px rgba(0,0,0,.26),0 0 0 4px rgba(212,175,55,.08), inset 0 1px 0 rgba(255,255,255,.96)!important;
    outline:none!important;
  }
  .legalia-header-scope .brand-logo-img{
    display:block!important;
    width:100%!important;
    height:auto!important;
    max-height:22px!important;
    object-fit:contain!important;
    object-position:center center!important;
  }
  @media(max-width:980px){
    .legalia-header-scope .brand.brand-logo{
      width:clamp(100px,29vw,132px)!important;
      max-width:132px!important;
      min-height:40px!important;
      padding:4px 7px!important;
    }
    .legalia-header-scope .brand-logo-img{max-height:21px!important;}
  }
  @media(max-width:420px){
    .legalia-header-scope .brand.brand-logo{
      width:108px!important;
      max-width:108px!important;
      min-height:38px!important;
      padding:4px 7px!important;
    }
    .legalia-header-scope .brand-logo-img{max-height:19px!important;}
  }


  /* AJUSTE DEFINITIVO HEADER RESPONSIVE DESKTOP
     - El logo ya actua como Inicio, por eso se oculta el enlace Inicio en escritorio.
     - En escritorio se recupera el telefono como enlace compacto.
     - WhatsApp queda dentro del menu movil para evitar saltos a dos lineas. */
  @media(min-width:981px){
    .legalia-header-scope .site-header{
      flex-wrap:nowrap!important;
      gap:12px!important;
      min-height:66px!important;
      padding-top:10px!important;
      padding-bottom:10px!important;
      padding-left:clamp(16px,3vw,42px)!important;
      padding-right:clamp(16px,3vw,42px)!important;
      overflow:visible!important;
    }
    .legalia-header-scope .brand.brand-logo{
      width:clamp(104px,9vw,130px)!important;
      max-width:130px!important;
      min-height:40px!important;
      padding:4px 7px!important;
    }
    .legalia-header-scope .brand-logo-img{
      max-height:21px!important;
    }
    .legalia-header-scope .main-nav{
      flex:1 1 auto!important;
      min-width:0!important;
      justify-content:center!important;
      gap:2px!important;
      overflow:visible!important;
    }
    .legalia-header-scope .nav-home{
      display:none!important;
    }
    .legalia-header-scope .nav-link,
    .legalia-header-scope .nav-dropdown-toggle{
      min-height:38px!important;
      padding:8px 9px!important;
      font-size:12.9px!important;
      letter-spacing:-.01em!important;
    }
    .legalia-header-scope .nav-dropdown-toggle::after{
      width:6px!important;
      height:6px!important;
      margin-left:6px!important;
    }
    .legalia-header-scope .header-actions{
      flex:0 0 auto!important;
      gap:6px!important;
      min-width:max-content!important;
    }
    .legalia-header-scope .header-actions .phone{
      display:inline-flex!important;
      min-height:38px!important;
      padding:8px 10px!important;
      font-size:12.8px!important;
    }
    .legalia-header-scope .header-actions .header-wa{
      display:none!important;
    }
    .legalia-header-scope .header-cta{
      min-height:38px!important;
      padding:8px 12px!important;
      font-size:12.8px!important;
    }
  }
  @media(max-width:980px){
    .legalia-header-scope .nav-home{
      display:flex!important;
    }
    .legalia-header-scope .header-actions .phone,
    .legalia-header-scope .header-actions .header-wa{
      display:flex!important;
    }
  }
  @media(min-width:981px) and (max-width:1100px){
    .legalia-header-scope .nav-link,
    .legalia-header-scope .nav-dropdown-toggle{
      padding-left:7px!important;
      padding-right:7px!important;
      font-size:12.5px!important;
    }
    .legalia-header-scope .header-actions .phone{
      padding-left:8px!important;
      padding-right:8px!important;
      font-size:12.2px!important;
    }
    .legalia-header-scope .header-cta{
      padding-left:10px!important;
      padding-right:10px!important;
      font-size:12.2px!important;
    }
  }

/* Header gestionado por grupos - 2026-05-10 */
.legalia-header-scope .nav-flyout-section{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:6px 0 8px;
  border-top:1px solid rgba(255,255,255,.08);
}
.legalia-header-scope .nav-flyout-section:first-child{border-top:0;padding-top:0;}
.legalia-header-scope .nav-flyout-heading{
  margin:4px 2px 5px;
  color:rgba(245,226,162,.88);
  font-size:10.5px;
  font-weight:950;
  letter-spacing:.13em;
  text-transform:uppercase;
}
@media(min-width:981px){
  .legalia-header-scope .nav-item--zones .nav-flyout,
  .legalia-header-scope .nav-item--services .nav-flyout{
    width:min(92vw,430px)!important;
  }
  .legalia-header-scope .nav-item--zones .nav-flyout-grid,
  .legalia-header-scope .nav-item--services .nav-flyout-grid,
  .legalia-header-scope .nav-item--types .nav-flyout-grid,
  .legalia-header-scope .nav-item--resources .nav-flyout-grid{
    gap:4px!important;
  }
}
@media(max-width:980px){
  .legalia-header-scope .nav-flyout-section{
    padding:8px 0;
  }
  .legalia-header-scope .nav-flyout-heading{
    margin:5px 8px 6px;
  }
}

/* Ajuste mobile compacto header - 2026-05-10
   Evita que CSS global de la home convierta el header en columna. */
@media(max-width:980px){
  .legalia-header-scope .site-header{
    position:sticky!important;
    top:0!important;
    z-index:10000!important;
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    min-height:58px!important;
    padding:8px 16px!important;
    background:radial-gradient(circle at 18% 0%,rgba(31,179,131,.12),transparent 30%),linear-gradient(180deg,rgba(7,17,14,.98) 0%,rgba(3,10,8,.98) 100%)!important;
  }
  .legalia-header-scope .brand.brand-logo{
    order:1!important;
    margin:0!important;
    width:112px!important;
    max-width:112px!important;
    min-height:34px!important;
    padding:3px 8px!important;
    align-self:center!important;
  }
  .legalia-header-scope .brand-logo-img{
    max-height:18px!important;
  }
  .legalia-header-scope .mobile-nav-toggle{
    order:2!important;
    display:block!important;
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    margin:0!important;
    border-radius:14px!important;
    align-self:center!important;
  }
  .legalia-header-scope .main-nav{
    order:3!important;
    flex:0 0 100%!important;
    width:100%!important;
    margin-top:6px!important;
    padding-top:10px!important;
  }
  .legalia-header-scope .header-actions{
    order:4!important;
    flex:0 0 100%!important;
    width:100%!important;
  }
}
@media(max-width:420px){
  .legalia-header-scope .site-header{
    min-height:54px!important;
    padding:7px 14px!important;
  }
  .legalia-header-scope .brand.brand-logo{
    width:104px!important;
    max-width:104px!important;
    min-height:32px!important;
    padding:3px 7px!important;
  }
  .legalia-header-scope .brand-logo-img{
    max-height:17px!important;
  }
  .legalia-header-scope .mobile-nav-toggle{
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
  }
}


/* Cabecera Legalia: regla única limpia */
html body .legalia-header-scope,
html body .legalia-header-scope::before,
html body .legalia-header-scope::after{
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
}
html body .legalia-header-scope > header.site-header,
html body header.site-header[data-legalia-site-header]{
  background:rgba(3,10,8,.30)!important;
  background-color:rgba(3,10,8,.30)!important;
  background-image:none!important;
  border-bottom:1px solid rgba(255,255,255,.06)!important;
  box-shadow:none!important;
  backdrop-filter:blur(10px)!important;
  -webkit-backdrop-filter:blur(10px)!important;
  transition:background-color .25s ease,box-shadow .25s ease,backdrop-filter .25s ease,border-color .25s ease!important;
}
html body .legalia-header-scope > header.site-header.is-scrolled,
html body .legalia-header-scope > header.site-header.nav-open,
html body header.site-header[data-legalia-site-header].is-scrolled,
html body header.site-header[data-legalia-site-header].nav-open{
  background:rgba(3,10,8,.88)!important;
  background-color:rgba(3,10,8,.88)!important;
  background-image:none!important;
  border-bottom:1px solid rgba(255,255,255,.10)!important;
  box-shadow:0 18px 45px rgba(0,0,0,.28)!important;
  backdrop-filter:blur(18px)!important;
  -webkit-backdrop-filter:blur(18px)!important;
}
html body .legalia-header-scope > header.site-header::before,
html body .legalia-header-scope > header.site-header::after,
html body header.site-header[data-legalia-site-header]::before,
html body header.site-header[data-legalia-site-header]::after{
  content:none!important;
  display:none!important;
  opacity:0!important;
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
}


/* DARK HEADER FIX 2026-05-14
   Fuerza el header oscuro para que no aparezca una franja clara en paginas nuevas. */
html,body{margin:0!important;background:#030a08!important;}
.legalia-header-scope{background:#030a08!important;}
.legalia-header-scope .site-header{
  background:radial-gradient(circle at 18% 0%,rgba(31,179,131,.16),transparent 32%),linear-gradient(180deg,rgba(7,17,14,.99) 0%,rgba(3,10,8,.99) 100%)!important;
  border-bottom:1px solid rgba(245,226,162,.13)!important;
  box-shadow:0 14px 38px rgba(0,0,0,.22)!important;
  color:#f7fbf9!important;
}
.legalia-header-scope .nav-link,
.legalia-header-scope .nav-dropdown-toggle{
  color:rgba(247,251,249,.80)!important;
}
.legalia-header-scope .nav-link:hover,
.legalia-header-scope .nav-dropdown-toggle:hover,
.legalia-header-scope .nav-item.is-current>.nav-dropdown-toggle,
.legalia-header-scope .nav-item.open>.nav-dropdown-toggle{
  color:#fff!important;
  background:rgba(255,255,255,.08)!important;
}
