/* ECI — Escuela de Control en Ingeniería */
:root {
  --azul: #235794;
  --azul-osc: #163a66;
  --azul-xosc: #0e2747;
  --azul-cl: #e8f0f9;
  --acento: #f2b705;
  --tinta: #17212e;
  --gris: #5a6676;
  --linea: #dde3ea;
  --fondo: #ffffff;
  --fondo2: #f4f6f9;
  --r: 14px;
  --sombra: 0 1px 2px rgba(14, 39, 71, .06), 0 8px 24px rgba(14, 39, 71, .08);
  --fuente: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--fuente); font-size: 1.0625rem; line-height: 1.65; color: var(--tinta); background: var(--fondo); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--azul); }
a:hover { color: var(--azul-osc); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.015em; color: var(--azul-xosc); }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; border-radius: 4px; }
.cont { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.saltar { position: absolute; left: -999px; top: 0; background: var(--azul); color: #fff; padding: .6rem 1rem; z-index: 100; }
.saltar:focus { left: 0; }
.ico { width: 1.25em; height: 1.25em; flex: none; }

/* Cabecera */
.cab { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.cab.scroll { border-color: var(--linea); box-shadow: 0 4px 20px rgba(14, 39, 71, .06); }
.cab__fila { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 1rem; }
.cab__logo img { width: 190px; height: auto; }
.nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: .55rem .9rem; border-radius: 999px; color: var(--tinta); text-decoration: none; font-weight: 600; font-size: .95rem; transition: background .15s, color .15s; }
.nav a:hover { background: var(--azul-cl); color: var(--azul); }
.nav a[aria-current] { background: var(--azul); color: #fff; }
.cab__btn { display: none; width: 46px; height: 46px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; padding: 0; position: relative; }
.cab__btn span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--azul-xosc); border-radius: 2px; transition: transform .25s, opacity .2s, top .25s; }
.cab__btn span:nth-child(1) { top: 16px; } .cab__btn span:nth-child(2) { top: 22px; } .cab__btn span:nth-child(3) { top: 28px; }
.cab__btn[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.cab__btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.cab__btn[aria-expanded="true"] span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* Botones */
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.5rem; border-radius: 999px; font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s, color .15s, border-color .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); }
.btn--p { background: var(--azul); color: #fff; box-shadow: 0 6px 16px rgba(35, 87, 148, .3); }
.btn--p:hover { background: var(--azul-osc); color: #fff; }
.btn--b { background: #fff; color: var(--azul-osc); }
.btn--b:hover { background: var(--azul-cl); color: var(--azul-osc); }
.btn--v { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn--v:hover { background: #fff; color: var(--azul-osc); }
.btn--ancho { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; }
.botones { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.enlace { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; text-decoration: none; }
.enlace .ico { transition: transform .2s; }
.enlace:hover .ico { transform: translateX(4px); }

/* Hero */
.hero { position: relative; min-height: min(78vh, 680px); display: flex; align-items: center; color: #fff; overflow: hidden; background: var(--azul-xosc); }
.hero__slides, .hero__vel { position: absolute; inset: 0; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 1.2s ease, transform 7s ease-out; }
.hero__img.on { opacity: 1; transform: scale(1); }
.hero__vel { background: linear-gradient(100deg, rgba(14, 39, 71, .92) 0%, rgba(14, 39, 71, .72) 45%, rgba(14, 39, 71, .2) 100%); }
.hero__c { position: relative; padding-block: 4rem 5rem; max-width: 1160px; }
.hero h1 { color: #fff; max-width: 17ch; }
.hero__p { font-size: 1.2rem; max-width: 52ch; color: #e3ebf5; }
.chip { display: inline-block; padding: .35rem .9rem; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); font-size: .85rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1.2rem; }
.hero__dots { position: absolute; left: 50%; bottom: 1.4rem; transform: translateX(-50%); display: flex; gap: .5rem; }
.hero__dots button { width: 28px; height: 6px; border-radius: 6px; border: 0; padding: 0; background: rgba(255, 255, 255, .4); cursor: pointer; transition: background .2s, width .2s; }
.hero__dots button.on { background: var(--acento); width: 44px; }

/* Cabecera de páginas internas */
.ph { background: linear-gradient(135deg, var(--azul-xosc), var(--azul)); color: #fff; padding: 3.5rem 0 3.2rem; position: relative; overflow: hidden; }
.ph::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; border: 48px solid rgba(255, 255, 255, .06); }
.ph h1 { color: #fff; margin-bottom: .3em; }
.ph p { margin: 0; color: #d6e3f3; font-size: 1.15rem; }

/* Secciones */
.sec { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.sec--gris { background: var(--fondo2); }
.sec--azul { background: linear-gradient(135deg, var(--azul-xosc), var(--azul-osc)); color: #e3ebf5; }
.sec--azul h2 { color: #fff; }
.sobre { font-size: .85rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--azul); margin-bottom: .6rem; }
.sobre--c { color: var(--acento); }
.enc { max-width: 720px; margin-bottom: 2.6rem; }
.enc__p { color: var(--gris); font-size: 1.1rem; }
.centro { text-align: center; }
.dos { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.dos--mapa { align-items: center; grid-template-columns: 1fr 1.3fr; }
.dos--form { grid-template-columns: 1fr 1.2fr; }
.texto { max-width: 780px; }
.texto--c { margin-inline: auto; }
.lead { font-size: 1.25rem; color: var(--azul-xosc); font-weight: 500; }
.cta { background: var(--azul-cl); }
.cta p { color: var(--gris); }

/* Tarjetas */
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.4rem; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.6rem; margin-bottom: 2.4rem; }
.mod { background: #fff; border: 1px solid var(--linea); border-radius: var(--r); padding: 1.8rem; transition: transform .2s, box-shadow .2s, border-color .2s; }
.mod:hover { transform: translateY(-4px); box-shadow: var(--sombra); border-color: transparent; }
.mod__ic { width: 52px; height: 52px; border-radius: 14px; background: var(--azul-cl); color: var(--azul); display: grid; place-items: center; margin-bottom: 1.1rem; }
.mod__ic .ico { width: 26px; height: 26px; }
.mod p { color: var(--gris); font-size: .98rem; margin: 0; }
.curso { background: #fff; border-radius: var(--r); overflow: hidden; border: 1px solid var(--linea); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.curso:hover { transform: translateY(-4px); box-shadow: var(--sombra); }
.curso img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--azul-cl); }
.curso__c { padding: 1.2rem 1.4rem 1.4rem; display: flex; flex-direction: column; gap: .9rem; flex: 1; justify-content: space-between; }
.curso h3 { margin: 0; font-size: 1.08rem; }

/* Docente */
.doc { display: grid; grid-template-columns: minmax(220px, 380px) 1fr; gap: clamp(2rem, 6vw, 4.5rem); align-items: center; }
.doc__foto { width: 100%; border-radius: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); aspect-ratio: 4 / 4.4; object-fit: cover; }
.doc--claro { align-items: start; }
.doc--claro .doc__foto { box-shadow: var(--sombra); }
.rol { color: var(--azul); font-weight: 700; margin-bottom: 1.2rem; }
.lista { padding-left: 1.2rem; margin: 0 0 1.8rem; }
.lista li { margin-bottom: .7rem; padding-left: .3rem; }
.lista li::marker { color: var(--azul); }

/* Dirección y mapa */
.dir { font-style: normal; margin-bottom: 1.8rem; }
.dir p { display: flex; gap: .9rem; align-items: flex-start; }
.dir .ico { color: var(--azul); margin-top: .2rem; width: 1.5rem; height: 1.5rem; }
.dir--g p { padding: 1.1rem 1.2rem; border: 1px solid var(--linea); border-radius: var(--r); background: var(--fondo2); }
.mapa { border-radius: var(--r); overflow: hidden; box-shadow: var(--sombra); min-height: 360px; background: var(--azul-cl); }
.mapa iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }
.mapa--ancho { border-radius: 0; box-shadow: none; min-height: 380px; }
.mapa--ancho iframe { min-height: 380px; }

/* Aviso */
.aviso { display: flex; gap: 1.2rem; align-items: flex-start; background: var(--azul-cl); border-radius: var(--r); padding: 1.8rem; margin-bottom: 1.6rem; }
.aviso .ico { width: 2.2rem; height: 2.2rem; color: var(--azul); }
.aviso h2 { font-size: 1.4rem; margin-bottom: .3em; }
.aviso p { margin: 0; color: var(--tinta); }

/* Formulario */
.form { background: #fff; border: 1px solid var(--linea); border-radius: 20px; padding: clamp(1.4rem, 4vw, 2.4rem); box-shadow: var(--sombra); }
.form h2 { font-size: 1.5rem; margin-bottom: 1.2rem; }
.campo { margin-bottom: 1.1rem; }
.campo label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.campo input, .campo textarea { width: 100%; font: inherit; padding: .8rem 1rem; border: 1.5px solid #c5cdd8; border-radius: 10px; background: #fff; color: var(--tinta); transition: border-color .15s, box-shadow .15s; }
.campo textarea { resize: vertical; min-height: 140px; }
.campo input:focus, .campo textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 4px rgba(35, 87, 148, .15); }
.campo.err input, .campo.err textarea { border-color: #c62828; }
.campo .msg { color: #b71c1c; font-size: .86rem; margin: .3rem 0 0; display: none; }
.campo.err .msg { display: block; }
.trampa { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.estado { margin: 1rem 0 0; padding: 0; font-weight: 600; }
.estado.ok, .estado.mal { padding: .9rem 1.1rem; border-radius: 10px; }
.estado.ok { background: #e6f4ea; color: #14532d; }
.estado.mal { background: #fdecea; color: #7f1d1d; }
.btn__t.cargando::after { content: ""; display: inline-block; width: 1em; height: 1em; margin-left: .6rem; vertical-align: -.15em; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: gira .7s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* Pie */
.pie { background: var(--azul-xosc); color: #c3d1e3; margin-top: 0; }
.pie a { color: #fff; text-decoration: none; }
.pie a:hover { text-decoration: underline; }
.pie__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr; gap: 3rem; padding-block: 3.6rem 2.6rem; }
.pie__logo { background: #fff; padding: .6rem .9rem; border-radius: 10px; width: 190px; height: auto; margin-bottom: 1rem; }
.pie__txt { font-size: .95rem; max-width: 36ch; }
.pie__tit { color: #fff; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.pie__lista { list-style: none; padding: 0; margin: 0; }
.pie__lista li { margin-bottom: .5rem; }
.pie__dir { font-style: normal; }
.pie__dir p { display: flex; gap: .7rem; margin-bottom: .8rem; }
.pie__dir .ico { color: var(--acento); margin-top: .25rem; }
.redes { display: flex; gap: .6rem; margin-top: 1rem; }
.redes a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); transition: background .15s, transform .15s; }
.redes a:hover { background: var(--acento); color: var(--azul-xosc); transform: translateY(-2px); text-decoration: none; }
.redes--c a { background: var(--azul-cl); color: var(--azul); }
.pie__base { border-top: 1px solid rgba(255, 255, 255, .12); padding: 1.2rem 0; font-size: .88rem; }
.pie__base .cont { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }

/* 404 */
.cuatro { font-size: clamp(5rem, 18vw, 9rem); font-weight: 800; line-height: 1; color: var(--azul); margin-bottom: .1em; }
.h1-s { font-size: clamp(1.6rem, 4vw, 2.4rem); }

/* Animación de entrada (solo con JS) */
.js .rev { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.js .rev.in { opacity: 1; transform: none; }

@media (max-width: 920px) {
  .cab__btn { display: block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--linea); box-shadow: 0 16px 30px rgba(14, 39, 71, .12); max-height: 0; overflow: hidden; visibility: hidden; transition: max-height .3s ease, visibility .3s; }
  .nav.abierto { max-height: 420px; visibility: visible; }
  .nav ul { flex-direction: column; padding: .8rem 1.25rem 1.2rem; }
  .nav a { padding: .85rem 1rem; border-radius: 10px; }
  .dos, .dos--mapa, .dos--form, .doc { grid-template-columns: 1fr; }
  .doc__foto { max-width: 340px; }
  .pie__grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero__vel { background: linear-gradient(180deg, rgba(14, 39, 71, .78), rgba(14, 39, 71, .88)); }
}
@media (max-width: 520px) {
  body { font-size: 1rem; }
  .cab__logo img { width: 160px; }
  .hero__c { padding-block: 3rem 4.5rem; }
  .botones .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .rev { opacity: 1; transform: none; }
  .hero__img { transform: none; }
}

/* Video de presentación de cursos */
.curso__img { position: relative; display: block; }
.play { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg, rgba(14, 39, 71, 0) 40%, rgba(14, 39, 71, .45)); transition: background .2s; }
.play svg { width: 62px; height: 62px; padding: 17px 14px 17px 20px; border-radius: 50%; background: rgba(255, 255, 255, .95); fill: var(--azul); box-shadow: 0 6px 20px rgba(0, 0, 0, .3); transition: transform .2s, background .2s; }
.curso__img:hover .play svg, .curso__img:focus-visible .play svg { transform: scale(1.1); background: var(--acento); fill: var(--azul-xosc); }
.curso__acc { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1rem; }
.enlace--s { color: var(--gris); font-weight: 600; font-size: .95rem; }
.enlace--s:hover { color: var(--azul); }
.video { width: min(960px, 94vw); padding: 0; border: 0; border-radius: 16px; background: #000; overflow: visible; }
.video::backdrop { background: rgba(8, 20, 38, .82); backdrop-filter: blur(3px); }
.video__m { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; }
.video__m iframe { width: 100%; height: 100%; border: 0; display: block; }
.video__x { position: absolute; right: 0; top: -48px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #fff; color: var(--azul-xosc); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.video__x:hover { background: var(--acento); }
