.cg-gallery > .tab-content > .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 2fr));
    gap: 8px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 5px;
    position: relative;
    width: 100%;
    height: auto;

    img {
        transition: 0.2s ease;
        margin: 0 !important;
    }

    &:hover {
        img {
            transform: scale(1.02);
        }

        .caption {
            transform: translateY(0);
        }
    }

    .caption {
        position: absolute;
        bottom: 0;
        width: calc(100% - 24px);
        color: #fff;
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0),
            rgba(0, 0, 0, 0.8)
        );
        padding: 40px 12px 12px;
        transition: 0.2s ease;
        transform: translateY(100%);
    }
}
