.banner-section {
    position: relative;
    /* para poder posicionar el texto encima */
    width: 100%;
    height: auto;
    /* altura fija para el banner */
    overflow: hidden;
}

.banner-section img {
    width: 100%;
    height: 100%;
    /*object-fit: cover;       /* que la imagen cubra todo el ancho/alto */
    /*display: block;*/
}

.texto1 {
    position: absolute;
    top: 50%;
    left: 23%;
    right: 10%;
    transform: translate(-50%, -50%);
    /* centra horizontal y vertical */
    text-align: left;
    color: #fff;
    padding: 0 20px;
    max-width: 40%;
    font-family: 'Gandhi Sans', sans-serif;
}

.texto1 h2 {
    font-size: 2rem;
    /* tamaño grande de título */
    font-weight: bold;
    line-height: 1.2;
}

/* ============================= */
/* SECCIÓN SERVICIOS*/
/* ============================= */

.contenido-dinamico {
    display: grid;
    place-items: center;
    margin-inline: 1.5rem;
    padding-block: 3rem;
    /*display: flex;
        justify-content: center;
        align-items: center;*/
    /*margin: 30px auto;
        padding: 0 10px; */
}

.container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    row-gap: 3.5rem;
}

.card {
    position: relative;
    overflow: hidden;
    /*
        height: 500px;
        margin: 50px 50px 250px 50px;
        box-shadow: 5px 5px 20px black;
        overflow: hidden;*/
}

#titulo-superior {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Gandhi Sans', sans-serif;
    width: 90%;
    padding: 0.8rem 1rem;
    text-align: center;
    font-size: 1.2rem;
    color: #fff;

    background: rgba(0, 0, 0, 0.65); /* Fondo negro con opacidad */
    border-radius: 10px;

    z-index: 5;

    opacity: 1;
    transition: opacity .4s ease;
}

/* Ajuste para la imagen */
.contenido-img {
    width: 350px;
    border-radius: 10px;
    /*height: 500px;
        width: 350px;
        border-radius: 3px;
        /*width: 50%;
        height: auto;
        margin: 0;
        /*order: -1;*/
    /*Coloca la imagen en la parte superior del stack */
}

.contenido-texto {
    width: 300px;
    background-color: #fff;
    font-family: 'Gandhi Serif', serif;
    padding: 1.5rem 2rem;
    box-shadow: 0 8px 24px hsla(0, 0%, 0%, .5);
    border-radius: 1rem;
    position: absolute;
    bottom: -9rem;
    left: 0;
    right: 0;
    margin-inline: auto;
    opacity: 0;
    transition: opacity 0.7s 0.7s;
    display: flex;
    flex-direction: column;
    align-items: center;
    /*height: 400px;
        width: 350px;
        padding: 6px;
        box-sizing: border-box;
        position: absolute;
        bottom: 40px;
        background-color: #000;
        color:#fff;*/
}

.contenido-texto h3 {
    margin: 10px;
    font-size: 1.2rem;
    font-family: 'Gandhi Sans', sans-serif;
}

.contenido-texto p {
    display: block;
    font-size: 1rem;
    margin: 20px;
    font-family: 'Gandhi Serif', serif;
}

.card:hover {
    cursor: pointer;
}

.contenido-lista {
    list-style: none;
    padding: 0;
    /*margin-bottom: 60px;
    margin-right: -30%;*/
    /*width: 100%;**/
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Alinea los <li> al inicio */
}

.contenido-lista li {
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-family: 'Gandhi Serif', serif;
    display: flex;
    align-items: center;
}

.contenido-lista i {
    margin-right: 10px;
    color: #CB4F24;
    display: flex;
    align-items: center;
}

.boton-accion {
    background-color: #CB4F24;
    color: #000;
    border: none;
    width: 200px;
    /*height: 50px;*/
    padding: 10px;
    font-family: 'Gandhi Sans', sans-serif;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 25px;
    /*margin-right: 50%;*/
    /*margin-top: 20px;*/
}

.boton-accion:hover {
    background-color: #B82F25;
    transform: translateY(-2px);
}

.card:hover .contenido-texto {
    animation: show-data 1s forwards;
    opacity: 1;
    transition: opacity .3s;
}

.card:hover {
    animation: remove-overflow 2s forwards;
}

.card:hover #titulo-superior {
    opacity: 0;
}

.card:not(:hover) {
    animation: show-overflow 2s forwards;
}

.card:not(:hover) .contenido-texto {
    animation: remove-data 1s forwards;
}

@keyframes show-data {
    50% {
        transform: translateY(-10rem);
    }

    100% {
        transform: translateY(-7rem);
    }
}

@keyframes remove-overflow {
    to {
        overflow: initial;
    }
}

