/* ----------- inicio hmservicios --------------- */

.hmservicios{
    display: flex;
    flex-direction: column;
    max-width: 1500px;
    margin: 0 auto;
    position: relative;
    container-type: inline-size;
    container-name: hmservicios;
    overflow-x: hidden;
}

.hmservicios__works-title-container{
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 1;
    background-image: url(imagenes/obreros1.webp);
    background-position: bottom;
    background-size: cover;
    background-repeat: no-repeat;
    height: 40vh;
    position: relative;
    cursor: default;
}

.hmservicios__works-title-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00002f49;
    z-index: 1;
}

.hmservicios__works-title-container > * {
    z-index: 2;
}

.hmservicios__works-title{
    font-size: 1.9rem;
    color: #fff;
}

@container hmservicios (min-width:56.25rem){
    .hmservicios__works-title-container{
        height: 50vh;
    }

    .hmservicios__works-title{
        font-size: 2.2rem;
        color: #fff;
    }
}

/* --------- hmservicios__works ------------- */

.hmservicios__works{
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    overflow: hidden;
}

.hmservicios__works-subtitle{
    padding: 20px 10px;
    text-align: center;
    text-wrap: balance;
    color: #FFF;
    background-color: #224477;
    width: 100%;
    opacity: 0;
    font-size: 1.4rem;
    transform: translateY(-75%);
    transition: transform 1s ease, opacity .3s ease;
    cursor: default;
}

.hmservicios__works-subtitle.visible{
    transform: translateY(0);
    opacity: 1;
}

.hmservicios__works-list{
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    gap: 40px 20px;
    padding: 40px 10px;
}

.hmservicios__works-list-item{
    display: flex;
    flex-direction: column;
    gap: 30px;
    justify-content: space-between;
    align-items: start;
    padding: 20px 10px;
    box-shadow: 0 0 2px #0005;
    border-radius: 6px;
    width: 100%;
    min-width: 250px;
    max-width: 500px;
    opacity: 0;
    transition: transform 1s ease, opacity 1s ease;
}

.hmservicios__works-list-item:nth-child(odd){
    transform: translateX(-100%);
}

.hmservicios__works-list-item:nth-child(even){
    transform: translateX(100%);
}

.hmservicios__works-list-item.visible{
    transform: translateX(0);
    opacity: 1;
}

.hmservicios__works-list-item:hover{
    transform: translateY(-2%);
}

.works__item-title{
    font-size: 1.5rem;
    color: #224499;
    text-align: center;
    text-wrap: pretty;
    width: 100%;
    padding: 10px;
}

.works__item-text-container{
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.works__item-text{
    font-size: 1rem;
    font-weight: 500;
    padding: 0 5px;
}

.works__item-img{
    width: 97.5%;
    margin: 0 auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    max-height: 275px;
    border-radius: 9px;
}

/* ---------- hmservicios__works queries ---------- */

@container hmservicios (min-width:700px){
    
    .hmservicios__works-list{
        justify-content: center;
        gap: 40px;
    }

    .hmservicios__works-list-item{
        max-width: 600px;
    }
    
    .works__item-img{
        max-height: 325px;
    }

    .works__item-title{
        font-size: 1.7rem;
    }
}

/* ----------- fin hmservicios__works ----------- */