/* Cabecera horizontal aprobada. Los recortes visuales conservan la imagen oficial.
   Coordenadas de referencia sobre una cuadrícula proporcional de 1600 × 1600:
   símbolo: x=330, y=154, ancho=1104, alto=928;
   nombre: siete recortes del archivo original de 2048 × 2048.
   Cada letra conserva su escala; solo cambia el espacio entre ellas. */
html { scroll-padding-top: 144px; }
.header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #dbe2e9;
}
.header-inner {
  width: min(1480px, calc(100% - 80px));
  min-height: 128px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-block: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 3.6%;
  width: 498px;
  max-width: calc(100% - 64px);
  flex-shrink: 0;
  text-decoration: none;
}
.brand-symbol, .brand-name { position: relative; display: block; overflow: hidden; }
.brand-symbol { width: 24.1%; flex-shrink: 0; aspect-ratio: 1104 / 928; }
.brand-text { display: block; width: 72.3%; flex-shrink: 0; }
.brand-name {
  width: 100%;
  aspect-ratio: 1292 / 162;
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 2.4%;
}
.brand-letter {
  display: block;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  width: calc(var(--letter-width) / 1654 * 100%);
  aspect-ratio: var(--letter-width) / 184;
}
/* Recortes con margen para conservar bordes suavizados; y=1490, alto=184. */
.brand-letter-s { --letter-width: 183; --letter-x: 210; }
.brand-letter-o { --letter-width: 219; --letter-x: 445; }
.brand-letter-l { --letter-width: 174; --letter-x: 720; }
.brand-letter-a { --letter-width: 223; --letter-x: 954; }
.brand-letter-i { --letter-width: 53; --letter-x: 1247; }
.brand-letter-n { --letter-width: 215; --letter-x: 1359; }
.brand-letter-d { --letter-width: 202; --letter-x: 1630; }
.brand img { position: absolute; max-width: none; height: auto; }
.brand-symbol img { width: 144.927536%; left: -29.891304%; top: -16.594828%; }
.brand-letter img {
  width: calc(2048 / var(--letter-width) * 100%);
  left: calc(var(--letter-x) / var(--letter-width) * -100%);
  top: -809.782609%;
}
.brand-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--navy);
  font-size: 17px;
  font-style: italic;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
}
.brand-tagline::before, .brand-tagline::after {
  content: "";
  width: 20px;
  height: 2px;
  background: var(--green);
  flex-shrink: 0;
}
.nav { display: flex; align-items: center; gap: 28px; flex-wrap: nowrap; justify-content: flex-end; }
.nav a { text-decoration: none; font-size: 1.2rem; font-weight: 600; line-height: 1.5; padding-block: 15px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--green); }
.nav .portal-link { color: var(--green); border: 1px solid var(--green); border-radius: 8px; padding: 12px 20px; }
.menu-toggle { display: none; background: none; border: 0; width: 48px; height: 48px; padding: 11px; cursor: pointer; }
.menu-toggle span { display: block; width: 25px; height: 2px; margin: 5px 0; background: var(--navy); }
@media (max-width: 1250px) {
  html { scroll-padding-top: 128px; }
  .header-inner { width: calc(100% - 48px); min-height: 112px; gap: 16px; padding-block: 12px; }
  .brand { width: 414px; }
  .brand-tagline { font-size: 14px; margin-top: 6px; gap: 6px; }
  .brand-tagline::before, .brand-tagline::after { width: 16px; }
  .menu-toggle { display: block; flex-shrink: 0; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 15px 20px #061b451a;
    max-height: calc(100vh - 112px);
    max-height: calc(100dvh - 112px);
    overflow: auto;
    flex-wrap: nowrap;
  }
  .nav.open { display: flex; align-items: stretch; flex-direction: column; gap: 4px; }
  .nav a { font-size: 1.125rem; padding: 12px; }
  .nav .portal-link { text-align: center; margin-top: 7px; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 108px; }
  .header-inner { width: calc(100% - 32px); min-height: 92px; padding-block: 10px; }
  .brand { width: 310px; }
  .brand-tagline { font-size: 11px; margin-top: 5px; gap: 5px; }
  .brand-tagline::before, .brand-tagline::after { width: 10px; }
  .nav { max-height: calc(100vh - 92px); max-height: calc(100dvh - 92px); }
}
@media (max-width: 380px) {
  .brand-tagline { font-size: 9.5px; gap: 3px; }
  .brand-tagline::before, .brand-tagline::after { width: 6px; }
}
