/* ============================================================
   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/cabeceraInicio.png') 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;
}

/* boton de contacto */
.btn-contacto,
.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;
    margin-right: 10px;
}

.btn-contacto:hover,
.btn-plataforma-inicio:hover {
    background-color: white;
    color: #0c6135;
}

/* ============================================================
   QUIENES SOMOS
   ============================================================ */
.about-section {
    padding: 80px 5%;
    background-color: #f9f9f9;
}

/* contenedor central */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* contenedor dividido en dos columnas */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

/* texto de la sección */
.about-text {
    flex: 1;
}

/* título de la sección */
.about-text h2 {
    color: black;
    font-size: 45px;
    margin-bottom: 20px;
    position: relative;
}

/* línea debajo del título */
.about-text h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #0c6135;
    margin-top: 10px;
}

/* parrafos */
.about-text p {
    color: #666;
    line-height: 1.8;
    font-size: 15px;
}

/* contenedor de la imagen */
.about-image {
    flex: 1;
    text-align: center;
}

/* imagen */
.about-image img {
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   SERVICIOS
   ============================================================ */
.services-section {
    padding: 80px 5%;
    background-color: #ffffff;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* titulo de la sección */
.section-title {
    font-size: 45px;
    margin-bottom: 50px;
}

/* línea debajo del título */
.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background-color: #0c6135;
    margin: 10px auto;
}

/* grid que organiza las tarjetas de servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    /* crea columnas automáticas según el espacio disponible */
    gap: 30px;
}

/* tarjeta de servicio */
.service-card {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* imagen del servicio */
.service-image {
    height: 200px;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* hace que la imagen rellene el espacio sin deformarse */
}

/* cuerpo del contenido */
.service-body {
    padding: 20px;
    text-align: left;
}

/* animación al pasar el cursor por encima */
.service-card:hover {
    transform: translateY(-10px);
    /* mueve la tarjeta hacia arriba al pasar el cursor */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: #0c6135;
}

/* botón de saber más*/
.services-footer {
    position: relative;
    z-index: 10;
    margin-top: 40px;
    display: block;
}

.btn-ver-servicios {
    position: relative;
    z-index: 20;
    display: inline-block;
    cursor: pointer !important;
    padding: 15px 35px;
    background-color: #0c6135;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 18px;
    text-transform: uppercase;
    border: transparent 2px solid;
    pointer-events: auto !important;
}

.btn-ver-servicios:hover {
    background-color: transparent;
    color: #0c6135;
    border: #0c6135 2px solid;
}

/* ============================================================
   FORMACIÓN 
   ============================================================ */
.formacion {
    position: relative;
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    /* imagen del fondo*/
    background: url('../imagenes/formacionInicio.jpg') no-repeat center center/cover;
}

/* capa más oscura sobre la imagen */
.formacion-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* contenido de la sección */
.formacion-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    padding: 0 80px;
}

/* titulo */
.formacion-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

/* botón de saber más */
.btn-saberMas-Formacion {
    display: inline-block;
    padding: 15px 35px;
    background-color: transparent;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    border: 2px solid white;
    border-radius: 18px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-saberMas-Formacion:hover {
    background-color: white;
    color: #0c6135;
    border-color: white;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 768px) {
    .hero {
        justify-content: center;
        height: 70vh;
        overflow: hidden;
    }

    .hero-content {
        padding: 0 20px;
        text-align: center;
        width: 100%; /* ✅ Añade esto */
        box-sizing: border-box;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .about-section {
        padding: 60px 5%;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .about-text h2 {
        font-size: 32px;
    }

    .about-text h2::after {
        margin: 10px auto;
    }

    .section-title {
        font-size: 32px;
        margin-bottom: 30px;
    }

    .services-grid {
        gap: 20px;
        padding: 0 10px;
    }

    .formacion {
        height: auto;
        padding: 80px 20px;
    }

    .formacion-content {
        padding: 0;
    }

    .formacion-content h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 28px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .btn-contacto,
    .btn-plataforma-inicio {
        display: block !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important; /* ✅ Sigue el ancho del contenedor, no uno fijo */
        min-height: 48px !important;
        height: auto !important;
        margin: 0 0 15px 0 !important; /* ✅ Sin auto, el padding del padre ya centra */
        border: 2px solid #ffffff !important;
        border-radius: 50px !important;
        padding: 12px 20px !important;
        text-align: center !important;
        text-decoration: none !important;
        text-transform: uppercase !important;
        font-weight: bold !important;
        line-height: 1.4 !important;
        background-color: transparent !important;
        color: #ffffff !important;
    }

    .btn-saberMas-Formacion,
    .btn-ver-servicios {
        display: block !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 48px !important;
        height: auto !important;
        margin: 0 0 15px 0 !important;
        border: 2px solid #ffffff !important;
        border-radius: 50px !important;
        padding: 12px 20px !important;
        text-align: center !important;
        text-decoration: none !important;
        text-transform: uppercase !important;
        font-weight: bold !important;
        line-height: 1.4 !important;
    }

    .about-text p {
        font-size: 14px;
        text-align: justify;
    }
}