/*
Theme Name: Enfold Child
Description: A Premium Streaming Platform Child Theme for Enfold
Template: enfold
Version: 1.1.0
*/

/* --- PREMIUM DESIGN SYSTEM: GIMNASIO MODERNO --- */
:root {
    --bg-dark: #262626;
    --bg-card: #141414;
    --accent: #f58220; /* Gimnasio Moderno Orange */
    --secondary: #006837; /* Gimnasio Moderno Green */
    --text-main: #ffffff;
    --text-dim: #a3a3a3;
    --glass: rgba(255, 255, 255, 0.05);
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Base resets for Streaming Look */
body {
    background-color: var(--bg-dark) !important;
    color: var(--text-main) !important;
    font-family: 'Inter', sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .bebas-font {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 900 !important;
    letter-spacing: -0.5px;
}

.hero-title, .archive-series-page h1 {
    font-family: 'Bebas Neue', cursive !important;
    letter-spacing: 2px;
    text-transform: none;
}

#main, .main_color, .alternate_color, .header_color {
    background-color: var(--bg-dark) !important;
    color: var(--text-main) !important;
    border: none !important;
}

/* --- HEADER PREMIUM --- */
#header {
    background: transparent !important;
    transition: var(--transition);
}

#header.header-scrolled {
    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(10px);
}

.av-main-nav > li > a {
    color: var(--text-main) !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0.5px !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 15px !important;
}

.av-main-nav > li > a:hover .avia-menu-text {
    color: var(--accent) !important;
}

/* --- CARDS & GRID --- */
.series-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.series-card:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border-color: var(--secondary); /* Green highlight on hover */
}

.card-thumb img {
    transition: var(--transition);
}

.series-card:hover .card-thumb img {
    filter: brightness(1.1);
}

/* --- BUTTONS --- */
.streaming-btn {
    background-color: var(--accent);
    color: white !important;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 14px;
}

.streaming-btn:hover {
    background-color: #f40612;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 9, 20, 0.4);
}

/* --- FOOTER --- */
#footer {
    background: #000 !important;
    padding: 80px 0 40px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#socket {
    background: #000 !important;
    border: none !important;
    color: var(--text-dim) !important;
}

/* Hide Enfold default borders */
.container_wrap, .container_wrap_logo, .container_wrap_menu {
    border: none !important;
}

/* --- HEADER REFINEMENTS --- */
.av-premium-streaming #header_main, 
.av-premium-streaming #header_main_alternate, 
.av-premium-streaming #header_meta,
.av-premium-streaming .header_bg {
    background: transparent !important;
    border: none !important;
}

.av-premium-streaming #header {
    position: absolute !important;
    background: transparent !important;
    border: none !important;
}

.av-premium-streaming.header-scrolled #header_bg {
    background: rgba(0,0,0,0.95) !important;
    opacity: 1 !important;
}

.av-premium-streaming #main {
    background-color: var(--bg-dark) !important;
}

/* Fix for the white bar in the screenshot */
#wrap_all {
    background-color: var(--bg-dark) !important;
}

.av-premium-streaming .av-main-nav-wrap {
    margin-right: 40px;
}

.av-premium-streaming #header_main {
    padding: 10px 0;
}

.av-premium-streaming #header_bg {
    background-color: transparent !important;
    opacity: 0;
}

.av-premium-streaming .header-scrolled #header_bg {
    background-color: rgba(0,0,0,0.9) !important;
    opacity: 1;
}

/* --- LOGO SIZE --- */
.logo img {
    max-height: 85px !important;
    width: auto !important;
    padding: 5px 0 !important;
}

/* --- FOOTER REFINEMENTS --- */
.av-premium-streaming #footer {
    text-align: center;
}

.av-premium-streaming #footer .widget {
    margin-bottom: 20px;
}

.av-premium-streaming #footer .widgettitle {
    color: var(--accent);
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 2px;
}

/* --- LO MÁS VISTO (TOP 5) SECTION --- */
.top-5-section {
    margin-bottom: 60px;
    position: relative;
    z-index: 20;
}

.top-5-title-container {
    margin-bottom: 25px;
}

.top-5-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 10px 0;
}

@media (max-width: 1024px) {
    .top-5-list {
        display: flex;
        overflow-x: auto;
        padding-bottom: 25px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 20px;
    }
    .top-5-item {
        min-width: 200px; /* Adjusted for wider vertical posters on mobile */
        scroll-snap-align: start;
    }
}

.top-5-item {
    position: relative;
    display: flex;
    align-items: flex-end;
    height: 330px; /* Increased row height to prevent text cut-off at the bottom */
}

@media (max-width: 1024px) {
    .top-5-item {
        height: 290px; /* Increased mobile row height */
    }
}

.top-5-number {
    font-size: 240px;
    font-family: 'Bebas Neue', sans-serif !important;
    font-weight: 900;
    line-height: 0.72;
    color: #4d4d4d; /* Solid flat gray */
    position: absolute;
    left: -15px;
    bottom: -15px;
    z-index: 1;
    user-select: none;
    transition: var(--transition);
}

@media (max-width: 1024px) {
    .top-5-number {
        font-size: 190px;
        left: -10px;
        bottom: -10px;
    }
}

.top-5-item:hover .top-5-number {
    color: #ff6600; /* Solid brand orange on hover */
}

.top-5-card {
    position: relative;
    z-index: 2;
    margin-left: 70px; /* Offset the thumbnail to make space for the number */
    width: 150px;      /* Increased card width to match 2:3 movie poster format on desktop */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

@media (max-width: 1024px) {
    .top-5-card {
        margin-left: 55px;
        width: 130px;  /* Increased card width to match 2:3 movie poster format on mobile */
    }
}

.top-5-thumb {
    width: 100%;       /* Inherit width from the constrained card parent */
    height: 220px;     /* Explicit height on desktop */
    background: #141414;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

@media (max-width: 1024px) {
    .top-5-thumb {
        height: 190px; /* Explicit height on mobile */
    }
}

.top-5-item:hover .top-5-thumb {
    transform: scale(1.05);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.9);
    border-color: var(--secondary);
}



.top-5-no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    background: #1a1a1a;
    font-size: 0.9rem;
}

.top-5-info {
    margin-top: 10px;
    padding: 0 5px;
}

.top-5-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-5-parent {
    font-size: 0.85rem;
    color: var(--accent);
    margin-top: 4px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- BADGES RECIÉN AGREGADO --- */
.badge-new {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background-color: #e50914; /* Netflix Red */
    color: #fff !important;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 2px;
    z-index: 5;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
    line-height: 1;
}

.card-thumb {
    position: relative;
}

.episode-thumb {
    position: relative;
}

.card-meta a {
    color: var(--accent) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: var(--transition);
}

.card-meta a:hover {
    color: #fff !important;
}

/* Spinner for infinite scroll loader */
.catalog-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: catalog-spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes catalog-spin {
    to { transform: rotate(360deg); }
}

.series-card h3, 
.series-card h4, 
.episode-card h4, 
.top-5-title {
    text-transform: none !important;
}

/* Remove Enfold default vertical separator lines/borders on streaming pages */
.streaming-template .content, 
.streaming-template .sidebar,
.streaming-template .container,
.streaming-template #main,
.streaming-template .entry-content-wrapper {
    border: none !important;
    border-right: none !important;
    border-left: none !important;
    box-shadow: none !important;
}

