.gallery-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 150px;
    padding: 20px;
    grid-gap: 10px;
    
}

.gallery__item {
    position: relative;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.726);
}

.gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery__title {
    position: absolute;
    bottom: 0;
    color: white;
    background: linear-gradient(rgba(109, 109, 109, 0.404), rgba(0, 0, 0, 0.651));
    width: 100%;
    margin: 0;
    padding: 20px;
}

.gallery__item:nth-child(4) {
    grid-column-start: span 2;
}

.gallery__item:nth-child(5) {
    grid-row-start: span 2;
}

.gallery__item:nth-child(9) {
    grid-column-start: span 2;
}

@media (min-width:768px) {
    .gallery-container {
        grid-template-columns: repeat(4, 1fr);
    }
    .gallery__item:nth-child(3) {
        grid-column-start: span 2;
    }
    .gallery__item:nth-child(4) {
        grid-column-start: span 3;
    }
    .gallery__item:nth-child(5) {
        grid-row-start: span 3;
    }
    .gallery__item:nth-child(9) {
        grid-column-start: span 3;
    }
}

@media (min-width:1024px) {
    .gallery-container {
        grid-template-columns: repeat(5, 1fr);
        width: 90%;
        margin: auto;
    }
    .gallery__item:nth-child(1) {
        grid-column-start: span 2;
        grid-row-start: span 2;
    }
    .gallery__item:nth-child(4) {
        grid-column-start: span 3;
        grid-row-start: span 3;
    }
}