@keyframes remove-data {
    0% {
        transform: translateY(-7rem);
    }

    50% {
        transform: translateY(-10rem);
    }

    100% {
        transform: translateY(.5rem);
    }
}

@keyframes show-overflow {
    0% {
        overflow: initial;
        pointer-events: none;
    }

    50% {
        overflow: hidden;
    }
}

/*SECCIÓN SERVICIOS

.btn {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-family: 'Gandhi Sans', sans-serif;
    margin-top: 50px;
    flex-wrap: wrap;
}

.btn button {
    background-color: #B82F25;
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 1.1rem;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn button:hover {
    background-color: #9c271f;
}

#contenido-dinamico {
    display: none;
    margin: 50px auto;
    max-width: 900px;
}

.contenido-caja {
    display: flex;
    flex-direction: row;
    /* Asegura disposición horizontal 
    background-color: #000;
    color: #fff;
    border-radius: 12px;
    padding: 30px;
    gap: 30px;
    align-items: flex-start;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    flex-wrap: wrap;
}

.contenido-img {
    width: 230px;
    height: auto;
    /*object-fit: cover;
    border-radius: 10px;
    margin: 50px 40px 50px 20px;
}

.contenido-texto {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centra todo horizontalmente 
}

.contenido-texto h3 {
    color: #CB4F24;
    font-size: 1.5rem;
    font-family: 'Gandhi Sans', sans-serif;
    margin-bottom: 10px;
    margin-right: 50%;
    width: 500px;
    display: flex;
    justify-content: center;
    text-align: center;
    /* Centra el texto 
}

.contenido-texto p {
    font-size: 1.1rem;
    margin: 40px 50px 40px 2px;
    font-family: 'Gandhi Serif', serif;
    line-height: 1.5;
}

.contenido-lista {
    list-style: none;
    padding: 0;
    margin-bottom: 60px;
    margin-right: -30%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Alinea los <li> al inicio 
}

.contenido-lista li {
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-family: 'Gandhi Serif', serif;
    display: flex;
    align-items: center;
}

.contenido-lista i {
    margin-right: 10px;
    color: #CB4F24;
    display: flex;
    align-items: center;
}

.boton-accion {
    background-color: #CB4F24;
    color: #000;
    border: none;
    width: 270px;
    height: 50px;
    padding: 10px 20px;
    font-family: 'Gandhi Sans', sans-serif;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 25px;
    margin-right: 50%;
    margin-top: 20px;
}

.boton-accion:hover {
    background-color: #B82F25;
    transform: translateY(-2px);
}
*/

/*SECCIÓN EMPEZAR AHORA*/
section.empieza {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Gandhi Sans', sans-serif;
    margin-top: 20px;
    width: 100%;
}

.titulo {
    background-color: #000;
    width: 100%;
    text-align: center;
    padding: 15px 0;
}

.titulo h3 {
    color: #fff;
    font-size: 1.8rem;
    margin: 0;
}

.paso {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
    font-size: 1.5rem;
    font-weight: bold;
}

.paso i {
    display: flex;
    justify-content: center;
    font-size: 1.8rem;
    /*margin-right: 20px;*/
    /*padding: 14px 0px 0px 0px; /* top: 10px, right: 20px, bottom: 30px, left: 40px */
    padding-top: 20px;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    text-align: center;
    line-height: 20px;
}


.paso.rojo {
    background-color: #CB4F24;
    color: white;
}

.paso.rojo i {
    color: #CB4F24;
    background-color: #FFFF;
    margin-right: 50px;
}

.paso.blanco {
    display: flex;
    flex-direction: row-reverse;
    background-color: #fff;
    color: #000;
}

.paso.blanco i {
    color: #FFFF;
    background-color: #CB4F24;
    margin-left: 50px;
}

