/* Video Carousel Widget Styles */

.video-carousel-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 25px 60px;
}

.video-carousel-wrapper {
    overflow: hidden;
    position: relative;
}

.video-carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    will-change: transform;
}

.video-carousel-item {
    flex: 0 0 calc(25% - 15px);
    min-width: calc(25% - 15px);
    height: 400px;
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-carousel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    z-index: 0;
}

.preview-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.video-carousel-item.playing-preview .preview-video {
    opacity: 1;
}

.video-carousel-item.playing-preview .video-thumbnail {
    background-image: none !important;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: background-color 0.3s ease;
    z-index: 2;
}

.video-carousel-item:hover .video-overlay {
    background-color: rgba(0, 0, 0, 0.7);
}

.video-content {
    text-align: center;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.video-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.video-description {
    font-size: 14px;
    color: #ffffff;
    margin: 0;
    line-height: 1.5;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.more-info-link {
    position: relative;
    z-index: 3;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 20px;
    border: 2px solid #ffffff;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-top: auto;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: transparent;
}

.more-info-link:hover {
    background-color: #ffffff;
    color: #000000;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-carousel-item:hover .play-button-overlay {
    opacity: 1;
}

.video-data {
    display: none;
}

/* Navigation Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid #000000;
    color: #000000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-arrow svg {
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
    stroke-width: 3;
}

.carousel-arrow:hover {
    background-color: #000000;
    color: #ffffff;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.carousel-arrow:hover svg {
    transform: scale(1.1);
}

.carousel-arrow:active {
    transform: translateY(-50%) scale(1.05);
}

.carousel-arrow-left {
    left: 0;
}

.carousel-arrow-right {
    right: 0;
}

/* Remove disabled state since we have infinite scroll */
.carousel-arrow:disabled {
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
}

.video-modal.active {
    display: block;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.video-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
    background-color: #000000;
    border-radius: 8px;
    overflow: hidden;
    animation: scaleIn 0.3s ease;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 40px;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.video-modal-close:hover {
    transform: rotate(90deg);
}

.video-modal-player {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-modal-player iframe,
.video-modal-player video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .video-carousel-item {
        flex: 0 0 calc(33.333% - 14px);
        min-width: calc(33.333% - 14px);
    }
}

@media (max-width: 768px) {
    .video-carousel-container {
        padding: 0 50px;
    }
    
    .video-carousel-item {
        flex: 0 0 calc(50% - 10px);
        min-width: calc(50% - 10px);
        height: 350px;
    }
    
    .video-title {
        font-size: 18px;
    }
    
    .video-description {
        font-size: 12px;
    }
    
    .carousel-arrow {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .video-carousel-container {
        padding: 0 40px;
    }
    
    .video-carousel-item {
        flex: 0 0 100%;
        min-width: 100%;
        height: 300px;
    }
    
    .video-modal-content {
        width: 95%;
    }
    
    .video-modal-close {
        top: -35px;
        font-size: 30px;
    }
}
