﻿.gallery-wrapper {
    width: 80%;
    margin: auto;
    min-height: 70vh; /* ✅ ensures vertical centering */
    display: flex;
    flex-direction: column;
    justify-content: center; /* ✅ vertical center */
}

/* FILTER */
.gallery-filter {
    display: flex;
    flex-wrap: wrap; /* ✅ allow wrapping */
    gap: 5px;
    list-style: none;
    padding: 10px 8px;
    border-bottom: 2px solid #eee;
    justify-content: center; /* center on desktop */
}

    .gallery-filter li {
        cursor: pointer;
        color: #003366;
        font-weight: 500;
    }

        .gallery-filter li.active {
            border-bottom: 3px solid red;
            color: #000;
        }

/* GRID */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* ✅ horizontal center */
    align-items: center; /* ✅ vertical alignment */
    margin-top: 3px;
}

.gallery-item {
    width: 20%; /* 5 per row */
    padding: 3px;
}

    .gallery-item img {
        width: 100%;
        height: 120px;
        object-fit: cover;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        transition: transform 0.3s ease;
    }

        .gallery-item img:hover {
            transform: scale(1.05);
        }
.gallery-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 5px;
    font-size: 16px;
    cursor: pointer;
}

    .gallery-filter li {
        cursor: pointer;
        pointer-events: auto !important;
        position: relative;
        z-index: 999;
    }

        .gallery-filter li.active {
            border-bottom: 3px solid red;
            font-weight: bold;
        }
/* Lightbox overlay fix */
.lightboxOverlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
}

/* Lightbox image container */
.lightbox {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-width: 90vw;
    max-height: 90vh;
    overflow: visible;
}
    .lightbox img {
        max-width: 90vw !important;
        max-height: 90vh !important;
        width: auto;
        height: auto;
    }
/* Mobile-specific behavior */
@media (max-width: 768px) {
    .gallery-filter {
        justify-content: flex-start;
        overflow-x: auto; /* ✅ horizontal scroll if needed */
        white-space: nowrap;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

        .gallery-filter li {
            flex: 0 0 auto;
            font-size: 14px;
        }
}
@media (max-width: 992px) {
    .gallery-item {
        width: 25%;
    }
}

@media (max-width: 768px) {
    .gallery-wrapper {
        width: 95%;
    }

    .gallery-item {
        width: 50%;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        width: 100%;
    }
}
@media (min-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr); /* desktop */
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr); /* tablet */
    }
}
@media (max-width: 768px) {

    .lightboxOverlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
    }

    .lightbox {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        max-width: 95vw !important;
        max-height: 95vh !important;
    }

        .lightbox img {
            max-width: 95vw !important;
            max-height: 85vh !important;
            width: auto !important;
            height: auto !important;
        }
}
