/**
 * IMAR Group - Video Carousel Styles
 * File: Imar-Group-Website/css/video-carousel.css
 */

/* ========================================
   VIDEO CAROUSEL SECTION
======================================== */
.video-carousel-section {
    min-height: 60vh;
    padding: 140px 5% 60px;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    position: relative;
}

.video-carousel-header {
    text-align: center;
    margin-bottom: 40px;
}

.video-carousel-header h1 {
    color: white;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin: 0;
}

.video-carousel-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-top: 10px;
}

/* Carousel Wrapper */
.video-carousel-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

/* Carousel Container */
.video-carousel {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 10px 0;
}

.video-carousel::-webkit-scrollbar {
    display: none;
}

/* Video Item */
.video-item {
    flex: 0 0 380px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-item:hover {
    transform: translateY(-10px);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.video-item:hover .video-thumbnail img {
    transform: scale(1.1);
}

/* Play Button */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #10b981;
    transition: all 0.3s ease;
}

.video-item:hover .play-button {
    background: #3b82f6;
    color: white;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Video Duration */
.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

/* Featured Badge */
.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #fbbf24;
    color: #78350f;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.video-item h3 {
    color: white;
    font-size: 1.1rem;
    margin-top: 15px;
    line-height: 1.4;
    font-weight: 600;
}

/* Carousel Navigation Buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.carousel-prev {
    left: -25px;
}

.carousel-next {
    right: -25px;
}

.carousel-nav:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.5);
}

.indicator.active {
    width: 32px;
    border-radius: 6px;
    background: white;
}

/* ========================================
   VIDEO POPUP MODAL
======================================== */
.video-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.video-popup.active {
    display: flex;
}

.video-popup .popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.video-popup-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: popupSlideIn 0.3s ease;
    z-index: 10000;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.video-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #1f2937;
    transition: all 0.3s;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-popup-close:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

.video-popup-body {
    display: flex;
    flex-direction: column;
}

/* Video Embed Container */
.video-embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Video Info Section */
.video-popup-info {
    padding: 30px;
}

.video-popup-info h2 {
    font-size: 28px;
    color: #1f2937;
    margin-bottom: 15px;
    line-height: 1.3;
}

.video-popup-info p {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Video Actions */
.video-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.video-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.video-action-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    transform: translateY(-2px);
}

.video-action-btn i {
    font-size: 18px;
}

/* Loading State */
.video-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: white;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 1024px) {
    .carousel-nav {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .carousel-prev {
        left: -15px;
    }
    
    .carousel-next {
        right: -15px;
    }
    
    .video-item {
        flex: 0 0 320px;
    }
}

@media (max-width: 768px) {
    .video-carousel-section {
        padding: 100px 3% 40px;
    }
    
    .video-carousel-header h1 {
        font-size: 2.5rem;
    }
    
    .video-item {
        flex: 0 0 280px;
    }
    
    .carousel-nav {
        display: none;
    }
    
    .video-popup-content {
        width: 95%;
        max-width: none;
    }
    
    .video-popup-info {
        padding: 20px;
    }
    
    .video-popup-info h2 {
        font-size: 22px;
    }
    
    .video-actions {
        flex-direction: column;
    }
    
    .video-action-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .video-carousel-section {
        padding: 80px 2% 30px;
    }
    
    .video-item {
        flex: 0 0 260px;
    }
    
    .play-button {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }
    
    .video-carousel-header h1 {
        font-size: 2rem;
    }
    
    .carousel-indicators {
        display: none;
    }
}
