/* === Gallery Container === */
.gallery {
    padding: 20px 0;
    background: #f9f9f9;
}

/* === Gallery Grid === */
.gallery-grid {
    display: grid;
    width: 100%;
    margin: 0;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 15px;
    
}

.gallery-grid a {
    position: relative;
    width: 100%;
    padding-top: 75%; /* Fixed aspect ratio */
    display: block;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.gallery-grid img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* === Individual Gallery Item === */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    aspect-ratio: 64 / 64;
    background: #f5f5f5;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

/* === Image Styling === */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.2);
}

/* === Responsive Design === */
@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 15px;
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    .gallery-item {
        aspect-ratio: 3 / 2;
        min-height: 240px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
        padding: 10px;
    }

    .gallery-item {
        aspect-ratio: 4 / 3;
        min-height: 180px;
    }
}

/* === Lightbox Custom Enhancements === */
.lightboxOverlay {
    background: rgba(0, 0, 0, 0.9) !important;
    z-index: 1000;
}

.lb-data .lb-caption {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    padding: 10px 0;
    text-align: center;
}

.lb-number {
    font-size: 14px;
    padding-top: 10px;
    color: #ccc;
}

/* === Lightbox Navigation === */
.lb-nav a.lb-prev,
.lb-nav a.lb-next {
    opacity: 0.8;
    transition: opacity 0.3s;
}

.lb-nav a.lb-prev:hover,
.lb-nav a.lb-next:hover {
    opacity: 1;
}

/* === Optional Filter Buttons === */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.filter-btn {
    margin: 5px;
    border: 2px solid #3366CC;
    background: transparent;
    color: #3366CC;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
    background: #3366CC;
    color: white;
}
