/*
 * Sitio público del Colegio Pucará. Misma identidad que la plataforma y el correo: fondo
 * marfil, burdeos como color de marca y títulos con serifa. Pensado primero para celular.
 * Sin fuentes ni recursos de terceros: todo sale del propio sitio.
 *
 * Movimiento (pedido de Cristián, 14-nov-2026): entradas al cargar, aparición al bajar,
 * microinteracciones y transición entre páginas. Todo es mejora progresiva y se apaga con
 * «reducir movimiento» (al final de este archivo).
 */
:root {
  --marfil: #f7f4ee;
  --arena: #f1ece3;
  --papel: #ffffff;
  --tinta: #1f1b16;
  --tinta-suave: #5c564d;
  --burdeos: #8f1d22;
  --burdeos-oscuro: #6f161a;
  --borde: #e6e2da;
  --foco: #1a4fad;
  --serifa: Georgia, "Times New Roman", serif;
  --palo:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --ancho: 70rem;
  --ancho-lectura: 46rem;
  --radio: 8px;
  /* Curva de casi todo el movimiento: parte decidida y frena suave. */
  --e: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--marfil);
  color: var(--tinta);
  font-family: var(--palo);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--burdeos);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color 0.25s;
}
a:hover {
  color: var(--burdeos-oscuro);
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 2px;
  border-radius: 3px;
}
h1,
h2,
h3 {
  font-family: var(--serifa);
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2rem, 1.2rem + 3.6vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.2rem);
  font-weight: 400;
}
h3 {
  font-size: 1.2rem;
  font-weight: 700;
}
p {
  margin: 0 0 1em;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.icono {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}
.solo-lector {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.saltar {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 40;
  background: var(--burdeos);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radio) var(--radio);
}
.saltar:focus {
  top: 0;
  color: #fff;
}
.contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
/* Columna de lectura: alineada a la izquierda, con el título de la página. */
.contenedor--angosto > * {
  max-width: var(--ancho-lectura);
}
main:focus {
  outline: none;
}

/* ── Cabecera y menú ─────────────────────────────────────────────────────── */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--papel);
  border-top: 4px solid var(--burdeos);
  border-bottom: 1px solid var(--borde);
  transition: box-shadow 0.35s;
  view-transition-name: cabecera;
}
.cabecera--bajo {
  box-shadow: 0 12px 30px rgb(31 27 22 / 0.08);
}
.cabecera__barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-block: 0.7rem;
  transition: padding 0.35s var(--e);
}
.cabecera--bajo .cabecera__barra {
  padding-block: 0.4rem;
}
.marca {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--tinta);
  text-decoration: none;
}
.marca:hover {
  color: var(--burdeos);
}
.marca__escudo {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  transition: transform 0.6s var(--e);
}
.marca:hover .marca__escudo {
  transform: rotate(-8deg) scale(1.08);
}
.marca__texto {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.marca__nombre {
  font-family: var(--serifa);
  font-size: 1.3rem;
}
.marca__lugar {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tinta-suave);
}
.menu__boton {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--borde);
  border-radius: 50%;
  background: var(--papel);
  color: var(--tinta);
  cursor: pointer;
  transition:
    background 0.3s,
    color 0.3s,
    border-color 0.3s;
}
.menu__cerrar,
.menu__boton[aria-expanded="true"] .menu__abrir {
  display: none;
}
.menu__boton[aria-expanded="true"] .menu__cerrar {
  display: inline-flex;
}
.menu__boton[aria-expanded="true"] {
  background: transparent;
  border-color: rgb(255 255 255 / 0.6);
  color: #fff;
}

