/* ========================================= */
/* VARIABLES Y RESET                         */
/* ========================================= */
:root {
    --bg-base: #141414;
    --bg-surface: #1f1f1f;
    --text-main: #ffffff;
    --text-muted: #a3a3a3;
    --accent: #3fe5ed;
    --danger: #e50914;
    --transition: all 0.3s ease;
    --header-height: 80px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================= */
/* HEADER                                    */
/* ========================================= */
#main-header {
    position: fixed; 
    top: 0; 
    left: 0;
    width: 100%; 
    height: var(--header-height);
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000; 
    transition: var(--transition);
}

#main-header.scrolled {
    background: rgba(20, 20, 20, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.header-container {
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 0 4%;
    height: 100%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}

.logo-img { height: 45px; object-fit: contain; }

.main-nav { display: flex; gap: 2rem; }
.main-nav a {
    color: var(--text-muted); 
    text-decoration: none;
    font-weight: 600; 
    transition: var(--transition);
}
.main-nav a:hover, .main-nav a.active { color: var(--accent); }

/* ========================================= */
/* HERO Y REPRODUCTOR NGINX                  */
/* ========================================= */
.hero-section {
    /* Mantiene el contenido por debajo del header sticky */
    padding-top: calc(var(--header-height) + 40px); 
    padding-bottom: 60px;
    min-height: 100vh; 
    display: flex; 
    align-items: center;
    background: radial-gradient(circle at top right, rgba(63, 229, 237, 0.05) 0%, transparent 60%);
}

.hero-container {
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 0 4%;
    display: grid; 
    grid-template-columns: 1fr 1.5fr; 
    gap: 4rem; 
    align-items: center;
}

/* Columna de Texto */
.live-badge {
    display: inline-block; 
    background: rgba(229, 9, 20, 0.15);
    color: var(--danger); 
    padding: 0.3rem 0.8rem; 
    border-radius: 4px;
    font-size: 0.85rem; 
    font-weight: bold; 
    border: 1px solid rgba(229, 9, 20, 0.3);
    margin-bottom: 1.5rem; 
    animation: pulse 2s infinite;
}

@keyframes pulse { 
    0%, 100% { opacity: 1; } 
    50% { opacity: 0.6; } 
}

.hero-info h1 { 
    font-size: clamp(2.5rem, 4vw, 4rem); 
    line-height: 1.1; 
    margin-bottom: 1.5rem; 
}
.hero-info h1 span { color: var(--accent); }
.hero-info p { 
    color: var(--text-muted); 
    font-size: 1.1rem;
    max-width: 90%;
}

/* Columna Derecha (EPG + Reproductor) */
.hero-visuals {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

/* Módulo EPG (Ahora / Siguiente) */
.epg-module {
    display: flex; 
    justify-content: space-between;
    background: rgba(31, 31, 31, 0.8); 
    border-radius: 8px;
    border-left: 4px solid var(--accent); 
    border-top: 1px solid rgba(255,255,255,0.05);
    border-right: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 1.25rem 1.5rem;
    backdrop-filter: blur(10px);
}

.epg-now, .epg-next {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.epg-next {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 2rem;
    margin-left: 1rem;
}

.epg-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.epg-now h3, .epg-next h3 {
    font-size: 1.15rem;
    color: var(--text-main);
    margin: 0;
    line-height: 1.3;
}

.live-dot {
    width: 8px; height: 8px;
    background-color: var(--danger);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Reproductor de Video */
.video-wrapper {
    width: 100%; 
    aspect-ratio: 16 / 9; 
    background: #000;
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.video-js { width: 100% !important; height: 100% !important; }
.vjs-play-progress, .vjs-volume-level { background-color: var(--accent) !important; }
.vjs-big-play-button { border-color: var(--accent) !important; }

/* ========================================= */
/* CARRUSEL YOUTUBE VOD                      */
/* ========================================= */
.vod-section { max-width: 1400px; margin: 0 auto; padding: 4rem 4%; }
.section-header h2 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.section-header span { color: var(--text-muted); font-weight: normal; }
.section-header p { color: var(--text-muted); margin-bottom: 2rem; }

.carousel-wrapper { position: relative; display: flex; align-items: center; }
.carousel-track {
    display: flex; gap: 1.5rem; width: 100%; overflow-x: auto;
    scroll-behavior: smooth; scroll-snap-type: x mandatory;
    scrollbar-width: none; padding: 1rem 0;
}
.carousel-track::-webkit-scrollbar { display: none; }

.carousel-item {
    flex: 0 0 calc(25% - 1.125rem); scroll-snap-align: start;
    transition: transform var(--transition);
}
.carousel-item:hover { transform: translateY(-5px); z-index: 2; }

.yt-container {
    width: 100%; aspect-ratio: 16 / 9; background: var(--bg-surface);
    border-radius: 8px; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.yt-container iframe { width: 100%; height: 100%; border: none; }

.carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 45px; height: 45px; border-radius: 50%; border: none;
    background: rgba(20,20,20,0.8); color: var(--text-main);
    cursor: pointer; z-index: 10; font-size: 1.2rem; opacity: 0; transition: var(--transition);
}
.carousel-wrapper:hover .carousel-btn { opacity: 1; }
.carousel-btn:hover { background: var(--accent); color: var(--bg-base); }
.prev { left: -20px; } .next { right: -20px; }

/* ========================================= */
/* FOOTER CORREGIDO Y CENTRADO               */
/* ========================================= */
.main-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 3rem 4%; 
    margin-top: 4rem; 
    background-color: #0d0d0d;
}

.footer-content { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    gap: 1rem; 
    text-align: center; 
    width: 100%;
}

.footer-logo { 
    height: 40px; /* Obliga a mantener un tamaño pequeño */
    width: auto;
    max-width: 150px;
    object-fit: contain;
    opacity: 0.5; 
    filter: grayscale(100%); 
    transition: var(--transition); 
}
.footer-logo:hover { opacity: 1; filter: grayscale(0%); }
.footer-content p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

/* ========================================= */
/* RESPONSIVO                                */
/* ========================================= */
@media (max-width: 1100px) {
    .hero-container { grid-template-columns: 1fr; gap: 3rem; }
    .hero-info { order: 2; text-align: center; }
    .hero-info p { margin: 0 auto; }
    .hero-visuals { order: 1; }
    .carousel-item { flex: 0 0 calc(33.333% - 1rem); }
}

@media (max-width: 768px) {
    .epg-module { flex-direction: column; gap: 1rem; padding: 1rem; }
    .epg-next { border-left: none; padding-left: 0; margin-left: 0; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1rem; }
    .carousel-item { flex: 0 0 calc(50% - 0.75rem); }
    .carousel-btn { display: none; }
}

@media (max-width: 480px) {
    .carousel-item { flex: 0 0 85%; }
}