/* ================================
   GALLERY PAGE STYLES
   ================================ */

/* Filters */
.gallery {
    padding: 80px 0;
    background: var(--white);
}

.gallery__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 48px;
}

.gallery__filter {
    padding: 10px 22px;
    border: 2px solid var(--border);
    border-radius: 50px;
    background: transparent;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.gallery__filter:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.gallery__filter.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(223, 180, 47, 0.35);
}

/* Grid */
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.gallery__item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery__item:hover img {
    transform: scale(1.08);
}

.gallery__item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(59, 59, 59, 0.8) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: var(--transition);
}

.gallery__item:hover .gallery__item-overlay {
    opacity: 1;
}

.gallery__item-overlay span {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Hide filtered items */
.gallery__item.hidden {
    display: none;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.lightbox.active {
    display: flex;
}

.lightbox__content {
    max-width: 90%;
    max-height: 90vh;
}

.lightbox__content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    cursor: pointer;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox__close {
    top: 24px;
    right: 24px;
}

.lightbox__prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__prev:hover,
.lightbox__next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Responsive */
@media (max-width: 1024px) {
    .gallery__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery {
        padding: 60px 0;
    }

    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .gallery__filters {
        gap: 8px;
    }

    .gallery__filter {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .lightbox__prev,
    .lightbox__next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}