/* gallery custom grid */

.gallery-grid-custom {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr 1fr;
    gap: 14px;
    height: 600px;
    padding: 0 7px;
}

.gallery-grid-custom .grid-item-tall {
    grid-row: span 2;
}

.gallery-grid-custom .grid-item {
    overflow: hidden;
}

.gallery-grid-custom .grid-item figure {
    margin: 0;
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

.gallery-grid-custom .grid-item .portfolio-img {
    height: 100%;
    width: 100%;
}

.gallery-grid-custom .grid-item .portfolio-img img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    cursor: pointer;
    display: block;
    opacity: 1;
    transition: all 0.3s ease 0s;
}

.gallery-grid-custom .grid-item figcaption {
    bottom: 0;
    left: 0;
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    text-align: center;
    transition: all 0.3s ease 0s;
}

.gallery-grid-custom .grid-item figure:hover figcaption {
    opacity: 1;
}

.gallery-grid-custom .grid-item figure:hover .portfolio-img img {
    opacity: 0.15;
    transform: scale(1.1);
}

@media (max-width: 991px) {
    .gallery-grid-custom {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto;
        height: auto;
    }
    .gallery-grid-custom .grid-item-tall {
        grid-row: span 1;
    }
    .gallery-grid-custom .grid-item {
        height: 300px;
    }
}

@media (max-width: 767px) {
    .gallery-grid-custom {
        grid-template-columns: 1fr;
    }
    .gallery-grid-custom .grid-item {
        height: 250px;
    }
}
