/*
 * VERTV.CLICK | Hoja de Estilos Principal - FINAL v10.0 (Glitch Effect - Full Height)
 * Estilo: Ortodoxo, Moderno, Cinematográfico. Base Mobile First.
 */

/* ========================================= */
/* 0. Importación de Fuentes y Reset */
/* ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&family=Roboto:wght@400;500&display=swap');

:root {
    --color-fondo: #121212;
    --color-superficie: #1E1E1E;
    --color-acento: #E50914; /* Rojo Cinematográfico */
    --color-texto-claro: #E0E0E0; 
    --color-texto-suave: #888888; 
    
    --fuente-titulos: 'Poppins', sans-serif; 
    --fuente-principal: 'Roboto', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-fondo);
    color: var(--color-texto-claro);
    font-family: var(--fuente-principal);
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    letter-spacing: 0.02em;
}

/* Enlaces base */
a {
    color: var(--color-texto-claro);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-acento);
}

/* Títulos de secciones secundarias */
h2 {
    font-family: var(--fuente-titulos);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 40px;
}

/* ========================================= */
/* 1. Header y Navegación (MOBILE FIRST) */
/* ========================================= */
.header-principal {
    background-color: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(8px);
    padding: 18px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    
    /* CRÍTICO para el Header Dinámico */
    transition: top 0.3s ease-in-out; 
}

/* Clase para ocultar el header cuando se desplaza hacia abajo */
.header-principal.oculto {
    top: -100px; 
}

.logo {
    font-size: 1.8rem;
    font-family: var(--fuente-titulos);
    font-weight: 800;
    color: var(--color-acento);
    letter-spacing: 0.5px;
}

/* Botón Hamburguesa */
.menu-toggle {
    background: none;
    border: none;
    color: var(--color-texto-claro);
    font-size: 1.8rem;
    cursor: pointer;
    display: block; 
    padding: 0;
    z-index: 2001; 
}

/* Menú Principal (Móvil: Oculto) */
.menu-principal {
    position: absolute;
    top: 100%; 
    left: 0;
    width: 100%;
    background-color: var(--color-superficie);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out; 
}

.menu-principal.abierto {
    max-height: 300px; 
}

.menu-principal ul {
    list-style: none;
    display: flex;
    flex-direction: column; 
    padding: 10px 20px;
}

.menu-principal li {
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

.menu-principal a {
    font-size: 1.05rem;
    font-weight: 500;
}

/* Iconos de la derecha del header (Ocultos en móvil) */
.header-iconos {
    display: none; 
}

/* ========================================= */
/* 2. Contenido Principal y Hero Section */
/* ========================================= */
.contenido-principal {
    flex-grow: 1;
    padding: 100px 0 60px 0; 
    max-width: none;
    width: 100%;
    margin: 0;
}

/* --- HERO SECTION: Contenido Destacado --- */
.hero-destacado {
    position: relative;
    width: 100%;
    height: 70vh;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.8)), #181818 no-repeat center center / cover; 
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 40px;
    margin-bottom: 60px;
    transition: background-image 0.5s ease; 
    overflow: hidden; 
}

.hero-contenido {
    max-width: 600px;
    color: var(--color-texto-claro);
    z-index: 100; 
    position: relative; 
}