/* Celular: el menú se abre como un telón burdeos desde el botón. */
.menu {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  padding: 6.5rem 1.5rem 3rem;
  background: var(--burdeos);
  color: #fff;
  visibility: hidden;
  clip-path: circle(0 at calc(100% - 2.6rem) 2.6rem);
  transition:
    clip-path 0.7s var(--e),
    visibility 0.7s;
}
.menu--abierto {
  visibility: visible;
  clip-path: circle(150% at calc(100% - 2.6rem) 2.6rem);
}
.menu-abierto {
  overflow: hidden;
}
.menu-abierto .marca,
.menu-abierto .marca__lugar {
  color: #fff;
}
.menu__lista {
  display: flex;
  flex-direction: column;
}
.menu__lista > li {
  opacity: 0;
  transform: translateX(-28px);
  transition:
    opacity 0.5s var(--e),
    transform 0.5s var(--e);
}
.menu--abierto .menu__lista > li {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--n, 0) * 60ms + 180ms);
}
.menu__lista > li:nth-child(2) {
  --n: 1;
}
.menu__lista > li:nth-child(3) {
  --n: 2;
}
.menu__lista > li:nth-child(4) {
  --n: 3;
}
.menu__lista > li:nth-child(5) {
  --n: 4;
}
.menu__lista > li:nth-child(6) {
  --n: 5;
}
.menu__lista > li:nth-child(n + 7) {
  --n: 6;
}
.menu__enlace {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.7rem 0;
  border: 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.22);
  background: none;
  color: #fff;
  font-family: var(--serifa);
  font-size: 1.7rem;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.menu__enlace:hover {
  color: #fff;
}
.menu__enlace[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}
.menu__enlace .icono {
  width: 0.8em;
  height: 0.8em;
}
.menu__desplegar .icono {
  margin-left: auto;
  transition: transform 0.35s var(--e);
}
.menu__desplegar[aria-expanded="true"] .icono {
  transform: rotate(180deg);
}
.menu__sub {
  display: none;
  padding: 0.3rem 0 0.6rem 1rem;
}
.menu__sub--abierto {
  display: block;
}
.menu__sub .menu__enlace {
  border: 0;
  padding: 0.45rem 0;
  font-family: var(--palo);
  font-size: 1.1rem;
}
.menu .boton--chico {
  margin-top: 1.5rem;
  background: #fff;
  border-color: #fff;
  color: var(--burdeos);
  font-size: 1.05rem;
  padding: 0.8rem 1.4rem;
}

@media (min-width: 60rem) {
  .menu__boton {
    display: none;
  }
  .menu {
    position: static;
    overflow: visible;
    padding: 0;
    background: none;
    color: inherit;
    visibility: visible;
    clip-path: none;
  }
  .menu__lista {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
  }
  .menu__lista > li {
    opacity: 1;
    transform: none;
  }
  .menu__enlace {
    position: relative;
    width: auto;
    padding: 0.5rem 0.7rem;
    border: 0;
    color: var(--tinta);
    font-family: var(--palo);
    font-size: 0.97rem;
    font-weight: 500;
    white-space: nowrap;
  }
  /* Subrayado que crece al pasar; queda fijo en la página actual. */
  .menu__enlace::after {
    content: "";
    position: absolute;
    left: 0.7rem;
    right: 0.7rem;
    bottom: 0.15rem;
    height: 2px;
    background: var(--burdeos);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--e);
  }
  .menu__enlace:hover,
  .menu__enlace[aria-current="page"],
  .menu__enlace--dentro {
    color: var(--burdeos);
    text-decoration: none;
  }
  .menu__enlace:hover::after,
  .menu__enlace[aria-current="page"]::after,
  .menu__enlace--dentro::after {
    transform: scaleX(1);
  }
  .menu__enlace .icono {
    width: 1em;
    height: 1em;
  }
  .menu__grupo {
    position: relative;
  }
  .menu__desplegar .icono {
    margin-left: 0;
  }
  .menu__sub {
    display: block;
    position: absolute;
    left: 0;
    top: calc(100% + 0.4rem);
    min-width: 17rem;
    padding: 0.4rem;
    background: var(--papel);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    box-shadow: 0 16px 36px rgb(31 27 22 / 0.14);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition:
      opacity 0.3s,
      transform 0.4s var(--e),
      visibility 0.3s;
  }
  .menu__sub--abierto {
    visibility: visible;
    opacity: 1;
    transform: none;
  }
  .menu__sub .menu__enlace {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 6px;
    color: var(--tinta);
    font-size: 0.97rem;
    white-space: normal;
    transition:
      background 0.25s,
      padding 0.4s var(--e);
  }
  .menu__sub .menu__enlace::after {
    display: none;
  }
  .menu__sub .menu__enlace:hover {
    background: var(--arena);
    padding-left: 1rem;
  }
  .menu__sub .menu__enlace[aria-current="page"] {
    box-shadow: inset 2px 0 0 var(--burdeos);
    text-decoration: none;
  }
  .menu .boton--chico {
    margin: 0 0 0 0.6rem;
    background: var(--burdeos);
    border-color: var(--burdeos);
    color: #fff;
    font-size: 0.95rem;
    padding: 0.45rem 0.9rem;
  }
}

