/* ============================================
   Lightbox
   ============================================ */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lightbox-fade-in 0.25s ease;
}

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

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 2rem;
}

.lightbox-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 95vw;
    max-height: 92vh;
}

.lightbox-image {
    max-width: 95vw;
    max-height: 92vh;
    object-fit: contain;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.1);
}

/* Controls */
.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #1a1a1a;
    cursor: pointer;
    line-height: 1;
    padding: 0.5rem;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.lightbox-close:hover {
    opacity: 0.5;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 3rem;
    color: #1a1a1a;
    cursor: pointer;
    padding: 1rem;
    transition: opacity 0.2s ease;
    line-height: 1;
    z-index: 2;
    user-select: none;
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.5;
}

.lightbox-caption {
    margin-top: 1rem;
    font-size: 0.9375rem;
    color: #1a1a1a;
    text-align: center;
    font-weight: 500;
}

.lightbox-counter {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: #999;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
        padding: 0.5rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }

    .lightbox-content {
        padding: 1rem;
    }

    .lightbox-image {
        max-width: 95vw;
        max-height: 75vh;
    }
}
