/* Expanding Cards Gallery for Nuestros Procesos */

.expanding-cards-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 5vmin auto;
    overflow: hidden;
    transform: skew(5deg);
    max-width: 90vw;
}

.expanding-cards-container .card {
    flex: 1;
    transition: all 1s ease-in-out;
    height: 75vmin;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.expanding-cards-container .card:not(:last-child) {
    margin-right: 1em;
}

.expanding-cards-container .card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 1s ease-in-out;
    filter: grayscale(100%);
}

.expanding-cards-container .card .card__head {
    color: black;
    background: rgba(132, 169, 140, 0.85);
    padding: 0.5em;
    transform: rotate(-90deg);
    transform-origin: 0% 0%;
    transition: all 0.5s ease-in-out;
    min-width: 100%;
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 0;
    font-size: 1em;
    white-space: nowrap;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.expanding-cards-container .card:hover {
    flex-grow: 10;
}

.expanding-cards-container .card:hover img {
    filter: grayscale(0);
}

.expanding-cards-container .card:hover .card__head {
    text-align: center;
    top: calc(100% - 2em);
    color: white;
    background: rgba(0, 0, 0, 0.7);
    font-size: 2em;
    transform: rotate(0deg) skew(-5deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .expanding-cards-container {
        flex-direction: column;
        transform: skew(0deg);
        height: auto;
    }

    .expanding-cards-container .card {
        width: 100%;
        height: 40vmin;
        margin-right: 0 !important;
        margin-bottom: 1em;
    }

    .expanding-cards-container .card .card__head {
        transform: rotate(0deg);
        position: relative;
        bottom: auto;
        left: auto;
        font-size: 1.2em;
    }

    .expanding-cards-container .card:hover .card__head {
        transform: skew(0deg);
        font-size: 1.5em;
    }
}