/* ══════════════════════════════════════════════════════════════
   CEDIC — hoja de estilos del portal
   Compartida por cedic.php, actividades.php, formacion.php
   y contenidos.php. Extraida del <style> monolitico original.
   ══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   SISTEMA DE DISEÑO — heredado del portal EVEM
   (festival.html / dim.html comparten estas variables)
   ═══════════════════════════════════════════════════════════ */
:root {
  --navy: #0f172a;
  --navy-mid: #1e3a8a;
  --blue: #0ea5e9;
  --blue-mid: #0284c7;
  --blue-dark: #075985;
  --slate: #475569;
  --slate-light: #94a3b8;
  --bg: #f1f5f9;
  --bg-soft: #f8fafc;
  --white: #ffffff;
  --border: rgba(15, 23, 42, 0.08);

  /* Acentos propios del CEDIC: las 3 ciencias fundamentales */
  --mat: #0ea5e9;
  --fis: #6366f1;
  --qui: #14b8a6;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--navy);
  line-height: 1.6;
  margin: 0;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

/* Capa display: todos los encabezados en Outfit */
h1,
h2,
h3,
h4 {
  font-family: "Outfit", sans-serif;
  letter-spacing: -0.015em;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Jerarquía tipográfica de dos familias:
   Outfit (geométrica) para la capa display: H1, títulos y numerales.
   DM Sans para cuerpo, UI y cursivas (Outfit no tiene italic real). */
.section-title {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 2.1rem;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0 0 14px;
  line-height: 1.2;
}

.section-lead {
  color: var(--slate);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
}

.section {
  padding: 96px 0;
}

/* ═══════════════════ NAVBAR ═══════════════════ */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(7, 89, 133, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.nav-cta {
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  background: #38bdf8;
  transform: translateY(-1px);
}

/* Gota central institucional. Mide más que el navbar por diseño de marca,
   por eso se contrae al hacer scroll (ver .scrolled) y así no cuelga
   sobre el contenido de abajo. */
.central-logo-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 92px;
  height: 104px;
  background: linear-gradient(180deg, #075985 0%, #0c4a6e 100%);
  border-radius: 0 0 46px 46px;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.32),
    inset 0 -3px 12px rgba(56, 189, 248, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 10px;
  z-index: 101;
  transition:
    box-shadow 0.3s ease,
    top 0.3s ease,
    width 0.3s ease,
    height 0.3s ease,
    padding 0.3s ease,
    border-radius 0.3s ease;
  text-decoration: none;
}

.central-logo-container:hover {
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.4),
    inset 0 -3px 14px rgba(56, 189, 248, 0.18);
}

.central-logo {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  /* El emblema es monocromático (un solo azul, sin degradado ni segundo
       color): se vuelve blanco puro para leerse sobre el navbar oscuro.
       Mismo patrón que festival.html/mat.html ya usan para estos logos. */
  filter: brightness(0) invert(1);
}

.top-bar.scrolled .central-logo-container {
  top: 10px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.top-bar.scrolled .central-logo {
  max-height: 26px;
}

/* ═══════════════════ HERO ═══════════════════ */
/* Textura fractal (conjunto de Mandelbrot, assets/cedic/fondoFractal.jpg)
   teñida al azul institucional del portal. Misma técnica híbrida validada
   antes: `luminosity` le quita al fractal su color original y lo tiñe con
   el gradiente de abajo; el gradiente en sí sube de opacidad hacia la
   izquierda para no competir con el título y el badge, que viven en esa
   columna (grid .hero-inner, texto a la izquierda / logo a la derecha).
   El encuadre `200% auto` a `98% 85%` deja el borde con más detalle del
   fractal asomando por la derecha, detrás del logo, y dejó fuera el bulbo
   negro grande del conjunto (competía visualmente con el halo del logo). */
.hero {
  position: relative;
  background-color: var(--navy);
  background-image:
    linear-gradient(
      115deg,
      rgba(15, 23, 42, 0.97) 0%,
      rgba(15, 23, 42, 0.94) 42%,
      rgba(7, 89, 133, 0.93) 76%,
      rgba(12, 74, 110, 0.91) 100%
    ),
    url("../assets/cedic/fondoFractal.jpg");
  background-size:
    auto,
    200% auto;
  background-position:
    center,
    98% 85%;
  background-repeat: no-repeat, no-repeat;
  background-blend-mode: normal, luminosity;
  padding: 168px 0 140px;
  overflow: hidden;
}

/* Sin soporte de background-blend-mode el fractal se vería a todo color
   tapando el título; se cae al gradiente sólido de siempre. */
@supports not (background-blend-mode: luminosity) {
  .hero {
    background-image: linear-gradient(
      135deg,
      var(--navy) 0%,
      var(--blue-dark) 55%,
      #0c4a6e 100%
    );
  }
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(
    ellipse 80% 60% at 50% 40%,
    #000 40%,
    transparent 100%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 80% 60% at 50% 40%,
    #000 40%,
    transparent 100%
  );
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: -140px;
  right: -120px;
  width: 520px;
  height: 520px;
  background: radial-gradient(
    circle,
    rgba(14, 165, 233, 0.28) 0%,
    transparent 68%
  );
  filter: blur(48px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #bae6fd;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 26px;
}

.hero-badge .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.6);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.5);
  }
  70% {
    box-shadow: 0 0 0 11px rgba(14, 165, 233, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
  }
}

.hero-title {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 5.2vw, 3.9rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: #fff;
  margin: 0 0 22px;
}

.hero-title span {
  background: linear-gradient(120deg, #38bdf8, #7dd3fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-motto {
  font-family: "DM Sans", sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  font-style: italic;
  color: #7dd3fc;
  margin: 0 0 18px;
}

.hero-sub {
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.06rem;
  max-width: 540px;
  margin: 0 0 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.32);
}

.btn-primary:hover {
  background: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.42);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.btn .arrow {
  transition: transform 0.22s ease;
}
.btn:hover .arrow {
  transform: translateX(4px);
}

/* Visual del hero: el logo institucional del CEDIC, con halo de apoyo */
/* El halo y el anillo son ::before/::after con border-radius:50%. Sobre una
   caja no cuadrada eso dibuja una ELIPSE, que no queda concéntrica con el
   logo (circular y limitado a 340px): de ahí la sensación de descentrado.
   Forzando proporción 1:1 y el mismo ancho máximo, todo comparte centro. */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1;
  margin-inline: auto;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(56, 189, 248, 0.2) 0%,
    transparent 68%
  );
  filter: blur(34px);
  pointer-events: none;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.hero-logo {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 410px;
  height: auto;
  /* Mismo tratamiento que .central-logo: emblema monocromático a blanco
       puro sobre el gradiente navy del hero, más la sombra que ya tenía. */
  filter: brightness(0) invert(1) drop-shadow(0 18px 40px rgba(0, 0, 0, 0.35));
  animation: floatLogo 8s ease-in-out infinite;
}