.hero-contenido .subtitulo-lanzamiento {
    color: var(--color-acento);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.hero-contenido .titulo-principal {
    font-family: var(--fuente-titulos);
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-contenido .meta-info {
    display: none; 
}

.hero-contenido .descripcion {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    color: var(--color-texto-claro);
}

.hero-contenido .btn-accion {
    background-color: var(--color-acento);
    color: var(--color-texto-claro);
    font-family: var(--fuente-principal);
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 25px;
    border-radius: 6px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.hero-contenido .btn-accion:hover {
    background-color: #FF1A27;
    transform: translateY(-2px);
}

.hero-paginacion {
    display: none; 
}

/* Barra de Búsqueda */
.barra-busqueda {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 40px;
    margin-bottom: 50px;
}

#buscador-vertv {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    background-color: var(--color-superficie); 
    color: var(--color-texto-claro);
    border: 1px solid #333;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

/* ========================================= */
/* 3. Grid de Contenido (Tarjetas) */
/* ========================================= */
.novedades {
    max-width: 1300px; 
    margin: 0 auto;
    padding: 0 40px; 
}

.grid-contenido {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); 
    gap: 20px; 
}

.tarjeta-contenido {
    cursor: pointer;
    background-color: transparent; 
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tarjeta-contenido:hover {
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
}

.imagen-poster {
    width: 100%; 
    height: auto; 
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 6px;
}

.tarjeta-contenido:hover .imagen-poster {
    transform: scale(1.05); 
}

.info-contenido {
    padding: 10px 0; 
    text-align: center;
}

.info-contenido h3 {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--color-texto-claro);
    transition: color 0.3s ease;
    margin-bottom: 2px;
}

.info-contenido p {
    font-size: 0.8rem;
    color: var(--color-texto-suave);
    margin-top: 5px;
}

/* ========================================= */
/* 4. Pie de Página (Footer) */
/* ========================================= */
.pie-pagina {
    background-color: var(--color-superficie);
    text-align: center;
    padding: 20px;
    border-top: 1px solid #333;
    font-size: 0.9rem;
    color: var(--color-texto-suave);
    margin-top: auto; 
}

.enlaces-legales a {
    color: var(--color-texto-suave);
    padding: 0 10px;
    transition: color 0.3s ease;
}

.enlaces-legales a:hover {
    color: var(--color-acento);
}

/* ========================================= */
/* 5. EFECTO DE INTERFERENCIA / GLITCH (Hero Section) */
/* ========================================= */

.efecto-estatica {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Fondo que simula líneas y ruido, cubriendo toda la altura */
    background-image: 
        linear-gradient(rgba(0,0,0,0.8) 0%, transparent 100%), /* Ajustado para cubrir 100% de alto */
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.3),
            rgba(0, 0, 0, 0.3) 1px,
            transparent 1px,
            transparent 2px
        );
    background-size: 100% 100%, 100% 100px; /* Cubre 100% de alto, y el ruido es más grande */
    
    opacity: 0; 
    z-index: 50; 
    animation: tv-glitch 8s infinite linear; 
    pointer-events: none;
    mix-blend-mode: overlay; 
}

@keyframes tv-glitch {
    0%, 100% { opacity: 0; transform: translate(0, 0); } 
    
    /* Primera Falla: Más intensa y abarca más */
    2%   { opacity: 0.9; transform: translate(15px, -15px); } /* Mayor desplazamiento y opacidad */
    2.5% { opacity: 0.2; transform: translate(-10px, 10px); } 
    3%   { opacity: 0; transform: translate(0, 0); } 
    
    /* Gran Periodo de normalidad */
    45%  { opacity: 0; transform: translate(0, 0); } 
    
    /* Segunda Falla: Un "desplazamiento" largo y fuerte */
    46%  { opacity: 1; transform: translate(-20px, 0); } /* Mucha más opacidad y desplazamiento */
    46.5%{ opacity: 0.6; transform: translate(0, 15px); } 
    47%  { opacity: 0; transform: translate(0, 0); } 
    
    /* Sigue en normalidad hasta el final */
    99% { opacity: 0; transform: translate(0, 0); }
}


/* ========================================= */
/* 6. BOTÓN DE WHATSAPP FLOTANTE (Con Glifo Centrado) */
/* ========================================= */
.whatsapp-flotante {
    position: fixed;
    bottom: 25px; 
    right: 25px; 
    
    display: flex;
    align-items: center;
    justify-content: flex-end; 
    gap: 15px; 
    
    z-index: 3000; 
    text-decoration: none;
    cursor: pointer; 
}

