.gallery {
    display: flex;
    flex-wrap: wrap;
}

.gallery__image {
    height: 128px;
    width: 50%;
    position: relative;
    overflow: hidden;
    transform-origin: bottom;
    transform: scaleY(0);
}

.gallery-content {
    position: relative;
    z-index: 1;
    padding: 80px 0;
}

.gallery-text h3 {
    font-size: 20px;
    padding: 0;
    margin-bottom: 10px;
    line-height: 1.5em;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.gallery-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    object-fit: cover;
    z-index: -1;
}

@media (min-width: 768px){
    .galleries {
        display: flex;
        flex-wrap: wrap;
    }

    .gallery {
        width: 226px;
    }

    .gallery-content {
        width: calc(100% - 452px);
        padding: 0 26px;
    }

    .gallery-text {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .gallery__image {
        width: 100%;
        height: 167px;
    }

    .gallery-text h3 {
        font-size: 25px;
        margin-bottom: 15px;
    }
    
}


@media (min-width: 1200px){
    .gallery {
        width: 487px;
    }

    .gallery-content {
        width: calc(100% - 974px);
        padding: 0 20px;
    }


    .gallery__image {
        width: 50%;
        height: 195px;
    }

    .gallery-text h3 {
        font-size: 30px;
        margin-bottom: 15px;
    }

    .gallery--1 .gallery__image {
        width: 100%;
        height: 100%;
    }

    .gallery--2 .gallery__image,
    .gallery--3 .gallery__image:last-child {
        width: 100%;
    }
    
}


@media (min-width: 1640px){
    .gallery {
        width: 672px;
    }

    .gallery-content {
        width: calc(100% - 1344px);
        padding: 0 0;
    }

    .gallery-text {
        max-width: 336px;
        margin: 0 auto;
    }


    .gallery__image {
        height: 243px;
    }

    .gallery-text h3 {
        font-size: 38px;
        margin-bottom: 15px;
    }

}