/* ── Botones ─────────────────────────────────────────────────────────────── */
.boton {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--burdeos);
  border-radius: var(--radio);
  background: var(--burdeos);
  color: #fff;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  transition:
    background 0.3s,
    border-color 0.3s,
    color 0.3s,
    transform 0.45s var(--e),
    box-shadow 0.45s var(--e);
}
.boton:hover {
  background: var(--burdeos-oscuro);
  border-color: var(--burdeos-oscuro);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgb(143 29 34 / 0.24);
}
.boton:active {
  transform: translateY(0);
  box-shadow: none;
}
/* Flecha que avanza al pasar (los enlaces externos ya traen su ícono). */
.boton:not(:has(.icono))::after {
  content: "→";
  display: inline-block;
  transition: transform 0.45s var(--e);
}
.boton:hover::after {
  transform: translateX(5px);
}
.boton--secundario {
  background: transparent;
  color: var(--burdeos);
}
.boton--secundario:hover {
  background: var(--burdeos);
  color: #fff;
}
.boton--chico {
  padding: 0.45rem 0.9rem;
  font-size: 0.95rem;
}
.boton .icono {
  width: 1em;
  height: 1em;
  transition: transform 0.45s var(--e);
}
.boton:hover .icono {
  transform: translate(2px, -2px);
}
.botones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 0;
}
.botones--centro {
  justify-content: center;
}

/* ── Encabezados y secciones ─────────────────────────────────────────────── */
.sobretitulo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.7rem;
  color: var(--burdeos);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.sobretitulo::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: currentColor;
  transform-origin: left;
}
.encabezado {
  margin-bottom: 1.75rem;
}
.titular {
  padding-block: 2.5rem 2rem;
  border-bottom: 1px solid var(--borde);
}
.titular .encabezado {
  margin: 0;
}
.seccion {
  padding-block: 2.75rem;
}
.seccion--arena {
  background: var(--arena);
}
.seccion--blanca {
  background: var(--papel);
  border-block: 1px solid var(--borde);
}
/* Dos secciones seguidas con el mismo fondo comparten el aire entre ellas. */
.seccion--lisa + .seccion--lisa,
.portada + .seccion--lisa {
  padding-top: 0;
}
/* Lo que sigue a un texto ocupa su mismo ancho: los dos bordes quedan alineados. */
.seccion--texto + .seccion > .contenedor > :is(.nivel, .tarjetas) {
  max-width: var(--ancho-lectura);
}
@media (min-width: 60rem) {
  .seccion {
    padding-block: 4rem;
  }
  .titular {
    padding-block: 3.5rem 2.5rem;
  }
}

/* ── Texto corrido ───────────────────────────────────────────────────────── */
.prosa > :last-child {
  margin-bottom: 0;
}
/* Justificado como las cartas del colegio (pedido de Cristián). La separación en sílabas
   evita los huecos entre palabras, sobre todo en celular. */