@keyframes floatLogo {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* ═══════════════════ SOBRE EL CEDIC ═══════════════════ */
/* La sección monta sobre el hero, como en el mockup */
.about {
  position: relative;
  z-index: 20;
  margin-top: -72px;
  padding-bottom: 96px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.glass-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 48px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
}

.pull-quote {
  font-size: 1.12rem;
  font-weight: 500;
  font-style: italic;
  color: var(--navy);
  border-left: 4px solid var(--blue);
  padding-left: 22px;
  margin: 0 0 28px;
  line-height: 1.65;
}

.about-body p {
  color: var(--slate);
  margin: 0 0 18px;
  line-height: 1.8;
}

.about-sub {
  font-family: "Outfit", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--navy);
  margin: 30px 0 10px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 38px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.stat {
  text-align: center;
}

.stat-num {
  font-family: "Outfit", sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--blue-mid);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--slate);
  letter-spacing: 0.02em;
}

.about-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pillar {
  flex: 1;
  border-radius: 26px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.pillar:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.14);
}

.pillar-teach {
  background: linear-gradient(150deg, var(--navy) 0%, var(--blue-dark) 100%);
  color: #fff;
}

.pillar-share {
  background: linear-gradient(150deg, var(--blue-mid) 0%, var(--blue) 100%);
  color: #fff;
}

.pillar h3 {
  font-size: 1.18rem;
  font-weight: 700;
  margin: 0 0 10px;
}

