/* Reusable lightbox (js/modules/lightbox.js) */
.lightbox {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(10, 26, 22, 0.94);
    color: var(--color-white);
    overflow: hidden;
}

.lightbox::backdrop {
    background: rgba(10, 26, 22, 0.6);
}

.lightbox[open] {
    display: grid;
    grid-template-rows: auto 1fr;
}

.lightbox__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem clamp(0.75rem, 2vw, 1.5rem);
}

.lightbox__counter {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.8);
}

.lightbox__actions {
    display: flex;
    gap: 0.5rem;
}

.lightbox__btn {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-white);
    cursor: pointer;
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.lightbox__btn:hover {
    background: var(--color-gold);
    color: var(--color-primary-dark);
}

.lightbox__btn .icon {
    width: 22px;
    height: 22px;
}

.lightbox__stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    min-height: 0;
    margin: 0;
    padding: 0 clamp(0.75rem, 6vw, 5.5rem) clamp(1rem, 3vw, 2rem);
}

.lightbox__img {
    max-width: 100%;
    max-height: calc(100dvh - 9rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}

.lightbox__caption {
    max-width: 70ch;
    text-align: center;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__nav--prev {
    left: clamp(0.4rem, 1.5vw, 1.5rem);
}

.lightbox__nav--next {
    right: clamp(0.4rem, 1.5vw, 1.5rem);
}

.lightbox__nav[hidden] {
    display: none;
}

@media (max-width: 600px) {
    .lightbox__nav {
        top: auto;
        bottom: 1rem;
        transform: none;
    }

    .lightbox__stage {
        padding-bottom: 5rem;
    }
}
