/* ============================================
   LIGHTBOX — Shared photo viewer for public + admin pages
   ============================================ */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: lightbox-fade-in 0.2s ease;
    font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
}

.lightbox--open {
    display: flex;
}

@keyframes lightbox-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox__img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    user-select: none;
}

.lightbox__caption {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    text-align: center;
    max-width: 80vw;
    padding: 0.4rem 0.8rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    pointer-events: none;
}

.lightbox__btn {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: white;
    font-size: 1.8rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    z-index: 10001;
    padding: 0;
    line-height: 1;
}

.lightbox__btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.06);
}

.lightbox__btn:active {
    transform: scale(0.95);
}

.lightbox__btn--close {
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.6rem;
}

.lightbox__btn--prev {
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__btn--prev:hover {
    transform: translateY(-50%) scale(1.06);
}

.lightbox__btn--next {
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__btn--next:hover {
    transform: translateY(-50%) scale(1.06);
}

.lightbox__counter {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

@media (max-width: 600px) {
    .lightbox__btn--prev { left: 0.5rem; }
    .lightbox__btn--next { right: 0.5rem; }
    .lightbox__btn { width: 44px; height: 44px; font-size: 1.4rem; }
}

/* Photo grid items behave like buttons when triggering the lightbox */
button.photo-grid__item {
    background: none;
    border: none;
    padding: 0;
    cursor: zoom-in;
    width: 100%;
    display: block;
    text-align: left;
}
