/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative; /* permite posicionar elementos encima */
    height: 60vh; /* altura del hero */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* contenido a la izquierda */
    text-align: left;
    color: white;
    /* imagen de fondo centrada y cubriendo todo */
    background: url('../imagenes/formacionInicio.jpg') no-repeat center center/cover;
}

/* capa pscura sobre la imagen */
.hero-overlay {
    position: absolute;
    inset: 0; /* cubre todo el fondo */
    background-color: rgba(0, 0, 0, 0.5); /*  oscurece la imagen */
    z-index: 1; /* colocado encima de la imagen */
}

/* contenido del hero */
.hero-content {
    position: relative;
    z-index: 2; /* colocado encima del overlay */
    max-width: 1000px; /* ancho máximo del contenido para que baje de línea */
    padding: 0 80px; /* espacio a los lados */
}

/* título del hero */
.hero-content h1 {
    font-size: 3.5rem; /* tamaño del título más grande */
    margin-bottom: 1rem;
    font-weight: 700; /* peso de la fuente para que se vea en negrita */
}

/* subtitulo del hero */
.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

.btn-plataforma-inicio {
    display: inline-block;
    padding: 15px 35px;
    background-color: transparent;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid white;
    border-radius: 18px; 
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-plataforma-inicio:hover {
    background-color: white;
    color: #0c6135;
}

/* ============================================================
   QUIENES SOMOS 
   ============================================================ */

/* sección de informacion de la empresa */
.about-section {
    padding: 80px 5%;
    background-color: #f9f9f9;
}

/* contenedor principal centrado */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* contenido en dos columnas */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

/* texto de la sección about */
.about-text {
    flex: 1;
}

/* titulo */
.about-text h2 {
    color: black;
    font-size: 45px;
    margin-bottom: 20px;
    position: relative;
}

/* linea decorativa debajo del título */
.about-text h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #0c6135;
    margin-top: 10px;
}

/* texto y listas */
.about-text p,
ul {
    color: #666;
    line-height: 1.8;
    font-size: 15px;
}

/* imagen de la sección about */
.about-image {
    flex: 1;
    text-align: center;
}

/* estilo para la imagen */
.about-image img {
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   CURSOS
   ============================================================ */
/* título de la sección */
.section-title {
    font-size: 45px;
    margin-bottom: 50px;
}

/* linea decorativa bajo el título */
.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background-color: #0c6135;
    margin: 10px auto;
}

/* --- SECCIÓN CURSOS --- */
.cursos-section {
    padding: 100px 5%;
    background-color: #ffffff;
}

/* contenedor de cursos */
.cursos-container {
    max-width: 1350px;
    margin: 0 auto;
    text-align: center;
}

/* grid de cursos en 4 columnas */
.cursos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 50px;
}

/* --- TARJETA DE CURSOS --- */
.cursos-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 25px; 
    padding: 35px; 
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* contenido alineado a la izquierda */
    text-align: left;
    transition: all 0.3s ease;
    height: auto; 
    box-sizing: border-box;
}

/* animacion al pasar el cursor por encima */
.cursos-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: #0c6135;
}

/* --- ICONO DE LA TARJETA --- */
.cursos-top-section {
    margin-bottom: 5px; /* margen reducido para pegar al título */
    width: 100%;
}

.cursos-icon-circle {
    width: 45px;
    height: 45px;
    background-color: #e8f5ed;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px; /* espacio entre icono y título */
}

.cursos-icon-circle i {
    color: #0c6135;
    font-size: 20px;
}

/* --- TÍTULO DE LA TARJETA --- */
.cursos-card h3 {
    font-size: 17px;
    color: #111;
    font-weight: 800;
    margin: 0 0 15px 0; /* quitamos el margen superior para que suba */
    text-transform: uppercase; /* letra en mayúsculas */
    line-height: 1.2;
}

/* cuerpo de texto pegado al título */
.cursos-body {
    margin-bottom: 25px; 
    flex-grow: 0;
    width: 100%;
}

/* texto del curso */
.cursos-card p {
    font-size: 13px;
    line-height: 1.6;
    color: #666;
    margin: 0;
    text-transform: uppercase;
}

/* --- BOTÓN SABER MÁS --- */
.cursos-footer {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
}

.btn-saberMas-Cursos {
    background-color: #0c6135;
    color: white;
    padding: 12px 25px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

/* animacion al pasar el cursor por encima */
.btn-saberMas-Cursos:hover {
    background-color: transparent;
    color: #0c6135;
    border-color: #0c6135;
}

/* ============================================================
   MODAL (VENTANA EMERGENTE)
   ============================================================ */
.modal {
    display: none; /* Siempre oculto por defecto */
    position: fixed;
    z-index: 10000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    
    /* Quitamos el display flex de aquí para que el 'none' funcione */
    justify-content: center;
    align-items: center; 
    padding: 20px;
    box-sizing: border-box;
}

/* 2. Crea una clase nueva para cuando el modal esté abierto */
.modal.is-active {
    display: flex; /* Solo se vuelve flex cuando tiene esta clase */
}

/* contenido del modal */
.modal-content {
    background: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: 25px;
    padding: 40px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.4s ease;
    box-sizing: border-box; /* asegura que el padding no sume al ancho total */
}

/* animación de entrada*/
@keyframes modalSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* botón para cerrar el modal*/
.close-modal {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

/* título del modal */
#modal-titulo {
    color: #0c6135;
    font-weight: 800;
    margin-bottom: 20px;
    font-size: 22px;
    text-transform: uppercase;
    padding-right: 20px; /* evita que el título choque con la X */
}

/* área con el scroll del modal */
.modal-scroll-area {
    max-height: 60vh; /* ajustado para que no se salga de la pantalla en vertical */
    overflow-y: auto;
    margin-bottom: 25px;
    text-align: left;
}

/* lista de cursos dentro del modal */
#modal-lista li {
    padding: 10px 0;
    list-style: none;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #444;
    font-weight: 600;
    text-transform: uppercase;
}

/* botón del modal */
.btn-plataforma {
    background-color: #0c6135;
    color: #fff;
    display: block;
    text-align: center;
    padding: 15px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
}

/* ============================================================
   RESPONSIVO 
   ============================================================ */
@media (max-width: 1100px) {
    .cursos-grid {
        grid-template-columns: repeat(2, 1fr); /* dos columnas */
    }
    .hero-content {
        padding: 0 40px;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 50vh;
        justify-content: center;
        text-align: center;
    }
    .hero-content {
        padding: 0 20px;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }

    .about-section {
        padding: 50px 5%;
    }
    .about-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    .about-text h2 {
        font-size: 32px;
    }
    .about-text h2::after {
        margin: 10px auto 0;
    }
    .about-image img {
        max-width: 100%;
    }

    .section-title {
        font-size: 32px;
    }

    .modal-content {
        padding: 30px 20px;
    }
}

@media (max-width: 650px) {
    .cursos-grid {
        grid-template-columns: 1fr; /* una columna en móviles */
        gap: 20px;
    }
    .cursos-section {
        padding: 60px 5%;
    }
    .cursos-card {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    #modal-titulo {
        font-size: 18px;
    }

    .modal-content {
        padding: 30px 20px; /* reducimos padding interno para ganar espacio */
        border-radius: 20px;
    }

    #modal-titulo {
        font-size: 18px;
    }

    .close-modal {
        right: 15px;
        top: 15px;
    }
}