.prosa p,
.entrada {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 7 3 3;
}
.prosa--grande,
.entrada {
  font-size: 1.15rem;
  color: #3a342c;
}
.prosa h3 {
  margin: 1.75em 0 0.5em;
}
.prosa ul,
.prosa ol {
  margin: 0 0 1em;
  padding-left: 1.3rem;
}
.prosa ul {
  list-style: disc;
}
.prosa li {
  margin-bottom: 0.3em;
}
.prosa li::marker {
  color: var(--burdeos);
}
.prosa hr {
  border: 0;
  border-top: 1px solid var(--borde);
  margin: 2rem 0;
}
.prosa .url {
  word-break: break-all;
}
.tabla-desliza {
  overflow-x: auto;
  margin-bottom: 1.25rem;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  background: var(--papel);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
th,
td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--borde);
  text-align: left;
  vertical-align: top;
}
thead th {
  background: var(--arena);
  color: var(--tinta-suave);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
tbody th {
  font-weight: 600;
}
tbody tr {
  transition: background 0.25s;
}
tbody tr:hover {
  background: var(--marfil);
}
tbody tr:last-child > * {
  border-bottom: 0;
}
.figura {
  margin: 0 0 1.75rem;
}
.figura img {
  width: 100%;
  border-radius: var(--radio);
  border: 1px solid var(--borde);
}
figcaption {
  margin-top: 0.5rem;
  color: var(--tinta-suave);
  font-size: 0.92rem;
}

/* ── Portada ─────────────────────────────────────────────────────────────── */
.portada {
  padding-block: 2.5rem 3rem;
  overflow: hidden;
}
.portada__rejilla {
  display: grid;
  gap: 2rem;
}
.portada__imagen {
  display: none;
}
@media (min-width: 60rem) {
  .portada {
    padding-block: 4.5rem 5rem;
  }
  .portada__rejilla {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    align-items: center;
    gap: 4rem;
  }
  .portada__imagen {
    display: block;
  }
  .portada__imagen img {
    width: min(20rem, 100%);
    margin-inline: auto;
  }
}

/* ── Aviso destacado ─────────────────────────────────────────────────────── */
.aviso {
  padding-top: 1.25rem;
}
.aviso a {
  display: block;
  border-radius: var(--radio);
  overflow: hidden;
  transition:
    transform 0.5s var(--e),
    box-shadow 0.5s var(--e);
}
.aviso a:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgb(31 27 22 / 0.14);
}
.aviso img {
  width: 100%;
  border-radius: var(--radio);
  border: 1px solid var(--borde);
}

/* ── Accesos rápidos ─────────────────────────────────────────────────────── */
.accesos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.75rem;
}
.acceso {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.4rem;
  height: 100%;
  min-height: 8.75rem;
  padding: 1.1rem;
  background: var(--papel);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  color: var(--tinta);
  text-decoration: none;
  transition:
    color 0.35s,
    border-color 0.35s,
    transform 0.5s var(--e),
    box-shadow 0.5s var(--e);
}
/* El burdeos sube desde abajo y llena la tarjeta. */
.acceso::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--burdeos);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.55s var(--e);
}
.acceso:hover,
.acceso:focus-visible {
  color: #fff;
  border-color: var(--burdeos);
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgb(143 29 34 / 0.22);
}
.acceso:hover::before,
.acceso:focus-visible::before {
  transform: scaleY(1);
}
.acceso__arriba {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.acceso__icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--arena);
  color: var(--burdeos);
  transition:
    background 0.35s,
    transform 0.5s var(--e);
}
.acceso:hover .acceso__icono,
.acceso:focus-visible .acceso__icono {
  background: #fff;
  transform: scale(1.08);
}
.acceso__flecha {
  color: var(--tinta-suave);
  rotate: -45deg;
  transition:
    color 0.35s,
    transform 0.5s var(--e);
}
.acceso__flecha .icono {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
}
.acceso:hover .acceso__flecha,
.acceso:focus-visible .acceso__flecha {
  color: #fff;
  transform: translateX(5px);
}
.acceso__titulo {
  font-weight: 600;
  line-height: 1.3;
}
.acceso__texto {
  color: var(--tinta-suave);
  font-size: 0.93rem;
  line-height: 1.45;
}