.pillar p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
  line-height: 1.65;
}

.pillar-icon {
  display: inline-flex;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.9);
}

.pillar-blob {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 130px;
  height: 130px;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  filter: blur(14px);
  transition: transform 0.4s ease;
}

.pillar:hover .pillar-blob {
  transform: scale(1.5);
}

/* ═══════════════════ BENTO: ECOSISTEMA ═══════════════════ */
.bento-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(190px, auto);
  gap: 20px;
}

.bento-item {
  border-radius: 28px;
  padding: 34px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s ease;
}

.bento-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

/* EVEM — el evento madre, ocupa el bloque grande */
.bento-evem {
  grid-column: span 2;
  grid-row: span 2;
  background: linear-gradient(
    160deg,
    var(--navy) 0%,
    #1e3a8a 60%,
    var(--blue-dark) 100%
  );
  color: #fff;
  justify-content: space-between;
}

.bento-festival {
  grid-column: span 2;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--navy);
  flex-direction: row;
  align-items: center;
  gap: 26px;
}

.bento-dim {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--navy);
}

.bento-encomat {
  background: linear-gradient(150deg, #0f766e 0%, #14b8a6 100%);
  color: #fff;
}

.bento-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
  margin-bottom: 12px;
  display: block;
}

.bento-item h3 {
  font-size: 1.32rem;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.25;
}

.bento-evem h3 {
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.bento-item p {
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0;
  opacity: 0.82;
}

.bento-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  margin-top: 22px;
}

.bento-item .arrow {
  transition: transform 0.25s ease;
}
.bento-item:hover .arrow {
  transform: translateX(5px);
}

.bento-emoji {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--blue-mid);
}

.bento-emoji .ico {
  width: 3.2rem;
  height: 3.2rem;
}

.bento-watermark {
  position: absolute;
  right: -18px;
  bottom: -26px;
  font-size: 7rem;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  opacity: 0.07;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.bento-soon {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.22);
  padding: 4px 10px;
  border-radius: 999px;
  margin-top: 14px;
}

/* ═══════════════════ ACTIVIDADES + CARRUSELES ═══════════════════ */
/* Migrado de mat.html con los arreglos acordados:
   el carrusel respeta el padding de la tarjeta, tiene radio propio,
   y un overlay inferior que garantiza contraste de los dots. */
.activities {
  background: var(--bg-soft);
}

.activity-stack {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 44px;
}

.activity-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 26px;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.activity-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

.activity-header {
  padding: 38px 38px 0;
}

.activity-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  line-height: 1;
  background: #eff6ff;
  color: var(--navy-mid);
  /* 0.7rem dejaba el ícono (piso de 14px en .ico) visiblemente más grande
       que la altura de mayúscula del texto. Ver comparación en el informe. */
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.activity-header h3 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.22;
  margin: 0 0 14px;
}

.activity-header p {
  color: var(--slate);
  line-height: 1.75;
  max-width: 660px;
  margin: 0;
}

.carousel-wrap {
  position: relative;
  height: 300px;
  margin: 30px 38px 38px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg);
}

/* Overlay de contraste para los dots: sin él se pierden sobre fotos claras */
.carousel-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent);
  pointer-events: none;
  z-index: 1;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-track img {
  min-width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-empty {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background: var(--bg);
  color: var(--slate-light);
  font-size: 0.9rem;
  text-align: center;
  padding: 20px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--blue-mid);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
  z-index: 2;
}

.carousel-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.carousel-btn .ico {
  width: 18px;
  height: 18px;
}

.carousel-btn.prev {
  left: 14px;
}
.carousel-btn.next {
  right: 14px;
}

.carousel-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
  z-index: 2;
}

/* El punto visual mide 8px, pero el botón real de toque es de 6px con
   0 padding — casi imposible de acertar con un dedo (mínimo recomendado:
   24-44px). Se agranda el hit-area con un ::before invisible centrado,
   sin tocar el tamaño ni el layout de los puntos (el gap de arriba subió
   de 6 a 14px para que las zonas ampliadas de puntos vecinos no se
   solapen entre sí). */
.dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.55);
  border: none;
  padding: 0;
  cursor: pointer;
  transition:
    width 0.3s ease,
    background 0.3s ease;
}

.dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
}

.dot.active {
  width: 22px;
  background: #fff;
}

/* ═══════════════════ OFERTA FORMATIVA ═══════════════════ */
.offer-motto {
  font-family: "DM Sans", sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  font-style: italic;
  color: var(--blue-mid);
  margin: 10px 0 0;
}

.program {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 38px;
  margin-top: 26px;
}

.program-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.program-head h3 {
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--navy);
}

.program-objective {
  color: var(--slate);
  font-size: 0.96rem;
  line-height: 1.7;
  max-width: 580px;
  margin: 0;
}

.program-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

.fact {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 15px;
  min-width: 96px;
}

.fact-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-light);
  margin: 0 0 3px;
}

.fact-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

.program-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 13px 16px;
  margin-top: 22px;
  font-size: 0.87rem;
  color: #92400e;
  line-height: 1.6;
}

.course-list {
  margin-top: 10px;
}

details.course {
  border-bottom: 1px solid var(--border);
}

details.course summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 18px 34px 18px 0;
  position: relative;
  transition: color 0.2s ease;
}

details.course summary::-webkit-details-marker {
  display: none;
}

details.course summary:hover .course-title {
  color: var(--blue-mid);
}

details.course summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 18px;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--blue);
  line-height: 1;
}

details.course[open] summary::after {
  content: "−";
}

.course-num {
  font-family: "Outfit", sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--blue);
  flex-shrink: 0;
  min-width: 24px;
}

.course-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
  transition: color 0.2s ease;
}

.course-body {
  padding: 0 0 24px 38px;
}

.course-body > p {
  font-size: 0.91rem;
  color: var(--slate);
  line-height: 1.78;
  margin: 0 0 18px;
}

.course-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  padding: 18px;
  background: var(--bg-soft);
  border-radius: 14px;
}

.course-meta div p:first-child {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--slate-light);
  margin: 0 0 3px;
}

.course-meta div p:last-child {
  font-size: 0.88rem;
  color: var(--navy);
  margin: 0;
  font-weight: 500;
  line-height: 1.5;
}

.course-dl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue-mid);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}

.course-dl:hover {
  color: var(--blue-dark);
  border-bottom-color: currentColor;
}

.course-unavailable {
  display: inline-block;
  margin-top: 18px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-light);
}

.offer-loading,
.offer-error {
  padding: 40px;
  text-align: center;
  color: var(--slate);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 26px;
  margin-top: 26px;
}

/* ═══════════════════ ICONOS ═══════════════════ */
.ico {
  width: 1em;
  height: 1em;
  min-width: 14px;
  min-height: 14px;
  flex-shrink: 0;
  vertical-align: -0.125em;
}

.ico-lg {
  width: 3rem;
  height: 3rem;
}
.ico-md {
  width: 1.25rem;
  height: 1.25rem;
}

/* ═══════════════════ NAVEGACIÓN ═══════════════════ */
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 7px 12px 7px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
  flex-shrink: 0;
}

.nav-back:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 9px;
  position: relative;
  white-space: nowrap;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.nav-menu a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

/* Sección visible en pantalla → enlace resaltado */
.nav-menu a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-menu a.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: #7dd3fc;
  border-radius: 2px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Botón que abre el drawer lateral (js/drawer.js + components.css).
   Se sobreescribe aquí solo la piel: base blanca de components.css no
   contrasta sobre este navbar oscuro. La visibilidad (display) la fija
   el breakpoint de más abajo, acorde al ancho en que el .nav-menu
   cede paso al drawer en este portal (1024px, no los 768px genéricos). */
.top-bar .drawer-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: none;
  transition: background 0.2s ease;
}

.top-bar .drawer-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
}
.top-bar .drawer-toggle .ico {
  width: 20px;
  height: 20px;
}

