/* Prevent body scroll when lightbox is open */
body.lightbox-open {
    overflow: hidden;
    height: 100vh; /* lock viewport height */
}


#gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 66%);
    z-index: 9999;
    display: none; /* hidden by default */
    justify-content: center;
    align-items: center;
}

/* Inner wrapper */
#gallery-lightbox .lightbox-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem; /* desktop padding */
    box-sizing: border-box;
    flex-direction: column;
}

/* The image itself */
#lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.6);
}

/* Text overlays */
#lightbox-author,
#lightbox-summary {
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Close button */
#lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
}

#lightbox-author {
    position: absolute;
    top: 20px;
    left: 20px; 
    margin:0px;
}

#lightbox-prev,
#lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 60;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

#lightbox-prev:hover,
#lightbox-next:hover {
    background: rgba(0, 0, 0, 0.6);
}

#lightbox-prev {
    left: 1rem;
}

#lightbox-next {
    right: 1rem;
}


/* Mobile adjustments */
@media (max-width: 768px) {
    #gallery-lightbox .lightbox-inner {
        padding: 0.5rem; /* minimal margin on mobile */
    }

    #lightbox-image {
        border-radius: 0; /* full-bleed feel */
        box-shadow: none;
    }

    #lightbox-prev,
    #lightbox-next {
        display: none;
    }
}