/* ── Tarjetas ────────────────────────────────────────────────────────────── */
.tarjetas {
  display: grid;
  gap: 1rem;
}
.tarjeta {
  position: relative;
  display: block;
  padding: 1.5rem;
  background: var(--papel);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  color: var(--tinta);
  text-decoration: none;
}
.tarjeta h3 {
  margin-bottom: 0.6rem;
  font-size: 1.35rem;
  font-weight: 400;
}
.tarjeta__etiqueta {
  margin: 0 0 0.4rem;
  color: var(--burdeos);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.tarjeta--enlace {
  padding-right: 3.5rem;
  transition:
    border-color 0.3s,
    transform 0.5s var(--e),
    box-shadow 0.5s var(--e);
}
.tarjeta--enlace .prosa p {
  text-align: left;
}
.tarjeta--enlace:hover {
  border-color: var(--burdeos);
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgb(31 27 22 / 0.1);
  color: var(--tinta);
}
.tarjeta--enlace:hover h3 {
  color: var(--burdeos);
}
.tarjeta__flecha {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  translate: 0 -50%;
  color: var(--burdeos);
  transition: transform 0.5s var(--e);
}
.tarjeta--enlace:hover .tarjeta__flecha {
  transform: translateX(6px);
}
@media (min-width: 48rem) {
  .tarjetas--2,
  .tarjetas--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tarjeta {
    padding: 2rem;
  }
  .tarjeta--enlace {
    padding-right: 3.75rem;
  }
}
@media (min-width: 64rem) {
  .tarjetas--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ── Mensaje con cita ────────────────────────────────────────────────────── */
.cita {
  display: grid;
  gap: 2rem;
}
.cita__foto img {
  width: min(16rem, 70%);
  border-radius: var(--radio);
  border: 1px solid var(--borde);
}
blockquote {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--burdeos);
  font-family: var(--serifa);
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.5;
}
.firma {
  display: flex;
  flex-direction: column;
  margin: 1.5rem 0 0;
}
.firma strong {
  font-family: var(--serifa);
  font-size: 1.15rem;
}
.firma span {
  color: var(--tinta-suave);
  font-size: 0.95rem;
}
@media (min-width: 60rem) {
  .cita {
    grid-template-columns: 18rem minmax(0, 1fr);
    gap: 4rem;
    align-items: start;
  }
  .cita__foto img {
    width: 100%;
  }
}

/* ── Documentos ──────────────────────────────────────────────────────────── */
.documentos {
  background: var(--papel);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
}
.documentos > li + li {
  border-top: 1px solid var(--borde);
}
.documento {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem 1rem;
  padding: 1.1rem 1.25rem;
  color: var(--tinta);
  text-decoration: none;
  transition:
    background 0.3s,
    padding 0.45s var(--e);
}
a.documento:hover {
  background: var(--marfil);
  color: var(--tinta);
  padding-left: 1.65rem;
}
a.documento:hover .documento__titulo {
  color: var(--burdeos);
}
.documento__icono {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--arena);
  color: var(--burdeos);
  transition:
    background 0.3s,
    color 0.3s,
    transform 0.45s var(--e);
}
a.documento:hover .documento__icono {
  background: var(--burdeos);
  color: #fff;
  transform: scale(1.08);
}
.documento__texto {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.documento__titulo {
  font-weight: 600;
  line-height: 1.35;
  transition: color 0.3s;
}
.documento__desc {
  color: var(--tinta-suave);
  font-size: 0.95rem;
  line-height: 1.5;
}
.documento__meta,
.curso__meta {
  color: var(--tinta-suave);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
.documento__meta {
  grid-column: 2;
}
a.documento .documento__meta::after {
  content: "→";
  display: inline-block;
  margin-left: 0.6rem;
  color: var(--burdeos);
  font-size: 1rem;
  transition: transform 0.45s var(--e);
}
a.documento:hover .documento__meta::after {
  transform: translateX(5px);
}
.documento--pendiente,
.curso--pendiente {
  opacity: 0.75;
}
@media (min-width: 40rem) {
  .documento {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }
  .documento__icono {
    grid-row: auto;
  }
  .documento__meta {
    grid-column: auto;
    white-space: nowrap;
  }
}

.nivel + .nivel {
  margin-top: 2.25rem;
}
.nivel__titulo {
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--borde);
  font-size: 1.3rem;
  font-weight: 400;
}
.cursos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.6rem;
}
.curso {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.85rem 1rem;
  background: var(--papel);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  color: var(--tinta);
  line-height: 1.35;
  text-decoration: none;
  transition:
    background 0.3s,
    border-color 0.3s,
    color 0.3s,
    transform 0.45s var(--e),
    box-shadow 0.45s var(--e);
}
a.curso:hover {
  background: var(--burdeos);
  border-color: var(--burdeos);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgb(143 29 34 / 0.2);
}
a.curso:hover .curso__meta {
  color: #f3d9d6;
}
.curso__nombre {
  font-weight: 600;
}
.curso__meta {
  transition: color 0.3s;
}

