* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0f0f0f;
    color: #fff;
    line-height: 1.6;
}

/* HEADER */
header {
    background: linear-gradient(to bottom, #000, transparent);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 5%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5em;
  font-weight: bold;
  color: #fff;
  font-size: 2rem;
}

.logo-img {
  height: 40px;
  width: auto;
  margin-right: 10px;
  border-radius: 25px;
}

.logo-text a {
  font-family: 'Poppins', sans-serif;
  letter-spacing: 1px;
  color: #9b8df5; /* puedes ajustar el color del texto */
  text-decoration: none;
  cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 1rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: #e50914;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    gap: 0.5rem;
}

.search-box input {
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    width: 200px;
    font-size: 0.95rem;
}

.search-box input {
    background-color: transparent !important;
    color: white !important;
}

.search-box input::placeholder {
    color: #bbb;
}

.search-box button {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
}

/* HERO SECTION */
.hero {
    height: 70vh;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), #0f0f0f), url('../assets/images/hero-bg.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    padding: 0 5%;
    margin-top: 60px;
}

.hero-content {
    max-width: 600px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    color: #ddd;
}

/* BUTTONS */
.btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
}

.btn-primary {
    background: #e50914;
    color: #fff;
}

.btn-primary:hover {
    background: #f40612;
    transform: scale(1.05);
}

.btn-secondary {
    background: rgba(109, 109, 110, 0.7);
    color: #fff;
    margin-left: 1rem;
}

.btn-secondary:hover {
    background: rgba(109, 109, 110, 0.9);
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

/* SECTIONS */
.section {
    padding: 3rem 5%;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title h2 {
    font-size: 1.8rem;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.ver-mas {
    color: #e50914;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

.ver-mas:hover {
    color: #f40612;
}

/* CONTAINER LAYOUT */
.container {
    display: flex;
    gap: 2rem;
    padding: 5rem 5% 3rem;
    max-width: 1600px;
    margin: 0 auto;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar h3 {
    margin-bottom: 1.5rem;
    color: #e50914;
}

.filtros-toggle {
    display: none;
    width: 100%;
    padding: 15px;
    background: var(--card-bg, #1a1a2e);
    border: none;
    color: var(--text-color, #fff);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 10px;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.filtros-toggle:hover {
    background: var(--primary-color, #e50914);
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.filtros-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #aaa;
    font-size: 0.9rem;
}

.filter-group select {
    width: 100%;
    padding: 0.6rem;
    background: #0f0f0f;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-size: 0.95rem;
}

.main-content {
    flex: 1;
}

/* LOADING */
.loading {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: #999;
}

.spinner {
    border: 4px solid rgba(255,255,255,0.1);
    border-left-color: #e50914;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

/* PAGINACIÓN */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination button {
    padding: 0.6rem 1rem;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

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

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

/* FOOTER */
footer {
    background: #000;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    color: #666;
}

footer p {
    margin: 0.5rem 0;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        padding: 9rem 5% 3rem;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        padding: 1rem 1rem;
    }
}

@media (max-width: 768px) {
    nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .section {
        padding: 2rem 3%;
    }
    
    .btn-secondary {
        margin-left: 0.5rem;
    }

    .container {
        flex-direction: column;
        padding: 9rem 5% 3rem;
    }

    /* Mostrar botón toggle en móviles */
    .filtros-toggle {
        display: flex;
    }
    
    /* Ocultar contenido de filtros por defecto en móviles */
    .filtros-content {
        display: none;
        animation: slideDown 0.3s ease;
    }
    
    /* Mostrar cuando está activo */
    .filtros-content.active {
        display: block;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }

    .section-title h2 {
        font-size: 1.4rem;
    }

    .section-header h1 {
        font-size: 2rem;
    }

    .container {
        flex-direction: column;
        padding: 12rem 5% 3rem;
    }

    nav {
        justify-content: center !important;
    }
}

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

@media (min-width: 769px) {
    .filtros-content {
        display: block !important;
    }

    .sidebar {
        padding: 1rem 1rem !important;
    }
}

/* CONTENIDO RELACIONADO */
.relacionados-section {
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.relacionados-section h3 {
    margin-bottom: 0.5rem;
    color: #e50914;
    font-size: 1.2rem;
}

.relacionados-subtitle {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}

.relacionados-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.relacionado-card {
    position: relative;
    padding-top: 1rem;
    margin-bottom: 1rem;
    overflow: hidden;
    border-top: 1px solid #333;
    transition: all 0.3s ease;
}

.relacionado-card:hover {
    background: rgba(229, 9, 20, 0.05);
}

.relacionado-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.relacionado-card img {
    float: left;
    width: 48px;
    height: 72px;
    margin-right: 1rem;
    border-radius: 6px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.relacionado-card:hover img {
    transform: scale(1.05);
}

.relacionado-content {
    overflow: hidden;
}

.relacionado-titulo {
    font-size: 0.95rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.relacionado-card:hover .relacionado-titulo {
    color: #e50914;
}

.relacionado-info {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #999;
}

.relacionado-badge {
    background: rgba(229, 9, 20, 0.2);
    color: #e50914;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.relacionado-descripcion {
    font-size: 0.9rem;
    color: #bbb;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Clearfix para los elementos flotantes */
.relacionado-card::after {
    content: "";
    display: table;
    clear: both;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .relacionados-section {
        padding: 1.5rem;
    }

    .relacionado-card img {
        width: 40px;
        height: 60px;
        margin-right: 0.75rem;
    }

    .relacionado-titulo {
        font-size: 0.9rem;
    }

    .relacionado-descripcion {
        font-size: 0.85rem;
        -webkit-line-clamp: 3;
    }

    .relacionado-info {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .relacionados-section {
        padding: 1rem;
    }

    .relacionado-card {
        padding-top: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .relacionado-card img {
        width: 36px;
        height: 54px;
    }

    .relacionado-titulo {
        font-size: 0.85rem;
    }

    .relacionado-info {
        font-size: 0.8rem;
    }

    .relacionado-descripcion {
        display: none; /* Ocultar descripción en móviles pequeños */
    }
}