/* Lightbox Gallery */
#lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(8px);
}
#lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lb-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lb-image {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
#lb-image.loaded {
    opacity: 1;
}

.lb-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 0;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}
#lb-caption {
    font-weight: 500;
}
#lb-counter {
    font-size: 0.85rem;
    opacity: 0.6;
}

.lb-close {
    position: fixed;
    top: 20px;
    right: 25px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lb-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.lb-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
}
.lb-nav:hover {
    opacity: 1;
    background: rgba(255,255,255,0.2);
}
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

@media (max-width: 768px) {
    .lb-nav { width: 40px; height: 40px; font-size: 1.2rem; }
    .lb-prev { left: 10px; }
    .lb-next { right: 10px; }
    .lb-close { top: 10px; right: 15px; }
}
