/*
Theme Name: Instituto Académico V21
Theme URI: https://paginasmexico.com
Author: PáginasMX
Description: Tema a la medida de Instituto Académico V21, hecho por PáginasMX. Editable desde el editor de bloques.
Version: 1.0
Requires at least: 6.5
Tested up to: 7.1
Text Domain: pmx-v21-instituto-academico
*/

/* ─────────────────────────────────────────────────────────────
   Dispositivo visual de la marca: EL FOLIO.
   Sale del propio modelo de control del Instituto ("folio interno
   único por alumno"): un ordinal enorme, en contorno, cruzado por
   un filete rojo. Se repite en Líneas, Niveles y Proceso.
   ───────────────────────────────────────────────────────────── */

:root {
  --v21-navy: var(--wp--preset--color--primario);
  --v21-rojo: var(--wp--preset--color--acento);
  --v21-linea: rgba(18, 44, 92, .16);
}

.v21-tricolor {
  height: 3px;
  background: linear-gradient(to right, #006847 33%, #fff 33%, #fff 66%, #CE1126 66%);
}

::selection { background: var(--v21-rojo); color: #fff; }

:focus-visible {
  outline: 2px solid var(--v21-rojo);
  outline-offset: 3px;
}

.wp-element-button:active,
.wp-block-button__link:active { transform: scale(.97); }

.wp-element-button,
.wp-block-button__link {
  transition: background-color .2s cubic-bezier(.22, 1, .36, 1), transform .12s;
  -webkit-tap-highlight-color: transparent;
}

/* ── Encabezado ─────────────────────────────────────────────── */

.v21-nav { border-bottom: 1px solid var(--v21-linea); }
.v21-nav__fila { gap: 1rem; }
.v21-nav .wp-block-site-logo img { display: block; }
.v21-nav .wp-block-navigation {
  font-family: var(--wp--preset--font-family--cuerpo);
  font-weight: 500;
  letter-spacing: .01em;
}

/* ── Etiquetas / eyebrows ───────────────────────────────────── */

.v21-etiqueta {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 700;
  margin-bottom: 1.1rem;
}
.v21-etiqueta--acento { color: var(--v21-rojo); }

/* El filete rojo: el segundo tiempo del dispositivo. */
.v21-regla::before {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--v21-rojo);
  margin-bottom: 1.4rem;
}

/* ── Secciones ──────────────────────────────────────────────── */

.v21-seccion {
  padding-top: var(--wp--preset--spacing--60);
  padding-bottom: var(--wp--preset--spacing--60);
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.v21-seccion__intro { max-width: 46rem; margin-bottom: var(--wp--preset--spacing--40); }
.v21-seccion h2 { margin-top: 0; }

/* ── Portada: bloque de color duro, sin degradados ──────────── */

.v21-hero { overflow: hidden; }
.v21-hero .wp-block-columns { gap: 0; margin-bottom: 0; }

.v21-hero__texto {
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.25rem, 4vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.v21-hero__texto h1 {
  line-height: .98;
  margin-top: 0;
  margin-bottom: 1.2rem;
}
.v21-hero__texto h2 {
  font-family: var(--wp--preset--font-family--cuerpo);
  font-weight: 500;
  line-height: 1.4;
  margin-top: 0;
  margin-bottom: 1.4rem;
  color: #cfd9ea;
}
.v21-hero__oferta {
  color: #a9bad4;
  max-width: 34rem;
  margin-bottom: 2rem;
}
.v21-hero .wp-block-buttons { margin-bottom: 0; }
.v21-hero .wp-block-button.is-style-outline .wp-block-button__link {
  border: 1px solid rgba(255, 255, 255, .45);
  color: #fff;
}

.v21-hero__marca {
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 3vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
}
.v21-hero__marca .wp-block-image { margin: 0 auto; max-width: 240px; }
.v21-hero__marca .wp-block-image img { width: 100%; height: auto; display: block; }

/* Cifras reales, contadas del propio proyecto. */
.v21-cifras { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
.v21-cifras__dato {
  font-family: var(--wp--preset--font-family--titulos);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1;
  color: var(--v21-navy);
  margin: 0 0 .35rem;
}
.v21-cifras__pie {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
  color: var(--wp--preset--color--tenue);
  margin: 0;
  border-top: 2px solid var(--v21-rojo);
  padding-top: .5rem;
}

/* Tira de metadatos al pie de la portada. */
.v21-meta {
  border-top: 1px solid rgba(255, 255, 255, .18);
  padding: 1rem clamp(1.25rem, 4vw, 4rem);
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 2rem;
}
.v21-meta p {
  margin: 0;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 700;
  color: #93a7c6;
}
.v21-meta__bandera { display: inline-flex; align-items: center; gap: .5rem; }

/* ── Líneas de desarrollo ───────────────────────────────────── */

.v21-linea { border-top: 3px solid var(--v21-navy); padding-top: 1.4rem; }
.v21-linea--acento { border-top-color: var(--v21-rojo); }
.v21-linea__folio {
  font-family: var(--wp--preset--font-family--titulos);
  color: transparent;
  -webkit-text-stroke: 1.5px var(--v21-navy);
  line-height: .9;
  margin: 0 0 .6rem;
}
.v21-linea--acento .v21-linea__folio { -webkit-text-stroke-color: var(--v21-rojo); }
.v21-linea h3 { margin: 0 0 .7rem; }
.v21-linea p:last-child { margin-bottom: 0; }

/* ── Ledger de niveles ──────────────────────────────────────── */

.v21-nivel {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0 2rem;
  border-top: 1px solid var(--v21-linea);
  padding-top: 1.8rem;
  padding-bottom: 1.8rem;
}
.v21-nivel__folio {
  font-family: var(--wp--preset--font-family--titulos);
  color: transparent;
  -webkit-text-stroke: 1.5px var(--v21-rojo);
  line-height: .85;
  margin: 0;
  grid-row: span 4;
}
.v21-nivel h3 { margin: 0 0 .6rem; }
.v21-nivel p { margin: 0 0 .5rem; max-width: 44rem; }
.v21-nivel p:last-child { margin-bottom: 0; }
.v21-nivel__campo {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
  color: var(--v21-rojo);
}

@media (max-width: 600px) {
  .v21-nivel { grid-template-columns: 1fr; gap: .4rem; }
  .v21-nivel__folio { grid-row: auto; }
  .v21-cifras { grid-template-columns: repeat(2, 1fr); }
}

/* ── Programas ──────────────────────────────────────────────── */

.v21-programas ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  columns: 2;
  column-gap: 2.5rem;
}
.v21-programas li {
  break-inside: avoid;
  padding: .55rem 0;
  border-bottom: 1px solid var(--v21-linea);
}
.v21-posgrados ul { list-style: none; padding-left: 0; margin: 0; }
.v21-posgrados li { padding: .5rem 0; border-bottom: 1px solid rgba(255, 255, 255, .16); }

@media (max-width: 700px) {
  .v21-programas ul { columns: 1; }
}

/* ── Certificación: vuelco tonal a fondo navy ───────────────── */

.v21-oscuro { background-color: var(--v21-navy); }
.v21-oscuro h2, .v21-oscuro h3 { color: #fff; }
.v21-oscuro p, .v21-oscuro li { color: #c3d0e5; }
.v21-oscuro .v21-etiqueta--acento { color: #ff8a99; }
.v21-oscuro .v21-regla::before { background: #fff; }

.v21-ec { display: grid; gap: 0; list-style: none; padding-left: 0; margin: 0; }
.v21-ec li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--v21-linea);
}
.v21-ec code {
  font-family: var(--wp--preset--font-family--cuerpo);
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--v21-rojo);
  background: none;
  font-size: .95rem;
}
/* En una banda oscura el mismo listado se invierte. */
.v21-oscuro .v21-ec li { border-bottom-color: rgba(255, 255, 255, .16); }
.v21-oscuro .v21-ec code { color: #fff; }
@media (max-width: 600px) {
  .v21-ec li { grid-template-columns: 1fr; gap: .15rem; }
}

/* ── Proceso ────────────────────────────────────────────────── */

.v21-paso {
  border-left: 2px solid var(--v21-linea);
  padding-left: 1.5rem;
  padding-bottom: 1.6rem;
  position: relative;
}
.v21-paso__folio {
  font-family: var(--wp--preset--font-family--titulos);
  color: transparent;
  -webkit-text-stroke: 1.5px var(--v21-rojo);
  line-height: .9;
  margin: 0 0 .2rem;
}
.v21-paso h3 { margin: 0 0 .3rem; }
.v21-paso p { margin: 0; }

/* ── Banda de declaración ───────────────────────────────────── */

.v21-declaracion {
  padding-top: var(--wp--preset--spacing--80);
  padding-bottom: var(--wp--preset--spacing--80);
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.v21-declaracion p {
  font-family: var(--wp--preset--font-family--titulos);
  font-size: clamp(1.9rem, 5vw, 3.6rem);
  line-height: 1.14;
  letter-spacing: -.015em;
  max-width: 22ch;
  margin: 0;
}

/* ── Controles ──────────────────────────────────────────────── */

.v21-controles ul { list-style: none; padding-left: 0; margin: 0; }
.v21-controles li {
  padding: .7rem 0 .7rem 1.6rem;
  border-bottom: 1px solid var(--v21-linea);
  position: relative;
}
.v21-controles li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.25rem;
  width: 8px;
  height: 8px;
  background: var(--v21-rojo);
}

/* ── Contacto ───────────────────────────────────────────────── */

.v21-form { display: grid; gap: .9rem; max-width: 34rem; }
.v21-form label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
  color: var(--v21-navy);
  display: block;
  margin-bottom: .35rem;
}
.v21-form input,
.v21-form select,
.v21-form textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: .8rem .9rem;
  border: 1px solid var(--v21-linea);
  border-radius: 2px;
  background: #fff;
  color: var(--wp--preset--color--texto);
  min-height: 48px;
  box-sizing: border-box;
}
.v21-form textarea { min-height: 120px; resize: vertical; }
.v21-form input:focus,
.v21-form select:focus,
.v21-form textarea:focus {
  outline: 2px solid var(--v21-rojo);
  outline-offset: 1px;
  border-color: transparent;
}
.v21-form__trampa {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.v21-form button {
  font: inherit;
  font-weight: 700;
  letter-spacing: .02em;
  background: var(--v21-rojo);
  color: #fff;
  border: 0;
  border-radius: 2px;
  padding: .95rem 2rem;
  min-height: 48px;
  cursor: pointer;
  justify-self: start;
  transition: transform .12s;
}
.v21-form button:active { transform: scale(.97); }
.v21-form button[disabled] { opacity: .6; cursor: progress; }
.v21-form__aviso { font-size: .9rem; margin: 0; }
.v21-form__aviso[data-estado="error"] { color: var(--v21-rojo); font-weight: 700; }
.v21-form__aviso[data-estado="ok"] { color: #0f7b3f; font-weight: 700; }

.v21-datos { display: grid; gap: 1.6rem; }
.v21-datos__campo { border-top: 2px solid var(--v21-rojo); padding-top: .7rem; }
.v21-datos__campo strong {
  display: block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--wp--preset--color--tenue);
  margin-bottom: .3rem;
}

/* ── Pie de página como destino ─────────────────────────────── */

.v21-pie { padding-left: 1.25rem; padding-right: 1.25rem; }
.v21-pie__cta {
  font-family: var(--wp--preset--font-family--titulos);
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  text-decoration: none;
  color: #fff;
  display: inline-block;
  border-bottom: 3px solid var(--v21-rojo);
  padding-bottom: .2rem;
}
.v21-pie__cta:hover { color: #ffd7dd; }
.v21-pie__fila {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, .18);
  padding-top: 1.4rem;
  margin-top: var(--wp--preset--spacing--40);
}
.v21-pie__fila p { margin: 0; font-size: .92rem; color: #b7c5da; }
.v21-pie__credito { font-size: .82rem; color: #8fa2be; margin-top: 1.4rem; }
.v21-pie__credito a { color: #b7c5da; }

/* ── Revelado con red de seguridad ──────────────────────────── */

.mt-js .v21-revela {
  opacity: 0;
  transform: translateY(18px);
}
.v21-revela {
  transition: opacity .7s cubic-bezier(.22, 1, .36, 1), transform .7s cubic-bezier(.22, 1, .36, 1);
}
.v21-revela.v21-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .mt-js .v21-revela { opacity: 1; transform: none; }
  .v21-revela, .wp-element-button, .wp-block-button__link { transition: none; }
  .wp-element-button:active, .wp-block-button__link:active, .v21-form button:active { transform: none; }
}

/* ── Correcciones verificadas en navegador ──────────────────── */

/* El titular jamás se parte a media palabra: era el defecto que dejaba
   "Institut / o / Acadé / mico" cuando el contenedor se estrechaba. */
.v21-hero__texto h1,
.v21-seccion h2,
.v21-declaracion p {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

/* El logotipo del encabezado se topa por ALTURA: si sólo se limita el ancho,
   en móvil ocupa media pantalla. */
.v21-nav .wp-block-site-logo img {
  max-height: 52px;
  width: auto;
  max-width: min(60vw, 190px);
}

.v21-hero__marca .wp-block-image { max-width: min(72%, 260px); }

@media (max-width: 781px) {
  .v21-hero .wp-block-columns { flex-wrap: wrap; }
  .v21-hero__marca { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .v21-nav .wp-block-site-logo img { max-height: 44px; }
}

/* Nada puede empujar el ancho de la página en un teléfono. */
.v21-seccion, .v21-declaracion, .v21-pie, .v21-hero { max-width: 100%; }
.v21-ec code, .v21-programas li, .v21-nivel p { overflow-wrap: anywhere; }

/* Las cifras se alinean entre sí aunque una etiqueta ocupe dos renglones. */
.v21-cifras > .wp-block-group {
  margin-top: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.v21-cifras > .wp-block-group > * { margin-top: 0; }
.v21-cifras__pie { margin-top: auto; }

/* El panel blanco tiene que llegar al borde: los márgenes por omisión del
   bloque de columnas dejaban una franja azul arriba, abajo y a la derecha. */
.v21-hero > .wp-block-columns {
  margin-top: 0;
  margin-bottom: 0;
  margin-left: 0;
  margin-right: 0;
  max-width: none;
  width: 100%;
}

/* La banda de declaración se alinea al mismo borde izquierdo que las demás
   secciones: el layout "constrained" centraba su caja de 22ch. */
.v21-declaracion {
  padding-left: max(1.25rem, calc((100% - 1180px) / 2));
  padding-right: max(1.25rem, calc((100% - 1180px) / 2));
}
.wp-block-group.v21-declaracion > p { max-width: 20ch; }

/* Ninguna etiqueta se parte a media palabra («LICENCIATURA / S E / INGENIERÍAS»). */
.v21-cifras__pie, .v21-meta p, .v21-etiqueta {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
@media (max-width: 430px) {
  .v21-cifras { grid-template-columns: 1fr; gap: 1.2rem; }
}

/* ── Sala de juntas virtual ─────────────────────────────────── */

.v21-sala {
  padding-top: var(--wp--preset--spacing--80);
  padding-bottom: var(--wp--preset--spacing--80);
}
.v21-sala__titulo {
  line-height: .98;
  margin-top: 0;
  margin-bottom: 1.2rem;
  max-width: 16ch;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.v21-sala__intro {
  font-family: var(--wp--preset--font-family--cuerpo);
  font-weight: 400;
  line-height: 1.5;
  color: #cfd9ea;
  max-width: 34rem;
  margin-top: 0;
  margin-bottom: 1.6rem;
}
.v21-sala__estado {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 2rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
  color: #9fd8bb;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  padding: .5rem 1rem;
}
.v21-sala__punto {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #19a15f;
  flex: none;
}
.v21-sala__estado-caja { margin-top: 0; margin-bottom: 0; }
.v21-sala .wp-block-buttons { margin-bottom: 0; }
.v21-sala__boton .wp-block-button__link { font-size: 1.05rem; }
.v21-sala__nota { margin-top: var(--wp--preset--spacing--40); }

/* El botón a la sala vive sobre fondo claro: contorno navy, no blanco. */
.v21-boton-sala .wp-block-button__link {
  background-color: transparent;
  color: var(--v21-navy);
  border: 1px solid var(--v21-navy);
}
.v21-boton-sala .wp-block-button__link:hover {
  background-color: var(--v21-navy);
  color: #fff;
}
