.gallery {
    width: 100%;
    box-sizing: border-box;
}

.gallery__grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    grid-gap: 1px;
    grid-template-rows: 222px;
    grid-auto-rows: 222px;
    background-color: rgba(58, 54, 54, 0.2);
    position: relative;
    animation: 0.7s customBounce ease 0s both;
}

@keyframes customBounce {
    0% {
        gap: 50px;
    }

    20% {
        gap: 30px;
    }

    40% {
        gap: 20px;
    }

    70% {
        gap: 10px;
    }

    100% {
        grid-gap: 1px;
    }
}

.gallery__grid-item {
    background-color: #37302c;
    background-position: center;
    color: #fff;
    background-size: cover;
    justify-content: center;
    align-items: center;
    display: flex;
    color: #dbdbdb;
    font-size: 28px;
    line-height: 32px;
    text-align: center;
    padding: 10px 27px;
    font-weight: 500;
    text-decoration: none;
    position: relative;
}

.gallery__grid-item .gallery__play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    margin-left: -12px;
    margin-top: -12px;
}

.gallery__grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media screen and (max-width: 1024px) {


    .gallery__grid {
        grid-template-rows: 180px;
        grid-auto-rows: 180px;
    }
}

@media screen and (max-width: 800px) {

    .gallery__grid {
        grid-template-rows: 155px;
        grid-auto-rows: 155px;
    }

    .gallery__grid-item {
        font-size: 20px;
        line-height: 24px;
    }
}

@media screen and (max-width: 480px) {


    .gallery__grid {
        overflow: hidden;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 215px 215px 0;
    }

    .gallery__grid-item {
        font-size: 18px;
        line-height: 20px;
        outline: 1px solid white;
    }
}