@import url(./global.css);

#servicios{
    margin-top: 30px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 30%));
    justify-content: center;  
}

#servicios .servicio{
    display: flex;
    flex-direction: column;
    color: var(--global-fuente-oscura); 
    height: 250px;
    text-align: center;
    font-size: 18px;
}

#servicios .servicio h1{
    font-size: 28px;
}

#servicios .servicio:nth-child(odd) .imagen-servicio{
    background-color: var(--global-color-claro);
}

#servicios .servicio:nth-child(even) .imagen-servicio{
    background-color: var(--global-color-resaltado);
}

#servicios .servicio:nth-child(even) .imagen-servicio img{
    filter: invert(1);
}

#servicios .servicio .imagen-servicio{
    display: flex;
    margin: 0 auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    flex-direction: column;
    justify-content: center;
    object-fit: contain;
}

#servicios .servicio .imagen-servicio img{
    height: 80%;
    object-fit: contain;
}


#animacion-servicios{
    width: 100%;
    height: 300px;
    display: grid;
    grid-template-columns: 40% 60%;
}

@media screen and (max-width: 720px) {
    #animacion-servicios{
        display: flex;
        flex-direction: column;
        height: fit-content;
    }

    #servicios .servicio{
        height: 300px;
    }

    #animacion-servicios .contenedor img{
        align-self: center;
        max-height: 200px;
    }
}

#animacion-servicios .contenedor{
    width: 100%;
    height: inherit;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    font-size: 16px;
}

#animacion-servicios .contenedor img{
    align-self: flex-end;
    max-height: 100%;
    object-fit: contain;
    animation: mover 10s linear 0s infinite;
}

@keyframes mover {
    0%, 100%{
        transform: translateX(-10px) translateY(-3px) rotateZ(1deg);
    }

    25%{
        transform: translateX(6px) translateY(3px) rotateZ(-1deg);
    }

    50%{
        transform: translateX(10px) translateY(-3px) rotateZ(1deg);
    }

    75%{
        transform: translateX(-6px) translateY(3px) rotateZ(-1deg);
    }
}

#animacion-servicios .contenedor h1{
    text-align: center;
    color: var(--global-color-oscuro);
    font-size: 16px;
}

#banner{
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100vh;
    color: var(--global-fuente-clara);
    background-image:url(../../img/4907157.jpg);
    background-size: cover;
    overflow: hidden;
}

#banner header{
    position: absolute;
}

#banner header ul li a{
    color: var(--global-fuente-clara);
    font-size: 18px;
}

#banner *{
    z-index: 5;
}

#banner::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(180deg, var(--global-color-oscuro) 3%, transparent 130%);
    overflow: hidden;
}

#banner .texto-banner{
    margin: 0 auto;
    height: 120px;
    width: fit-content;
    padding: 35px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    border-end-end-radius: 20px;
    border-start-start-radius: 20px;
    backdrop-filter: brightness(.7);
    font-size: 18px;
}

@media screen and (max-width: 500px) {

    #banner .texto-banner{
        height: 150px;
    }

    #banner .texto-banner > h1{
        font-size: 24px !important;
    }
}

#banner .texto-banner h1{
    font-size: 36px;
}

@media screen and (max-width: 720px) {
    #banner{
        justify-content: flex-end;
    }

    #banner .texto-banner{
        width: 70vw;
        margin-bottom: 120px;
    }

    #animacion-servicios .contenedor img{
        margin: 0 auto;
        height: 300px;
    }
}

@media screen and (max-width: 540px) {
    #servicios{
        display: flex;
        flex-direction: column;
    }
}