/* El BOTÓN VERDE CIRCULAR que contiene el ícono */
.whatsapp-button-circle {
    background-color: #25d366;
    color: white; 
    width: 60px; 
    height: 60px;
    border-radius: 50%; 
    
    /* PROPIEDADES CRÍTICAS PARA EL CENTRADO DEL GLIFO */
    display: flex; 
    justify-content: center; 
    align-items: center; 
    
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, background-color 0.3s ease;
    flex-shrink: 0; 
}

.whatsapp-button-circle:hover {
    background-color: #128c7e;
    transform: scale(1.08);
}

/* El GLIFO de Font Awesome (dentro del círculo) */
.whatsapp-button-circle .fab {
    font-size: 28px; 
}


/* El BOCADILLO de texto (oculto por defecto en móvil) */
.whatsapp-bocadillo {
    display: none; 
    pointer-events: none; 
}


/* ========================================= */
/* 7. ADAPTACIÓN PARA ESCRITORIO (Media Query) */
/* ========================================= */
@media (min-width: 768px) {
    
    /* 7.1 HEADER: Estilo de Escritorio */
    .header-principal {
        padding: 18px 60px; 
    }
    
    .menu-toggle {
        display: none;
    }

    .menu-principal {
        position: static; 
        max-height: none; 
        overflow: visible;
        width: auto;
        box-shadow: none;
        background: none;
        margin-left: auto;
    }
    
    .menu-principal ul {
        flex-direction: row; 
        padding: 0;
        gap: 30px;
    }

    .menu-principal li {
        border-bottom: none;
        padding: 0;
    }
    
    .menu-principal a {
        position: relative;
    }
    
    .menu-principal a::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 0;
        height: 2px;
        background-color: var(--color-acento);
        transition: width 0.3s ease;
    }

    .menu-principal a:hover::after {
        width: 100%;
    }

    /* Mostrar iconos de la derecha */
    .header-iconos {
        display: flex; 
        gap: 30px;
        margin-left: 30px;
    }

    /* 7.2 HERO SECTION: Mejora de Tipografía y elementos */
    .hero-destacado {
        padding: 0 60px;
    }
    
    .hero-contenido .titulo-principal {
        font-size: 3.8rem; 
    }
    
    .hero-contenido .meta-info {
        display: flex; 
        gap: 15px;
        color: var(--color-texto-suave);
    }
    
    .hero-paginacion {
        display: flex; 
        position: absolute;
        right: 40px;
        flex-direction: column;
        gap: 15px;
    }

    .hero-paginacion .dot {
        width: 12px;
        height: 12px;
        background-color: rgba(255, 255, 255, 0.4);
        border-radius: 50%;
        cursor: pointer;
        transition: background-color 0.3s ease, transform 0.2s ease;
    }
    
    .hero-paginacion .dot:hover {
        background-color: var(--color-texto-claro);
    }

    .hero-paginacion .dot.active {
        background-color: var(--color-acento);
        transform: scale(1.2);
    }


    /* 7.3 GRID: Más columnas en escritorio */
    .grid-contenido {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); 
        gap: 30px; 
    }
    
    /* 7.4 WhatsApp: Estilo Bocadillo en Escritorio (Ajustado) */
    .whatsapp-flotante {
        bottom: 30px;
        right: 30px;
    }
    
    .whatsapp-button-circle {
        width: 70px;
        height: 70px;
    }

    .whatsapp-button-circle .fab {
        font-size: 32px;
    }
    
    .whatsapp-bocadillo {
        display: block; 
        background-color: white;
        color: #333; 
        font-family: var(--fuente-principal);
        font-size: 16px;
        font-weight: 500;
        padding: 12px 20px;
        border-radius: 8px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        pointer-events: auto;
        line-height: 1.25;
        transition: all 0.2s ease;
    }

    .whatsapp-bocadillo:hover {
        background-color: #f0f0f0;
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    }
}