/* =========================================
   ESTILO CINEMATOGRÁFICO - ROLLOS (VIDEO FIJO)
   ========================================= */

:root {
    --dark-bg: #050a10;
    --card-bg: rgba(20, 25, 35, 0.75); /* Hacemos las tarjetas semitransparentes */
    --cyan-glow: #00d2ff;
    --gold: #ffd700;
    --text-main: #e0e0e0;
}

/* --- CORRECCIÓN FUNDAMENTAL AQUÍ --- */
body {
    /* ANTES: background-color: #000; (Esto tapaba el video) */
    /* AHORA: transparent (Para ver el video que está fijo al fondo) */
    background: transparent; 
    
    color: var(--text-main);
    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 el video un 60% para que el contenido resalte pero se vea el fondo */
    background: rgba(0, 0, 0, 0.6); 
}

/* --- HERO SECTION --- */
.rollos-hero {
    padding: 140px 20px 0px; 
    text-align: center; 
    position: relative;
    background: transparent; /* Transparente para ver el video */
}

/* Ajustes de texto para mejor lectura sobre video */
.hero-content-center h1 {
    font-family: 'Cinzel', serif; font-size: 3.5rem; color: white;
    text-shadow: 0 0 30px rgba(0, 210, 255, 0.4); margin: 15px 0;
}
.hero-content-center p { 
    color: #e0e0e0; 
    font-size: 1.2rem; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.8); /* Sombra para legibilidad */
    max-width: 900px;
    margin: 0 auto;
}
.badge-glow {
    color: var(--cyan-glow); border: 1px solid var(--cyan-glow);
    padding: 5px 15px; border-radius: 20px; font-size: 0.8rem; letter-spacing: 3px;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
    background: rgba(0,0,0,0.6); 
}

/* --- CONTROLES --- */
.rollos-controls { 
    padding: 20px 0 60px; 
    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;
    transition: 0.3s; font-size: 1rem;
}
.search-wrapper input:focus {
    border-color: var(--cyan-glow); box-shadow: 0 0 20px rgba(0, 210, 255, 0.3); outline: none;
    background: rgba(0,0,0,0.6);
}
.search-wrapper i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: #ccc; }

.filter-tabs { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.tab-btn {
    background: rgba(0,0,0,0.5); /* Fondo oscuro para que se lea sobre el video */
    border: 1px solid rgba(255,255,255,0.2); color: #ccc;
    padding: 8px 20px; border-radius: 30px; cursor: pointer; transition: 0.3s;
}
.tab-btn:hover, .tab-btn.active {
    background: var(--cyan-glow); color: #000; border-color: var(--cyan-glow); font-weight: 700;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.5);
}

/* --- GRILLA DE TARJETAS --- */
.rollos-grid-section { background: transparent; }

.rollos-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px; padding-bottom: 80px;
}

.rollo-card {
    background: var(--card-bg); 
    backdrop-filter: blur(5px); /* Efecto cristal */
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 15px; overflow: hidden; transition: 0.4s; cursor: pointer;
    display: flex; flex-direction: column;
}
.rollo-card:hover {
    transform: translateY(-10px); border-color: var(--gold);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 20px rgba(255, 215, 0, 0.2);
    background: rgba(20, 25, 35, 0.9); 
}

.card-img-box {
    height: 250px; overflow: hidden; position: relative;
}
.card-img-box img {
    width: 100%; height: 100%; object-fit: cover; transition: 0.5s; opacity: 0.9;
}
.rollo-card:hover img { transform: scale(1.1); opacity: 1; }

.card-info { padding: 20px; text-align: center; }
.card-num { color: var(--gold); font-size: 0.8rem; letter-spacing: 2px; font-weight: 700; display: block; margin-bottom: 5px; }
.card-title { font-family: 'Cinzel', serif; font-size: 1.1rem; color: white; line-height: 1.3; }

/* =========================================
   VISOR DIVINO (MODAL) - EFECTO CRISTAL REAL
   ========================================= */

.visor-overlay {
    display: none; 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    
    /* Fondo general muy transparente (0.4) para ver el video detrás */
    background: rgba(0, 0, 0, 0.4); 
    backdrop-filter: blur(4px); /* Blur suave */
    
    z-index: 5000; flex-direction: column;
}

/* Header del Visor */
.visor-header {
    height: 70px; 
    /* Header transparente */
    background: rgba(15, 21, 32, 0.6); 
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; align-items: center; padding: 0 30px;
}
.visor-title { font-family: 'Cinzel', serif; color: var(--gold); letter-spacing: 3px; font-weight: 700; }

.nav-btn {
    background: rgba(255,255,255,0.1); border: none; color: white; padding: 8px 20px;
    border-radius: 30px; cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 10px;
}
.nav-btn:hover { background: var(--cyan-glow); color: black; }

.close-btn {
    width: 40px; height: 40px; border-radius: 50%; background: #d32f2f; color: white;
    border: none; cursor: pointer; font-size: 1.2rem; margin-left: 15px; transition: 0.3s;
}
.close-btn:hover { transform: rotate(90deg); background: red; }
.header-right { display: flex; align-items: center; }

