/* video-carousel.css */
.video-carousel-container {
    /* max-width: 900px; */ /* Consider removing or adjusting if full-width is desired */
    margin: 0 auto;
    padding: 0; /* Changed from 20px 0 to 0 for more control by user/theme */
    position: relative; /* Ensure container has positioning context */
}

.video-carousel-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    text-align: center; /* Example: center the title */
}

.video-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 0; /* Was 8px, changed to 0 for sharper edges, adjust as needed */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px; /* Add space below carousel for testimonial text */
}

.video-slide {
    display: none; /* Handled by JS */
    position: relative;
    width: 100%;
}

.video-slide.active {
    display: block; /* Handled by JS */
}

.video-placeholder {
    width: 100%;
    position: relative;
    aspect-ratio: 16/9;
    background-color: #000;
    overflow: hidden;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #fff;
    z-index: 2;
    transition: all 0.3s ease;
}

.play-button:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translate(-50%, -50%) scale(1.05);
}

.play-button:before {
    content: "";
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-left: 25px solid #555; /* Play icon color */
    border-bottom: 15px solid transparent;
    margin-left: 5px; /* Adjust for centering the triangle */
}

.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    border: 0;
    background-color: #000; /* Ensure background is black while loading */
}

.video-pagination {
    display: flex;
    justify-content: center;
    padding: 15px 0;
    margin-bottom: 20px;
    gap: 10px;
    position: relative;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}

.video-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.video-dot.active {
    background-color: #d4af37; /* Gold color for active dot, or your theme's accent */
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff; /* Spinner color */
    animation: spin 1s ease-in-out infinite;
    z-index: 2; /* Above thumbnail, below iframe when loaded */
    display: none; /* Shown by JS */
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Testimonial content associated with a video slide */
.video-slide .testimonial-content { /* Scoped to video-slide */
    position: relative; /* Was static, relative might be better for complex layouts */
    z-index: 5; /* Ensure it's above any video player elements if overlapping */
    clear: both; /* If there were floats, though flex/grid is more common now */
    margin-top: 20px; /* Space between video and testimonial */
    padding: 0 15px; /* Add some horizontal padding */
    text-align: center; /* Example alignment */
}


/* Mobile specific styles */
@media only screen and (max-width: 767px) {
    .video-carousel {
        margin-bottom: 30px;
        -webkit-overflow-scrolling: touch;
        /* touch-action: pan-y; -- Let JS handle touch for swipe */
    }

    .video-carousel-swipeable { /* Class added by JS for swipe */
        overflow-x: hidden; /* Prevent scrollbars if swipe is slightly off */
        position: relative;
        width: 100%;
        touch-action: pan-y pinch-zoom; /* Allow vertical scroll, JS will handle pan-x */
    }
    .video-carousel-swipeable .video-slide {
        touch-action: pan-y pinch-zoom; /* Ensure slides themselves don't block vertical scroll */
    }


    .video-pagination {
        margin-bottom: 30px;
        cursor: pointer;
    }

    .video-dot {
        width: 14px;
        height: 14px;
    }

    .video-slide.playing .video-placeholder {
        /* height: auto !important; -- This can be problematic, aspect-ratio is better */
        min-height: 56.25vw; /* 16:9 aspect ratio based on viewport width */
    }

    .video-slide .testimonial-content { /* Scoped to video-slide */
        margin-top: 30px;
    }
}
