.gallery-page-section .gallery-grid {
    display: grid !important;
    width: 100% !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 18px !important;
}

.gallery-page-section .gallery-grid .gallery-item,
.gallery-page-section .gallery-grid .gallery-item.tall,
.gallery-page-section .gallery-grid .gallery-item.wide {
    position: relative !important;
    grid-column: span 4 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 0.895 / 1 !important;
    overflow: hidden !important;
    border-radius: 22px !important;
    box-sizing: border-box !important;
}

.gallery-page-section .gallery-grid .gallery-item img {
    display: block ;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    object-fit: cover !important;
    object-position: center center !important;
    transition: transform 0.6s ease;
}

.gallery-page-section .gallery-grid .gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-page-section .gallery-grid .gallery-overlay {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

@media (max-width: 991px) {
    .gallery-page-section .gallery-grid .gallery-item,
    .gallery-page-section .gallery-grid .gallery-item.tall,
    .gallery-page-section .gallery-grid .gallery-item.wide {
        grid-column: span 6 !important;
    }
}

@media (max-width: 767px) {
    .gallery-page-section .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }

    .gallery-page-section .gallery-grid .gallery-item,
    .gallery-page-section .gallery-grid .gallery-item.tall,
    .gallery-page-section .gallery-grid .gallery-item.wide {
        grid-column: span 1 !important;
        aspect-ratio: 0.895 / 1 !important;
    }
}

@media (max-width: 480px) {
    .gallery-page-section .gallery-grid {
        grid-template-columns: 1fr !important;
    }

    .gallery-page-section .gallery-grid .gallery-item,
    .gallery-page-section .gallery-grid .gallery-item.tall,
    .gallery-page-section .gallery-grid .gallery-item.wide {
        grid-column: span 1 !important;
    }
}
