/* ==============================
   Modal Vanilla (sin Bootstrap)
   Compartido entre galería de fotos y vídeos
   ============================== */

/* Oculto por defecto */
.lbp-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

/* Visible cuando tiene la clase is-open */
.lbp-modal.is-open {
    display: flex;
}

.lbp-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.lbp-modal__dialog {
    position: relative;
    z-index: 1;
    width: 90vw;
    max-height: 90vh;
    margin: auto;
    display: flex;
    flex-direction: column;
    animation: lbpModalIn 0.2s ease;
}

.lbp-modal__dialog--xl {
    max-width: 1140px;
}

@keyframes lbpModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.lbp-modal__content {
    background: #0d0d0d;
    border: 1px solid rgba(227, 64, 40, 0.3);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.lbp-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(227, 64, 40, 0.3);
    gap: 12px;
    flex-shrink: 0;
}

.lbp-modal__title {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fff;
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lbp-modal__close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s;
    font-size: 1rem;
}

.lbp-modal__close:hover {
    background: rgba(227, 64, 40, 0.5);
    transform: scale(1.1);
}

.lbp-modal__body {
    overflow-y: auto;
    flex: 1;
}

/* Clase utilitaria para ocultar captions */
.hidden {
    display: none !important;
}

/* Grid de fotos — reemplaza Bootstrap row/col */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .photos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .photos-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Grid de vídeos — reemplaza Bootstrap row/col */
.videos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

@media (min-width: 640px) {
    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .videos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
