/* Landings DIFIC 2027 (Chile y LatAm). Papel recortado + minimalismo IFICC; colores tomados de las piezas de Canva. */
/* Color de texto por mención: el color exacto, salvo ámbar y naranja, que como texto no alcanzan contraste y se oscurecen. */
:root {
  --texto-general: var(--general); --texto-ciencias_cognitivas: var(--ciencias_cognitivas); --texto-biologia: var(--biologia); --texto-sistemas_complejos: var(--sistemas_complejos);
  --texto-economia: color-mix(in srgb, var(--economia) 72%, #000); --texto-fisica: color-mix(in srgb, var(--fisica) 72%, #000);
}
@property --acento { syntax: "<color>"; inherits: true; initial-value: #454d54; } /* registrada para poder animar el cambio de color */
:root {
  --tinta: #111; --suave: #555; --linea: #dcdbd4; --papel: #f6f5f0; --gris: #ecebe4; --negro: #0b0b0b;
  --cta: #111; --cta-tinta: #fff; --foco: #0066cc;
  --economia: #f19404; --ciencias_cognitivas: #21487f; --fisica: #f96936; --biologia: #0c6b45; --sistemas_complejos: #472c7e;
  --general: #454d54;
  --acento: var(--general); /* ?mencion= o el selector del hero lo reemplazan */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --sombra-papel: 0 1px 2px rgba(0,0,0,.1), 0 8px 18px rgba(0,0,0,.09);
  --titulo: "Inter", "Arial Black", Arial, sans-serif;
  --cuerpo: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ancho: 1120px;
}
/* En :root y .hero: el hero cambia de color por su cuenta mientras rota, sin recalcular toda la página. */
:root, .hero {
  --acento-texto: var(--texto-general); /* el selector del hero y ?mencion= lo cambian por var(--texto-<mención>) */
  --acento-claro: color-mix(in srgb, var(--acento) 45%, #fff);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font: 400 17px/1.6 var(--cuerpo); color: var(--tinta); background: var(--papel); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--titulo); font-weight: 800; line-height: 1.08; letter-spacing: -.015em; margin: 0 0 .5em; text-transform: uppercase; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.envoltura { max-width: var(--ancho); margin: 0 auto; padding: 0 16px; }
.seccion { padding: clamp(56px, 8vw, 96px) 0; }
.seccion--gris { background: var(--gris); }
.seccion--negra { background: var(--negro); color: #fff; }
.antetitulo { font: 600 .8rem/1.2 var(--cuerpo); letter-spacing: .14em; text-transform: uppercase; color: var(--suave); margin-bottom: .75em; }
.seccion--negra .antetitulo { color: #bbb; }
.intro { max-width: 680px; color: var(--suave); }
.seccion--negra .intro { color: #ccc; }
.solo-lector { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.saltar:focus { left: 8px; }

/* Botones */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 12px 26px; border: 2px solid var(--cta); border-radius: 4px;
  background: var(--cta); color: var(--cta-tinta); font: 600 1rem/1.2 var(--cuerpo); text-decoration: none; cursor: pointer; transition: transform .15s, background .15s; }
.boton:hover { background: #333; }
.boton:active { transform: translateY(1px); }
.boton--borde { background: transparent; color: inherit; border-color: currentColor; }
.boton--borde:hover { background: rgba(127,127,127,.12); }
.boton[disabled] { opacity: .6; cursor: wait; }

/* Barra superior */
.barra { position: sticky; top: 0; z-index: 50; background: rgba(246,245,240,.96); border-bottom: 1px solid var(--linea); backdrop-filter: blur(6px); }
.barra .envoltura { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.barra img { width: 260px; max-width: 58vw; }
.barra .boton { min-height: 40px; padding: 8px 18px; }

/* Hero */
.hero { background: linear-gradient(160deg, var(--papel) 55%, var(--gris)); padding: clamp(32px, 6vw, 72px) 0 clamp(64px, 8vw, 96px); overflow: hidden; transition: --acento .25s ease; }
.hero__rejilla { display: grid; gap: 20px 32px; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) {
  .hero__rejilla { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .hero__menciones { grid-column: 1 / -1; grid-row: 2; }
  .hero__pie { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
  .hero__pie .hero__datos { margin: 0; }
}
.hero__sello { display: flex; align-items: center; gap: 12px; margin-bottom: clamp(20px, 3vw, 36px); font-size: .85rem; line-height: 1.2; text-transform: uppercase; }
.hero__sello svg { width: 26px; height: 40px; flex: none; }
.hero__sello b { font: 800 1.25rem/1 var(--titulo); padding-right: 12px; border-right: 1px solid var(--tinta); }
.hero__punto { display: block; flex: none; /* va dentro del h1: acompaña al texto aunque el alto reservado cambie */ width: 16px; height: 16px; border-radius: 50%; background: var(--acento); margin-bottom: 12px; }
.hero h1 { font-size: clamp(2.3rem, 6.2vw, 4.4rem); line-height: 1; margin-bottom: 4px; display: flex; flex-direction: column; justify-content: flex-end; } /* el alto reservado (JS) queda arriba: el título se apoya en las tarjetas */
.hero h1 small { display: block; font: 600 clamp(.85rem, 1.5vw, 1rem)/1.3 var(--cuerpo); letter-spacing: .04em; margin-bottom: 12px; }
.hero h1 span { display: block; color: var(--acento-texto); }
@supports (-webkit-text-stroke: 1px #000) {
  .hero h1 .contorno { color: var(--papel); paint-order: stroke fill; -webkit-text-stroke: clamp(2px, .4vw, 4px) var(--acento-texto); } /* el relleno tapa los trazos internos de la fuente */
}
.hero__datos { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; padding: 0; margin: 22px 0 28px; font-weight: 600; font-size: .95rem; }
.hero__datos li::before { content: "● "; color: var(--acento); }
.hero__acciones { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__figura { width: 100%; max-width: 330px; aspect-ratio: 1; contain: size; justify-self: center; display: grid; place-items: center; } /* contain: el alto lo da el cuadrado, no la imagen (Biología es más alta y movía la página) */
@media (max-width: 859px) {
  /* En móvil la ilustración va junto al sello, para que el selector y el botón entren en la primera pantalla. */
  .hero__rejilla { position: relative; }
  .hero__figura { position: absolute; top: -10px; right: 16px; width: 112px; }
  .hero__sello { margin-bottom: 52px; }
  .hero h1 { font-size: clamp(2.1rem, 9.5vw, 3rem); margin-bottom: 0; }
  .hero__pie .hero__datos { margin: 10px 0 14px; font-size: .88rem; }
}
.hero__figura > * { grid-area: 1 / 1; width: 100%; height: 100%; }
.hero__figura img { object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0,0,0,.18)); transition: opacity .2s var(--ease-out), transform .25s var(--ease-out); }
/* El cerebro es más ancho que alto y deja más aire: se agranda para que a la vista pese como las demás. */
img[src*="/ciencias_cognitivas"] { scale: 1.15; }
#h1-antes, #h1-a, #h1-b { transition: opacity .2s var(--ease-out), transform .25s var(--ease-out); }
.hero--cambiando .hero__figura img, .hero--cambiando #h1-antes, .hero--cambiando #h1-a, .hero--cambiando #h1-b { opacity: 0; }

/* Selector de menciones */
.hero__menciones { min-width: 0; }
.hero__menciones-cabeza { display: flex; justify-content: flex-end; align-items: baseline; gap: 16px; margin-bottom: 2px; font-size: .95rem; font-weight: 600; }
.hero__pausa { flex: none; border: 0; padding: 4px 0; background: none; color: var(--suave); font: inherit; line-height: 1.2; font-weight: 400; font-size: .85rem; text-decoration: underline; cursor: pointer; }
.chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.chip { position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px 10px; border: 0; border-radius: 2px; background: #fff; box-shadow: var(--sombra-papel); color: var(--tinta); font: 600 .82rem/1.15 var(--cuerpo); text-align: left; cursor: pointer; transition: transform .2s var(--ease-out); }
.chip img { width: 38px; height: 38px; flex: none; object-fit: contain; filter: grayscale(1); opacity: .65; transition: opacity .2s ease, filter .2s ease; }
.chip[aria-pressed="true"] img { filter: none; opacity: 1; }
.chip__barra { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--color); transform: scaleX(0); transform-origin: left; }
.chip[aria-pressed="true"] .chip__barra { transform: scaleX(1); }
.hero--auto .chip[aria-pressed="true"] .chip__barra { animation: avance 4.5s linear both; }
.hero--inicio .chip:first-child .chip__barra { animation: avance-inicio 4.5s linear both; } /* otro nombre: si fuera el mismo, no se reiniciaría al activarse esa tarjeta */
.hero--pausa .chip__barra, .hero--fuera .chip__barra, .chips:focus-within .chip__barra { animation-play-state: paused !important; }
@keyframes avance { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes avance-inicio { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (hover: hover) and (pointer: fine) {
  .chips:hover .chip__barra { animation-play-state: paused !important; }
  .chip:hover img { filter: none; opacity: 1; }
}
@media (max-width: 859px) {
  /* En móvil se desliza de lado; la tarjeta asomada indica que hay más. */
  .chips { display: flex; overflow-x: auto; scroll-snap-type: x proximity; margin: 0 -16px; padding: 4px 16px 12px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 136px; scroll-snap-align: center; }
}

/* Movimiento: solo si la persona no pidió reducirlo */
@media (prefers-reduced-motion: no-preference) {
  .whatsapp::before { animation: wa-pulso 3.5s ease-out 2s infinite; } /* onda suave que sale del botón */
  .wa-qr:not([hidden]) { animation: wa-qr-entra .2s var(--ease-out); }
  .carrusel__pista { scroll-behavior: smooth; }
  /* Acordeones: la altura se anima donde el navegador lo permite (Chrome y Edge); en los demás el contenido solo aparece con un fundido. */
  .mencion, .faq details { interpolate-size: allow-keywords; }
  .mencion::details-content, .faq details::details-content { block-size: 0; overflow: clip; transition: block-size .3s var(--ease-out), content-visibility .3s allow-discrete; }
  .mencion[open]::details-content, .faq details[open]::details-content { block-size: auto; }
  .mencion[open] > :not(summary), .faq details[open] > div { animation: acordeon-entra .3s var(--ease-out); }
  .hero__figura { animation: flotar 7s ease-in-out infinite alternate; }
  .hero--cambiando .hero__figura img { transform: scale(.97); }
  .hero--cambiando #h1-antes, .hero--cambiando #h1-a, .hero--cambiando #h1-b { transform: translateY(6px); }
  .chip { animation: chip-entra .4s var(--ease-out) both; animation-delay: calc(var(--i) * 50ms + 120ms); }
  .chip:active { transform: scale(.97); }
  .rev { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
  .rev--visto { opacity: 1; transform: none; }
  @media (hover: hover) and (pointer: fine) {
    .chip:hover, .pago:hover { transform: translateY(-2px); }
    .pago { transition: transform .2s var(--ease-out); }
  }
}
@keyframes flotar { from { transform: translateY(-4px); } to { transform: translateY(4px); } }
@keyframes chip-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media print { .rev { opacity: 1 !important; transform: none !important; } }
.hero__papel { overflow: visible; }
.hero__papel use { filter: drop-shadow(0 3px 5px rgba(0,0,0,.28)); }
.hero__papel .c1 { fill: #fff; }
.hero__papel .c2 { fill: color-mix(in srgb, var(--acento) 12%, #fff); }
.hero__papel .c3 { fill: color-mix(in srgb, var(--acento) 28%, #fff); }
.hero__papel .c4 { fill: color-mix(in srgb, var(--acento) 48%, #fff); }
.hero__papel .c5 { fill: color-mix(in srgb, var(--acento) 72%, #fff); }
.hero__papel .c6 { fill: var(--acento); }
.hero__papel .c7 { fill: color-mix(in srgb, var(--acento) 55%, #000); }

/* Borde de papel recortado sobre las bandas negras */
.con-corte { position: relative; }
.corte { position: absolute; left: 0; bottom: 100%; width: 100%; height: clamp(18px, 3vw, 36px); margin-bottom: -1px; display: block; fill: var(--negro); filter: drop-shadow(0 -3px 4px rgba(0,0,0,.18)); pointer-events: none; }

/* Franja de fase */
.fase { background: var(--negro); color: #fff; padding: 28px 0; }
.fase .envoltura { display: grid; gap: 20px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 860px) { .fase .envoltura { grid-template-columns: 1.3fr 1fr auto; } }
.fase__nombre { font: 600 .8rem/1 var(--cuerpo); letter-spacing: .14em; text-transform: uppercase; }
.fase__gancho { font: 800 clamp(1.3rem, 3vw, 1.75rem)/1.15 var(--titulo); text-transform: uppercase; margin: 6px 0 4px; }
.fase__urgencia { margin: 0; font-size: .95rem; }
.contador { display: flex; gap: 10px; font-variant-numeric: tabular-nums; }
.contador div { min-width: 64px; text-align: center; background: #fff; color: #111; padding: 10px 6px 8px; border-radius: 4px; }
.contador b { display: block; font: 800 1.8rem/1 var(--titulo); }
.contador span { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--suave); }
.fase .boton { background: #fff; color: #111; border-color: #fff; }
.fase .boton:hover { background: #ddd; }

/* Grillas */
.grilla { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pilar { border-top: 4px solid var(--tinta); padding-top: 16px; }
.pilar strong { display: block; font: 800 1.9rem/1.05 var(--titulo); margin-bottom: 8px; }
.pilar p { color: var(--suave); margin: 0; }

/* Cómo funciona */
.linea-tiempo { display: grid; gap: 0; grid-template-columns: 1fr; margin-top: 32px; }
@media (min-width: 760px) { .linea-tiempo { grid-template-columns: 1fr 1fr; } }
.semestre { border: 2px solid #fff; padding: 24px; }
.semestre + .semestre { border-top: 0; }
@media (min-width: 760px) { .semestre + .semestre { border-top: 2px solid #fff; border-left: 0; } }
.semestre h3 { margin-bottom: .25em; }
.semestre ul { margin: 12px 0 0; padding-left: 1.1em; color: #ddd; }
.semestre__resumen { margin: 12px 0 0; color: #ddd; max-width: 46ch; }
.carrusel__pista { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.carrusel__pista::-webkit-scrollbar { display: none; }
.carrusel__panel { flex: 0 0 100%; scroll-snap-align: start; }
.carrusel__nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.carrusel__nav button { padding: 5px 12px; border: 1px solid #555; border-radius: 99px; background: none; color: #aaa; font: 600 .78rem/1.2 var(--cuerpo); cursor: pointer; transition: color .2s ease, border-color .2s ease, background-color .2s ease; }
.carrusel__nav button:hover { color: #fff; border-color: #888; }
.carrusel__nav button[aria-current="true"] { background: #fff; border-color: #fff; color: var(--tinta); }
.semestre__clases { color: #aaa; font-size: .9em; }
.semestre__docentes { margin: 12px 0 0; color: #ddd; }
.semestre__docentes:empty { display: none; }
.modalidades { margin-top: 32px; }
.modalidades .pilar { border-color: #fff; }
.modalidades .pilar p { color: #ccc; }
.hora-local { display: block; margin-top: 6px; font-size: .9rem; color: #fff; }

/* Menciones */
.menciones { display: grid; gap: 12px; margin-top: 32px; }
.mencion { background: #fff; box-shadow: var(--sombra-papel); border-radius: 2px; }
.mencion summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; font: 800 1.2rem/1.2 var(--titulo); text-transform: uppercase; }
.mencion summary::-webkit-details-marker { display: none; }
.mencion summary span { display: flex; align-items: center; gap: 12px; }
.mencion summary span::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--color, var(--tinta)); flex: none; }
.mencion summary::after { content: "+"; font: 400 1.8rem/1 var(--cuerpo); }
.mencion[open] summary::after { content: "−"; }
.mencion__cuerpo { padding: 0 20px 20px; }
.mencion__cuerpo ol { padding-left: 1.2em; margin: 0 0 16px; }
.mencion__etiqueta { display: none; }
.mencion--destacada .mencion__etiqueta { display: block; }
.mencion__docentes { font-size: .95rem; color: var(--suave); }
.mencion--destacada { box-shadow: 0 0 0 3px var(--color); }
.etiqueta { display: inline-block; font: 600 .7rem/1 var(--cuerpo); letter-spacing: .1em; text-transform: uppercase; background: var(--color-texto, color-mix(in srgb, var(--color) 72%, #000)); color: #fff; padding: 5px 8px; border-radius: 2px; }

/* Docentes */
.filtro { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 24px 0; }
select, input { font: inherit; color: inherit; }
.filtro select { min-height: 44px; padding: 8px 12px; border: 2px solid var(--tinta); border-radius: 4px; background: #fff; }
.docentes { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; background: var(--linea); border: 1px solid var(--linea); grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.docentes li { background: #fff; padding: 16px; }
.docentes b { display: block; }
.docentes small { color: var(--suave); }
.aviso { font-size: .9rem; color: var(--suave); border-left: 3px solid var(--acento); padding-left: 10px; }

/* Testimonios */
.videos { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 280px)); justify-content: center; margin-top: 32px; }
@media (max-width: 859px) {
  /* En móvil se deslizan de lado, como los shorts; apiladas ocuparían varias pantallas. */
  .videos { display: flex; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; margin: 32px -16px 0; padding: 0 16px 12px; scrollbar-width: none; }
  .videos::-webkit-scrollbar { display: none; }
  .video { flex: 0 0 min(68vw, 280px); scroll-snap-align: center; }
}
.video { position: relative; aspect-ratio: 9 / 16; background: #222; border: 0; border-radius: 10px; padding: 0; cursor: pointer; overflow: hidden; width: 100%; box-shadow: var(--sombra-papel); }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.video:hover img { opacity: 1; }
.video::after { content: ""; position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 12px; background: #fff
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 28px no-repeat; }
.video--activo { cursor: auto; }
.video--activo::after { content: none; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Precios */
.precio-destacado { display: grid; gap: 16px; margin: 32px 0 16px; }
.valor-bloque { background: #fff; box-shadow: var(--sombra-papel); padding: clamp(20px, 3vw, 28px); }
.valor-bloque--negro { background: var(--negro); color: #fff; border-color: var(--negro); }
.valor-bloque__ante { font: 600 .75rem/1.2 var(--cuerpo); letter-spacing: .1em; text-transform: uppercase; color: var(--suave); margin-bottom: 8px; }
.valor-bloque--negro .valor-bloque__ante { color: #bbb; }
.valor-bloque > :last-child { margin-bottom: 0; }
.beneficios { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 600; }
.beneficios li::before { content: "● "; color: var(--acento-claro); }
.tarjetas-pago { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 12px; }
.tarjetas-pago p { margin-bottom: .25em; }
.tarjeta h4 { font: 600 1rem/1.2 var(--cuerpo); margin: 0; }
.tarjeta__nota { font-size: .9rem; color: var(--suave); }
.tramos-grupo { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.tramos-grupo li { border-top: 3px solid var(--tinta); padding-top: 8px; }
.tramos-grupo b { display: block; font: 600 1.35rem/1.15 var(--titulo); letter-spacing: -.01em; }
.tramos-grupo span { font-size: .9rem; color: var(--suave); }
.valor-accion { margin: 8px 0 0; text-align: center; }
.todas-fases { margin-top: 16px; }
.todas-fases summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.tarjeta { padding: 20px; background: var(--papel); box-shadow: var(--sombra-papel); }
.tarjeta--negra { background: var(--negro); color: #fff; border-color: var(--negro); }
.tarjeta h3 { font-size: 1rem; letter-spacing: .08em; }
.monto { font: 600 clamp(1.4rem, 2.6vw, 1.7rem)/1.1 var(--titulo); letter-spacing: -.01em; margin: 8px 0; }
.monto small { font: 400 1rem var(--cuerpo); }
.tachado { text-decoration: line-through; color: var(--suave); }
.tarjeta--negra .tachado { color: #aaa; }
.tarjeta ul { padding-left: 1.1em; margin: 12px 0 0; }
.tabla-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 620px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--linea); vertical-align: top; }
th { font: 600 .75rem/1.2 var(--cuerpo); letter-spacing: .08em; text-transform: uppercase; color: var(--suave); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.vigente { background: var(--gris); font-weight: 600; }
tr.vigente td:first-child { box-shadow: inset 6px 0 0 var(--tinta); }
tr.pasada { color: #999; }
tr.pasada td.num { text-decoration: line-through; }

/* Cotizador */
.cotizador { width: min(880px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 8px; color: var(--tinta); background: #fff; }
.cotizador::backdrop { background: rgba(0, 0, 0, .65); }
body:has(.cotizador[open]) { overflow: hidden; }
.cot__cabeza { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--linea); }
.cot__cabeza h2 { font-size: 1.35rem; margin: 0; }
.cot__cerrar { width: 44px; height: 44px; flex: none; margin: -8px -10px -8px 0; border: 0; background: none; font-size: 1.8rem; line-height: 1; color: inherit; cursor: pointer; }
.cot__cuerpo { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 780px) { .cot__cuerpo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.cot__opciones { display: grid; gap: 28px; align-content: start; padding: 28px 24px 32px; }
.cot__opciones .campo { margin: 0; gap: 10px; }
.cot__panel { display: grid; gap: 20px; align-content: start; padding: 28px 24px 32px; background: var(--papel); }
.cotizador fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.cotizador legend { font-weight: 600; font-size: .95rem; padding: 0; margin-bottom: 10px; }
.opciones { display: flex; flex-wrap: wrap; gap: 10px; }
.opcion { flex: 1 1 auto; position: relative; cursor: pointer; }
.opcion > input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opcion > span { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 14px; border: 1px solid #aaa; border-radius: 4px; font-weight: 600; white-space: nowrap; }
.opcion > input:checked + span { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.opcion > input:focus-visible + span { outline: 3px solid var(--foco); outline-offset: 2px; }
#cot-resultado { display: grid; gap: 20px; }
#cot-resultado > * { margin: 0; }
.cot-total { display: grid; gap: 4px; }
.cot-total span { font-size: .9rem; color: var(--suave); }
.cot-total strong { font: 600 1.9rem/1.15 var(--titulo); letter-spacing: -.01em; margin-bottom: 4px; }
.cot-total small { color: var(--suave); font-size: .9rem; }
.desglose { font-size: .92rem; border-top: 1px solid var(--linea); }
.desglose > div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.desglose dd { margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.desglose__suma { font-weight: 600; }
.cot-empujon { font-weight: 600; font-size: .95rem; background: #fff; border-left: 3px solid var(--acento); padding: 12px 14px; }
.cot__panel .tarjeta__nota { margin: -8px 0 0; font-size: .85rem; text-align: center; }
.cotizador .boton { width: 100%; }

/* Pagos */
.pagos { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 24px; }
.pago { box-shadow: var(--sombra-papel); padding: 20px; background: #fff; }
.pago b { font: 800 1.3rem/1.2 var(--titulo); text-transform: uppercase; display: block; margin-bottom: 4px; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--linea); }
.faq summary { cursor: pointer; padding: 18px 32px 18px 0; font-weight: 600; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.5rem; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 18px; color: var(--suave); max-width: 760px; }
.tabla-horas__intro { display: block; margin-top: 12px; }
.tabla-horas { min-width: 0; margin: 8px 0; font-size: .88rem; }
.tabla-horas th, .tabla-horas td { padding: 7px 8px 7px 0; }
.tabla-horas tbody th { font: 600 .88rem/1.35 var(--cuerpo); letter-spacing: 0; text-transform: none; color: var(--tinta); }
.tabla-horas td { font-variant-numeric: tabular-nums; color: var(--tinta); }
.tabla-horas__tuya th, .tabla-horas__tuya td { font-weight: 800; }
.tabla-horas__nota { display: block; font-size: .82rem; }

/* Formulario */
.formulario { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .formulario { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }
form { background: #fff; color: var(--tinta); padding: clamp(20px, 4vw, 36px); border-radius: 4px; }
.campo { display: grid; gap: 6px; margin-bottom: 16px; }
.campo label { font-weight: 600; font-size: .95rem; }
.campo input, .campo select { min-height: 48px; padding: 10px 12px; border: 2px solid #999; border-radius: 4px; background: #fff; width: 100%; }
.campo input:focus, .campo select:focus { border-color: var(--tinta); }
.campo [aria-invalid="true"] { border-color: #b00020; }
.error { color: #b00020; font-size: .85rem; min-height: 0; }
.dos-columnas { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .dos-columnas { grid-template-columns: 1fr 1fr; } }
.casilla { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin-bottom: 16px; }
.casilla input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.miel { position: absolute; left: -9999px; }
.estado-envio { margin-top: 12px; font-weight: 600; }
.estado-envio--ok { color: #1a7f37; }
.estado-envio--error { color: #b00020; }
form .boton { width: 100%; }
.otra-landing { font-size: .9rem; color: #bbb; }

/* Pie */
.pie { background: var(--negro); color: #ccc; padding: 48px 0 96px; font-size: .95rem; }
.pie .envoltura { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .pie .envoltura { grid-template-columns: 1fr 1fr 1fr; } }
.pie img { width: 200px; }
.pie ul { list-style: none; padding: 0; margin: 0; }
.pie li { margin-bottom: 6px; }

/* WhatsApp flotante */
.whatsapp { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.whatsapp svg { width: 30px; height: 30px; fill: #fff; }
.whatsapp::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: #25d366; opacity: 0; }
.whatsapp { transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out); }
.whatsapp:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 8px 20px rgba(0,0,0,.28); }
.wa-qr { position: fixed; right: 16px; bottom: 84px; z-index: 61; width: 260px; padding: 18px; border-radius: 8px; background: #fff; color: var(--tinta); box-shadow: 0 14px 40px rgba(0,0,0,.25); text-align: center; }
.wa-qr[hidden] { display: none; }
.wa-qr__cerrar { position: absolute; top: 6px; right: 8px; width: 32px; height: 32px; border: 0; background: none; font-size: 1.4rem; line-height: 1; color: var(--suave); cursor: pointer; }
.wa-qr__titulo { margin: 0 24px 6px; font-weight: 800; }
.wa-qr__texto { margin: 0 0 14px; font-size: .85rem; color: var(--suave); }
.wa-qr__codigo { width: 180px; height: 180px; margin: 0 auto 14px; display: grid; place-items: center; font-size: .85rem; }
.wa-qr__codigo svg { width: 100%; height: 100%; }
.wa-qr__web { font-size: .85rem; font-weight: 600; color: #128c4a; }

/* Color: la paleta de las menciones en acentos pequeños. La franja de cinco colores es el motivo que se repite; los fondos siguen neutros. */
:root { --franja: linear-gradient(90deg, var(--fisica) 20%, var(--ciencias_cognitivas) 20% 40%, var(--biologia) 40% 60%, var(--economia) 60% 80%, var(--sistemas_complejos) 80%); }
.grilla > :nth-child(5n+1), .pagos > :nth-child(5n+1), .tramos-grupo > :nth-child(5n+1), .contador > :nth-child(5n+1), .faq details:nth-of-type(5n+1), main > section:nth-of-type(5n+1) { --color: var(--fisica); --color-texto: var(--texto-fisica); }
.grilla > :nth-child(5n+2), .pagos > :nth-child(5n+2), .tramos-grupo > :nth-child(5n+2), .contador > :nth-child(5n+2), .faq details:nth-of-type(5n+2), main > section:nth-of-type(5n+2) { --color: var(--ciencias_cognitivas); --color-texto: var(--texto-ciencias_cognitivas); }
.grilla > :nth-child(5n+3), .pagos > :nth-child(5n+3), .tramos-grupo > :nth-child(5n+3), .contador > :nth-child(5n+3), .faq details:nth-of-type(5n+3), main > section:nth-of-type(5n+3) { --color: var(--biologia); --color-texto: var(--texto-biologia); }
.grilla > :nth-child(5n+4), .pagos > :nth-child(5n+4), .tramos-grupo > :nth-child(5n+4), .contador > :nth-child(5n+4), .faq details:nth-of-type(5n+4), main > section:nth-of-type(5n+4) { --color: var(--economia); --color-texto: var(--texto-economia); }
.grilla > :nth-child(5n+5), .pagos > :nth-child(5n+5), .faq details:nth-of-type(5n+5), main > section:nth-of-type(5n+5) { --color: var(--sistemas_complejos); --color-texto: var(--texto-sistemas_complejos); }
.antetitulo::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; background: var(--color, var(--general)); }
.seccion--negra .antetitulo::before { background: color-mix(in srgb, var(--color, var(--general)) 55%, #fff); }
.grilla .pilar { border-top-color: var(--color); }
.seccion--negra .grilla .pilar { border-top-color: color-mix(in srgb, var(--color) 55%, #fff); }
.semestre + .semestre, #formulario { background: var(--franja) top / 100% 5px no-repeat; }
#formulario { background-color: #fff; border-radius: 0 0 4px 4px; }
.form-clientify [ng-version] { display: block; } /* el componente de Clientify es inline y deja su iframe angosto */
.pie { background: var(--franja) top / 100% 5px no-repeat, var(--negro); }
.cot__cabeza { background: var(--franja) top / 100% 5px no-repeat; }
.fase__nombre { color: var(--economia); }
.contador div { border-top: 3px solid var(--color); }
.beneficios li::before { color: var(--economia); }
.tramos-grupo li { border-top-color: var(--color); }
.tramos-grupo b { color: var(--color-texto, color-mix(in srgb, var(--color) 72%, #000)); }
.pago { border-top: 3px solid var(--color); }
.mencion[open] summary { color: var(--color-texto, color-mix(in srgb, var(--color) 72%, #000)); }
.faq summary::after { color: var(--color-texto, color-mix(in srgb, var(--color) 72%, #000)); }
.docentes__puntos { display: flex; gap: 4px; margin-top: 6px; }
.docentes__puntos i { width: 9px; height: 9px; border-radius: 50%; background: var(--color); }
tr.vigente { background: color-mix(in srgb, var(--economia) 12%, #fff); }
tr.vigente td:first-child { box-shadow: inset 6px 0 0 var(--economia); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; }
  .boton:active { transform: none; }
}

/* Móvil: menos densidad. Textos algo más chicos, bloques cortos en dos columnas y más aire entre secciones. */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .seccion { padding: 64px 0; }
  h2 { font-size: 1.4rem; margin-bottom: .7em; }
  .antetitulo { font-size: .72rem; }
  .intro { font-size: .95rem; line-height: 1.55; }
  .grilla { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .pilar { padding-top: 12px; }
  .pilar strong { font-size: 1.15rem; margin-bottom: 6px; }
  .pilar p { font-size: .86rem; line-height: 1.5; }
  .linea-tiempo, .modalidades { margin-top: 24px; }
  .semestre { padding: 20px; }
  .fase { padding: 24px 0; }
  .fase__gancho { font-size: 1.1rem; }
  .fase__urgencia { font-size: .88rem; }
  .contador div { min-width: 0; flex: 1; }
  .contador b { font-size: 1.4rem; }
  .menciones { gap: 10px; margin-top: 24px; }
  .mencion summary { font-size: .92rem; padding: 16px; }
  .mencion__cuerpo { padding: 0 16px 16px; font-size: .92rem; }
  .docentes { grid-template-columns: 1fr 1fr; }
  .docentes li { padding: 12px; }
  .docentes b { font-size: .86rem; line-height: 1.3; }
  .docentes small { font-size: .76rem; }
  .valor-bloque h3 { font-size: 1rem; }
  .beneficios { flex-direction: column; gap: 6px; font-size: .92rem; }
  .tarjeta { padding: 16px; }
  .faq summary { font-size: .95rem; padding: 16px 32px 16px 0; }
  .faq details > div { font-size: .92rem; }
  form { padding: 20px; }
  .campo { margin-bottom: 14px; }
  .whatsapp { width: 50px; height: 50px; }
}

/* Ayudas «i» */
.ayuda { position: relative; display: inline-block; margin-left: 6px; vertical-align: middle; line-height: 1; }
.ayuda__boton { position: relative; width: 20px; height: 20px; padding: 0; border: 1px solid currentColor; border-radius: 50%; background: none; color: inherit; font: italic 600 .72rem/1 Georgia, serif; text-transform: none; cursor: pointer; opacity: .7; }
.ayuda__boton::after { content: ""; position: absolute; inset: -12px; } /* área táctil de 44 px */
.ayuda__boton:hover, .ayuda__boton[aria-expanded="true"] { opacity: 1; }
.ayuda__texto { position: absolute; z-index: 40; top: calc(100% + 10px); left: 50%; transform: translateX(calc(-50% + var(--desplazar, 0px))); width: max-content; max-width: min(300px, calc(100vw - 32px)); display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--linea); border-radius: 6px; background: #fff; color: var(--tinta); box-shadow: 0 10px 28px rgba(0,0,0,.18); font: 400 .85rem/1.45 var(--cuerpo); letter-spacing: 0; text-transform: none; text-align: left; white-space: normal; }
.ayuda__texto[hidden] { display: none; }
.ayuda__texto ul { margin: 0; padding-left: 1.1em; list-style: disc; display: grid; gap: 2px; }
.ayuda__texto li::before { content: none; }

/* Botones de cada mención: separados también cuando pasan a dos líneas */
.mencion__acciones { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
@media (max-width: 600px) { .mencion__acciones .boton { flex: 1 1 100%; } }

@keyframes acordeon-entra { from { opacity: 0; transform: translateY(-6px); } }
@keyframes wa-pulso { 0% { transform: scale(1); opacity: .45; } 55%, 100% { transform: scale(1.7); opacity: 0; } }
@keyframes wa-qr-entra { from { opacity: 0; transform: translateY(8px) scale(.97); } }

/* Certificación: diploma de ejemplo en 3D. Posiciones en % de la hoja original (1115 × 831 pt); tipos en cqw para que escale como la hoja. */
.certificacion { overflow-x: clip; } /* la inclinación 3D no debe crear scroll lateral */
.certificacion__grilla { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.cert-puntos { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 18px; }
.cert-punto { padding-left: 16px; border-left: 3px solid var(--acento-claro); font-weight: 600; }
/* Foco de luz detrás del diploma: sin él, la sombra no se lee sobre el negro */
.diploma-escena { position: relative; margin: 0; perspective: 1400px; }
.diploma-escena::before { content: ""; position: absolute; inset: -18% -12% -6%; background: radial-gradient(ellipse 55% 50% at 50% 46%, rgba(255,255,255,.13), transparent 70%); pointer-events: none; }
.diploma-escena figcaption { position: relative; margin-top: 48px; padding-left: 30%; font-size: .82rem; color: #aaa; text-align: center; }
/* Movimiento automático: giro, reflejo y barrido de luz comparten las mismas variables, así el brillo acompaña la inclinación */
@property --rx { syntax: "<angle>"; inherits: true; initial-value: 8deg; }
@property --ry { syntax: "<angle>"; inherits: true; initial-value: -16deg; }
@property --gx { syntax: "<percentage>"; inherits: true; initial-value: 25%; }
@property --gy { syntax: "<percentage>"; inherits: true; initial-value: 20%; }
@property --sx { syntax: "<percentage>"; inherits: true; initial-value: 46%; }
@property --alto { syntax: "<length>"; inherits: true; initial-value: 0px; }
.diploma { position: relative; transform-style: preserve-3d; transform: translateY(var(--alto)) rotateX(var(--rx)) rotateY(var(--ry)); }
/* Hojas de papel detrás, para dar grosor */
/* Canto del papel (cartulina) y sombra proyectada en capas: cercana y nítida, lejana y difusa */
.diploma::before { content: ""; position: absolute; inset: 0; background: #cfccc2; border-radius: 2px; transform: translateZ(-3px); }
.diploma::after { content: ""; position: absolute; left: 4%; right: 2%; top: 8%; bottom: -2%; z-index: -1; border-radius: 50%; background: rgba(0,0,0,.75); filter: blur(28px); transform: translateZ(-40px) translateY(26px); }
.diploma__hoja { position: relative; z-index: 1; container-type: inline-size; aspect-ratio: 1115 / 831; overflow: hidden; border-radius: 2px; color: #231f20;
  box-shadow: 0 1px 1px rgba(0,0,0,.12), 0 2px 2px rgba(0,0,0,.12), 0 4px 4px rgba(0,0,0,.12), 0 8px 8px rgba(0,0,0,.12), 0 16px 16px rgba(0,0,0,.12), inset 0 0 0 1px rgba(0,0,0,.05); font-family: "Myriad Pro", var(--cuerpo); transform: translateZ(0);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 160px, #fdfdfb url("img/diploma-fondo.webp") center / cover; background-blend-mode: multiply, normal; }
.diploma__hoja::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255,255,255,.55), rgba(255,255,255,0) 45%), linear-gradient(115deg, transparent calc(var(--sx) - 16%), rgba(255,255,255,.5) var(--sx), transparent calc(var(--sx) + 14%)), linear-gradient(180deg, rgba(255,255,255,0) 55%, rgba(60,50,30,.07));
  mix-blend-mode: soft-light; }
.diploma__logo { position: absolute; left: 61.5%; top: 5.4%; width: 10.4%; }
.d-l { position: absolute; left: 36.5%; right: 3%; margin: 0; text-align: center; line-height: 1.1; font-size: 1.84cqw; white-space: nowrap; }
.d-inst { top: 24.6%; font-size: 1.8cqw; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.d-nombre { top: 39.6%; }
.d-nombre b { margin-left: .6em; font-size: 2.13cqw; font-weight: 600; text-transform: uppercase; }
.d-cumple { top: 43.6%; }
.d-prog, .d-con, .d-mencion { font-size: 2.32cqw; text-transform: uppercase; }
.d-prog { top: 52.4%; font-weight: 600; }
.d-con { top: 57%; }
.d-mencion { top: 61.4%; font-weight: 700; }
.d-otorga { top: 71%; }
.d-firma { position: absolute; top: 79%; width: 12%; fill: none; stroke: #3557b7; stroke-width: 2; stroke-linecap: round; }
.d-firma--1 { left: 43%; }
.d-firma--2 { left: 77%; }
.d-cargo { top: 89%; border-top: 1px solid #231f20; padding-top: .5%; }
.d-cargo--1 { left: 38.2%; right: 38.8%; }
.d-cargo--2 { left: 72%; right: 5%; }
.d-codigo { top: 95.2%; font: 1.3cqw Arial, sans-serif; }
.diploma__muestra { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-24deg); font: 800 11cqw/1 var(--titulo); letter-spacing: .1em; text-transform: uppercase; color: rgba(0,0,0,.045); pointer-events: none; }
.diploma__sello { position: absolute; z-index: 2; left: -5%; bottom: -9%; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; background: linear-gradient(135deg, #fff 40%, #eef1f4); color: var(--tinta); border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 6px 12px rgba(0,0,0,.25), 0 22px 40px rgba(0,0,0,.4), inset 0 1px 0 #fff; transform: translateZ(60px); font-size: .78rem; line-height: 1.25; }
.diploma__sello b { display: block; font-size: .9rem; color: var(--biologia); }
.diploma__sello b::before { content: "✓ "; }
.diploma__qr { width: 52px; height: 52px; shape-rendering: crispEdges; }
@media (prefers-reduced-motion: no-preference) {
  .diploma { animation: diploma-luz 7s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
}
@keyframes diploma-luz {
  0%   { --rx: 9deg; --ry: -20deg; --gx: 12%; --gy: 18%; --sx: -25%; --alto: 0px; }
  50%  { --rx: 4deg; --ry: -10deg; --gx: 50%; --gy: 40%; --sx: 55%;  --alto: -8px; }
  100% { --rx: 7deg; --ry: 2deg;   --gx: 90%; --gy: 28%; --sx: 135%; --alto: -2px; }
}
@media (max-width: 860px) {
  .certificacion__grilla { grid-template-columns: 1fr; }
  .diploma-escena { padding: 0 6px 24px; }
  .diploma-escena figcaption { margin-top: 104px; padding-left: 0; }
  .diploma__sello { left: auto; right: 3%; bottom: -22%; padding: 6px 10px 6px 6px; font-size: .7rem; }
  .diploma__qr { width: 38px; height: 38px; }
}
