/* ===================================================================
   04-portada.css — PORTADA
   Carrusel a pantalla completa detrás del encabezado. Cambia solo
   (02-carrusel.js) con fundido y un acercamiento lento de la foto.
   El texto queda arriba de las tarjetas de Oferta académica.
   =================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--brown-dark);
  color: #fff;
  --sec-title: #fff;
  outline: none;
}
.hero-stage { display: grid; }
.hero-slide {
  grid-area: 1 / 1;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(560px, 100svh, 900px);
  overflow: hidden;
  background: radial-gradient(120% 90% at 85% 10%, #7a4626 0%, var(--brown) 45%, var(--brown-dark) 100%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 1100ms var(--ease-in-out), visibility 0s linear 1100ms;
}
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity 1100ms var(--ease-in-out), visibility 0s; }
.hero-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
/* Acercamiento lento de la foto activa (solo transform: no afecta el rendimiento) */
.con-animaciones .hero-slide.is-active .hero-photo { animation: hero-zoom 7s ease-out both; }
@keyframes hero-zoom { from { transform: scale(1.1); } }
/* Velo para que el texto siempre se lea */
.hero-slide.has-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, rgb(28 14 6 / 0.78) 0%, rgb(28 14 6 / 0.25) 45%, rgb(28 14 6 / 0) 70%),
    linear-gradient(90deg, rgb(28 14 6 / 0.4) 0%, rgb(28 14 6 / 0) 55%);
  pointer-events: none;
}
.hero-content { position: relative; padding-block: 140px 290px; }
.hero-content .eyebrow { color: var(--gold-light); }
.hero-heading { max-width: 16ch; margin-bottom: 16px; color: #fff; font-size: clamp(2.4rem, 1.4rem + 4vw, 4.6rem); }
.hero-text { max-width: 54ch; margin-bottom: 26px; color: rgb(255 255 255 / 0.9); font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); }
.con-animaciones .hero-slide.is-active .hero-content > * { animation: hero-in 800ms var(--ease-out) both; }
.con-animaciones .hero-slide.is-active .hero-content > :nth-child(2) { animation-delay: 80ms; }
.con-animaciones .hero-slide.is-active .hero-content > :nth-child(3) { animation-delay: 160ms; }
.con-animaciones .hero-slide.is-active .hero-content > :nth-child(4) { animation-delay: 220ms; }
@keyframes hero-in { from { opacity: 0; transform: translateY(16px); } }
/* Sin tarjetas debajo, el texto baja un poco */
.hero:not(:has(+ .oferta-solapada)) .hero-content { padding-bottom: 120px; }

/* ===================================================================
   CABECERA DE PÁGINAS INTERNAS (partials/page_hero.html)
   Foto con velo crema, migas de pan, título grande y borde inferior curvo.
   =================================================================== */
.page-hero {
  position: relative;
  isolation: isolate;
  padding: calc(var(--header-alto, 96px) + 72px) 0 120px;
  overflow: hidden;
  background: var(--crema-encabezado);
}
.page-hero-media { position: absolute; inset: 0; z-index: -2; }
.page-hero-img { width: 100%; height: 100%; object-fit: cover; }
.con-animaciones .page-hero-img { animation: hero-zoom 9s ease-out both; }
.page-hero.has-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(252 239 221 / 0.96) 0%, rgb(252 239 221 / 0.86) 45%, rgb(252 239 221 / 0.45) 100%);
}
/* Borde inferior curvo y ligeramente inclinado */
.page-hero::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -60px;
  height: 120px;
  background: var(--white);
  border-radius: 50%;
  transform: rotate(-2deg);
}
.migas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--muted); font: 600 0.75rem/1.4 var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; }
.migas a { color: var(--brown-dark); text-decoration: none; }
.migas a:hover { text-decoration: underline; }
.page-hero h1 { max-width: 20ch; margin: 0; color: var(--brown-dark); font-size: clamp(2.2rem, 1.4rem + 3vw, 3.8rem); font-weight: 650; }
