﻿/* Gallery filter tabs */
.gallery-tabs {
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.gallery-tab {
    padding: .5rem 1.4rem;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    border-radius: 99px;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: .88rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

    .gallery-tab:hover,
    .gallery-tab.active {
        border-color: var(--primary);
        background: var(--primary);
        color: #fff;
    }

[data-theme="dark"] .gallery-tab:hover,
[data-theme="dark"] .gallery-tab.active {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--primary);
}

/* Gallery Counter */
.gallery-counter {
    text-align: center;
    font-size: .88rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

    .gallery-counter strong {
        color: var(--primary);
        font-weight: 800;
    }

[data-theme="dark"] .gallery-counter strong {
    color: var(--gold-light);
}

/* Masonry Grid */
.gallery-masonry {
    columns: 4;
    column-gap: 1rem;
}

@media (max-width: 1199px) {
    .gallery-masonry {
        columns: 3;
    }
}

@media (max-width: 767px) {
    .gallery-masonry {
        columns: 2;
    }
}

@media (max-width: 479px) {
    .gallery-masonry {
        columns: 1;
    }
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

    .gallery-item img {
        width: 100%;
        display: block;
        transition: transform var(--transition-slow);
    }

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(22,29,54,0.8), transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-base);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-label {
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
    backdrop-filter: blur(8px);
}

    .lightbox.active {
        opacity: 1;
        pointer-events: all;
    }

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 88vh;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0,0,0,0.6);
}

    .lightbox-content img {
        max-width: 90vw;
        max-height: 88vh;
        object-fit: contain;
        display: block;
    }

.lightbox-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 99px;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
    z-index: 10;
}

    .lightbox-close:hover {
        background: rgba(255,255,255,0.25);
    }

.lightbox-prev, .lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 99px;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
}

.lightbox-prev {
    right: 1.5rem;
}

.lightbox-next {
    left: 1.5rem;
}

    .lightbox-prev:hover, .lightbox-next:hover {
        background: rgba(201,169,110,0.3);
        border-color: var(--gold);
    }

@media (max-width: 767px) {
    .lightbox-prev, .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-prev {
        right: 0.5rem;
    }

    .lightbox-next {
        left: 0.5rem;
    }
}
