.titulo{
    padding: 90px 0 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.titulo h1{
    font-size: 50px;
    color: #03727b;
    text-align: center;
    text-transform: uppercase;
    margin: 0
}

.titulo h3{
    font-size: 30px;
    color: #ffa92e;
    text-align: center;
}

/* Image Section */
.image-text-section {
    background-color: white;
    padding: 0px 20px; /* Mayor espaciado interno para más aire */
}

.image-text-section.parte1{
    background-color: #199a8f;
    z-index: 3;
    border-radius: 0 0 40px 40px;
    box-shadow: 4px 10px 20px rgba(0, 0, 0, 0.3);
}

.image-text-section.parte1 .text{
    color: white;
}

.image-text-section.parte2{
    background-color: #ffa92e;
    margin-top: -40px;
    z-index: 2;
    box-shadow: 4px 10px 20px rgba(0, 0, 0, 0.3);
}

.content {
    display: flex; /* Usamos flexbox para organizar los elementos en una fila */
    justify-content: space-between; /* Distribuye el texto y la imagen */
    align-items: center; /* Alinea verticalmente el contenido */
    max-width: 1200px; /* Ancho máximo de la sección */
    margin: 0 auto; /* Centra la sección en la página */
    gap: 60px; /* Espaciado amplio entre la imagen y el texto */
    padding: 120px 0;
}

.text {
    flex: 1; /* El texto ocupará más espacio */
    text-align: justify; /* Alinea el texto a la izquierda */
    font-size: 20px;
    line-height: 1.4;
    width: 90%;
    font-weight: 700;
}

.text h4, .text2 h4{
    font-size: 25px;
    text-align: center;
    color: #03727b;
}

.text2 {
    flex: 1; /* El texto ocupará más espacio */
    text-align: justify; /* Alinea el texto a la izquierda */
    font-size: 16px;
    line-height: 1.5;
    width: 90%;
}

.text-text-section .content{
    gap: 100px;
}

.image {
    flex: 1; /* La imagen ocupa el otro espacio */
    display: flex;
    justify-content: center;
}

.image img {
    height: auto; /* Imagen responsiva */
    width: 500px; /* Tamaño máximo de la imagen */
    border-radius: 20px; /* Bordes redondeados para un toque moderno */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Animación suave al hacer hover */
    z-index: 2;
}

.image-text-section.parte1 .image::before,
.image-text-section.parte2 .image::before{
    content: "";
    position: absolute;
    background-image: url(/img/hexagono.png);
    background-size: contain;
    background-repeat: no-repeat;
    width: 160px;
    height: 180px;
    top: 190px;      /* Ajusta según tu diseño */
    left: -60px;    /* Ajusta según tu diseño */
    z-index: 1;     /* Debe estar debajo de la imagen */
    transition: 0.3s ease-in-out;
}

.image img:hover {
    transform: scale(1.05); /* Efecto de zoom suave al pasar el cursor */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1); /* Sombra más profunda en hover */
}

.image-text-section.parte1 .image:hover::before {
    transform: rotate(50deg);
}

.image-text-section.parte2 .image::before{
    background-image: url(/img/hexagono1.png);
    top: 190px;      /* Ajusta según tu diseño */
    left: 450px;    /* Ajusta según tu diseño */
}

.image-text-section.parte2 .image:hover::before {
    transform: rotate(-50deg);
}


.text {
    view-timeline-name: --imagenes;
    view-timeline-axis: block;
    animation-timeline: --imagenes;
    animation-name: fadeInLeft;
    animation-range: entry 25% cover 50%;
    animation-fill-mode: both;
}

.text2 {
    view-timeline-name: --imagenes;
    view-timeline-axis: block;
    animation-timeline: --imagenes;
    animation-name: fadeInRight;
    animation-range: entry 25% cover 50%;
    animation-fill-mode: both;
}



@keyframes fadeInLeft {
    0% {
        opacity: 0; /* Inicialmente invisible */
        transform: translateX(-100px); /* Desplazado hacia la izquierda */
    }
    100% {
        opacity: 1; /* Totalmente visible */
        transform: translateX(0); /* Regresa a su posición original */
    }
}