/* Tarjetas de documentos, ordenadas como «Documentos Oficiales» del sitio antiguo. */
.fichas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1.25rem;
}
.fichas > li {
  display: flex;
}
.ficha {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 1.75rem 1.5rem 1.25rem;
  background: var(--papel);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  color: var(--tinta);
  text-align: center;
  text-decoration: none;
  transition:
    border-color 0.3s,
    transform 0.5s var(--e),
    box-shadow 0.5s var(--e);
}
a.ficha:hover {
  border-color: var(--burdeos);
  color: var(--tinta);
  transform: translateY(-5px);
  box-shadow: 0 20px 38px rgb(31 27 22 / 0.11);
}
.ficha__icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--arena);
  color: var(--burdeos);
  transition:
    background 0.3s,
    color 0.3s,
    transform 0.5s var(--e);
}
a.ficha:hover .ficha__icono {
  background: var(--burdeos);
  color: #fff;
  transform: scale(1.08) rotate(-6deg);
}
.ficha__titulo {
  font-weight: 700;
  line-height: 1.3;
  transition: color 0.3s;
}
a.ficha:hover .ficha__titulo {
  color: var(--burdeos);
}
.ficha__desc {
  color: var(--tinta-suave);
  font-size: 0.93rem;
  line-height: 1.55;
}
.ficha__pie {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: 100%;
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--borde);
}
.ficha__accion {
  color: var(--burdeos);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}
.ficha__accion::after {
  content: "→";
  display: inline-block;
  margin-left: 0.4rem;
  transition: transform 0.45s var(--e);
}
a.ficha:hover .ficha__accion::after {
  transform: translateX(5px);
}
.ficha__meta {
  color: var(--tinta-suave);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.ficha--pendiente {
  opacity: 0.75;
}

/* ── Equipo ──────────────────────────────────────────────────────────────── */
.bandas {
  display: grid;
  gap: clamp(3rem, 2rem + 3vw, 4.5rem);
}
.banda__titulo {
  margin-bottom: 0.4rem;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  text-align: center;
}
.banda__titulo::after {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  margin: 0.7rem auto 0;
  background: var(--burdeos);
}
.banda > .grupo__nota {
  text-align: center;
}
.banda__titulo + .personas,
.banda__titulo + .grupos,
.banda > .grupo__nota + .personas {
  margin-top: 1.6rem;
}
/* Directivos: tarjetas del mismo ancho, centradas (la última fila no queda cargada a un lado). */
.personas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}
.persona {
  display: flex;
  flex: 0 1 min(15.5rem, calc(50% - 0.43rem));
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.15rem 1.25rem;
  text-align: center;
  background: var(--papel);
  border: 1px solid var(--borde);
  border-top: 3px solid var(--burdeos);
  border-radius: var(--radio);
  transition:
    transform 0.45s var(--e),
    box-shadow 0.45s var(--e);
}
.persona:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgb(31 27 22 / 0.09);
}
.persona__cargo {
  color: var(--tinta-suave);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}
.persona__nombre {
  font-family: var(--serifa);
  font-size: 1.2rem;
  line-height: 1.3;
}
@media (max-width: 30rem) {
  .persona {
    padding: 1rem 0.7rem;
  }
  .persona__cargo {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }
  .persona__nombre {
    font-size: 1.08rem;
  }
}
/* Listas (jefaturas, asignaturas, departamentos): recuadros lado a lado. */
.grupos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1.25rem;
}
.grupo--tabla {
  padding: 1.3rem 1.4rem 0.6rem;
  background: var(--papel);
  border: 1px solid var(--borde);
  border-top: 3px solid var(--burdeos);
  border-radius: var(--radio);
}
.grupo__titulo {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.3;
}
.grupo__nota {
  margin-top: 0.3rem;
  color: var(--tinta-suave);
  font-size: 0.92rem;
}
.tabla--equipo {
  margin-top: 0.8rem;
  font-size: 0.95rem;
}
.tabla--equipo th,
.tabla--equipo td {
  padding: 0.55rem 0;
}
.tabla--equipo thead th {
  padding-top: 0.2rem;
  background: none;
  font-size: 0.7rem;
}
.tabla--equipo tbody th {
  width: 48%;
  padding-right: 1rem;
}
.tabla--equipo tbody tr:hover {
  background: none;
}
.tabla--equipo tbody tr:hover > * {
  color: var(--burdeos);
}

