/* Estilos personalizados para el popup */
.popup-overlay {
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
}

.popup-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #ff0000;
    box-shadow: 0 20px 50px rgba(255, 0, 0, 0.3);
    max-width: 500px;
    animation: popupFadeIn 0.5s ease-out forwards;
}

.premium-badge {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.glow-button {
    background: linear-gradient(45deg, #ff0000, #ff3333);
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.glow-button:hover {
    background: linear-gradient(45deg, #cc0000, #ff1a1a);
    box-shadow: 0 6px 25px rgba(255, 0, 0, 0.7);
    transform: translateY(-2px);
}

.crown-icon {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Animación de entrada del popup */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Estilos base */
body {
    background-color: #121212;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    scroll-behavior: smooth;
}

.navbar {
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
    min-height: 80px;
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #ff0000;
    transition: width 0.3s ease;
}

.nav-link:hover:after {
    width: 100%;
}

.nav-link:hover {
    color: #ff0000;
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

.btn-primary {
    background-color: #ff0000;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #ff3333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.btn-disabled {
    background: #4a5568;
    color: #a0aec0;
    cursor: not-allowed;
}

.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

.video-card {
    background-color: #1a1a1a;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 0, 0, 0.2);
}

.category-btn {
    transition: all 0.3s ease;
    background-color: #1a1a1a;
    border: 1px solid #333333;
}

.category-btn.active {
    background-color: #ff0000;
    color: white;
    border-color: #ff0000;
}

.category-btn:hover:not(.active) {
    border-color: #ff0000;
    color: #ff0000;
}

.pagination-btn {
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(.active) {
    color: #ff0000;
}

.pagination-btn.active {
    background-color: #ff0000;
    color: white;
}

.contact-input {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.contact-input:focus {
    border-color: #ff0000;
    box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.15);
}

/* YouTube container with correct 16:9 ratio */
.youtube-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

/* Featured video container with correct 16:9 ratio */
.featured-video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    max-height: none;
    padding-bottom: 0;
}

.youtube-container iframe,
.featured-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Banner con altura automática */
.featured-banner {
    width: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-bottom: 2px solid #ff0000;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    margin-bottom: 3rem;
}

.featured-banner img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    object-position: center;
}

/* NAVBAR LOGO */
.navbar-logo {
    height: 50px;
    width: auto;
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

/* Navbar container para mejor alineación */
.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

.navbar-brand {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
}

.navbar-links {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #121212;
}

::-webkit-scrollbar-thumb {
    background: #ff0000;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff3333;
}

.loader {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader div {
    width: 20px;
    height: 20px;
    background-color: #ff0000;
    border-radius: 50%;
    margin: 0 5px;
    animation: bounce 0.5s infinite alternate;
}

.loader div:nth-child(2) {
    animation-delay: 0.1s;
}

.loader div:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-10px);
    }
}

/* Description truncation and animation styles */
.description-wrapper {
    max-height: 3em;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}

.description-wrapper.expanded {
    max-height: 300px;
}

.fade-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0), rgba(26, 26, 26, 1));
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.description-wrapper.expanded .fade-gradient {
    opacity: 0;
}

.read-more {
    color: #ff0000;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    margin-top: 2px;
    display: inline-block;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #ff3333;
}

/* Mobile menu improvements */
.mobile-menu {
    background-color: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(12px);
}

/* Add media query for large screens */
@media (min-width: 1024px) {
    .navbar-logo {
        height: 60px;
    }
    .featured-banner {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        min-height: 350px;
        margin-bottom: 4rem;
    }
    .featured-banner img {
        max-height: 600px;
    }
}

/* Para móviles */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: row;
        justify-content: space-between;
    }
    .navbar-brand {
        justify-content: flex-start;
        flex: none;
    }
    .navbar-links {
        display: none;
    }
    .featured-banner {
        margin-bottom: 2rem;
    }
    .mobile-menu {
        border-top: 1px solid #ff0000;
    }
}

/* Estilos para el popup en móviles */
@media (max-width: 640px) {
    .popup-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .popup-content h2 {
        font-size: 1.75rem;
    }
}