/* Compensa el header fijo al saltar por anclas */
section[id],
div[id] {
  scroll-margin-top: 84px;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ═══════════════════ EQUIPO ═══════════════════ */
.team {
  background: var(--bg-soft);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
  margin-top: 44px;
}

.member {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.member:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.member-top {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.member-photo {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--bg);
  background: var(--bg);
}

.member-initials {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  flex-shrink: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: #fff;
  background: linear-gradient(150deg, var(--blue-dark), var(--blue));
}

.member h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
}

.member-role {
  font-size: 0.8rem;
  color: var(--blue-mid);
  font-weight: 600;
  margin: 0;
}

.member-bio {
  font-size: 0.9rem;
  color: var(--slate);
  line-height: 1.72;
  margin: 0;
  flex: 1;
}

.member-bio.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* padding:0 dejaba el botón en ~22px de alto (la mitad del mínimo táctil
   recomendado). El padding vertical amplía el área de toque sin cambiar
   el tamaño visual del texto; el margin-top se reduce lo mismo que crece
   el padding para no mover el botón de su posición original. */
.bio-toggle {
  align-self: flex-start;
  margin-top: 4px;
  background: none;
  border: none;
  padding: 10px 2px;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--blue-mid);
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}

.bio-toggle:hover {
  color: var(--blue-dark);
  border-bottom-color: currentColor;
}

.team-note {
  margin-top: 30px;
  padding: 22px 26px;
  background: var(--white);
  border: 1px dashed rgba(15, 23, 42, 0.14);
  border-radius: 18px;
  font-size: 0.92rem;
  color: var(--slate);
}

.team-note strong {
  color: var(--navy);
}

/* ═══════════════════ CONTENIDOS PROGRAMÁTICOS ═══════════════════ */
.syllabus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 24px;
  margin-top: 44px;
}

.syllabus-col {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 34px;
}

.syllabus-col > h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.syllabus-col > p {
  font-size: 0.9rem;
  color: var(--slate);
  margin: 0 0 22px;
}

details.topic {
  border-top: 1px solid var(--border);
}

details.topic:last-child {
  border-bottom: 1px solid var(--border);
}

details.topic summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 30px 16px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  position: relative;
  transition: color 0.2s ease;
}

details.topic summary::-webkit-details-marker {
  display: none;
}

details.topic summary:hover {
  color: var(--blue-mid);
}

details.topic summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--blue);
  transition: transform 0.25s ease;
}

details.topic[open] summary::after {
  content: "−";
}

details.topic p {
  font-size: 0.89rem;
  color: var(--slate);
  line-height: 1.78;
  margin: 0;
  padding: 0 0 20px;
}

.competencias {
  margin-top: 26px;
  padding: 22px;
  background: var(--bg-soft);
  border-radius: 16px;
}

.competencias h4 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin: 0 0 14px;
}

.competencias ul {
  margin: 0;
  padding-left: 18px;
}

.competencias li {
  font-size: 0.88rem;
  color: var(--slate);
  line-height: 1.6;
  margin-bottom: 9px;
}

.competencias li:last-child {
  margin-bottom: 0;
}

/* ═══════════════════ SEDE Y CONTACTO ═══════════════════ */
.venue {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue-dark) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.venue::before {
  content: "";
  position: absolute;
  top: -120px;
  left: -80px;
  width: 420px;
  height: 420px;
  background: radial-gradient(
    circle,
    rgba(14, 165, 233, 0.22) 0%,
    transparent 70%
  );
  filter: blur(40px);
}

.venue-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.venue .section-title {
  color: #fff;
}

.venue-address {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.8;
  margin: 0 0 8px;
}

.venue-ref {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
  font-size: 0.85rem;
  font-weight: 600;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(14, 165, 233, 0.3);
  padding: 8px 16px;
  border-radius: 999px;
  margin-top: 14px;
}

.contact-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 34px;
  backdrop-filter: blur(8px);
}

.contact-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 22px;
  color: #fff;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.contact-row .contact-ico {
  color: #7dd3fc;
  margin-top: 2px;
  flex-shrink: 0;
}

.contact-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 3px;
}

.contact-value {
  font-size: 0.95rem;
  color: #fff;
  margin: 0;
  font-weight: 500;
}

.contact-value a {
  color: #7dd3fc;
  text-decoration: none;
  display: inline-block;
  padding: 4px 0;
}

.contact-value a:hover {
  text-decoration: underline;
}

/* Dos teléfonos que antes vivían en la misma línea separados por "·":
   dos enlaces tel: de ~20px de alto pegados uno al otro es fácil de
   confundir al tocar. Se apilan en líneas propias, cada una con su
   propio padding vertical de arriba. */