/* Cuerpo del Visor */
.visor-body {
    flex: 1; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden;
}

/* Columna Izquierda: IMAGEN */
.visor-col-img {
    /* Casi transparente (0.2) para ver el video */
    background: rgba(0, 0, 0, 0.2); 
    
    display: flex; flex-direction: column;
    justify-content: center; align-items: center; padding: 20px;
    border-right: 1px solid rgba(255,255,255,0.1);
}
.img-container {
    width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden;
}
.img-container img {
    max-width: 100%; max-height: 80vh; object-fit: contain;
    box-shadow: 0 0 30px rgba(0,0,0,0.5); 
}
.download-link {
    margin-top: 15px; color: #ccc; text-decoration: none; font-size: 0.9rem;
    border-bottom: 1px solid #888; transition: 0.3s;
    background: rgba(0,0,0,0.5); padding: 5px 15px; border-radius: 20px;
}
.download-link:hover { color: var(--cyan-glow); border-color: var(--cyan-glow); }

/* Columna Derecha: TEXTO TRANSCRITO */
.visor-col-text {
    padding: 50px; 
    overflow-y: auto; 
    
    /* CAMBIO: Fondo semitransparente (0.5) + Blur para leer bien sobre el video */
    background: rgba(11, 16, 26, 0.5); 
    backdrop-filter: blur(15px);
}

.modal-num { color: var(--cyan-glow); letter-spacing: 3px; font-weight: 700; font-size: 0.9rem; }
.visor-col-text h2 {
    font-family: 'Cinzel', serif; font-size: 2.5rem; color: white; margin: 10px 0 20px; line-height: 1.1;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}
.gold-line { width: 60px; height: 4px; background: var(--gold); margin-bottom: 30px; }

/* --- AJUSTES DE TEXTO JUSTIFICADO (COMO EN WORD) --- */

.bloque-visor {
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3); 
    padding-bottom: 30px;
}
.bloque-visor:last-child { border-bottom: none; }

.titulo-seccion {
    color: var(--cyan-glow);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem; letter-spacing: 2px; text-transform: uppercase;
    margin-bottom: 15px; display: flex; align-items: center; gap: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,1);
}

.texto-biblico {
    font-style: italic; color: #ddd; 
    background: rgba(255, 255, 255, 0.05);
    padding: 20px; border-left: 3px solid var(--gold); font-size: 1rem;
    
    /* JUSTIFICADO */
    text-align: justify;
    text-justify: inter-word;
}

.texto-profetico {
    font-weight: 600; color: #fff; font-size: 1rem; line-height: 1.6;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    
    /* JUSTIFICADO */
    text-align: justify;
    text-justify: inter-word;
}

.subtitulo-rollo {
    font-family: 'Cinzel', serif; color: var(--gold); font-size: 1.4rem;
    margin-bottom: 20px; line-height: 1.4; text-align: center;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);

    /* --- AGREGA ESTO PARA SUBRAYAR --- */
    text-decoration: underline;        /* Activa el subrayado */
    text-underline-offset: 10px;       /* Separa la línea del texto (muy importante) */
    text-decoration-thickness: 2px;    /* Grosor de la línea */
    text-decoration-color: var(--gold); /* Asegura que la línea sea dorada */
}


.texto-lectura {
    font-size: 1.15rem; line-height: 1.8; color: #ddd;
    
    /* JUSTIFICADO */
    text-align: justify;
    text-justify: inter-word;
}

.texto-lectura::first-letter {
    font-family: 'Cinzel', serif; font-size: 3.5rem; float: left;
    margin-right: 10px; line-height: 0.8; color: var(--gold);
}

/* Regla para asegurar que los párrafos internos también se justifiquen */
.texto-lectura p, .texto-profetico p {
    text-align: justify;
    text-justify: inter-word;
    margin-bottom: 15px;
}

/* =========================================
   RESPONSIVE: AJUSTES PARA CELULARES
   ========================================= */
@media (max-width: 900px) {
    .visor-body { 
        grid-template-columns: 1fr; overflow-y: auto; 
        display: flex; flex-direction: column;
    }
    .visor-col-img { 
        height: 35vh; min-height: 250px; 
        border-right: none; border-bottom: 1px solid rgba(255,255,255,0.2); 
        padding: 10px;
    }
    .img-container img { max-height: 100%; box-shadow: none; }
    .visor-col-text { 
        height: auto; padding: 20px; padding-bottom: 80px; 
        overflow-y: visible;
    }
    .visor-col-text h2 { font-size: 1.6rem; line-height: 1.2; }
    .subtitulo-rollo { font-size: 1.2rem; }
    
    /* Aseguramos justificado en móvil también */
    .texto-lectura, .texto-profetico { 
        font-size: 1rem; 
        text-align: justify; 
    }
    
    .visor-header { padding: 0 10px; height: 60px; }
    .visor-title { font-size: 0.8rem; text-align: center; max-width: 120px; line-height: 1.1; }
    .nav-btn span { display: none; } 
    .nav-btn { padding: 8px 12px; }
    .nav-btn i { font-size: 1.2rem; margin: 0; }
}