/* Visor de fotos compartido (Galería y Blog) — ver /js/lightbox.js */
.rma-lightbox {
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(8, 17, 13, .96);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem 1.5rem;
    animation: rma-lb-in .2s ease-out;
}

.rma-lightbox[hidden] { display: none; }

body.rma-lightbox-open { overflow: hidden; }

@keyframes rma-lb-in { from { opacity: 0; } to { opacity: 1; } }

.rma-lightbox__top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    color: rgba(255, 255, 255, .75);
    font-variant-numeric: tabular-nums;
}

.rma-lightbox__btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 1.5rem;
    display: grid;
    place-items: center;
    transition: background .2s;
}

.rma-lightbox__btn:hover,
.rma-lightbox__btn:focus-visible { background: rgba(255, 255, 255, .25); outline: none; }

.rma-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.rma-lightbox__nav--prev { left: 1rem; }
.rma-lightbox__nav--next { right: 1rem; }
.rma-lightbox.is-single .rma-lightbox__nav { display: none; }

.rma-lightbox__figure {
    margin: 0;
    max-width: min(1200px, 100%);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
}

.rma-lightbox__figure img {
    max-width: 100%;
    max-height: calc(100vh - 9rem);
    object-fit: contain;
    border-radius: .5rem;
    opacity: 0;
    transition: opacity .25s;
}

.rma-lightbox__figure img.is-loaded { opacity: 1; }

.rma-lightbox__caption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .5rem 1rem;
    color: rgba(255, 255, 255, .85);
    text-align: center;
}

.rma-lightbox__link {
    color: var(--rma-yellow, #f9b000);
    font-weight: 600;
}

.rma-lightbox__link:hover { color: #fff; }

@media (max-width: 767.98px) {
    .rma-lightbox__nav { top: auto; bottom: 1rem; transform: none; }
}
