/* Explain: Styles for gallery filters, cards, photos, and lightbox viewer. */
.gallery-filter {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--glass-bg);
    padding: 0.6rem 1.35rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: all 300ms ease;
    backdrop-filter: blur(14px);
}

.gallery-filter:hover {
    border-color: var(--primary-hover);
    color: var(--text-color);
}

.gallery-filter.is-active {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: var(--button-text-color);
    box-shadow: var(--shadow-button);
}

.gallery-card {
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.gallery-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-6px);
}

.gallery-card.is-hidden {
    display: none;
}

.gallery-photo {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    border: 0;
    padding: 0;
    background: var(--surface-color);
    cursor: pointer;
}

.gallery-photo img {
    transition: transform 600ms ease;
}

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

.gallery-photo-zoom {
    position: absolute;
    right: 0.9rem;
    bottom: 0.9rem;
    display: inline-flex;
    width: 2.4rem;
    height: 2.4rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(7, 14, 22, 0.78);
    color: var(--accent-color);
    font-size: 0.85rem;
}

.gallery-thumb {
    width: 4.6rem;
    height: 3.3rem;
    border-radius: 0.9rem;
    border: 1px solid var(--glass-border);
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(3, 7, 12, 0.93);
    padding: 1.25rem;
    backdrop-filter: blur(6px);
}

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

.gallery-lightbox-inner {
    display: flex;
    max-width: min(1100px, 100%);
    max-height: 100%;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.gallery-lightbox-inner img {
    width: auto;
    max-width: 100%;
    max-height: 78vh;
    border-radius: 1.5rem;
    object-fit: contain;
}

.gallery-lightbox-caption {
    margin: 0;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
    position: absolute;
    display: inline-flex;
    width: 48px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--glass-bg);
    color: var(--text-color);
    transition: all 300ms ease;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-nav:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.gallery-lightbox-close {
    top: 1.25rem;
    right: 1.25rem;
}

.gallery-lightbox-prev {
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-lightbox-next {
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 640px) {
    .gallery-lightbox-prev {
        left: 0.5rem;
    }

    .gallery-lightbox-next {
        right: 0.5rem;
    }

    .gallery-lightbox-close {
        top: 0.5rem;
        right: 0.5rem;
    }
}