/* carousel.css */
:root {
    --primary-blue: #4A90E2;
    --dark-blue: #2C3E50;
    --light-bg: #E8F4F8;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Video Carousel Section */
.video-carousel-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, var(--light-bg) 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--dark-blue);
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-header p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Carousel Container */
.carousel-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.carousel-wrapper {
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.video-carousel {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Video Cards */
.video-card {
    flex: 0 0 25%;
    padding: 1rem;
    opacity: 0.7;
    transform: scale(0.9);
    transition: all var(--transition-speed) ease;
}

.video-card.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.video-card.next,
.video-card.prev {
    opacity: 0.8;
    transform: scale(0.95);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 1.25rem;
    background: var(--dark-blue);
}

.video-thumbnail iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(74, 144, 226, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    opacity: 0;
}

.video-thumbnail:hover .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 0 0.5rem;
}

.video-info h4 {
    color: var(--dark-blue);
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.video-info p {
    color: #666;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    margin-bottom: 0.75rem;
}

.video-date {
    color: var(--primary-blue);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.video-date::before {
    content: '📅';
    margin-right: 0.5rem;
}

/* Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: var(--primary-blue);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:focus {
    outline: 2px solid var(--dark-blue);
    outline-offset: 2px;
}

.prev-btn {
    left: 0;
}

.next-btn {
    right: 0;
}

/* Dots Indicator */
.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 0.75rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    position: relative;
}

.dot.active {
    background: var(--primary-blue);
    transform: scale(1.2);
}

.dot:hover:not(.active) {
    background: var(--dark-blue);
}

/* Responsive Design */
@media (max-width: 992px) {
    .video-card {
        flex: 0 0 33.333%;
    }
}

@media (max-width: 768px) {
    .video-card {
        flex: 0 0 50%;
    }
    
    .carousel-container {
        padding: 0 1.5rem;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .video-card {
        flex: 0 0 100%;
    }
    
    .video-carousel-section {
        padding: 2.5rem 0;
    }
    
    .carousel-container {
        padding: 0 1rem;
    }
    
    .carousel-btn {
        display: none;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .video-carousel,
    .video-card,
    .carousel-btn,
    .play-overlay {
        transition: none !important;
    }
    
    .dot.active::after {
        animation: none !important;
    }
}

/* Focus styles for keyboard navigation */
.video-card:focus-within {
    outline: 2px solid var(--primary-blue);
    outline-offset: 5px;
    border-radius: 12px;
}