/* MAG'S — ÚNICAMENTE PUNTO 1: cabecera y logotipo (borrador).
   Estilo de cierre cargado después de las hojas anteriores para evitar
   reglas contradictorias. No modifica el hero, otras secciones ni calculadoras. */
body .site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(248, 246, 241, .94) !important;
  border-bottom: 1px solid rgba(12, 43, 60, .12);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  transition: background-color .27s ease, box-shadow .27s ease,
    backdrop-filter .27s ease, -webkit-backdrop-filter .27s ease;
}
/* El contenido debe seguir viéndose a través de la franja al desplazarse. */
body .site-header.is-scrolled {
  background: rgba(248, 246, 241, .38) !important;
  -webkit-backdrop-filter: blur(12px) saturate(1.05) !important;
  backdrop-filter: blur(12px) saturate(1.05) !important;
  box-shadow: 0 4px 18px rgba(8, 34, 46, .06);
  border-bottom-color: rgba(12, 43, 60, .10);
}
/* Antes, otra hoja ocultaba el logotipo específicamente en portada. */
body.home .site-header .brand {
  display: flex !important;
}
body .site-header .brand {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  align-items: center;
  max-width: 44%;
  padding: 2px 9px 2px 0;
  border-radius: 4px;
}
body .site-header.is-scrolled .brand {
  background: transparent !important;
}
body .site-header .brand img,
body.home .site-header .brand img {
  display: block;
  width: clamp(152px, 16vw, 202px) !important;
  max-width: 100%;
  height: auto !important;
  max-height: 111px !important;
  object-fit: contain;
  object-position: left center;
  transform: none !important;
  filter: none !important;
  opacity: 1 !important;
  transition: width .27s ease, max-height .27s ease;
}
body.home .site-header .header-row {
  justify-content: space-between !important;
}
body.home .site-header .menu-toggle {
  margin-left: auto;
}
body .site-header.is-scrolled .brand img,
body.home .site-header.is-scrolled .brand img {
  width: clamp(142px, 13vw, 174px) !important;
  max-height: 92px !important;
}
@media (max-width: 760px) {
  body .site-header .header-row,
  body.home .site-header .header-row {
    min-height: 104px;
    gap: 12px;
    justify-content: space-between !important;
  }
  body .site-header .brand {
    max-width: 67%;
    padding-right: 6px;
  }
  body .site-header .brand img,
  body.home .site-header .brand img {
    width: min(173px, 47vw) !important;
    max-height: 98px !important;
  }
  body .site-header.is-scrolled .header-row,
  body.home .site-header.is-scrolled .header-row {
    min-height: 81px;
  }
  body .site-header.is-scrolled .brand img,
  body.home .site-header.is-scrolled .brand img {
    width: min(147px, 42vw) !important;
    max-height: 77px !important;
  }
  body .site-header .menu-toggle {
    flex: 0 0 auto;
    margin-left: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  body .site-header, body .site-header .brand img {
    transition: none !important;
  }
}
