/* ============================================================
   Modal de previsualización universal (imagen, video, PDF) —
   compartido por Noticias/Multimedia y las galerías de productos.
   Usa el partial Views/Shared/_MediaLightbox.cshtml y
   wwwroot/js/media-preview.js. Se apoya en las variables globales
   de institucional-theme.css (--inst-*), no en alias de página,
   para poder cargarse en cualquier módulo sin depender de otra hoja.
   ============================================================ */

.np-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.88);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease, visibility 220ms ease;
}

.np-lightbox.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.np-lightbox-content {
    max-width: 900px;
    width: 100%;
    background: #FFFFFF;
    border-radius: 14px;
    overflow: hidden;
    transform: scale(0.96) translateY(8px);
    transition: transform 240ms ease;
}

.np-lightbox.open .np-lightbox-content {
    transform: scale(1) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .np-lightbox, .np-lightbox-content { transition: none; }
}

.np-lightbox-stage {
    width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.np-lightbox-stage img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.np-lightbox-stage iframe,
.np-lightbox-stage video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
}

.np-lightbox-stage.np-stage-pdf iframe {
    aspect-ratio: auto;
    height: 78vh;
}

.np-lightbox-skeleton {
    width: 100%;
    min-height: 320px;
    border-radius: 0;
    background: #1a1a1a;
}

.np-lightbox-caption {
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.np-lightbox-caption .np-lightbox-download {
    color: var(--inst-secondary);
    font-weight: 600;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.np-lightbox-caption .np-lightbox-download:hover {
    color: var(--inst-accent);
}

.np-lightbox-caption strong {
    display: block;
    color: var(--inst-heading, #14532D);
    font-size: 15px;
    margin-bottom: 4px;
}

.np-lightbox-caption span {
    color: var(--inst-muted-fg, #516156);
    font-size: 13px;
}

.np-lightbox-close {
    position: absolute;
    top: 24px;
    right: 30px;
    color: #FFFFFF;
    font-size: 28px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1;
}




.np-video-thumb {
    position: relative;
    overflow: hidden;
}

    .np-video-thumb video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.np-play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}