.contact-value-multi {
  display: flex;
  flex-direction: column;
}

/* ═══════════════════ CTA FINAL ═══════════════════ */
.final-cta {
  padding: 96px 0;
  background: var(--bg-soft);
  text-align: center;
}

.final-cta-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 64px 40px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.07);
}

.final-cta h2 {
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  color: var(--navy);
}

.final-cta p {
  color: var(--slate);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 32px;
}

.final-cta .hero-actions {
  justify-content: center;
}

.btn-dark {
  background: var(--navy);
  color: #fff;
}

.btn-dark:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
}

.btn-outline {
  background: transparent;
  border-color: rgba(15, 23, 42, 0.18);
  color: var(--navy);
}

.btn-outline:hover {
  background: var(--bg);
  border-color: var(--navy);
  transform: translateY(-2px);
}

/* ═══════════════════ FOOTER ═══════════════════ */
.footer {
  background: var(--navy);
  color: #fff;
  padding: 72px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-logo {
  max-width: 140px;
  margin-bottom: 16px;
  /* Logo UNET, también monocromático: mismo tratamiento que los otros dos. */
  filter: brightness(0) invert(1);
}

.footer-col p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 8px;
}

/* Blanco y Title Case, igual que en el resto del sitio (antes celeste
   #7dd3fc en mayúsculas) — footer unificado entre EVEM y CEDIC. */
.footer-col h4 {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin: 0 0 18px;
}

.footer-lead {
  line-height: 1.7;
  max-width: 34ch;
  margin: 0 0 10px;
}

.footer-phone,
.footer-email {
  display: flex;
  align-items: center;
  gap: 9px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a .ico {
  opacity: 0.6;
}
.footer-links a:hover .ico {
  opacity: 1;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.86rem;
  margin: 0;
}

/* Botón "volver arriba": no se carga components.css en el portal CEDIC,
   así que se define acá para que combine con el resto del sitio (inyectado
   por js/animations.js, cargado junto a cedic.js en footer.php). */
.back-to-top {
  position: fixed;
  /* max() respeta el borde inferior en iPhones con home indicator sin
       cambiar nada en dispositivos sin esa franja (env() cae en 0). */
  bottom: max(32px, calc(env(safe-area-inset-bottom) + 16px));
  right: 32px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  color: #ffffff;
  font-size: 1.2rem;
  line-height: 1;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.4);
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  transform: translateY(-5px);
}

