/* =====================================
   VAR ALTURA HEADER (RESPONSIVE)
   Controla el spacer
===================================== */
:root{
  --header-height: 72px; /* desktop */
}

/* =========================================================
   HEADER FIJO + SPACER
========================================================= */
#siteHeader.site-header{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;

  width: 100%;
  background: #ffffff;

  border-bottom: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);

  will-change: transform;
  transform: translateY(0);
  transition: transform 260ms ease;
}

/* Spacer para que no se coma el hero */
.header-spacer{
  height: var(--header-height);
}

/* =========================================================
   BASE
========================================================= */
.site-header,
.site-header *{
  box-sizing: border-box;
}

.site-header__inner{
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px;

  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  column-gap: 22px;
}

/* =========================================================
   LOGO
========================================================= */
.site-header__brand{
  display: flex;
  align-items: center;
  text-decoration: none;
}
.site-header__brand img{
  height: 44px;
  width: auto;
  display: block;
}

/* =========================================================
   NAV DESKTOP
========================================================= */
.site-header__nav{
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 30px;
  white-space: nowrap;
}

/* LINKS DESKTOP */
.site-header__link{
  color: #011077;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.1px;
  opacity: .92;
  padding: 8px 0;
  position: relative;
  transition: opacity .18s ease, transform .18s ease, color .18s ease;
}
.site-header__link:hover{
  opacity: 1;
  color: #000;
  transform: translateY(-1px);
}
.site-header__link::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0%;
  height: 2px;
  background: #011077;
  border-radius: 999px;
  transition: width .22s ease;
}
.site-header__link:hover::after{
  width: 100%;
}

/* =========================================================
   SOCIAL DESKTOP
========================================================= */
.site-header__social{
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
}
.site-header__icon{
  display: flex;
  line-height: 0;
  text-decoration: none;
  opacity: .92;
  transition: opacity .18s ease, transform .18s ease;
}
.site-header__icon:hover{
  opacity: 1;
  transform: translateY(-1px);
}
.site-header__icon img{
  width: 20px;
  height: 20px;
  display: block;
}

/* =========================================================
   HAMBURGER
========================================================= */
.hamburger-fx{
  display: none;
  justify-self: end;
  position: relative;
}

.hamburger-fx__btn{
  width: 56px;
  height: 56px;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 2100;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease;
}
.hamburger-fx__btn:active{
  transform: scale(.94);
}

.hamburger-fx__btn::before{
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 18px;
  background: rgba(1,16,119,.06);
  box-shadow: 0 12px 24px rgba(0,0,0,.10);
  opacity: 0;
  transition: opacity .18s ease;
}
@media (hover:hover){
  .hamburger-fx__btn:hover::before{
    opacity: 1;
  }
}

/* líneas */
.fx-line{
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 2.4px;
  background: #011077;
  border-radius: 999px;
  transform: translate(-50%,-50%);
  transition: transform 520ms cubic-bezier(.16,1,.3,1), opacity 200ms ease;
}
.fx-line--1{ transform: translate(-50%,calc(-50% - 8px)); }
.fx-line--2{ transform: translate(-50%,-50%); }
.fx-line--3{ transform: translate(-50%,calc(-50% + 8px)); }

.fx-line--1.is-a{ transform: translate(-50%,-50%) rotate(45deg); }
.fx-line--2.is-c{ opacity: 0; }
.fx-line--3.is-b{ transform: translate(-50%,-50%) rotate(-45deg); }

/* =========================================================
   OVERLAY + PANEL MOBILE
========================================================= */
.fx-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 2000;
}
.fx-overlay.is-open{
  opacity: 1;
  pointer-events: auto;
}

.fx-blue{
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 0%;
  background: rgba(1,16,119,.08);
  transition: width 520ms cubic-bezier(.16,1,.3,1);
  z-index: 2010;
}
.fx-blue.is-slide{
  width: min(86vw,360px);
}

.fx-nav{
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 0%;
  opacity: 0;
  overflow: hidden;
  background: #fff;
  border-right: 1px solid rgba(0,0,0,.12);
  transition: width 620ms cubic-bezier(.16,1,.3,1), opacity 260ms ease;
  z-index: 2020;

  display: flex;
  flex-direction: column;
  padding: 90px 18px 15px;
  gap: 12px;
}
.fx-nav.is-show{
  width: min(86vw,360px);
  opacity: 1;
}

/* Items mobile */
.fx-item,
.fx-nav .site-header__link{
  display: block;
  color:#011077;
  text-decoration:none;
  text-transform:uppercase;
  font-size:18px;
  font-weight:900;
  letter-spacing:1px;
  padding:14px;
  border-radius:16px;
  background:rgba(0,0,0,.04);
  border:1px solid rgba(0,0,0,.10);
}
.fx-item:hover,
.fx-nav .site-header__link:hover{
  color:#000;
}

/* social mobile */
.fx-social{
  margin-top: 15px;
  display:flex;
  gap:16px;
}
.fx-icon{
  display:flex;
  line-height:0;
}
.fx-icon img{
  width:26px;
  height:26px;
}

/* =========================================================
   BLOQUEO SCROLL CUANDO MENU ABIERTO
========================================================= */
html.menu-open,
html.menu-open body{
  overflow: hidden;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width:1024px){
  :root{ --header-height: 68px; }

  .site-header__inner{
    grid-template-columns: 1fr auto;
  }

  .site-header__nav,
  .site-header__social{
    display: none;
  }

  .hamburger-fx{
    display: block;
  }
}

@media (max-width:768px){
  :root{ --header-height: 64px; }
}

@media (max-width:420px){
  :root{ --header-height: 60px; }

  .site-header__inner{
    padding: 12px 16px;
  }

  .site-header__brand img{
    height: 40px;
  }

  .hamburger-fx__btn{
    width: 48px;
    height: 48px;
  }

  .hamburger-fx__btn::before{
    inset: 7px;
    border-radius: 16px;
  }

  .fx-line{
    width: 24px;
    height: 2.2px;
  }

  .fx-line--1{ transform: translate(-50%,calc(-50% - 7px)); }
  .fx-line--3{ transform: translate(-50%,calc(-50% + 7px)); }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  #siteHeader{
    transition: none !important;
  }
}
