/* ================================================
   Video Carousel - Vertical Videos Carousel System
   Soutwest Business Club
   ================================================ */

.video-carousel-container {
    position: relative;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.video-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.video-carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 15px;
    width: fit-content;
}

.video-carousel-item {
    flex: 0 0 auto;
    width: calc((100% - 30px) / 3); /* 3 videos con 2 gaps de 15px en desktop */
    position: relative;
    box-sizing: border-box;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16; /* Mantiene proporción vertical */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.vertical-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-wrapper:hover .video-overlay,
.video-wrapper.paused .video-overlay {
    opacity: 1;
}

.video-play-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.video-play-btn i {
    font-size: 24px;
    color: #333;
    margin-left: 3px;
}

.video-play-btn:hover {
    transform: scale(1.1);
    background: #fff;
}

.video-play-btn.playing {
    opacity: 0;
    pointer-events: none;
}

.video-sound-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.video-sound-btn i {
    font-size: 16px;
    color: #fff;
}

.video-sound-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

/* Navegación */
.video-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.video-carousel-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.video-carousel-nav.prev {
    left: -20px;
}

.video-carousel-nav.next {
    right: -20px;
}

.video-carousel-nav i {
    font-size: 20px;
    color: #333;
}

.video-carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.video-carousel-nav:disabled:hover {
    transform: translateY(-50%);
}

/* Indicadores (dots) */
.video-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.video-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.video-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

.video-dot.active {
    background: #fff;
    width: 12px;
    height: 12px;
    border-color: rgba(255, 255, 255, 0.5);
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

/* Tablets */
@media (max-width: 991px) {
    .video-carousel-item {
        width: calc((100% - 15px) / 2); /* 2 videos con 1 gap de 15px */
        flex-shrink: 0;
    }

    .video-carousel-nav {
        width: 40px;
        height: 40px;
    }

    .video-carousel-nav i {
        font-size: 18px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .video-carousel-item {
        width: 100%; /* 1 video visible */
        flex-shrink: 0; /* Prevenir encogimiento */
    }

    .video-carousel-track {
        gap: 0; /* Sin gap en mobile */
    }

    .video-carousel-wrapper {
        margin: 0 10px; /* Margen en wrapper para espacio de navegación */
    }

    .video-carousel-nav {
        width: 35px;
        height: 35px;
        opacity: 0.9;
    }

    .video-carousel-nav.prev {
        left: 10px;
    }

    .video-carousel-nav.next {
        right: 10px;
    }

    .video-carousel-nav i {
        font-size: 16px;
    }

    .video-play-btn {
        width: 50px;
        height: 50px;
    }

    .video-play-btn i {
        font-size: 20px;
    }

    .video-sound-btn {
        width: 35px;
        height: 35px;
        bottom: 10px;
        right: 10px;
    }

    .video-sound-btn i {
        font-size: 14px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .video-wrapper {
        aspect-ratio: 9 / 16;
        max-height: 500px;
    }

    .video-carousel-nav {
        width: 32px;
        height: 32px;
    }

    .video-carousel-nav i {
        font-size: 14px;
    }
}

/* Loading state */
.video-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Smooth transitions */
.video-carousel-item,
.video-wrapper,
.video-overlay,
.video-play-btn,
.video-sound-btn,
.video-carousel-nav,
.video-dot {
    will-change: transform;
}