/* ── Noticias ────────────────────────────────────────────────────────────── */
.noticias {
  display: grid;
  gap: 1.25rem;
}
.noticia {
  display: flex;
  flex-direction: column;
  background: var(--papel);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  transition:
    transform 0.5s var(--e),
    box-shadow 0.5s var(--e),
    border-color 0.3s;
}
.noticia:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgb(31 27 22 / 0.13);
  border-color: transparent;
}
.seccion--blanca .noticia {
  background: var(--marfil);
}
.noticia__imagen {
  display: block;
  overflow: hidden;
}
.noticia__imagen img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.9s var(--e);
}
.noticia:hover .noticia__imagen img {
  transform: scale(1.07);
}
.noticia__texto {
  padding: 1.25rem;
}
.noticia__texto h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
  font-weight: 400;
}
.noticia__texto h3 a {
  color: var(--tinta);
  text-decoration: none;
}
/* Toda la tarjeta lleva a la noticia. */
.noticia {
  position: relative;
}
.noticia__texto h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.noticia:hover h3 a {
  color: var(--burdeos);
}
.noticia__texto > p:last-child {
  margin: 0;
  color: var(--tinta-suave);
  font-size: 0.97rem;
  line-height: 1.55;
}
.noticia__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.6rem;
  color: var(--tinta-suave);
  font-size: 0.85rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--borde);
  border-radius: 99px;
  background: var(--papel);
  color: var(--burdeos);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chip .icono {
  width: 1em;
  height: 1em;
}
.vacio {
  color: var(--tinta-suave);
}
@media (min-width: 40rem) {
  .noticias {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 64rem) {
  .noticias {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.articulo {
  padding-block: 2rem 3.5rem;
}
.articulo .contenedor--angosto {
  max-width: calc(var(--ancho-lectura) + 2.5rem);
}
.migas {
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
}
.migas a::before {
  content: "← ";
  display: inline-block;
  transition: transform 0.4s var(--e);
}
.migas a:hover::before {
  transform: translateX(-4px);
}
.articulo__cabeza {
  margin-bottom: 1.75rem;
}
.articulo__cabeza h1 {
  font-size: clamp(1.8rem, 1.2rem + 2.6vw, 2.6rem);
}
.articulo__imagen img {
  max-height: 80vh;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}
.articulo .galeria {
  margin-top: 2rem;
}

/* ── Galería y foto ampliada ─────────────────────────────────────────────── */
.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.5rem;
}
.galeria a {
  display: block;
  overflow: hidden;
  border-radius: 6px;
}
.galeria img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.7s var(--e);
}
.galeria a:hover img {
  transform: scale(1.1);
}
.ampliar {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(20 17 14 / 0.94);
}
.ampliar[open] {
  animation: aclara 0.3s ease both;
}
.ampliar[open] img {
  animation: acerca 0.5s var(--e) both;
}
.ampliar::backdrop {
  background: rgb(20 17 14 / 0.94);
}
.ampliar__marco {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 3.5rem 0.75rem;
}
.ampliar img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
}
.ampliar button {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgb(255 255 255 / 0.4);
  border-radius: 50%;
  background: rgb(20 17 14 / 0.6);
  color: #fff;
  cursor: pointer;
  transition:
    background 0.3s,
    transform 0.4s var(--e);
}
.ampliar button:hover {
  background: var(--burdeos);
  transform: scale(1.1);
}
.ampliar__cerrar {
  top: 0.5rem;
  right: 0.75rem;
}
.ampliar__antes,
.ampliar__despues {
  bottom: 0.5rem;
}
.ampliar__antes {
  right: 4rem;
}
.ampliar__antes .icono {
  rotate: 180deg;
}
.ampliar__despues {
  right: 0.75rem;
}
.ampliar :focus-visible {
  outline-color: #fff;
}

/* ── Contacto y redes ────────────────────────────────────────────────────── */
.contacto {
  display: grid;
  gap: 1rem;
}
.contacto li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}
.contacto .icono {
  margin-top: 0.2em;
  color: var(--burdeos);
}
.contacto__rotulo {
  display: block;
  color: var(--tinta-suave);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.contacto a {
  word-break: break-word;
}
.redes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}
.redes a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--borde);
  border-radius: 99px;
  color: var(--tinta);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    background 0.3s,
    border-color 0.3s,
    color 0.3s,
    transform 0.45s var(--e);
}
.redes a:hover {
  background: var(--burdeos);
  border-color: var(--burdeos);
  color: #fff;
  transform: translateY(-2px);
}
.tarjeta--contacto {
  font-size: 1.05rem;
}

