/* =========================================
   ESTILOS CINEMATOGRÁFICOS - DOCUMENTOS (VIDEO FIJO)
   ========================================= */

/* Variables locales */
:root {
    --cyan-glow: #00d2ff;
    --dark-blue: #0f253e;
    --gold: #ffd700;
}

/* 1. BODY TRANSPARENTE (Para ver el video global) */
body {
    background: transparent; 
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
}

/* =========================================
   FONDO DE VIDEO GLOBAL (FIJO)
   ========================================= */
.video-fondo-global {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -10; /* Detrás de todo */
    overflow: hidden;
}

#bg-video-global {
    width: 100%; height: 100%; object-fit: cover;
}

.overlay-global {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    /* Oscurecemos un 60% para que el contenido resalte */
    background: rgba(0, 0, 0, 0.6); 
}

/* --- HERO SECTION --- */
.docs-hero {
    position: relative; 
    padding: 120px 20px 10px; 
    text-align: center;
    overflow: hidden;
    background: transparent; /* Transparente */
}

/* Ya no necesitamos el overlay antiguo, lo ocultamos */
.hero-bg-overlay { display: none; }

.badge-glow {
    display: inline-block; padding: 5px 15px; border: 1px solid var(--cyan-glow);
    color: var(--cyan-glow); border-radius: 20px; font-size: 0.8rem;
    letter-spacing: 3px; margin-bottom: 20px; text-transform: uppercase;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
    background: rgba(0,0,0,0.6); /* Fondo oscurito para leer */
}

.docs-hero h1 {
    font-family: 'Cinzel', serif; font-size: 3.5rem; color: white; margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
}
.docs-hero p { 
    color: #e0e0e0; font-size: 1.1rem; max-width: 600px; margin: 0 auto;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8); 
}

/* --- CONTROLES --- */
.docs-controls { 
    padding: 20px 0 50px; 
    background: transparent;
}

.search-wrapper {
    max-width: 500px; margin: 0 auto 30px; position: relative;
}
.search-wrapper input {
    width: 100%; 
    background: rgba(255,255,255,0.1); 
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 15px 50px; border-radius: 50px; color: white; font-size: 1rem;
    transition: 0.3s;
}
.search-wrapper input:focus {
    background: rgba(0,0,0,0.6); border-color: var(--cyan-glow);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.2); outline: none;
}
.search-wrapper i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: #ccc; }

.category-tabs { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.cat-btn {
    background: rgba(0,0,0,0.5); /* Fondo oscuro semitransparente */
    border: 1px solid rgba(255,255,255,0.2);
    color: #ccc; padding: 8px 25px; border-radius: 30px; cursor: pointer;
    transition: 0.3s; font-family: 'Montserrat', sans-serif; font-weight: 500;
}
.cat-btn:hover, .cat-btn.active {
    background: var(--cyan-glow); color: var(--dark-blue); border-color: var(--cyan-glow);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4); font-weight: 700;
}

/* --- GRILLA --- */
.docs-grid-section { background: transparent; }

.docs-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px; padding-bottom: 80px;
}

/* --- TARJETA DE DOCUMENTO (GLASSMORPHISM) --- */
.doc-card {
    /* Fondo semitransparente oscuro (Cristal) */
    background: rgba(20, 25, 35, 0.75); 
    backdrop-filter: blur(5px);
    
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px; padding: 25px;
    transition: all 0.4s ease; position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: flex-start;
}

.doc-card:hover {
    transform: translateY(-10px);
    background: rgba(20, 25, 35, 0.9); /* Más sólido al pasar el mouse */
    border-color: var(--cyan-glow);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 210, 255, 0.1);
}

/* Caja de la Miniatura */
.doc-icon-box {
    width: 100%; height: 200px; /* Altura fija para la miniatura */
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px; 
    margin-bottom: 20px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
}

.doc-thumb {
    width: 100%; height: 100%; 
    object-fit: cover; /* Hace que la imagen llene el cuadro sin deformarse */
    opacity: 0.9; transition: 0.5s;
}

.doc-card:hover .doc-thumb {
    opacity: 1; transform: scale(1.1); /* Zoom suave al pasar mouse */
}

/* Info */
.doc-category {
    font-size: 0.75rem; color: var(--gold); text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 8px; font-weight: 700;
}
.doc-title {
    font-family: 'Cinzel', serif; font-size: 1.3rem; color: white;
    margin-bottom: 10px; line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.doc-desc {
    font-size: 0.9rem; color: #ccc; line-height: 1.6; margin-bottom: 25px; flex-grow: 1;
}

/* Botón Ver */
.doc-btn {
    width: 100%; padding: 12px; border-radius: 8px;
    background: rgba(255,255,255,0.05); 
    border: 1px solid rgba(255,255,255,0.2);
    color: white; font-weight: 600; text-align: center; cursor: pointer;
    transition: 0.3s; display: flex; justify-content: center; align-items: center; gap: 10px;
}
.doc-btn:hover {
    background: var(--cyan-glow); color: var(--dark-blue); border-color: var(--cyan-glow);
}

/* --- VISOR MODAL (PANTALLA COMPLETA) --- */
.doc-modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    
    /* Fondo semitransparente (0.85) para ver un poco el video detrás */
    background: rgba(0, 0, 0, 0.85); 
    
    z-index: 6000;
    justify-content: center; align-items: center; padding: 20px;
    backdrop-filter: blur(8px);
}

.doc-modal-content {
    max-width: 1000px; max-height: 95vh; width: 100%;
    display: flex; flex-direction: column; align-items: center;
    position: relative;
    
    /* Fondo para el contenido del modal */
    background: rgba(15, 21, 32, 0.5);
    padding: 20px; border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.1);
}

.doc-modal-content img {
    max-width: 100%; max-height: 75vh; 
    border: 1px solid var(--cyan-glow);
    border-radius: 5px; box-shadow: 0 0 50px rgba(0, 210, 255, 0.2);
    object-fit: contain;
}

.doc-modal-info {
    margin-top: 20px; text-align: center; width: 100%;
}
.doc-modal-info h3 {
    font-family: 'Cinzel', serif; color: white; font-size: 1.5rem; margin-bottom: 15px;
}

.download-link {
    display: inline-block; padding: 10px 30px; 
    background: var(--cyan-glow); color: var(--dark-blue);
    text-decoration: none; border-radius: 50px; font-weight: 700;
    text-transform: uppercase; font-size: 0.9rem; transition: 0.3s;
}
.download-link:hover { background: white; transform: translateY(-3px); }

.close-doc-modal {
    position: absolute; top: 20px; right: 30px; font-size: 3rem; color: white;
    cursor: pointer; transition: 0.3s; z-index: 6001;
}
.close-doc-modal:hover { color: var(--cyan-glow); transform: rotate(90deg); }

/* Responsive */
@media (max-width: 768px) {
    .docs-hero h1 { font-size: 2.5rem; }
    .doc-modal-content img { max-height: 60vh; }
}