.image {
    view-timeline-name: --imagenes;
    view-timeline-axis: block;
    animation-timeline: --imagenes;
    animation-name: fadeInRight; /* Cambié el nombre a fadeInRight */
    animation-range: entry 25% cover 50%;
    animation-fill-mode: both;
}

@keyframes fadeInRight {
    0% {
        opacity: 0; /* Inicialmente invisible */
        transform: translateX(+100px); /* Desplazado hacia la derecha fuera de la pantalla */
    }
    100% {
        opacity: 1; /* Totalmente visible */
        transform: translateX(0); /* Regresa a su posición original */
    }
}



/* Media Query para pantallas más pequeñas */
@media (max-width: 800px) {
    .text p, .text2 p{
        padding: 0 30px;
    }
    .content {
        flex-direction: column; /* Apila el texto y la imagen en dispositivos móviles */
        align-items: center; /* Alinea ambos elementos al centro */
        padding: 40px 20px; /* Ajusta el padding interno para dispositivos más pequeños */
        gap: 20px; /* Reduce el espacio entre la imagen y el texto */
    }

    .image-text-section.parte1, .image-text-section.parte2{
        padding: 70px;
    }

    .content.type2{
        flex-direction: column-reverse; /* Apila el texto y la imagen en dispositivos móviles */
    }

    .text {
        padding-top: 20px;
        text-align: center; /* Alinea el texto al centro */

    }

    .text h3 {
        font-size: 24px; /* Reduce el tamaño del título */
    }

    .image img {
        max-width: 100%; /* Asegura que la imagen ocupe todo el ancho disponible */
        height: auto; /* Mantiene la proporción de la imagen */
    }
}

@media (max-width: 400px) {
    .titulo h1{
        font-size: 30px;
        line-height: 40px;
        width: 90%;
    }

    .titulo h3{
        font-size: 20px;
        margin: 0;
    }
    .titulo .content {
        padding: 20px 10px; /* Ajusta el padding en dispositivos aún más pequeños */
    }

    .text {
        font-size: 14px; /* Reduce aún más el tamaño del texto en pantallas muy pequeñas */
        line-height: 1.4; /* Ajusta el espaciado entre líneas */
    }

    .text h3 {
        font-size: 20px; /* Ajusta el tamaño del título */
    }

    .image img {
        max-width: 100%; /* Ocupa el 100% del ancho disponible */
        height: auto; /* Mantiene la proporción de la imagen */
    }

    .image-text-section.parte1 .image::before,
    .image-text-section.parte2 .image::before{
        display: none;
    }
}

.formacion{
    background-image: url('/img/adultos/bg.png');
    display: flex;
    flex-direction: column;
    position: relative;
    padding-top: 100px;
    padding-bottom: 200px;
    margin-top: -100px;
    
    /* Animación con scroll */
    view-timeline-name: --formacion;
    view-timeline-axis: block;
    animation-timeline: --formacion;
    animation-name: fadeInUp1;
    animation-range: entry 40% cover 70%;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.46, 0.03, 0.52, 0.96);
}

.formacion::after {
    content: "";
    background-image: url(/img/adultos/bg1.png);
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    top: 460px;
    left: 0;
    width: 45%;
    height: 70%;


    z-index: -1; /* para que quede detrás del contenido */
    pointer-events: none; /* opcional: permite que los clics pasen a través */
}


