/* --- GALLERY GRID --- */
.gallery-grid {
    columns: 3 250px;
    gap: 1rem;
    margin-top: 1.5rem;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.gallery-item img {
    width: 100%;
    display: block;
    border-radius: 8px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
    filter: brightness(1.1);
}

.gallery-item.hide { display: none; }
.gallery-item.show { animation: fadeIn 0.4s ease forwards; }

/* --- GALLERY FILTERS --- */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.4rem 1.2rem;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #111827;
}

/* --- LIGHTBOX --- */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(6px);
}

.lightbox-modal.active { display: flex; }

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.close-lightbox {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    font-weight: 700;
    transition: color 0.2s;
    z-index: 2001;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-lightbox:hover,
.close-lightbox:focus { color: var(--accent-comp); }

/* --- GALLERY OVERLAY --- */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    border-radius: 8px;
    transition: background 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover .gallery-overlay {
    background: rgba(0,201,167,0.08);
}

@media only screen and (max-width: 700px) {
    .lightbox-content { max-width: 98vw; }
}