/* Gallery Styles */

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--primary-blue);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-full);
    color: var(--primary-blue);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-blue);
    color: white;
}

/* Masonry Layout */
.masonry-grid {
    column-count: 3;
    column-gap: 1.5rem;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

.gallery-img-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(245, 158, 11, 0.12));
}

.gallery-img-wrap img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 165, 233, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-overlay i {
    color: white;
    font-size: 2rem;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.gallery-img-wrap:hover img {
    transform: scale(1.1);
}

.gallery-img-wrap:hover .gallery-overlay {
    opacity: 1;
}

.gallery-img-wrap:hover .gallery-overlay i {
    transform: scale(1);
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    border-radius: var(--radius-md);
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-lightbox:hover {
    color: var(--primary-blue);
}

.lightbox-caption {
    margin: 1.5rem auto 0;
    text-align: center;
    color: var(--bg-white);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    max-width: 80%;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
}

/* Responsive Masonry */
@media (max-width: 991px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .masonry-grid {
        column-count: 1;
    }
    
    .lightbox-caption {
        font-size: 1.05rem;
        max-width: 90%;
    }
}