/* Definición de la animación */
@keyframes fadeInUp1 {
    0% {
        opacity: 0;
        transform: translateY(150px);
    }
    50% {
        opacity: 1;
        transform: translateY(100px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


.formacion h2{
    color: #03727b;
    font-size: 40px;
    text-transform: uppercase;
    line-height: 40px;
    max-width: 30%;
    text-align: center;
    margin: auto;
}

.formacion h2::after{
    content: "";
    display: block; /* o inline-block si lo necesitas en línea */
    width: 150px; /* ajusta a lo que necesites */
    height: 4px;
    margin-top: 15px;
    background-color: #ffa92e;
}

.timeline{
    margin-bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-item.Ecuador{
    transform: translateX(-130px);
    transition: 0.2s;
}

.timeline-item.Loja{
    transform: translateX(+120px);
    transition: 0.2s;
}

.timeline-item.Loja2{
    transform: translateX(+200px);
    transition: 0.2s;
}

.timeline-item.Universitario{
    transform: translateX(+230px);
    transition: 0.2s;
}



.timeline-item.Ecuador:hover {
    transform: translateX(-80px); /* -130 + 50 */
}

.timeline-item.Loja:hover {
    transform: translateX(170px); /* 120 + 50 */
}

.timeline-item.Loja2:hover {
    transform: translateX(250px); /* 200 + 50 */
}

.timeline-item.Universitario:hover {
    transform: translateX(280px); /* 230 + 50 */
}


.timeline-item img{
    transform: translateX(-50px);
}

.timeline-item:hover > img {
    transform: scale(1.3) translateX(-50px);
}


.timeline-item {
    display: flex;
    padding: 0px;
    gap: 0px;
    margin-top: 110px;
    justify-content: center;
}


.timeline-item p{
    text-align: left;
    margin: 0;
    color: #767676;
    text-transform: uppercase;
    font-weight: 700;
}


.timeline-item .content {
    display: block; /* Asegura que text-align funcione */
    gap: 0px;
    padding: 0 0px;
    width: 60%;
}

.timeline h3{
    font-size: 35px;
    color: #03727b;
    font-weight: 700;
    margin: 0;
    padding: 0;
    text-transform: uppercase;
}

.timeline-item img {
    height: 100px;
    width: auto;
    transition: .5s;
}

.timeline-item:hover > img {
    transform: scale(1.3) translateX(-50px);
}


.timeline span{
    font-size: 20px;
    color: #ffa92e;
    text-transform: uppercase;
    font-weight: 700;
}

@media (max-width: 400px) {
    
    .timeline-item p{
        text-align: center;
    }

    .timeline-item .content {
        width: 2%; /* Ajusta el ancho de cada casilla */
        text-align: center;
        left: 100px;
    }

    .timeline-item img {
        transform: none;
        display: none;
    }

    .timeline-item:hover > img{
        transform: none;
    }

    .timeline h3 {
        font-size: 20px; /* Ajusta el tamaño de la fuente */
    }

    .timeline span {
        font-size: 16px; /* Reduce el tamaño de la fuente */
    }


}





@media screen and (max-width: 800px) {

    .timeline {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    /* Ocultar la línea central en pantallas pequeñas */
    .timeline::before {
        display: none;
    }

    /* Ajuste de los ítems para evitar desplazamiento */
    .timeline-item {
        box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
        width: 500px;
        border-radius: 20px;
        transform: none !important; 
        margin-bottom: 20px;
        height: 220px;
    }

    .timeline-item .content {
        display: block;
        flex-direction: column;
        width: 100%;
        padding: 40px 10px;
    }

    .timeline-item p {
        font-size: 16px;
    }

    .formacion::after {
        display: none;
    }

    .timeline-item img {
        transform: translateX(+20px);
    }

    .timeline-item:hover > img{
        transform: none
    }
}

@media screen and (max-width: 1350px){
    .formacion h2{
        margin-top: 80px;
        margin-bottom: 50px;
    }


    .timeline-item img {
        margin: 0 10px;
        padding: 0 10px;
    }

    .timeline-item {
        display: flex;
        align-items: center;
        margin: 10px 0;
        padding: 15px 0;
        gap: 30px;
    }

    .timeline-item .content {
        padding: 0 0px;
        width: 40%;
        margin: 0;
    }

    .timeline{
        margin-bottom: 100px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .timeline-item.Ecuador{
        transform: translateX(-20px);
        transition: 0.2s;
    }
    
    
    .timeline-item.Ecuador:hover {
        transform: translateX(30px); /* -130 + 50 */
    }


}

@media screen and (max-width: 1500px){
    
    .timeline {
        flex-direction: column;
        max-width: 100%;
        padding: 0 0;
    }

    .formacion{
        position: relative;
        padding: 80px 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow: hidden; /* Evita desbordamientos */
    }

    .formacion::after {
        top: 420px;
        width: 70%;
        background-image: url(/img/adultos/bg2.png);
    }
    

}



.consulta-section {
    margin-top: 0px;
    margin-bottom: 50px;
    position: relative;
    width: 100%;
    height: 300px; /* Ajusta según lo necesites */
    background-image: url('/img/adultos/consulta.jpg'); /* Reemplaza con la ruta correcta */
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.consulta-section a{
    margin-bottom: 60px;
    align-self: flex-end;
}

.consulta-btn {
    z-index: 2;
    font-family: 'Cormorant Infant', sans-serif;
    padding: 10px 70px;
    background-color: #ffa92e;
    color: white;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.5s;
    text-transform: uppercase;
    font-weight: 800;
    font-weight: 700;
    text-decoration: none;
}

.consulta-btn:hover {
    transform: translateY(-10px);
    background-color: #f5be72;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
}


.experiencia {
    display: flex;
    flex-direction: column;
    align-items: center; /* Alinea internamente todo al centro */
    text-align: center;
    padding: 50px 20px;
}

.experiencia h2 {
    color: #03727b;
    font-size: 40px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 15px; /* Mejor usar margin que padding en este caso */
    position: relative; /* Para posicionar el ::after con más control si se desea */
}

.experiencia h2::after {
    content: "";
    display: block;
    width: 150px;
    height: 4px;
    background-color: #ffa92e;
    margin: 15px auto 0 auto; /* margen superior de 10px */
}


.experiencia-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    max-width: 80%;
    margin: 50px auto 0;
}

.experiencia-container.pt2 {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Dos columnas iguales */
    gap: 110px;
}


.card {
    width: 100%; /* Hace que las tarjetas ocupen todo el ancho posible */
    max-width: 400px; /* Limita el tamaño máximo de cada tarjeta */
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    transition: .5s;
    display: flex;
    flex-direction: column;
    align-items: center;

    /* Animación con scroll */
    view-timeline-name: --card;
    view-timeline-axis: block;
    animation-timeline: --card;
    animation-name: fadeInScale;
    animation-range: entry 20% cover 40%;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.3, 0, 0.3, 1);
}

/* Definición de la animación */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}



.card:hover{
    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.2);
    transform: translateX(+10px);
}

.card h3 {
    color: #03727b;
    font-size: 23px;
    margin: 0;
    font-weight: 900;
}

.card p {
    color: black;
    font-size: 20px;
    margin: 2px 0;
    line-height: 20px;
    max-width: 90%;
}

.card p span {
    color: #ffa92e;
    font-weight: bold;
}

@media screen and (max-width: 800px){
    .experiencia-container {
        grid-template-columns: repeat(1, 1fr);
    }

    .card {
        text-align: center;
        justify-items: center;
    }

    .experiencia {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .experiencia-container.pt2 {
        display: flex;
        gap: 30px;
    }
    
} 

.condiciones {
    margin: 100px 0;
    background-image: url(/img/adultos/bg.png);
    background-size: cover;
    background-repeat: no-repeat;
    padding: 100px 0;
    position: relative;
    z-index: 0;
    overflow: hidden;
}

.condiciones::after {
    content: "";
    background-image: url(/img/adultos/isologo.png);
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute; /* ← Aquí va absolute, no relative */
    top: 40px;
    width: 45%;
    height: 70%;
    z-index: 1;
    bottom: 0;
    right: 0;
    top: auto;
    pointer-events: none; /* Para que no interfiera con clicks */
}



.condiciones h2 {
    color: #03727b;
    font-size: 40px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 15px; /* Mejor usar margin que padding en este caso */
    position: relative; /* Para posicionar el ::after con más control si se desea */
    margin-bottom: 60px;
}

.condiciones h2::after {
    content: "";
    display: block;
    width: 150px;
    height: 4px;
    background-color: #ffa92e;
    margin: 15px auto 0 auto; /* margen superior de 10px */
}

.condiciones h4{
    padding-left: 200px;
    font-size: 35px;
    color: #ffa92e;
    max-width: 35%;
    line-height: 35px;
}

.condiciones h3{
    padding-left: 200px;
    font-size: 30px;
    color: black;
}

.condiciones .container {
    position: relative;
    height: 80%;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Dos columnas iguales */
    padding-bottom: 60px;
    padding-left: 50px;
    z-index: 3;
}

.condiciones .btn {
    font-family: 'Cormorant Infant', sans-serif;
    font-weight: 800;
    border: 2px solid #03727b;
    padding: 10px 60px;
    font-size: 18px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 280px; /* Establece un ancho fijo para todos los botones */
    height: 70px;
    text-align: center; /* Asegura que el texto esté centrado */
    line-height: 10x;
    text-transform: capitalize;
    display: flex;
    align-items: center; /* Centra el texto verticalmente */
    justify-content: center; /* Centra el texto horizontalmente */
    margin: 15px 100px;


        /* Animación con scroll */
        view-timeline-name: --testimonial;
        view-timeline-axis: block;
        animation-timeline: --testimonial;
        animation-name: fadeInBounce;
        animation-range: entry 70% cover 50%;
        animation-fill-mode: both;
        animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
}

.condiciones .btn.epilepsia,
.condiciones .btn.cerebrovaculares,
.condiciones .btn.Hematomas,
.condiciones .btn.vertigo,
.condiciones .btn.trauma,
.condiciones .btn.cervicalgia,
.condiciones .btn.craneoplastia{
    transform: translateX(250px);
}

.condiciones .btn.cerebrales{
    transform: translateX(470px);
}

.btn:hover {
    background-color: #03727b;
    color: white;
}

.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    overflow: scroll;
}


.modal-content {
    background-color: white;
    padding: 20px;
    width: 50%;
    text-align: center;
    animation: fadeIn 0.5s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.2);
}


.modal-content .close{
    align-self: flex-end;
    font-size: 60px;
    cursor: pointer;
    color: #03727b;
    transition: 0.5s;
}



.modal-content .close:hover {
    padding-left: 10px;
}


.modal h3{
    font-size: 40px;
    text-transform: uppercase;
    color: #03727b;
    font-weight: 600;
    line-height: 40px;
}

.modal img{
    height: 200px;
}

.modal p{
    max-width: 80%;
    margin-top: 40px;
    line-height: 1.4em;
    margin-bottom: 40px;
    font-weight: 500;
    font-size: 20px;
}

.modal .contacto{
    background-color: #ffa92e;
    color: white;
    border: solid 2px #ffa92e;
    font-family: 'Cormorant Infant', sans-serif;
    padding: 10px 70px;
    border-radius: 40px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 800;
    transition: 0.5s;
    margin-bottom: 60px;
}

.modal .contacto:hover{
    background-color: white;
    color: #ffa92e;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.8); }
}

@keyframes fadeOut2 {
    from { opacity: 1; }
    to { opacity: 0; }
}

.modal-content.fade-in {
    animation: fadeIn 0.5s forwards;
}

.modal.fade-out2 {
    animation: fadeOut2 0.5s forwards;
}

.modal-content.fade-out {
    animation: fadeOut 0.5s forwards;
}


@media screen and (max-width: 800px){
    .modal-content {
        width: 100%;
    }
}


.consulta-section2 {
    margin-top: 30px;
    position: relative;
    width: 100%;
    height: 300px; /* Ajusta según lo necesites */
    background-color: white;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 60px;
    font-size: 20px;
    z-index: 1;
}

.consulta-section2 h1{
    margin: 0;
    color: #03727b;
    font-size: 30px;
    max-width: 50%;
    text-align: center;
}
.consulta-section2 p{
    margin-bottom: 20px;
}
.consulta-section a{
    margin: 80px 0;
    align-self: flex-end;
}


@media screen and (max-width: 400px){
    .consulta-section2 {
        height: 600px; /* Ajusta según lo necesites */
    }

    .consulta-section2 h1{
        font-size: 30px;
        max-width: 60%;
    }

    .condiciones .container {
    grid-template-columns: repeat(1, 1fr); /* Dos columnas iguales */
}
}

@media screen and (max-width: 800px){
    .condiciones .container {
        display: grid;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
        max-width: 600px;
        margin: auto;
        align-items: center;
    }

.condiciones .btn.tumores,
.condiciones .btn.epilepsia,
.condiciones .btn.Hematomas,
.condiciones .btn.vertigo,
.condiciones .btn.periférico,
.condiciones .btn.cervicalgia{
    transform: none;
}

.condiciones .btn {
    margin: 15px 10px; 

}

.condiciones .container {
    padding-left: 0px;
}

.condiciones::after {
    display: none;
}

.condiciones h4 {
    padding-left: 0px;
    max-width: 70%;
    text-align: center;
    margin: 0 auto; /* Esto centra el elemento h4 dentro de su contenedor */
}

}