#lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#lightbox[hidden] { display: none !important; }

#lightbox.show { opacity: 1; }

.lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
    margin: 0;
    padding: 0 1rem;
    max-width: 90vw;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 0.375rem;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox-caption {
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.875rem;
    text-align: center;
    max-width: 60ch;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    transition: background 0.15s;
    padding: 0;
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }

body.lightbox-open { overflow: hidden; }

/* Indiciu vizual că imaginea poate fi mărită. */
.rst-content a.image-reference { cursor: zoom-in; }
