/* ===================================
   Gallery Styles
   =================================== */

/* --- Gallery Section --- */
.gallery-section {
    padding: 60px 0 80px;
}

/* --- Filter Buttons --- */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border: 2px solid var(--color-primary);
    background: transparent;
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
}

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

/* --- Gallery Grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 1.25rem;
    opacity: 0;
    transition: opacity var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
}

/* Hidden items when filtering */
.gallery-item.hidden {
    display: none;
}

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem;
}

.lightbox.is-open {
    display: flex;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox-caption {
    color: var(--color-white);
    margin-top: 1rem;
    font-size: 1rem;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition);
}

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

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 2.5rem;
    cursor: pointer;
    padding: 1rem;
    transition: color var(--transition);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--color-accent);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 1.8rem;
    }
}
