/* VARIABLES DE COLOR - LA PALETA SELECCIONADA */
:root {
    --bg-primary: #1a1d21;      /* El gris oscuro de tu foto */
    --bg-secondary: #25282d;    /* Un gris un toque más claro para las tarjetas */
    --text-main: #e0e0e0;       /* Blanco suave para no cansar la vista */
    --text-muted: #909090;      /* Gris para fechas e info secundaria */
    --accent-red: #e50914;      /* El rojo vibrante de cartelera/streaming */
    --accent-red-hover: #b20710;/* Rojo oscuro para cuando pasas el mouse */
}

/* RESETEO BÁSICO GENERAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
}

/* BARRA DE NAVEGACIÓN */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-secondary);
    padding: 15px 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid #2d3137;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

.red-text {
    color: var(--accent-red);
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-red);
}

/* BUSCADOR */
.search-box input {
    background-color: var(--bg-primary);
    border: 1px solid #3d424a;
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.btn-search {
    background-color: var(--accent-red);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-search:hover {
    background-color: var(--accent-red-hover);
}

/* PORTADA PRINCIPAL (HERO) - AJUSTADA */
.hero-section {
    position: relative;
    background: linear-gradient(rgba(26, 29, 33, 0.7), rgba(26, 29, 33, 1)), 
                url('img/fondo1.webp') no-repeat center center/cover;
    
    /* 1. CAMBIAMOS LA ALTURA: De 65vh la subimos a 85vh para que sea mucho más imponente */
    height: 85vh; 
    
    /* 2. REFORZAMOS EL CENTRADO: Asegura que la imagen se acomode bien sin importar la pantalla */
    background-position: center top; /* Si notas que tapa cabezas, podés probar con 'center center' o 'center 20%' */
    background-size: cover;
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4%;
}

.hero-content {
    max-width: 600px;
    text-align: left;
    margin: 0 auto 0 4%; /* Empuja el contenido un poco a la izquierda pero centrado */
}

/* ESTILO DE LAS FLECHAS */
.slider-arrow {
    background-color: rgba(0, 0, 0, 0.4); /* Fondo negro transparente */
    color: white;
    border: none;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%; /* Las hace redondas */
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s, color 0.3s;
    z-index: 10;
}

.slider-arrow:hover {
    background-color: var(--accent-red); /* Se vuelve roja al pasar el mouse */
    color: white;
}

/* El resto del contenido Hero queda igual */
.badge {
    background-color: var(--accent-red);
    color: white;
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 4px;
    margin-bottom: 15px;
}

.hero-content h1 {
    font-size: 42px;
    margin-bottom: 10px;
    color: #ffffff;
    line-height: 1.2;
}

.meta-info {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 15px;
}

.description {
    margin-bottom: 25px;
    color: #cccccc;
}

.hero-buttons button {
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 15px;
    border: none;
    transition: transform 0.2s, background 0.3s;
}

.btn-primary {
    background-color: var(--accent-red);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-red-hover);
    transform: scale(1.03);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--bg-primary);
}
/* SECCIÓN DE NOTICIAS (GRID DE TARJETAS) */
.container {
    padding: 40px 8%;
}

.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    border-left: 5px solid var(--accent-red);
    padding-left: 15px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #2d3137;
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.card-content {
    padding: 20px;
}

.card-category {
    color: var(--accent-red);
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.news-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: white;
}

.news-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 15px;
}

.read-more {
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.read-more:hover {
    color: var(--accent-red);
}
/* ==========================================================================
   DISEÑO DE ARTÍCULOS EN DOS COLUMNAS (MAIN CONTENT + SIDEBAR)
   ========================================================================== */

/* Contenedor que activa la grilla: 1fr (columna grande izquierda) y 350px (fijo derecha) */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-top: 30px;
    align-items: start;
}

/* Columna izquierda: se asegura que los textos tengan buena lectura */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-text p {
    color: #e0e0e0;
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* Columna derecha: contenedor del Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
}

/* Estilos de la Publicidad Falsa */
.ad-box {
    text-align: center;
}

.ad-label {
    display: block;
    font-size: 11px;
    color: #666;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.ad-banner {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #222, #333);
    border: 2px dashed #444;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 14px;
    border-radius: 4px;
}

/* Lista de mini publicaciones sugeridas */
.widget-title {
    color: white;
    font-size: 20px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent-red);
    padding-bottom: 8px;
}