/* ═══════════════════ REVEAL ═══════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-logo {
    animation: none;
  }
  .hero-badge .pulse {
    animation: none;
  }
  .carousel-track {
    transition: none;
  }
}

/* ═══════════════════ RESPONSIVE ═══════════════════ */
@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-visual {
    max-width: 380px;
    margin: 0 auto;
  }

  /* El hero usa `200% auto` en escritorio para acercar los filamentos
       del fractal al lado del logo. Acá el grid pasa a una columna (texto
       arriba, logo abajo) y el hero se alarga mucho más de lo que ese
       tamaño fijo cubre — dejaría ver el color plano por debajo. `cover`
       lo evita en cualquier alto. */
  .hero {
    background-size: auto, cover;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .venue-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-evem {
    grid-column: span 2;
    grid-row: span 1;
  }
  .bento-festival {
    grid-column: span 2;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* Antes de que los enlaces choquen con la gota central, la etiqueta
   del botón de retorno se oculta y queda solo el chevron */
@media (max-width: 1080px) {
  .nav-back-label {
    display: none;
  }
  .nav-back {
    padding: 7px 9px;
  }
  .nav-left {
    gap: 12px;
  }
  .nav-menu a {
    padding: 8px 9px;
    font-size: 0.83rem;
  }
}

/* El grupo de enlaces mide ~400px y la gota centrada ocupa el centro ±46px:
   por debajo de 1024px se solapan, así que el menú cede al panel desplegable
   antes de que eso pase. */
@media (max-width: 1024px) {
  .nav-menu {
    display: none;
  }
  .top-bar .drawer-toggle {
    display: inline-flex;
  }
}

@media (max-width: 900px) {
  .nav-inner {
    padding: 0 14px;
    height: 60px;
  }

  /* En móvil la gota ya nace compacta: no hay protuberancia que domar */
  .central-logo-container {
    position: relative;
    transform: none;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  }

  .central-logo {
    max-height: 26px;
  }

  .top-bar.scrolled .central-logo-container {
    top: 0;
  }

  .nav-cta {
    font-size: 0.8rem;
    padding: 7px 13px;
  }

  section[id],
  div[id] {
    scroll-margin-top: 76px;
  }
}

@media (max-width: 420px) {
  .nav-cta {
    display: none;
  }
}

@media (max-width: 700px) {
  .wrap {
    padding: 0 16px;
  }
  .section {
    padding: 64px 0;
  }
  .hero {
    padding: 128px 0 96px;
  }
  .about {
    margin-top: -48px;
    padding-bottom: 64px;
  }
  .glass-card {
    padding: 30px 24px;
  }
  .section-title {
    font-size: 1.7rem;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
  .bento {
    grid-template-columns: 1fr;
  }
  .bento-evem,
  .bento-festival {
    grid-column: span 1;
  }
  .bento-festival {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .bento-item {
    padding: 28px;
  }
  .bento-evem h3 {
    font-size: 1.6rem;
  }
  .syllabus-col {
    padding: 26px 22px;
  }
  .final-cta-box {
    padding: 44px 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .final-cta .hero-actions {
    flex-direction: column;
  }
}

/* ══════════════════════════════════════════════════════════════
   CABECERA DE SUBPÁGINA
   Las páginas internas no tienen el hero grande: entran con una
   banda compacta que despeja el navbar fijo y ubica al visitante.
   ══════════════════════════════════════════════════════════════ */
.page-hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue-dark) 100%);
  padding: 132px 0 64px;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -160px;
  right: -100px;
  width: 460px;
  height: 460px;
  background: radial-gradient(
    circle,
    rgba(14, 165, 233, 0.24) 0%,
    transparent 68%
  );
  filter: blur(46px);
  pointer-events: none;
}

.page-hero-inner {
  position: relative;
  z-index: 2;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 20px;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb .sep {
  opacity: 0.4;
}

.breadcrumb [aria-current="page"] {
  color: #7dd3fc;
}

.page-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 16px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.03rem;
  line-height: 1.7;
  max-width: 620px;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   NAVEGACIÓN CRUZADA
   Cierre de cada subpágina para que no sea un callejón sin salida.
   ══════════════════════════════════════════════════════════════ */
.next-nav {
  background: var(--bg-soft);
  padding: 72px 0;
}

.next-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.next-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  text-decoration: none;
  color: var(--navy);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.next-card:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}

.next-card .ico {
  color: var(--blue-mid);
  width: 22px;
  height: 22px;
}

.next-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.next-card p {
  font-size: 0.89rem;
  color: var(--slate);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.next-card span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-mid);
}

.next-card:hover .arrow {
  transform: translateX(4px);
}

/* ══════════════════════════════════════════════════════════════
   TEASERS DE LA LANDING
   Resúmenes que reemplazan a las secciones que se mudaron a
   página propia. Todos terminan en un enlace "ver más".
   ══════════════════════════════════════════════════════════════ */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.section-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease;
}

.section-cta:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  transform: translateY(-2px);
}

.section-cta:hover .arrow {
  transform: translateX(4px);
}

/* ── Teaser de actividades: 3 tarjetas con foto de portada ── */
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.teaser-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(160deg, var(--navy) 0%, var(--blue-dark) 100%);
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.35s ease;
}

.teaser-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.22);
}

/* La portada la inyecta cedic.js con la primera imagen de la carpeta */
.teaser-cover {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.teaser-cover.cargada {
  opacity: 1;
}

.teaser-card:hover .teaser-cover {
  transform: scale(1.05);
}

.teaser-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 20, 40, 0.92) 8%,
    rgba(8, 20, 40, 0.45) 48%,
    rgba(8, 20, 40, 0.18) 100%
  );
}

.teaser-body {
  position: relative;
  z-index: 2;
}

.teaser-card .activity-tag {
  background: rgba(255, 255, 255, 0.16);
  color: #e0f2fe;
  margin-bottom: 12px;
}

.teaser-card h3 {
  font-size: 1.16rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}