/* ── Pie ─────────────────────────────────────────────────────────────────── */
.pie {
  margin-top: 1rem;
  background: var(--burdeos-oscuro);
  color: #f6e9e6;
  font-size: 0.97rem;
}
/* Subrayado que crece al pasar. */
.pie a {
  color: #fff;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px
    no-repeat;
  transition: background-size 0.4s var(--e);
}
.pie a:hover {
  background-size: 100% 1px;
}
.pie :focus-visible {
  outline-color: #fff;
}
.pie__rejilla {
  display: grid;
  gap: 2.25rem;
  padding-block: 3rem 2.25rem;
}
.pie__nombre {
  margin: 0;
  color: #fff;
  font-family: var(--serifa);
  font-size: 1.6rem;
}
.pie__lema {
  color: #e9c9c5;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pie__titulo {
  margin-bottom: 0.9rem;
  color: #e9c9c5;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.pie nav li {
  margin-bottom: 0.45rem;
}
.pie .contacto .icono,
.pie .contacto__rotulo {
  color: #e9c9c5;
}
.pie .redes a {
  border-color: rgb(255 255 255 / 0.35);
  background: none;
  color: #fff;
}
.pie .redes a:hover {
  background: #fff;
  border-color: #fff;
  color: var(--burdeos-oscuro);
}
.pie__final {
  padding-block: 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 0.18);
  color: #e9c9c5;
  font-size: 0.88rem;
}
.pie__final p {
  margin: 0;
}
@media (min-width: 48rem) {
  .pie__rejilla {
    grid-template-columns: 1.4fr 1fr 1.3fr;
    gap: 3rem;
  }
}

/* ── Movimiento ──────────────────────────────────────────────────────────── */
@keyframes sube {
  from {
    transform: translateY(112%);
  }
}
@keyframes aparece {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
}
@keyframes traza {
  from {
    transform: scaleX(0);
  }
}
@keyframes sello {
  from {
    opacity: 0;
    transform: scale(0.82) rotate(-8deg);
  }
}
@keyframes flota {
  to {
    transform: translateY(-12px);
  }
}
@keyframes aclara {
  from {
    opacity: 0;
  }
}
@keyframes acerca {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}

/* Títulos de página: las palabras suben una tras otra. */
.palabra {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
}
.palabra > span {
  display: inline-block;
  animation: sube 0.9s var(--e) calc(var(--i, 0) * 70ms + 120ms) both;
}
.portada .sobretitulo,
.titular .sobretitulo {
  animation: aparece 0.8s var(--e) 0.05s both;
}
.portada .sobretitulo::before,
.titular .sobretitulo::before {
  animation: traza 1s var(--e) 0.2s both;
}
.articulo__cabeza .noticia__meta,
.migas {
  animation: aparece 0.8s var(--e) 0.05s both;
}

/* Portada: el texto entra por partes y el escudo llega como un sello. */
.portada .prosa > * {
  animation: aparece 0.9s var(--e) 0.5s both;
}
.portada .prosa > :nth-child(2) {
  animation-delay: 0.62s;
}
.portada .prosa > :nth-child(n + 3) {
  animation-delay: 0.74s;
}
.portada .botones {
  animation: aparece 0.9s var(--e) 0.85s both;
}
.portada__imagen {
  animation: sello 1.2s var(--e) 0.3s both;
}
.portada__imagen img {
  animation: flota 6s ease-in-out 1.5s infinite alternate;
  will-change: transform;
}

/* Aparición al bajar: el script marca lo que está bajo la primera pantalla y lo muestra al
   entrar. Sin script nada se oculta. */
.revelar {
  transition:
    opacity 0.75s var(--e) calc(var(--i, 0) * 70ms),
    transform 0.75s var(--e) calc(var(--i, 0) * 70ms);
}
.revelar.oculto {
  opacity: 0;
  transform: translateY(34px);
}

/* Transición entre páginas (donde el navegador la ofrece): el contenido se desvanece y
   llega el nuevo; la cabecera se queda en su lugar. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
  ::view-transition-old(root) {
    animation: 0.22s ease both vt-sale;
  }
  ::view-transition-new(root) {
    animation: 0.5s var(--e) both vt-llega;
  }
}
@keyframes vt-sale {
  to {
    opacity: 0;
  }
}
@keyframes vt-llega {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* Quien pide menos movimiento ve todo de inmediato y sin desplazamientos. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .revelar.oculto {
    opacity: 1;
    transform: none;
  }
}
@media print {
  .cabecera,
  .pie,
  .saltar,
  .botones {
    display: none;
  }
  body {
    background: #fff;
  }
}