.paso.rojo i span {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/*SECCIÓN ASESORIA*/
section.asesoria {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #000;
    color: #fff;
    overflow: hidden;
    width: 100%;
    min-height: 400px;
    overflow: hidden;

}

.contenedor-imagen {
    flex: 0 0 50%;
    display: flex;
    justify-content: flex-start;
    position: relative;
    align-items: center;
    height: 100%;
}

.contenedor-imagen img {
    width: 100%;
    max-width: 800px;
    /* Limita el tamaño de la imagen */
    height: auto;
    position: relative;
    object-fit: cover;
    z-index: 2;
    /* Asegura que esté por encima del fondo negro del texto si se superponen */

}

.contenedor-texto {
    flex: 1;
    background-color: #000;
    color: #fff;
    display: flex;
    height: 100%;
    margin-right: 200px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1;
}

.contenedor-texto p {
    font-family: 'Gandhi Serif', serif;
    font-size: 1.5rem;
    line-height: 1.6;
    margin-top: 90px;
    margin-bottom: 50px;
    max-width: 800px;
}

.contenedor-texto strong {
    color: #CB4F24;
}

.btn-contacto {
    background-color: #CB4F24;
    color: #000;
    padding: 14px 40px;
    font-family: 'Gandhi Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 300px;
}

.btn-contacto:hover {
    background-color: #D19733;
}


@media (max-width: 700px) {
   /*BANNER*/
    .texto1 {
        position: absolute;
        padding: 0 10px;
    }

    .texto1 h2 {
        font-size: 1.1rem;
        line-height: 1.2;
    }

    /* ============================= */
    /* SECCIÓN SERVICIOS*/
    /* ============================= */

    .container{
        grid-template-columns: 1fr;
        row-gap: 2rem;
        margin-inline: 1rem;
    }

    .contenido-texto{
        width: 90%;
        max-width: 300px;
        padding: 1rem;
    }

    .contenido-img{
        width: 100%;
        max-width: 300px;
    }

    /*SECCIÓN DE SERVICIOS

    .btn {
        display: flex;
        justify-content: center;
        gap: 20px;
        flex-direction: column;
        /* Apila los botones verticalmente 
        margin-right: 15%;
        margin-left: 15%;
        margin-top: 30px;
        padding: 0 10px;
    }

    .btn button {
        width: auto;
        padding: 12px 15px;
        font-size: 0.9rem;
    }*/

    /* ------------------- CONTENIDO DINÁMICO ------------------- 
    #contenido-dinamico {
        margin: 30px auto;
        padding: 0 10px; 
    }

    .contenido-caja {
        flex-direction: column;  /*Apila la imagen y el texto verticalmente 
        padding: 20px;
        gap: 15px;
    }

    /* Ajuste para la imagen 
    .contenido-img {
        width: 50%; 
        height: auto;
        margin: 0; 
        order: -1; /*Coloca la imagen en la parte superior del stack 
    }

    /* Ajuste para el contenedor de texto 
    .contenido-texto {
        min-width: auto;
        width: 100%;
        padding: 0;
    }

    /* Ajuste para el Título (h3) 
    .contenido-texto h3 {
        font-size: 0.9rem;
        width: 100%;
        margin-right: 0;
        text-align: center;
        justify-content: center; 
    }

    /* Ajuste para la Descripción (p) 
    .contenido-texto p {
        font-size: 0.8rem;
        margin: 10px 0; 
        text-align: left;
    }

    /* Ajuste para la Lista (ul) 
    .contenido-lista {
        margin-top: 20px;
        margin-bottom: 10px;
        margin-right: 0; 
        width: auto;
        padding-left: 0;
    }

    .contenido-lista li {
        font-size: 0.7rem;
        font-family: 'Gandhi Serif', serif;
        display: flex;
        align-items: center;
    }

    /* Ajuste para el Botón de Acción 
    .boton-accion {
        display: flex;
        justify-content: center;
        align-items: center;
        width: auto;
        font-family: 'Gandhi Sans', sans-serif; 
        margin-right: 0; /* Elimina el margen derecho de escritorio 
        margin-top: 15px;
        font-size: 0.8rem;
    }

    /*SECCIÓN DE EMPIEZA*/

    .titulo h3 {
        font-size: 1.3rem;
        /* Reduce el tamaño del título principal */
    }

    .paso {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 15px 10px;

    }

    .paso i {
        display: flex;
        justify-content: center;
        text-align: center;
        font-size: 1.2rem;
        width: 40px;
        height: 40px;
        line-height: 0;
    }

    .paso span {
        font-size: 1.1rem;
    }


    /*SECCIÓN ASESORIA*/
    section.asesoria {
        flex-direction: column;
        width: 100%;
        min-height: auto;
        padding: 40px 20px;
        overflow-x: hidden;
    }

    .contenedor-imagen {
        display: none;
    }

    .contenedor-texto {
        display: flex;
        flex-direction: column;
        /* Apila los párrafos y el botón */
        justify-content: center;
        align-items: center;
        /* Centra horizontalmente todo el contenido (texto y botón) */
        font-size: 0.7rem;
        width: 100%;
        margin-right: 0;
        margin-top: 0;
    }

    .contenedor-texto p {
        font-family: 'Gandhi Serif', serif;
        font-size: 1.3rem;
        margin-top: 20px;
        margin-bottom: 20px;
        padding: 0 10px;
        max-width: 100%;
    }

    .btn-contacto {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 250px;
        height: 45px;
        margin: 10px auto 30px auto;
        /* Lo centra horizontalmente (auto) y le da espacio vertical */
        font-size: 0.9rem;
    }
}