.mini-post {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    align-items: center;
}

.mini-post img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.mini-post a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    transition: color 0.2s;
}

.mini-post a:hover {
    color: var(--accent-red);
}

/* RESPONSIVE: Si la pantalla es chica (celular), pasa todo a una sola columna */
@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
}
/* ==========================================
   GRILLA Y TARJETAS DE CARTELERA (Index)
   ========================================== */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Crea columnas compactas */
    gap: 20px;
    margin-top: 25px;
}

.movie-card {
    background-color: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #2a2a2a;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: #ff0000;
}

.poster-box {
    position: relative;
    width: 100%;
    height: 260px; /* Tamaño controlado del cartel */
    display: block;
    overflow: hidden;
}

.poster-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.85);
    color: #ffcc00; /* Color amarillo estrella */
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
}

.movie-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.movie-genre {
    color: #ff0000;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.movie-info h3 {
    font-size: 15px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.movie-info h3 a {
    color: #ffffff !important;
    text-decoration: none;
}

.release-date {
    color: #888888;
    font-size: 12px;
    margin-bottom: 12px;
}

.btn-movie-detail {
    margin-top: auto;
    display: block;
    text-align: center;
    background-color: #262626;
    color: #ffffff !important;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.btn-movie-detail:hover {
    background-color: #ff0000;
}

/* ==========================================
   SECCIÓN DE TRÁILER Y BOTONES DE IDIOMA
   ========================================== */
.trailer-section {
    margin-top: 25px;
}

.trailer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.trailer-buttons {
    display: flex;
    gap: 8px;
}

.btn-lang {
    background-color: #262626;
    color: #ffffff;
    border: 1px solid #444;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.btn-lang:hover {
    background-color: #ff0000;
    border-color: #ff0000;
}

.btn-lang.active {
    background-color: #ff0000;
    border-color: #ff0000;
}

/* Contenedor adaptativo 16:9 sin bordes negros */
.trailer-container {
    position: relative;
    width: 100%;
    max-width: 850px;
    aspect-ratio: 16 / 9; /* Mantiene la proporción perfecta de cine/YouTube */
    background-color: #000;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #333;
}

.trailer-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ==========================================
   ESTILOS DE BARRA DE FILTROS
   ========================================== */
.filters-bar {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
    background-color: #1a1a1a;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 14px;
}

.filter-select {
    background-color: #262626;
    color: #ffffff;
    border: 1px solid #444;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.filter-select:focus {
    border-color: #ff0000;
}

/* FIJAR ALINEACIÓN DEL HERO SLIDER */
.hero-section {
    display: flex;
    align-items: flex-end; /* Alinea el contenido desde abajo de forma fija */
    padding-bottom: 50px;  /* Altura constante desde la base */
    min-height: 500px;     /* Mantener la altura del slider uniforme */
}

.hero-content {
    max-width: 650px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Título con altura mínima uniforme */
.hero-content h1 {
    min-height: 70px;      /* Reserva el espacio para 1 o 2 líneas sin mover el diseño */
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

/* Descripción con altura fija retenida */
.hero-content .description {
    min-height: 65px;      /* Mantiene 3 líneas retenidas para que no empuje los botones */
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 20px;
}

/* 1. SECCIÓN HERO CONTENEDORA RELATIVA */
.hero-section {
    position: relative;       /* Permite ubicar las flechas relativas a esta caja */
    min-height: 520px;
    display: flex;
    align-items: center;
    padding: 0 70px;          /* Espacio a los costados para no pisar las flechas */
}

/* 2. ETIQUETA ROJA AJUSTADA AL TEXTO */
.hero-content .badge, 
#hero-badge {
    display: inline-block !important;
    width: fit-content !important; /* Ajusta el fondo rojo solo al tamaño de la palabra */
    padding: 6px 14px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 4px;
    margin-bottom: 12px;
}

/* 3. FLECHAS EN EL CENTRO VERTICAL EXACTO */
.arrow-left, 
.arrow-right {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 20;
    cursor: pointer;
}

.arrow-left { left: 25px !important; }
.arrow-right { right: 25px !important; }

.hero-section {
    position: relative;
}

/* Capa de degradado inferior */
.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, transparent, #121212);
    pointer-events: none;
    z-index: 1;
}

/* Asegurar que el texto y los botones queden por encima del degradado */
.hero-content, .arrow-left, .arrow-right {
    position: relative;
    z-index: 2;
}

/* Adaptar altura del slider a la pantalla y cubrir el espacio completo */
.hero-section {
    min-height: 80vh; /* Ocupa el 80% del alto de la pantalla */
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    display: flex;
    align-items: center;
}

/* Posicionamiento del póster para el botón me gusta */
.poster-box {
    position: relative;
    display: block;
}

/* Botón flotante de corazón */
.btn-fav {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 10;
}

.btn-fav:hover {
    transform: scale(1.15);
    background: rgba(0, 0, 0, 0.9);
}

.red-text {
    color: #ff0000;
}

/* Asegurar fondo oscuro en todas las páginas */
body {
    background-color: #1a1d24;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

/* Corregir colores de los enlaces del menú superior */
nav a, nav a:visited {
    color: #e0e0e0 !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

nav a:hover, nav a.active {
    color: #ff0000 !important;
}

/* Botón flotante de me gusta (Movido a la IZQUIERDA) */
.btn-fav {
    position: absolute;
    top: 10px;
    left: 10px; /* Izquierda para no pisar la estrella */
    right: auto;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 10;
}

.btn-fav:hover {
    transform: scale(1.15);
    background: rgba(0, 0, 0, 0.95);
}

/* Fondo oscuro global */
html, body {
    background-color: #1a1d24 !important;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

/* Alineación y separación entre los botones del menú superior */
header nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

header nav a, header nav a:visited {
    color: #e0e0e0 !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

header nav a:hover, header nav a.active {
    color: #ff0000 !important;
}

/* Grilla para adaptar las tarjetas */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    width: 100%;
    margin-top: 20px;
}

.movie-card {
    background: #222630;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
}

.movie-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

/* Fondo oscuro global */
html, body {
    background-color: #1a1d24 !important;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

/* Alineación y separación entre los botones del menú superior */
header nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

header nav a, header nav a:visited {
    color: #e0e0e0 !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

header nav a:hover, header nav a.active {
    color: #ff0000 !important;
}

/* Grilla del catálogo y favoritos */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    width: 100%;
    margin-top: 20px;
}

/* Tarjeta individual */
.movie-card {
    background: #222630;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
}

/* Control del tamaño de los posters */
.movie-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

/* ==========================================================
   HEADER Y NAVEGACIÓN UNIFICADA (ALTURA Y TAMAÑO FIJO)
   ========================================================== */
header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 70px !important; /* Altura fija estandarizada para TODAS las páginas */
    padding: 0 5% !important;
    background-color: #14171d !important;
    border-bottom: 1px solid #222630 !important;
    box-sizing: border-box !important;
}

header .logo {
    display: flex;
    align-items: center;
}

header .logo h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

header nav {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important; /* Separación fija e igual en todas las páginas */
    margin: 0 !important;
    padding: 0 !important;
}

header nav a, header nav a:visited {
    color: #e0e0e0 !important;
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    transition: color 0.2s ease !important;
    line-height: 1 !important;
}

header nav a:hover, header nav a.active {
    color: #ff0000 !important;
}

/* BUSCADOR (TAMAÑO Y POSICIÓN FIJA) */
header .search-box {
    display: flex !important;
    align-items: center !important;
    height: 38px !important;
}

header .search-box input {
    background: #1f232d !important;
    border: 1px solid #333846 !important;
    border-right: none !important;
    border-radius: 4px 0 0 4px !important;
    color: #fff !important;
    padding: 0 12px !important;
    height: 100% !important;
    font-size: 14px !important;
    outline: none !important;
    box-sizing: border-box !important;
}

header .search-box button {
    background: #e50914 !important;
    border: none !important;
    border-radius: 0 4px 4px 0 !important;
    color: #fff !important;
    padding: 0 16px !important;
    height: 100% !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

header .search-box button:hover {
    background: #b80710 !important;
}

.search-box input {
    background: #1f232d;
    border: 1px solid #333846;
    border-radius: 4px 0 0 4px;
    color: #fff;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
}

.search-box button {
    background: #e50914; /* Rojo oficial PlanetCine */
    border: none;
    border-radius: 0 4px 4px 0;
    color: #fff;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-box button:hover {
    background: #b80710;
}

/* VENTANA MODAL DE CONFIRMACIÓN (VACIAR LISTA) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.modal-content {
    background: #222630;
    border: 1px solid #333846;
    border-radius: 10px;
    padding: 25px 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.modal-content h3 {
    margin-top: 0;
    color: #fff;
    font-size: 20px;
}

.modal-content p {
    color: #a0a5b5;
    font-size: 14px;
    margin-bottom: 25px;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-cancelar {
    background: #2a2e39;
    border: 1px solid #444;
    color: #fff;
    padding: 9px 18px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-confirmar {
    background: #e50914;
    border: none;
    color: #fff;
    padding: 9px 18px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.btn-confirmar:hover {
    background: #b80710;
}

/* =======================================================
   ADAPTACIÓN PARA DISPOSITIVOS MÓVILES (RESPONSIVE DESIGN)
   ======================================================= */

/* 1. TABLETS Y PANTALLAS MEDIANAS (Hasta 768px) */
@media (max-width: 768px) {
    /* Header / Navegación */
    header, nav, .navbar {
        flex-direction: column;
        gap: 12px;
        padding: 12px 15px;
        text-align: center;
    }

    .nav-links, .filter-bar, .search-box {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .search-box input {
        width: 100%;
    }

    /* Portada / Hero Slider */
    .hero-section {
        min-height: 420px;
        padding: 30px 15px;
        align-items: flex-end;
    }

    .hero-content h1 {
        font-size: 24px;
        line-height: 1.2;
    }

    .hero-content .description {
        font-size: 14px;
        line-clamp: 3;
        -webkit-line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .hero-buttons .btn-primary, 
    .hero-buttons .btn-secondary {
        width: 100%;
        text-align: center;
    }

    /* Grillas de Películas y Series (2 columnas en móvil) */
    .movies-grid, 
    .series-grid, 
    #favoritos-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 10px;
    }

    .movie-card h3 {
        font-size: 13px;
    }

    .movie-genre, .release-date {
        font-size: 11px;
    }

    /* Vista de Detalle (pelicula.html) */
    #movie-details-container {
        flex-direction: column !important;
        align-items: center;
        text-align: center;
        padding: 15px;
    }

    #movie-details-container img {
        max-width: 200px !important;
        margin: 0 auto 15px auto;
    }

    .trailer-header {
        flex-direction: column;
        gap: 10px;
    }

    .trailer-buttons {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .trailer-container {
        position: relative;
        padding-bottom: 56.25%; /* Relación de aspecto 16:9 */
        height: 0;
        overflow: hidden;
    }

    .trailer-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: 0;
    }
}

/* 2. CELULARES PEQUEÑOS (Hasta 480px) */
@media (max-width: 480px) {
    .movies-grid, 
    .series-grid, 
    #favoritos-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* Mantiene 2 pósters limpios por fila */
        gap: 10px !important;
    }

    .hero-content h1 {
        font-size: 20px;
    }

    .hero-content .meta-info {
        font-size: 12px;
    }
    
    .btn-movie-detail {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* ==========================================
   CABECERA DE TARJETA CON 3 PUNTOS Y POPOVER
   ========================================== */
.card-type-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 8px;
}

.btn-dots {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease;
}

.btn-dots:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.generos-popover {
    display: none;
    position: absolute;
    top: 26px;
    right: 0;
    background: #1f232c;
    border: 1px solid #ff0000;
    border-radius: 6px;
    padding: 10px;
    width: 180px;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.generos-popover.active {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

.generos-popover strong {
    display: block;
    font-size: 11px;
    color: #ff0000;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.generos-popover p {
    font-size: 12px;
    color: #ddd;
    margin: 0;
    line-height: 1.3;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* BARRA DE FILTROS */
.filters-bar {
    display: flex;
    justify-content: space-between; /* Separa filtros a la izquierda y paginación a la derecha */
    align-items: center;
    background-color: #1a1a1a;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-group select {
    background-color: #2a2a2a;
    color: #fff;
    border: 1px solid #3a3a3a;
    padding: 8px 12px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

/* CONTROLES DE PAGINACIÓN DERECHA */
.pagination-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn {
    background-color: #2a2a2a;
    color: #ffffff;
    border: 1px solid #3a3a3a;
    min-width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #e50914;
    border-color: #e50914;
}

.pagination-btn.active {
    background-color: #e50914;
    border-color: #e50914;
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-info {
    font-size: 13px;
    color: #aaa;
    margin: 0 8px;
}