:root {
  --azul: #0b2a5b;
  --azul-oscuro: #061a3a;
  --cian: #00b4d8;
  --amarillo: #ffcc00;
  --rojo: #cf142b;
  --texto: #1c2733;
  --suave: #5b6b7b;
  --fondo: #f4f7fb;
  --blanco: #ffffff;
  --radio: 14px;
  --sombra: 0 10px 30px rgba(11, 42, 91, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--texto);
  background: var(--fondo);
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: var(--azul); }
.contenedor { width: min(1160px, 92%); margin: 0 auto; }

/* Franja tricolor */
.franja {
  height: 6px;
  background: linear-gradient(90deg, var(--amarillo) 33.3%, #00247d 33.3% 66.6%, var(--rojo) 66.6%);
}

/* Cabecera */
header.sitio {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 26, 58, 0.97);
  backdrop-filter: blur(6px);
}
.barra { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--blanco); text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: .3px;
}
.logo-icono {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--cian), var(--azul));
  display: grid; place-items: center;
}
.logo-icono svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
nav.menu ul { list-style: none; display: flex; gap: 6px; }
nav.menu a {
  display: block; color: #cfe0f5; text-decoration: none; padding: 8px 14px;
  border-radius: 8px; font-weight: 600; font-size: .96rem; transition: .2s;
}
nav.menu a:hover, nav.menu a.activo { background: rgba(0, 180, 216, .18); color: #fff; }
.hamburguesa {
  display: none; background: none; border: 0; cursor: pointer; padding: 6px;
}
.hamburguesa span { display: block; width: 26px; height: 3px; background: #fff; margin: 5px 0; border-radius: 2px; }

/* Héroe */
.heroe {
  position: relative; overflow: hidden; color: #fff;
  background:
    linear-gradient(90deg, rgba(6,26,58,.92) 0%, rgba(6,26,58,.70) 45%, rgba(6,26,58,.15) 100%),
    url("../img/portada.jpg") center right / cover no-repeat,
    var(--azul-oscuro);
  padding: 60px 0 90px;
  min-height: 340px;
  display: flex; align-items: center;
}
.heroe .contenedor { width: min(1160px, 92%); }
.heroe.corto { padding: 40px 0 50px; min-height: 0; }
.heroe.corto {
  background:
    linear-gradient(90deg, rgba(6,26,58,.95) 0%, rgba(6,26,58,.78) 60%, rgba(6,26,58,.5) 100%),
    url("../img/portada.jpg") center 75% / cover no-repeat,
    var(--azul-oscuro);
}
.heroe::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(to bottom, transparent, rgba(6,26,58,.55));
}
.heroe .contenedor { position: relative; z-index: 2; }
.etiqueta {
  display: inline-block; background: rgba(255, 204, 0, .15); color: var(--amarillo);
  padding: 6px 14px; border-radius: 99px; font-size: .82rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px;
}
.heroe h1 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); line-height: 1.15; max-width: 760px; }
.heroe h1 em { font-style: normal; color: var(--cian); }
.heroe p.lead { margin-top: 12px; font-size: 1rem; max-width: 640px; color: #d4e3f6; }
.botones { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 10px; font-weight: 700;
  text-decoration: none; transition: .2s; border: 2px solid transparent; cursor: pointer; font-size: 1rem;
}
.btn-primario { background: var(--amarillo); color: #1a1a1a; }
.btn-primario:hover { transform: translateY(-2px); background: #ffd93a; }
.btn-secundario { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-secundario:hover { background: rgba(255,255,255,.12); }
.btn-azul { background: var(--azul); color: #fff; }
.btn-azul:hover { background: #12468f; }

/* Secciones */
section.bloque { padding: 70px 0; }
section.bloque.blanca { background: var(--blanco); }
section.bloque.oscura { background: var(--azul-oscuro); color: #fff; }
.encabezado { max-width: 760px; margin-bottom: 40px; }
.encabezado .sobretitulo { color: var(--cian); font-weight: 800; letter-spacing: 1.5px; font-size: .82rem; text-transform: uppercase; }
.encabezado h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); color: var(--azul); line-height: 1.2; margin: 6px 0 12px; }
.oscura .encabezado h2 { color: #fff; }
.encabezado p { color: var(--suave); font-size: 1.05rem; }
.oscura .encabezado p { color: #bcd0ea; }

.rejilla { display: grid; gap: 24px; }
.col-2 { grid-template-columns: repeat(2, 1fr); }
.col-3 { grid-template-columns: repeat(3, 1fr); }
.col-4 { grid-template-columns: repeat(4, 1fr); }

.tarjeta {
  background: var(--blanco); border-radius: var(--radio); padding: 28px;
  box-shadow: var(--sombra); border-top: 4px solid var(--cian); transition: .25s;
}
.tarjeta:hover { transform: translateY(-5px); }
.blanca .tarjeta { background: var(--fondo); box-shadow: none; }
.tarjeta h3 { color: var(--azul); margin-bottom: 10px; font-size: 1.2rem; }
.tarjeta p { color: var(--suave); }
.tarjeta ul { margin: 12px 0 0 18px; color: var(--suave); }
.tarjeta ul li { margin-bottom: 5px; }
.icono {
  width: 52px; height: 52px; border-radius: 14px; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--cian), var(--azul)); display: grid; place-items: center;
}
.icono svg { width: 26px; height: 26px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Cifras */
.cifras { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: -50px; position: relative; z-index: 5; }
.cifra { background: #fff; border-radius: var(--radio); padding: 24px; text-align: center; box-shadow: var(--sombra); }
.cifra strong { display: block; font-size: 2.1rem; color: var(--azul); }
.cifra span { color: var(--suave); font-size: .95rem; }

/* Pasos */
.pasos { counter-reset: paso; display: grid; gap: 20px; }
.paso {
  counter-increment: paso; position: relative; background: #fff; border-radius: var(--radio);
  padding: 26px 26px 26px 88px; box-shadow: var(--sombra);
}
.paso::before {
  content: counter(paso); position: absolute; left: 24px; top: 24px; width: 46px; height: 46px;
  border-radius: 50%; background: var(--azul); color: var(--amarillo); font-weight: 800; font-size: 1.3rem;
  display: grid; place-items: center;
}
.paso h3 { color: var(--azul); margin-bottom: 6px; }
.paso p, .paso li { color: var(--suave); }
.paso ul { margin: 8px 0 0 18px; }
.paso .duracion { display: inline-block; margin-top: 10px; font-size: .82rem; font-weight: 700; color: var(--azul); background: #e3f4fa; padding: 3px 12px; border-radius: 99px; }

/* Módulos del programa */
.modulo { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); overflow: hidden; margin-bottom: 18px; }
.modulo header { background: var(--azul); color: #fff; padding: 16px 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.modulo header h3 { font-size: 1.1rem; }
.modulo header span { color: var(--amarillo); font-weight: 700; font-size: .9rem; }
.modulo .cuerpo { padding: 20px 24px; }
.modulo .cuerpo p { color: var(--suave); margin-bottom: 10px; }
.modulo ul { margin-left: 18px; color: var(--suave); columns: 2; column-gap: 40px; }
.modulo ul li { margin-bottom: 4px; break-inside: avoid; }

/* Tablas */
.tabla-contenedor { overflow-x: auto; border-radius: var(--radio); box-shadow: var(--sombra); }
table { width: 100%; border-collapse: collapse; background: #fff; min-width: 640px; }
th { background: var(--azul); color: #fff; text-align: left; padding: 14px 16px; font-size: .95rem; }
td { padding: 13px 16px; border-bottom: 1px solid #e5ebf2; color: var(--suave); font-size: .96rem; }
tr:nth-child(even) td { background: #f7fafd; }
td strong { color: var(--azul); }

/* Fotos */
.foto { margin: 0 0 26px; border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); background: #fff; }
.foto img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .6s; }
.foto:hover img { transform: scale(1.04); }
.foto figcaption { padding: 10px 16px; font-size: .88rem; color: var(--suave); border-top: 3px solid var(--cian); }
.foto.ancha img { aspect-ratio: 21 / 9; }

/* Texto largo */
.texto-largo { max-width: 860px; }
.texto-largo h3 { color: var(--azul); font-size: 1.3rem; margin: 26px 0 8px; }
.texto-largo p { color: var(--suave); margin-bottom: 12px; font-size: 1.04rem; }
.texto-largo ul { margin: 6px 0 14px 22px; color: var(--suave); }
.texto-largo li { margin-bottom: 6px; }
.oscura .texto-largo h3 { color: #fff; }
.oscura .texto-largo p, .oscura .texto-largo ul { color: #bcd0ea; }
.dos-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 760px) { .dos-col { grid-template-columns: 1fr; gap: 0; } }

/* Aviso */
.nota {
  background: #fff8d9; border-left: 5px solid var(--amarillo); padding: 18px 22px;
  border-radius: 10px; color: #5a4a00; margin-top: 26px;
}

/* FAQ */
.faq-grupo { margin-bottom: 38px; }
.faq-grupo h3 { color: var(--azul); font-size: 1.35rem; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 3px solid var(--cian); display: inline-block; }
details { background: #fff; border-radius: 12px; box-shadow: var(--sombra); margin-bottom: 12px; overflow: hidden; }
summary {
  cursor: pointer; padding: 18px 56px 18px 22px; font-weight: 700; color: var(--azul);
  list-style: none; position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; color: var(--cian); transition: .2s;
}
details[open] summary::after { content: "–"; }
details[open] summary { background: #eef7fb; }
details .respuesta { padding: 16px 22px 20px; color: var(--suave); }
details .respuesta p + p, details .respuesta ul { margin-top: 10px; }
details .respuesta ul { margin-left: 20px; }

/* Línea de tiempo / valores */
.valor { text-align: center; padding: 10px; }
.valor .icono { margin: 0 auto 14px; }
.valor h3 { color: #fff; margin-bottom: 6px; }
.valor p { color: #bcd0ea; font-size: .96rem; }

/* CTA */
.cta {
  background:
    linear-gradient(180deg, rgba(6,26,58,.82), rgba(6,26,58,.62)),
    url("../img/pie-ciudad.jpg") center / cover no-repeat,
    var(--azul);
  color: #fff; text-align: center; padding: 100px 0;
}
.cta h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin-bottom: 12px; }
.cta p { color: #d4e3f6; max-width: 640px; margin: 0 auto 26px; }

/* Formulario */
.formulario { background: #fff; padding: 32px; border-radius: var(--radio); box-shadow: var(--sombra); }
.formulario label { display: block; font-weight: 700; color: var(--azul); margin: 14px 0 6px; font-size: .92rem; }
.formulario input, .formulario select, .formulario textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid #cfd9e5; border-radius: 10px;
  font: inherit; background: #fbfdff;
}
.formulario input:focus, .formulario select:focus, .formulario textarea:focus { outline: 0; border-color: var(--cian); box-shadow: 0 0 0 3px rgba(0,180,216,.2); }
.formulario button { margin-top: 20px; width: 100%; }
.mensaje-ok { display: none; margin-top: 14px; background: #e6f7ee; color: #146c3a; padding: 12px 16px; border-radius: 10px; font-weight: 600; }
.contacto-lista { list-style: none; }
.contacto-lista li { margin-bottom: 16px; display: flex; gap: 12px; color: var(--suave); }
.contacto-lista strong { display: block; color: var(--azul); }

/* Pie */
footer.sitio { background: var(--azul-oscuro); color: #b5c7de; padding: 56px 0 0; }
.pie-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; }
footer.sitio h4 { color: #fff; margin-bottom: 14px; }
footer.sitio ul { list-style: none; }
footer.sitio li { margin-bottom: 8px; }
footer.sitio a { color: #b5c7de; text-decoration: none; }
footer.sitio a:hover { color: var(--amarillo); }
.pie-final { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding: 20px 0; font-size: .88rem; text-align: center; }

/* Volver arriba */
#arriba {
  position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--cian); color: #fff; font-size: 1.3rem; cursor: pointer;
  opacity: 0; pointer-events: none; transition: .3s; box-shadow: var(--sombra);
}
#arriba.visible { opacity: 1; pointer-events: auto; }

/* Animación de entrada */
.aparece { opacity: 0; transform: translateY(24px); transition: .7s; }
.aparece.visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 960px) {
  .col-3, .col-4 { grid-template-columns: repeat(2, 1fr); }
  .cifras { grid-template-columns: repeat(2, 1fr); }
  .pie-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .hamburguesa { display: block; }
  nav.menu {
    position: absolute; left: 0; right: 0; top: 100%; background: var(--azul-oscuro);
    max-height: 0; overflow: hidden; transition: max-height .3s;
  }
  nav.menu.abierto { max-height: 420px; }
  nav.menu ul { flex-direction: column; padding: 10px 4%; }
  .col-2, .col-3, .col-4 { grid-template-columns: 1fr; }
  .modulo ul { columns: 1; }
  .pie-grid { grid-template-columns: 1fr; }
  .paso { padding: 80px 22px 22px; }
  .heroe { padding: 40px 0 70px; min-height: 0; }
  .heroe.corto { padding: 30px 0 40px; }
}
