/* Video Carousel Styles */
.video-carousel-container {
    position: relative;
    max-width: 100%;
    margin: 20px 0;
}

/* Thumbnail Carousel */
.video-carousel-thumbnails {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #f8f9fa;
    padding: 20px;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-track {
    display: flex;
    transition: transform 0.3s ease-in-out;
    gap: 0;
}

.carousel-slide {
    flex: 0 0 auto;
    width: 100%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.carousel-slide:hover {
    transform: translateY(-5px);
}

.thumbnail-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.thumbnail-container:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.thumbnail-container:hover .play-overlay {
    opacity: 1;
}

.play-button {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: all 0.3s ease;
}

.play-button:hover {
    background: #fff;
    transform: scale(1.1);
}


/* Navigation Arrows */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #0D3C56;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-nav:hover {
    background: #0a2f42;
    color: #fff;
    box-shadow: 0 4px 12px rgba(13, 60, 86, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    display: flex;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90%;
    max-height: 800px;
    margin: auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.main-video-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
}

.main-video-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.main-video iframe {
    width: 100%;
    height: 100%;
    border: none;
    min-height: 400px;
}

.main-video video {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

/* VideoPress specific styles */
.main-video .wp-video {
    width: 100% !important;
    height: 100% !important;
}

.main-video .mejs-container {
    width: 100% !important;
    height: 100% !important;
    min-height: 400px !important;
}

/* Suggested Videos */
.suggested-videos {
    background: #0D3C56;
    padding: 20px;
    border-top: 1px solid #0a2f42;
}

.suggested-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.suggested-thumbnails {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    flex-wrap: nowrap;
}

.suggested-thumbnail {
    flex: 0 0 auto;
    width: 120px;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.suggested-thumbnail:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.suggested-thumbnail.active {
    border: 2px solid #fff;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
}

.suggested-thumbnail img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .carousel-slide {
        width: 100%;
    }

    .video-thumbnail {
        height: 150px;
    }

    .modal-content {
        width: 95%;
        height: 95%;
    }

    .suggested-thumbnails {
        gap: 15px;
        justify-content: center;
    }

    .suggested-thumbnail {
        width: 100px;
    }

    .suggested-thumbnail img {
        height: 60px;
    }

    .carousel-nav {
        width: 35px;
        height: 35px;
    }

    .carousel-prev {
        left: 5px;
    }

    .carousel-next {
        right: 5px;
    }
}

@media (max-width: 480px) {
    .video-carousel-thumbnails {
        padding: 15px;
    }

    .carousel-slide {
        width: 100%;
    }

    .video-thumbnail {
        height: 120px;
    }

    .play-button {
        width: 50px;
        height: 50px;
    }

    .suggested-thumbnails {
        gap: 10px;
        justify-content: center;
    }

    .suggested-thumbnail {
        width: 80px;
    }

    .suggested-thumbnail img {
        height: 50px;
    }
}

/* Loading States */
.video-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #666;
}

.video-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #0D3C56;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Accessibility */
.carousel-nav:focus,
.modal-close:focus,
.suggested-thumbnail:focus {
    outline: 2px solid #0D3C56;
    outline-offset: 2px;
}

/* Smooth scrolling for suggested videos */
.suggested-thumbnails {
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
}

.suggested-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.suggested-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.suggested-thumbnails::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.suggested-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Mobile Video Carousel Styles */
.mobile-video-carousel-container {
    position: relative;
    max-width: 100%;
    margin: 20px 0;
}

.mobile-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-video-modal.active {
    display: flex;
    opacity: 1;
}

.mobile-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mobile-video-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-video-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-in-out;
}

.mobile-video-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-video-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.mobile-video iframe,
.mobile-video video {
    width: 100%;
    height: 100%;
    border: none;
}

.mobile-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(13, 60, 86, 0.8);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    z-index: 10;
    transition: all 0.3s ease;
}

.mobile-carousel-nav:hover {
    background: rgba(13, 60, 86, 1);
    transform: translateY(-50%) scale(1.1);
}

.mobile-carousel-prev {
    left: 20px;
}

.mobile-carousel-next {
    right: 20px;
}

.mobile-carousel-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile Modal Close Button */
.mobile-modal-content .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: background 0.3s ease;
}

.mobile-modal-content .modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .mobile-carousel-nav {
        width: 45px;
        height: 45px;
    }

    .mobile-carousel-prev {
        left: 15px;
    }

    .mobile-carousel-next {
        right: 15px;
    }

    .mobile-modal-content .modal-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .mobile-carousel-nav {
        width: 40px;
        height: 40px;
    }

    .mobile-carousel-prev {
        left: 10px;
    }

    .mobile-carousel-next {
        right: 10px;
    }

    .mobile-modal-content .modal-close {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
    }
}