/* gallery.css */
.gallery-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: .5rem 1.4rem;
    border-radius: 50px;
    border: 1.5px solid var(--beige-dark);
    background: var(--white);
    color: var(--charcoal-light);
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-color: var(--gold);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(198, 167, 94, .35);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
    aspect-ratio: 4/3;
    transition: var(--transition);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(110, 15, 26, .85) 0%, transparent 55%);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 1.2rem;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay-content {
    color: #fff;
}

.gallery-item-overlay-content h4 {
    font-size: 1rem;
    margin-bottom: .2rem;
}

.gallery-item-overlay-content span {
    font-size: .78rem;
    color: rgba(255, 255, 255, .7);
    text-transform: capitalize;
}

.gallery-zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    backdrop-filter: blur(4px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-zoom-icon {
    opacity: 1;
}

.gallery-item.hidden {
    display: none;
}

.gallery-empty {
    text-align: center;
    padding: 4rem;
    color: var(--charcoal-light);
}

.gallery-empty i {
    font-size: 3rem;
    color: var(--beige-dark);
    margin-bottom: 1rem;
    display: block;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.lightbox.open {
    display: flex;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    backdrop-filter: blur(6px);
}

.lightbox-content {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    object-fit: contain;
}

.lightbox-caption {
    margin-top: 1rem;
    color: rgba(255, 255, 255, .8);
    font-size: .9rem;
    text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    background: rgba(255, 255, 255, .12);
    border: 1.5px solid rgba(255, 255, 255, .2);
    color: #fff;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: var(--transition);
    cursor: pointer;
}

.lightbox-close {
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.1rem;
}

.lightbox-prev {
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--gold);
    border-color: var(--gold);
}

.lightbox-counter {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .6);
    font-size: .85rem;
    z-index: 3;
}

@media(max-width:900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:500px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 38px;
        height: 38px;
    }
}