/* ==========================================================================
   CASCEP — Propuesta de diseño (vista previa)
   Se carga en todas las páginas después de style.css (publicado el 24-10-2026).
   Misma línea gráfica (azul marino, celeste y dorado), con tonos más vivos.
   ========================================================================== */

:root {
    --primary-color: #0d3b78;     /* antes #1a3a5f: azul marino más vivo */
    --primary-dark: #082853;
    --secondary-color: #00a8f5;   /* antes #00AEEF: celeste más brillante */
    --secondary-dark: #0080d6;
    --accent-color: #ffc21a;      /* antes #FFC107: dorado más cálido */
    --text-dark: #1e293b;
    --text-muted: #5b6b82;
    --bg-light: #f2f7fd;
    --grad-azul: linear-gradient(135deg, #00a8f5 0%, #0066e0 100%);
    --grad-marino: linear-gradient(135deg, #0d3b78 0%, #082853 100%);
    --grad-dorado: linear-gradient(135deg, #ffd24d 0%, #ffb300 100%);
    --sombra-suave: 0 10px 30px rgba(13, 59, 120, .10);
    --sombra-fuerte: 0 18px 45px rgba(13, 59, 120, .18);
}

body.vista-nueva { color: var(--text-dark); }

/* El texto justificado deja huecos en celular: se alinea a la izquierda */
.vista-nueva [style*="text-align: justify"], .vista-nueva [style*="text-align:justify"] { text-align: left !important; }

/* Colores que estaban escritos a mano en el HTML */
.vista-nueva [style*="color: #1a3a5f"], .vista-nueva [style*="color:#1a3a5f"] { color: var(--primary-color) !important; }
.vista-nueva [style*="background: #1a3a5f"], .vista-nueva [style*="background-color: #1a3a5f"] { background: var(--grad-marino) !important; color: #fff !important; }
.vista-nueva .testimonials-section { background: var(--grad-marino) !important; }

/* ---------- Botones ---------- */
.vista-nueva .btn { border-radius: 12px; font-weight: 700; letter-spacing: .02em; transition: transform .2s, box-shadow .2s, background .2s; }
.vista-nueva .btn-primary,
.vista-nueva button.btn-primary,
.vista-nueva [type="submit"].btn {
    background: var(--grad-azul) !important; border: 0 !important; color: #fff !important;
    box-shadow: 0 8px 20px rgba(0, 120, 230, .30);
}
.vista-nueva .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 120, 230, .40); }
.vista-nueva .btn-outline { border-radius: 12px; border-width: 2px; }
.vista-nueva .btn-outline:hover { background: #fff; color: var(--primary-color); }

/* ---------- Títulos de sección ---------- */
.vista-nueva main h2 { letter-spacing: -.01em; text-transform: none !important; }
.vista-nueva main h2::first-letter { text-transform: uppercase; }

/* ==========================================================================
   Cabecera nueva
   ========================================================================== */
.hn-cont { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.hn-barra { background: var(--primary-dark); color: rgba(255,255,255,.85); font-size: .8rem; }
.hn-barra-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 38px; }
.hn-barra-txt i { color: var(--accent-color); margin-right: 6px; }
.hn-barra-links { display: flex; gap: 22px; }
.hn-barra-links a { color: rgba(255,255,255,.9); text-decoration: none; font-weight: 600; white-space: nowrap; }
.hn-barra-links a:hover { color: var(--accent-color); }
.hn-barra-links i { margin-right: 6px; color: var(--secondary-color); }

.hn { position: sticky; top: 0; z-index: 1000; transition: background .25s, box-shadow .25s; }
.hn-solido, .hn.hn-scroll { background: rgba(255,255,255,.97); box-shadow: 0 6px 24px rgba(8, 40, 83, .10); backdrop-filter: saturate(160%) blur(8px); }
.hn-transparente:not(.hn-scroll) { background: linear-gradient(180deg, rgba(8,40,83,.55), rgba(8,40,83,0)); }
body.hn-inicio .hn { position: fixed; left: 0; right: 0; top: 38px; }
body.hn-inicio .hn.hn-scroll { top: 0; }
.hn-fila { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 78px; }

.hn-logo img { height: 50px; display: block; }
.hn-logo-color { display: none !important; }
.hn-solido .hn-logo-blanco, .hn-scroll .hn-logo-blanco { display: none !important; }
.hn-solido .hn-logo-color, .hn-scroll .hn-logo-color { display: block !important; }

.hn-menu { display: flex; align-items: center; gap: 4px; }
.hn-link { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 10px; font: 600 .95rem var(--font-body); text-decoration: none; white-space: nowrap; color: var(--primary-color); transition: background .2s, color .2s; }
.hn-transparente:not(.hn-scroll) .hn-link { color: #fff; }
.hn-link i { font-size: .7rem; transition: transform .2s; }
.hn-link:hover { background: rgba(0,168,245,.10); color: var(--secondary-dark); }
.hn-transparente:not(.hn-scroll) .hn-link:hover { background: rgba(255,255,255,.14); color: #fff; }
.hn-link.activo { color: var(--secondary-dark); }
.hn-transparente:not(.hn-scroll) .hn-link.activo { color: var(--accent-color); }

.hn-desp { position: relative; }
.hn-desp:hover .hn-link i { transform: rotate(180deg); }
.hn-desp-panel { position: absolute; top: 100%; left: 50%; transform: translate(-50%, 8px); min-width: 300px; padding: 10px; background: #fff; border-radius: 16px; box-shadow: var(--sombra-fuerte); opacity: 0; visibility: hidden; transition: .2s; }
.hn-desp:hover .hn-desp-panel, .hn-desp:focus-within .hn-desp-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.hn-desp-panel a { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; text-decoration: none; }
.hn-desp-panel a:hover { background: var(--bg-light); }
.hn-desp-panel i { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-azul); color: #fff; flex-shrink: 0; }
.hn-desp-panel strong { display: block; color: var(--primary-color); font-size: .95rem; }
.hn-desp-panel small { display: block; color: var(--text-muted); font-size: .8rem; }

.hn-acciones { display: flex; align-items: center; gap: 10px; }
.hn-btn-aula, .hn-btn-inscribe { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 12px; font: 700 .9rem var(--font-body); text-decoration: none; white-space: nowrap; transition: transform .2s, box-shadow .2s; }
.hn-btn-aula { border: 2px solid var(--secondary-color); color: var(--secondary-dark); background: transparent; }
.hn-transparente:not(.hn-scroll) .hn-btn-aula { border-color: rgba(255,255,255,.7); color: #fff; }
.hn-btn-inscribe { background: var(--grad-dorado); color: #1a1a1a; box-shadow: 0 8px 18px rgba(255, 179, 0, .35); }
.hn-btn-aula:hover, .hn-btn-inscribe:hover { transform: translateY(-2px); }

.hn-hamb { display: none; width: 46px; height: 46px; border: 0; border-radius: 12px; background: rgba(13,59,120,.08); cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.hn-hamb span { width: 22px; height: 2.5px; border-radius: 2px; background: var(--primary-color); }
.hn-transparente:not(.hn-scroll) .hn-hamb { background: rgba(255,255,255,.15); }
.hn-transparente:not(.hn-scroll) .hn-hamb span { background: #fff; }

/* Menú en celular: panel lateral */
.hn-movil { position: fixed; inset: 0; z-index: 2000; visibility: hidden; }
.hn-movil.abierto { visibility: visible; }
.hn-movil-fondo { position: absolute; inset: 0; background: rgba(8,40,83,.55); opacity: 0; transition: .25s; }
.hn-movil.abierto .hn-movil-fondo { opacity: 1; }
.hn-movil-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 360px); background: #fff; padding: 18px 18px 28px; overflow-y: auto; transform: translateX(100%); transition: transform .28s ease; display: flex; flex-direction: column; gap: 2px; }
.hn-movil.abierto .hn-movil-panel { transform: none; }
.hn-movil-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.hn-movil-top img { height: 42px; }
.hn-movil-top button { width: 42px; height: 42px; border: 0; border-radius: 10px; background: var(--bg-light); color: var(--primary-color); font-size: 1.1rem; }
.hn-movil-panel > a { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-radius: 12px; color: var(--primary-color); font-weight: 600; text-decoration: none; }
.hn-movil-panel > a i { width: 22px; text-align: center; color: var(--secondary-color); }
.hn-movil-panel > a:hover { background: var(--bg-light); }
.hn-movil-panel > a.sub { padding-left: 22px; font-weight: 500; }
.hn-movil-tit { margin: 12px 12px 2px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.hn-movil-btns { display: grid; gap: 10px; margin-top: 18px; }
.hn-movil-btns a { padding: 14px; }

.hn-aviso { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 3000; background: #111827; color: #fff; padding: 10px 18px; border-radius: 999px; font-size: .82rem; box-shadow: 0 10px 30px rgba(0,0,0,.3); white-space: nowrap; }
.hn-aviso a { color: var(--accent-color); font-weight: 700; }

@media (max-width: 1180px) {
    .hn-menu .hn-link { padding: 10px 10px; font-size: .9rem; }
    .hn-btn-aula { display: none; }
}
@media (max-width: 991px) {
    .hn-menu, .hn-barra-txt { display: none; }
    .hn-hamb { display: inline-flex; }
    .hn-barra-in { justify-content: center; }
    .hn-barra-links { gap: 16px; font-size: .76rem; }
    .hn-barra-links a:last-child { display: none; }
    .hn-fila { min-height: 68px; }
    .hn-logo img { height: 42px; }
}
@media (max-width: 560px) {
    .hn-btn-inscribe { padding: 10px 14px; font-size: .85rem; }
    .hn-acciones .hn-btn-inscribe { display: none; }
    .hn-aviso { font-size: .72rem; padding: 8px 14px; white-space: normal; width: calc(100% - 32px); text-align: center; }
}

/* ==========================================================================
   Página de inicio
   ========================================================================== */
/* Nuevo orden de secciones (sin tocar el contenido):
   portada, cifras, cursos, próximas fechas, modalidades, aval MDT,
   testimonios, presencia nacional, bolsa de empleo, preguntas, clientes */
body.hn-inicio main { display: flex; flex-direction: column; }
body.hn-inicio main > :nth-child(1)  { order: 1; }   /* portada */
body.hn-inicio main > :nth-child(3)  { order: 2; }   /* cifras */
body.hn-inicio main > :nth-child(5)  { order: 3; }   /* cursos */
body.hn-inicio main > :nth-child(9)  { order: 4; }   /* próximas fechas */
body.hn-inicio main > :nth-child(4)  { order: 5; }   /* modalidades */
body.hn-inicio main > :nth-child(6)  { order: 6; }   /* aval MDT */
body.hn-inicio main > :nth-child(8)  { order: 7; }   /* testimonios */
body.hn-inicio main > :nth-child(7)  { order: 8; }   /* presencia nacional */
body.hn-inicio main > :nth-child(10) { order: 9; }   /* bolsa de empleo */
body.hn-inicio main > :nth-child(11) { order: 10; }  /* preguntas y contacto */
body.hn-inicio main > :nth-child(12) { order: 11; }  /* clientes */

/* Portada: degradado más vivo, de azul marino a celeste */
body.hn-inicio .hero {
    background-image:
        linear-gradient(105deg, rgba(8,40,83,.95) 0%, rgba(13,59,120,.82) 42%, rgba(0,128,214,.40) 100%),
        url('../img/banner-1.webp') !important;
    padding-top: 150px !important;
}
body.hn-inicio .hero h1 { text-shadow: 0 4px 24px rgba(0,0,0,.25); }
body.hn-inicio .hero .btn-outline { border-color: rgba(255,255,255,.85); }

/* Cifras: bloque con degradados y esquinas redondeadas */
.vista-nueva .stats-split { border-radius: 22px; overflow: hidden; box-shadow: var(--sombra-fuerte); }
.vista-nueva .stats-left { background: var(--grad-azul) !important; }
.vista-nueva .stats-right { background: var(--grad-dorado) !important; }
.vista-nueva .stat-item h3 { color: var(--primary-dark) !important; font-size: 3rem; }
.vista-nueva .stats-left .btn, .vista-nueva .stats-left a[class*="btn"] { background: var(--primary-dark) !important; border-radius: 12px; }

/* Tarjetas de cursos y modalidades */
.vista-nueva main .section [style*="border-radius"] { transition: transform .25s, box-shadow .25s; }
.vista-nueva .cat-curso, .vista-nueva main .section [style*="box-shadow"] { border-radius: 18px !important; }
.vista-nueva .cat-curso:hover { transform: translateY(-4px); box-shadow: var(--sombra-fuerte); }
.vista-nueva .cat-btn { background: var(--grad-azul); border-radius: 10px; }
.vista-nueva .cat-etq { background: var(--grad-dorado); }
.vista-nueva .pc-fila + .pc-fila .pc-monto { color: var(--secondary-dark); }

/* Bolsa de empleo y pie de página con los nuevos tonos */
.vista-nueva .cta-section {
    background-image: linear-gradient(100deg, rgba(8,40,83,.94) 0%, rgba(13,59,120,.80) 50%, rgba(0,128,214,.45) 100%), url('../img/banner-empleo.webp') !important;
}
.vista-nueva .main-footer {
    background-image: linear-gradient(rgba(8,40,83,.92), rgba(8,40,83,.96)), url('../img/bg-footer.webp') !important;
}
.vista-nueva .main-footer a:hover { color: var(--accent-color) !important; }


/* Ajustes en celular */
@media (max-width: 991px) {
    body.hn-inicio .hn { top: 34px; }
    body.hn-inicio .hero { padding-top: 130px !important; }
}
@media (max-width: 560px) {
    body.hn-inicio .hero h1 { font-size: 2.1rem !important; }
    .vista-nueva .stat-item h3 { font-size: 2.2rem; }
}

/* Página del curso: botón de inscripción más visible */
.vista-nueva a[onclick*="inscribirseAhora"] {
    background: var(--grad-dorado) !important; color: #1a1a1a !important; border: 0 !important;
    padding: 14px 24px !important; border-radius: 12px !important; font-weight: 700 !important;
    box-shadow: 0 10px 24px rgba(255, 179, 0, .35); transition: transform .2s;
}
.vista-nueva a[onclick*="inscribirseAhora"]:hover { transform: translateY(-2px); }

/* ==========================================================================
   Colores más notorios por sección (portada)
   ========================================================================== */
/* Títulos con una barra de color celeste a dorado */
.vista-nueva main h2::after { content: ''; display: block; width: 70px; height: 5px; border-radius: 5px; margin: 14px auto 0; background: linear-gradient(90deg, #00a8f5, #ffc21a); }
body.hn-inicio main > :nth-child(5) h2::after, body.hn-inicio main > :nth-child(6) h2::after,
body.hn-inicio main > :nth-child(7) h2::after, body.hn-inicio main > :nth-child(11) h2::after,
.vista-nueva .cta-section h2::after { margin-left: 0; }
.vista-nueva .stats-left h2::after, .vista-nueva .hero h2::after { display: none; }

/* Cursos: fondo celeste suave */
body.hn-inicio main > :nth-child(5) { background: linear-gradient(180deg, #e6f3ff 0%, #f7fbff 70%, #ffffff 100%) !important; }

/* Próximos eventos: fondo dorado suave */
body.hn-inicio main > :nth-child(9) { background: linear-gradient(180deg, #fff6dc 0%, #fffaf0 60%, #ffffff 100%) !important; }

/* Modalidades: bloque azul intenso con círculos decorativos */
body.hn-inicio main > :nth-child(4) {
    background:
        radial-gradient(circle at 8% 15%, rgba(0,168,245,.35) 0, rgba(0,168,245,0) 34%),
        radial-gradient(circle at 92% 85%, rgba(255,194,26,.25) 0, rgba(255,194,26,0) 30%),
        linear-gradient(135deg, #0d3b78 0%, #0a4fa8 55%, #0077d9 100%) !important;
}
body.hn-inicio main > :nth-child(4) h2,
body.hn-inicio main > :nth-child(4) h2 + p,
body.hn-inicio main > :nth-child(4) .container > p,
body.hn-inicio main > :nth-child(4) .container > span,
body.hn-inicio main > :nth-child(4) .container > div:first-child * { color: #fff !important; }
body.hn-inicio main > :nth-child(4) [style*="text-transform: uppercase"],
body.hn-inicio main > :nth-child(4) [style*="letter-spacing"] { color: var(--accent-color) !important; }
body.hn-inicio main > :nth-child(4) [style*="border-radius"] { box-shadow: 0 20px 40px rgba(0,0,0,.25); border: 2px solid rgba(255,255,255,.15); }

/* Aval del Ministerio: celeste muy suave */
body.hn-inicio main > :nth-child(6) { background: linear-gradient(135deg, #eef7ff 0%, #ffffff 60%, #fff8e6 100%) !important; }

/* Testimonios: azul vivo con brillo */
.vista-nueva .testimonials-section {
    background:
        radial-gradient(circle at 15% 20%, rgba(0,168,245,.35) 0, rgba(0,168,245,0) 35%),
        radial-gradient(circle at 85% 80%, rgba(255,194,26,.18) 0, rgba(255,194,26,0) 30%),
        linear-gradient(135deg, #082853 0%, #0d3b78 50%, #0a5bc0 100%) !important;
}
.vista-nueva .testimonial-text { font-size: 1.15rem; }
.vista-nueva .testimonial-author img { border-color: var(--accent-color) !important; box-shadow: 0 0 0 6px rgba(255,194,26,.18); }

/* Preguntas y contacto: fondo celeste suave y tarjeta de contacto en degradado */
body.hn-inicio main > :nth-child(11) { background: linear-gradient(180deg, #f2f8ff 0%, #ffffff 100%) !important; }
.vista-nueva [style*="background: #1a3a5f"] form button,
.vista-nueva [style*="background: var(--primary-color)"] form button { background: var(--grad-dorado) !important; color: #1a1a1a !important; }

/* Botón "Ver todos los cursos" con degradado */
.vista-nueva a[href*="capacitaciones"][style*="background: var(--primary-color)"],
.vista-nueva a[href*="capacitaciones"][style*="background:var(--primary-color)"] { background: var(--grad-marino) !important; box-shadow: 0 10px 24px rgba(13,59,120,.30); }

/* Pie de página con línea de color arriba */
.vista-nueva .main-footer { border-top: 5px solid transparent; border-image: linear-gradient(90deg, #00a8f5, #0066e0, #ffc21a) 1; }