.teaser-card p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin: 0 0 14px;
}

.teaser-card .ver {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #7dd3fc;
}

.teaser-card:hover .arrow {
  transform: translateX(4px);
}

/* ── Teaser de formación: 3 tarjetas de programa desde el JSON ── */
.teaser-programs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.program-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--navy);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.program-card:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
}

.program-card .count {
  font-family: "Outfit", sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 4px;
}

.program-card .count small {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--slate-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-top: 6px;
}

.program-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 18px 0 8px;
  line-height: 1.35;
}

.program-card p {
  font-size: 0.88rem;
  color: var(--slate);
  line-height: 1.65;
  margin: 0 0 18px;
  flex: 1;
}

.program-card .pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.program-card .pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue-dark);
  background: #eff6ff;
  border-radius: 999px;
  padding: 5px 11px;
}

.program-card .ver {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-mid);
}

.program-card:hover .arrow {
  transform: translateX(4px);
}

/* ── Teaser de contenidos: franja con dos accesos ── */
.teaser-contents {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.content-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px 28px;
  text-decoration: none;
  color: var(--navy);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.content-card:hover {
  transform: translateY(-3px);
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.09);
}

.content-card .badge {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: linear-gradient(150deg, var(--blue-dark), var(--blue));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.content-card .badge .ico {
  width: 24px;
  height: 24px;
}

.content-card h3 {
  font-size: 1.04rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.content-card p {
  font-size: 0.87rem;
  color: var(--slate);
  margin: 0;
  line-height: 1.55;
}

.content-card .arrow {
  color: var(--blue-mid);
  margin-left: auto;
  flex-shrink: 0;
}

.content-card:hover .arrow {
  transform: translateX(4px);
}

@media (max-width: 700px) {
  .page-hero {
    padding: 108px 0 48px;
  }
  .section-head {
    margin-bottom: 26px;
  }
  .section-cta {
    width: 100%;
    justify-content: center;
  }
  .next-nav {
    padding: 52px 0;
  }
  .teaser-card {
    min-height: 220px;
    padding: 22px;
  }
  .program-card,
  .content-card {
    padding: 24px;
  }
  .content-card {
    gap: 16px;
  }

  /* Bug de overflow horizontal: .program-facts tenía flex-shrink:0 Y
       flex-wrap:wrap a la vez — el shrink:0 le impedía contraerse a su
       columna, así que el propio flex-wrap nunca llegaba a activarse y
       las cajas Duración/Costo/Inicio/Metodología se salían del viewport
       en vez de envolver a una segunda fila. */
  .program-facts {
    flex-shrink: 1;
    width: 100%;
    min-width: 0;
  }
}

/* ══════════════════════════════════════════════════════════════
   SWIPEABLE CARDS — solo <768px
   "Eventos e iniciativas" (.bento), "Formación" (.teaser-programs),
   "Nuestros profesores" (.team-grid) y "Actividades y encuentros"
   (.teaser-grid) usan grid con auto-fit/1fr, que en móvil colapsa a
   una sola columna: tarjetas apiladas verticalmente, alargando la
   página muchísimo ("fatiga de scroll"). .teaser-grid quedó afuera
   en el primer pase (solo se pidieron las otras 3); se suma acá con
   el mismo tratamiento tras la auditoría, mismo síntoma y causa.
   Se convierten en cintas horizontales con scroll-snap. No toca
   nada de >=768px: son reglas nuevas, no overrides de las de grid.
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .bento,
  .teaser-programs,
  .team-grid,
  .teaser-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 1rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }

  .bento::-webkit-scrollbar,
  .teaser-programs::-webkit-scrollbar,
  .team-grid::-webkit-scrollbar,
  .teaser-grid::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }

  .bento-item,
  .program-card,
  .member,
  .teaser-card {
    flex: 0 0 85% !important;
    max-width: 85% !important;
    scroll-snap-align: center;
  }

  /* Aire a los extremos para que la primera/última tarjeta no
       queden pegadas al borde del viewport durante el recorrido */
  .bento > :first-child,
  .teaser-programs > :first-child,
  .team-grid > :first-child,
  .teaser-grid > :first-child {
    scroll-margin-left: 1rem;
  }
}
