/* ==========================================
   GALERÍA EXCLUSIVA - TIPO WINDOWS
   ========================================== */

/* GRID DE CARPETAS */
.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 30px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.folder-card {
    background: rgba(15, 15, 30, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.folder-card:hover {
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
    background: rgba(15, 15, 30, 0.95);
}

.folder-icon {
    width: 80px;
    height: 80px;
    fill: var(--gold);
    opacity: 0.8;
    transition: all 0.3s;
}

.folder-card:hover .folder-icon {
    opacity: 1;
    transform: scale(1.05);
}

.folder-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--gray-light);
    letter-spacing: 1px;
}

.folder-count {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 5px;
}

/* GRID DE CONTENIDO */
.content-grid {
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.back-btn {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 10px 25px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    margin-bottom: 30px;
    transition: all 0.3s;
}

.back-btn:hover {
    background: var(--gold);
    color: var(--dark);
}

.folder-title {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
}

.items-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.media-item {
    position: relative;
    aspect-ratio: 1/1;
    background: rgba(15, 15, 30, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.media-item:hover {
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

.media-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--gold);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

/* LIGHTBOX */
.exclusive-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 3rem;
    color: var(--gold);
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s;
}

.lightbox-close:hover {
    color: var(--white);
    transform: scale(1.1);
}

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 95%;
    max-height: 85vh;
}

/* ✅ Contenedor de media con fullscreen real */
.lightbox-media-container {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* ✅ Cuando está en fullscreen, ocupa toda la pantalla */
.lightbox-media-container:fullscreen {
    max-width: 100vw;
    max-height: 100vh;
    width: 100%;
    height: 100%;
}

.lightbox-media-container img,
.lightbox-media-container video {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
    transition: all 0.3s ease;
}

/* ✅ En fullscreen, la imagen/video ocupa todo */
.lightbox-media-container:fullscreen img,
.lightbox-media-container:fullscreen video {
    max-width: 100vw;
    max-height: 100vh;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.protected-media {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.lightbox-nav {
    background: rgba(212, 175, 55, 0.2);
    border: 2px solid var(--gold);
    color: var(--gold);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    background: var(--gold);
    color: var(--dark);
    transform: scale(1.1);
}

.lightbox-controls {
    position: absolute;
    bottom: 40px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.fullscreen-btn {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 10px 25px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.fullscreen-btn:hover {
    background: var(--gold);
    color: var(--dark);
}

.lightbox-counter {
    color: var(--gray-light);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Overlay protector invisible */
.media-protect-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 10;
    cursor: pointer;
}

@media (max-width: 768px) {
    .folders-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 20px;
    }
    
    .folder-icon {
        width: 60px;
        height: 60px;
    }
    
    .items-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
}