/**
 * Video Banner Section Styles
 * Premium design for video showcase
 * Optimized for performance
 * 
 * @package StreamBox
 */

/* ===============================================
   VIDEO BANNER CAROUSEL (TOP LEVEL)
   =============================================== */

.video-banner-carousel {
    margin: 4rem auto;
    padding: 3rem 2rem;
    position: relative;
    max-width: 1400px;
    min-height: 550px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 100px rgba(139, 92, 246, 0.15);
    overflow: hidden;
}

.video-banner-carousel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 150%;
    background: radial-gradient(ellipse at center, rgba(157, 78, 255, 0.15) 0%, rgba(123, 47, 255, 0.1) 30%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Remove old video-banner-section styling */
.video-banner-section {
    margin: 0;
    padding: 0;
}

.video-banner-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===============================================
   BANNER CONTENT LAYOUT
   =============================================== */

.video-banner-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    align-items: center;
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: none;
    overflow: visible;
    position: relative;
    margin: auto;
}

.video-banner-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
}

/* ===============================================
   VIDEO PLAYER
   =============================================== */

.video-player-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: visible;
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    align-self: center;
}

.video-player-frame {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio - proper video size */
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
}

.video-player-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Video Placeholder */
.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.3);
}

.video-placeholder svg {
    opacity: 0.3;
}

.video-placeholder p {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

/* Video Overlay */
.video-banner-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 5;
}

.video-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 100px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.6);
    }
}

/* ===============================================
   VIDEO INFO SECTION
   =============================================== */

.video-banner-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: center;
    height: 100%;
}

.video-banner-info-inner {
    max-width: 100%;
}

/* Category */
.video-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    margin-bottom: 1.5rem;
}

.category-icon {
    font-size: 18px;
}

.category-text {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Title */
.video-banner-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 1rem;
    letter-spacing: -0.5px;
}

.video-banner-title a {
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.video-banner-title a:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Excerpt */
.video-banner-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 1.5rem;
}

/* Meta Info */
.video-banner-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
}

.meta-rating {
    color: #fbbf24;
    font-weight: 700;
}

.meta-rating svg {
    color: #fbbf24;
}

.meta-year,
.meta-genres {
    padding: 0.375rem 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Action Buttons */
.video-banner-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-watch-now,
.btn-more-info {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 100px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-watch-now {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: #fff;
    border: 1px solid rgba(139, 92, 246, 0.5);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.btn-watch-now::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.btn-watch-now:hover::before {
    left: 100%;
}

.btn-watch-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.5);
}

.btn-more-info {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-more-info:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* ===============================================
   SKELETON LOADING STATE
   =============================================== */

.video-banner-skeleton {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
    padding: 2rem;
}

.video-skeleton-player {
    aspect-ratio: 16 / 9;
    border-radius: 16px;
}

.video-skeleton-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */

@media (max-width: 1024px) {
    .video-banner-carousel {
        margin: 3rem auto;
        padding: 2rem 1.5rem;
        min-height: 450px;
    }
    
    .video-banner-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }
    
    .video-banner-skeleton {
        grid-template-columns: 1fr;
    }
    
    .video-banner-title {
        font-size: 32px;
    }
}

/* Mobile/Tablet - Compact video only mode */
@media (max-width: 991.98px) {
    .video-banner-carousel {
        margin: 0 !important;
        padding: 0 !important;
        min-height: auto !important;
        height: auto !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5) !important;
        overflow: hidden !important;
    }
    
    .video-banner-content {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        padding: 0 !important;
    }
    
    /* Non-active slides collapse */
    .video-banner-content:not(.active) {
        position: absolute !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    .video-banner-content.active {
        position: relative !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .video-banner-skeleton {
        display: none !important;
    }
    
    .video-banner-title,
    .video-banner-excerpt,
    .video-banner-meta,
    .video-banner-actions,
    .video-banner-info,
    .video-banner-overlay,
    .video-type-badge {
        display: none !important;
    }
    
    .video-player-frame {
        border-radius: 12px !important;
    }
}

@media (max-width: 768px) {
    .video-banner-carousel {
        margin: 0 !important;
        padding: 0 !important;
        min-height: auto !important;
        border-radius: 12px !important;
    }
    
    .video-banner-content {
        padding: 0 !important;
    }
    
    .video-player-frame {
        border-radius: 12px !important;
    }
}

@media (max-width: 640px) {
    .video-banner-carousel {
        margin: 0 !important;
        padding: 0 !important;
        min-height: auto !important;
        border-radius: 10px !important;
    }
    
    .video-banner-content {
        gap: 0 !important;
        padding: 0 !important;
    }
    
    .video-player-frame {
        border-radius: 10px !important;
    }
}

/* ===============================================
   ANIMATIONS
   =============================================== */

@keyframes videoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.video-banner-content {
    animation: videoFadeIn 0.6s ease-out;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .video-banner-content,
    .video-type-badge,
    .btn-watch-now,
    .btn-more-info {
        animation: none;
        transition: none;
    }
}
