/* Desktop Gallery Grid - Hidden on Mobile */
.desktop-gallery-container {
    display: none;
    /* Default hidden */
    margin-bottom: 20px;
}

@media (min-width: 992px) {
    .desktop-gallery-container {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        height: 450px;
        gap: 10px;
        border-radius: 20px;
        overflow: hidden;
        position: relative;
    }

    /* Hide the old carousel on desktop */
    .ts-gallery-carousel.ts-gallery-carousel__multi {
        display: none !important;
    }

    .gallery-main {
        grid-column: 1 / 2;
        grid-row: 1 / 3;
        border-radius: 20px 0 0 20px;
    }

    .gallery-sub-1 {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }

    .gallery-sub-2 {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
        border-radius: 0 20px 0 0;
    }

    .gallery-sub-3 {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
    }

    .gallery-sub-4 {
        grid-column: 3 / 4;
        grid-row: 2 / 3;
        border-radius: 0 0 20px 0;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* "Show all photos" Button */
.btn-show-all-photos {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease;
}

.btn-show-all-photos:hover {
    transform: scale(1.02);
    background-color: #f8f9fa;
}

/* Modal Grid Styles */
.gallery-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Force 3 columns as requested */
    gap: 15px;
    padding: 20px;
}

.gallery-modal-item img {
    width: 100%;
    height: 200px;
    /* Reduced height slightly for better fit */
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.gallery-modal-item img:hover {
    opacity: 0.9;
}

/* Modal Backdrop Blur */
.modal-backdrop.show {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.5);
    /* Semi-transparent black */
}