html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    font-family: 'Montserrat', sans-serif;
    background-color: #f5f6fa;
}

main {
    padding-top: var(--header-height);
}

/* =========== HERO =========== */

.ecHero {
    background: linear-gradient(135deg, #0000ff 0%, #1d28ff 45%, #32dbfd 100%);
    padding: 60px 20px 70px;
}

.ecHeroContenido {
    max-width: 1100px;
    margin: 0 auto;
}

.ecHeroEyebrow {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.ecHeroIcono {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}

.ecHeroMarca {
    display: block;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.ecHeroEyebrow h1 {
    font-family: 'Gilroy-Bold', 'Montserrat', sans-serif;
    color: #fff;
    font-size: 42px;
    margin: 0;
}

.ecHeroDescripcion {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 0 40px;
}

.ecHeroStats {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
}

.ecStat {
    display: flex;
    flex-direction: column;
}

.ecStatNumero {
    font-family: 'Gilroy-Bold', 'Montserrat', sans-serif;
    color: #32dbfd;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.1;
}

.ecStatLabel {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin-top: 4px;
}

/* =========== SECCIONES =========== */

.ecSeccion {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
    box-sizing: border-box;
}

.ecSeccionTitulo {
    display: flex;
    align-items: center;
    border-left: 5px solid #0000ff;
    padding-left: 14px;
}

.ecSeccionTitulo.ecBarraRoja {
    border-left-color: #e63946;
}

.ecSeccionTitulo h2 {
    color: #464646;
    font-family: 'Gilroy-Bold', 'Montserrat', sans-serif;
    font-size: 26px;
    margin: 0;
}

.ecSeccionSubtitulo {
    color: #7a7a7a;
    font-size: 15px;
    margin: 10px 0 30px;
}

/* =========== CURSOS VIRTUALES =========== */

.ecCursosGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cursoCard {
    background-color: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cursoCard:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.cursoImagen {
    position: relative;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dfe4ea, #c9ccd1);
}

.cursoIconoPlaceholder {
    font-size: 42px;
    color: rgba(255, 255, 255, 0.85);
}

.badgeCategoria {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #fff;
    text-transform: uppercase;
}

.badgeNivel {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.92);
    color: #464646;
}

.cursoInfo {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cursoInfo h3 {
    color: #2b2b2b;
    font-size: 17px;
    margin: 0 0 8px;
}

.cursoInfo p {
    color: #7a7a7a;
    font-size: 13.5px;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.cursoInfo hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 16px 0;
    width: 100%;
}

.cursoFooter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12.5px;
    color: #7a7a7a;
}

.cursoFooter i {
    margin-right: 4px;
}

.botonCurso {
    margin-left: auto;
    padding: 9px 18px;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.botonCurso:hover {
    opacity: 0.85;
}

/* Colores por categoría — cursos */
.categoriaDesarrollo { background: linear-gradient(135deg, #4338ca, #6366f1); }
.categoriaDerecho { background: linear-gradient(135deg, #2b2b2b, #4b4b4b); }
.categoriaComunicacion { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.categoriaPsicologia { background: linear-gradient(135deg, #0d9488, #14b8a6); }
.categoriaTrabajoSocial { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }
.categoriaEmprendimiento { background: linear-gradient(135deg, #dc2626, #ef4444); }

.botonDesarrollo { background-color: #4338ca; }
.botonDerecho { background-color: #2b2b2b; }
.botonComunicacion { background-color: #1d4ed8; }
.botonPsicologia { background-color: #0d9488; }
.botonTrabajoSocial { background-color: #6d28d9; }
.botonEmprendimiento { background-color: #dc2626; }

/* Colores por categoría — masterclasses (badge sobre thumbnail real) */
.categoriaTrabajoSocialBg { background-color: #6d28d9; }
.categoriaDerechoBg { background-color: #2b2b2b; }
.categoriaPsicologiaBg { background-color: #0d9488; }
.categoriaComunicacionBg { background-color: #1d4ed8; }

/* =========== MASTERCLASSES =========== */

.ecMasterGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.masterCard {
    background-color: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.masterCard:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.masterThumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #111;
}

.masterThumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.botonPlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: #e63946;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.masterInfo {
    padding: 20px 22px 24px;
}

.masterInfo h3 {
    color: #2b2b2b;
    font-size: 18px;
    margin: 0 0 10px;
}

.masterInfo p {
    color: #7a7a7a;
    font-size: 13.5px;
    line-height: 1.55;
    margin: 0 0 14px;
}

.masterMeta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: #7a7a7a;
    margin-bottom: 16px;
}

.masterMeta i {
    margin-right: 5px;
}

.botonYoutube {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border-radius: 8px;
    background-color: #e63946;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.botonYoutube:hover {
    opacity: 0.85;
}

/* =========== CTA CANAL DE YOUTUBE =========== */

.canalCta {
    margin-top: 40px;
    background-color: #fdecec;
    border-radius: 14px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.canalIcono {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background-color: #e63946;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.canalTexto {
    flex: 1;
}

.canalTexto h3 {
    color: #2b2b2b;
    font-size: 17px;
    margin: 0 0 4px;
}

.canalTexto p {
    color: #7a7a7a;
    font-size: 13.5px;
    margin: 0;
}

.botonCanal {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 8px;
    background-color: #e63946;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.botonCanal:hover {
    opacity: 0.85;
}

/* =========== RESPONSIVE =========== */

@media (max-width: 1024px) {

    .ecCursosGrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {

    .ecMasterGrid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .ecHeroEyebrow h1 {
        font-size: 32px;
    }

    .ecHeroStats {
        gap: 30px;
    }

    .ecCursosGrid {
        grid-template-columns: 1fr;
    }

    .canalCta {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {

    .ecHero {
        padding: 45px 16px 55px;
    }

    .ecHeroEyebrow {
        gap: 12px;
    }

    .ecHeroEyebrow h1 {
        font-size: 26px;
    }

    .ecStatNumero {
        font-size: 28px;
    }

    .cursoFooter {
        flex-direction: column;
        align-items: flex-start;
    }

    .botonCurso {
        margin-left: 0;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}
