/* Base Wrapper */
.vc-animated-columns-wrapper {
    /* controlled by anime.js */
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Initial State (Before Scroll, Strict Force) */
/* Initial State (Default to 3-Column / Expanded to prevent Flash) */
.vc-animated-columns-wrapper:not(.is-expanded) .vc-col-side {
    width: 33.333%;
    flex: 0 0 33.333%;
    opacity: 1;
    overflow: hidden;
}

.vc-animated-columns-wrapper:not(.is-expanded) .vc-col-center {
    width: 33.333%;
    flex: 0 0 33.333%;
}

/* Play button visible in all states */
.vc-animated-columns-wrapper:not(.is-expanded) .vc-video-play-btn {
    opacity: 1;
    pointer-events: auto;
}

.vc-col-side {
    /* controlled by anime.js */
}

.vc-col-center {
    /* controlled by anime.js */
}

/* Expanded State (After Scroll) */
.vc-animated-columns-wrapper.is-expanded .vc-col-side {
    width: 33.333%;
    flex: 0 0 33.333%;
    opacity: 1;
}

.vc-animated-columns-wrapper.is-expanded .vc-col-center {
    width: 33.333%;
    flex: 0 0 33.333%;
}

/* YouTube Cover Utility */
.vc-yt-cover-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.vc-yt-cover-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300%;      /* Force overly large width to push vertical black bars out */
    height: 180%;     /* Force overly large height to ensure vertical coverage */
    pointer-events: none; /* Prevent interaction to act as background */
}

/* Play Button */
.vc-video-play-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    z-index: 20;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
}

.vc-video-play-btn svg, 
.vc-video-play-btn i {
    font-size: 24px;
    color: white;
    width: 24px;
    height: 24px;
}

.vc-video-play-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%) scale(1.05); /* Enhance scale on hover */
    transition: all 0.3s ease;
}

/* Hide play button when playing */
.vc-anim-carousel.is-playing .vc-video-play-btn,
.vc-col-center.is-playing .vc-video-play-btn {
    opacity: 0 !important;
    pointer-events: none;
}
.vc-yt-cover-wrapper img {
    height: 100%;
    object-fit: cover;
}

.vc-video-play-btn {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.vc-video-pause-btn {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.vc-video-controls:hover .vc-video-pause-btn {
    /* Optional hover effect */
}

/* Toggle Logic */
.vc-col-center.is-playing .vc-video-play-btn {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
    pointer-events: none;
}

.vc-col-center.is-playing .vc-video-pause-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

/* Mute Button Styles */
.vc-video-mute-btn i {
    font-size: 16px;
}

.vc-icon-muted.hidden,
.vc-icon-unmuted.hidden {
    display: none;
}

/* Ensure Mute button is hidden if content is not expanded? 
   No, user wants controls. 
*/
/* Responsive Overrides (Stack on Mobile) */
/* Responsive Overrides */

/* Tablet & Mobile (Stack) - Below 1024px */
@media (max-width: 1024px) {
    .vc-animated-columns-wrapper {
        flex-direction: row !important; /* Allow row flow for side-by-side */
        flex-wrap: wrap !important;     /* Allow wrapping */
        height: auto !important;
        min-height: auto !important;
        position: relative !important;
        top: auto !important;
        display: flex !important;
    }
    
    .vc-col-center {
        width: 100% !important;
        flex: 0 0 100% !important;
        height: 50vh !important;
        max-height: 500px;
        order: 1 !important; /* Video On Top */
    }
    
    .vc-col-side {
        width: 50% !important;
        flex: 0 0 50% !important;
        height: 40vh !important; /* Smaller height for buttons */
        min-height: 300px;
        opacity: 1 !important;
        position: relative !important;
        transform: none !important;
        left: auto !important;
        top: auto !important;
    }

    /* Left Side */
    .vc-col-left {
        order: 2 !important;
        border-right: 1px solid rgba(255,255,255,0.1); /* Separator */
    }
    
    /* Right Side */
    .vc-col-right {
        order: 3 !important;
    }

    /* Reset margins/paddings */
    .vc-col-side {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .vc-col-side {
        width: 100% !important;
        flex: 0 0 100% !important;
        padding-top: 10px;
    }
}
