.section-gallery .gallery-grid-parent {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto;
    grid-column-gap: 40px;
    grid-row-gap: 40px;
}

.section-gallery .gallery-grid-parent img {
    width: 100%;
    object-fit: cover;
}

.section-gallery .gallery-img1 {
    grid-area: 1 / 1 / 2 / 13;
}

.section-gallery .gallery-img2 {
    grid-area: 2 / 1 / 3 / 8;
}

.section-gallery .gallery-img3 {
    grid-area: 2 / 8 / 3 / 13;
}

.section-gallery .gallery-img2 img,
.section-gallery .gallery-img3 img {
    height: 100%;
    object-fit: cover;
}

.hidden-gallery-item {
    display: none;
}

@media (min-width: 769px) {
    .section-gallery .custom-uploaded-image {
        overflow: hidden;
        max-height: 580px;
    }

    .section-gallery .custom-image-right img {
        aspect-ratio: 12 / 9;
    }

    .section-gallery .custom-image-left img {
        aspect-ratio: 1 / 1;
    }

    .section-gallery .custom-uploaded-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

@media (min-width: 770px) and (max-width:1400px) {
    .section-gallery .custom-uploaded-image img {
        object-fit: inherit;
    }
}

@media (max-width: 768px) {
    .section-gallery .gallery-grid-parent {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-column-gap: 0;
        grid-row-gap: 0;
    }

    .section-gallery .gallery-img1,
    .section-gallery .gallery-img2,
    .section-gallery .gallery-img3 {
        grid-area: auto;
        max-height: none;
    }

    .section-gallery .gallery-img2 img,
    .section-gallery .gallery-img3 img {
        max-height: none;
    }
}