.main__flex-container{
    margin-top: 0;
}

*{
    padding: 0;
    margin: 0;
    font-family: outfit;
}

body{
    /* COLORES A USAR */
    --blue: #364b8c;
    --orange: #ff9900;
    --light-blue: #7f8aba; /* Si quieres usarlos en un sitio pones var(--variable)*/
}


.header{
    container-type: inline-size;
    container-name: header;
}


.header__title-container{
    display: flex;
    height: 30dvh;
    align-items: center;
    background-image: url("backgroundsservicio.png");
    background-position: -100px 75px;
    background-size: 120% 30%;
    background-attachment: fixed;
}
.header__title-container::after{
    content: "";
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: #559a;
}

.header__title-container h1{
    position: relative;
    color: #fff;
    z-index: 50;
    padding-left: 10px;
}

.main{
    container-type: inline-size;
    container-name: main;
}

.main__content-container{
    display: flex;
    flex-direction: column;
    padding: 20px 30px;
    gap: 20px;
}

.main__content-container h4{
    font-size: 1.3rem;
    position: relative;
    top: 100px;
    opacity: 0;
    animation: view-title 1s both;
    
}

.main__content-container h6{
    color: var(--orange);
}

.main__content-container p{
    position: relative;
    top: 100px;
    opacity: 0;
    animation: view-title 1s both;
    animation-delay: .5s;
}

.main__info-container{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main__flex-container{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.flex-item{
    width: 80%;
    height: 40dvh;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    box-shadow: 0px 0px 10px 0px #222;
    position: relative;
    animation: opacity .5s both;
    overflow: hidden;
    animation: view-flex both;
    animation-timeline: view();
    animation-range: cover 10% contain 10%;
    opacity: 0;
}



.flex-item h4{
    position: absolute;
    bottom: 8rem;
    font-size: 2rem;
    color: #fff;
    padding: 0 18px;
    z-index: 50;
    text-shadow: 1px 3px 1px rgb(0, 0, 0);
    -webkit-text-stroke: #000 1px;
}
.flex-item a{
    display: none;
}


.flex-item:nth-child(4){
    background-image: url("Transporte-Pesado-y-Liviano3.png");
}



.flex-item:nth-child(2){
    background-image: url("../Transporte-Pesado-y-Liviano2.jpg");
    background-position: center;
    background-size: cover;
    
}

.flex-item:first-child{
    background-image: url("fotodetanquemovi.jpg");
}

.flex-item:last-child{
    background-image: url("../IMG_20240807_161535_337@1196544402\ \(1\).jpg");
    margin-bottom: 280px;
}

@keyframes view-link{
    to{
        opacity: 1;
        left: 0;
    }
}

@keyframes view-title{
    to{
        top: 0;
        opacity: 1;
    }
}

@keyframes view-flex{
    to{
        opacity: 1;
    }
}

@container header (min-width: 52rem){
    .header__title-container{
        height: calc(50dvh - 2cm);
        background-position: 0px 35px;
        background-size: cover;
    }


    .header__title-container h1{
        font-size: 2.5rem;
        margin-left: 80px;
    }

    .header__title-container::after{
        height: 100%;
        width: 100%;
    }
}

@container main (min-width: 52rem){

    .main__general-container{
        padding: 5rem;
    }

    .main__info-container{
        flex-direction: row;
        gap: 5dvw;
    }

    .main__info-container h4{
        width: 800px;
    }

    .main__flex-container{
        flex-direction: row;
        flex-wrap: wrap;
        margin-top: 5%;
        padding: 20px;
    }

    .flex-item{
        height: 50dvh;
        transition: width .3s;
        width: 25dvw;
    }

    .flex-item:hover{
        width: 27dvw;
    }



    .flex-item:hover > a{
        bottom: 6rem;
    }


    .flex-item:last-child{
        margin-bottom: 0;
    }
}
