/*
 * Reusable video slide-deck / carousel for the Blog/<Topic>/index.html tiles.
 * One <video> visible at a time in a fixed 16:9 frame, with prev/next arrows
 * and clickable dot indicators, wrapping around. Works for any number of
 * slides, and for multiple carousels on a page. See /static/js/video-carousel.js.
 *
 * Markup:
 *   <div class="video-carousel" data-video-carousel>
 *     <div class="video-carousel__viewport">
 *       <div class="video-carousel__track">
 *         <div class="video-carousel__slide"><video ...>...</video></div>
 *         ... (one .video-carousel__slide per video) ...
 *       </div>
 *     </div>
 *     <button class="video-carousel__arrow video-carousel__arrow--prev">&#10094;</button>
 *     <button class="video-carousel__arrow video-carousel__arrow--next">&#10095;</button>
 *     <div class="video-carousel__dots"></div>   <!-- dots injected by JS -->
 *   </div>
 */

.video-carousel {
    position: relative;
    width: 100%;
    max-width: 760px;
    margin: 20px auto 0;
}

.video-carousel__viewport {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;          /* fixed frame */
    background: #000;
    border: 2px solid #ccc;
    border-radius: 10px;
}

.video-carousel__track {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease-in-out;
}

.video-carousel__slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.video-carousel__slide video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;           /* keep aspect ratio, never crop */
    background: #000;
}

/* Prev / next arrows */
.video-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.3s ease;
}

.video-carousel__arrow:hover,
.video-carousel__arrow:focus {
    background: rgba(227, 174, 87, 0.95);   /* site gold #E3AE57 */
    outline: none;
}

.video-carousel__arrow--prev { left: 12px; }
.video-carousel__arrow--next { right: 12px; }

/* Dot indicators */
.video-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

.video-carousel__dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #c9c0b6;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.video-carousel__dot:hover,
.video-carousel__dot:focus {
    outline: none;
    transform: scale(1.15);
}

.video-carousel__dot.is-active {
    background: #E3AE57;            /* site gold */
}

/* With a single video there's nothing to navigate */
.video-carousel--single .video-carousel__arrow,
.video-carousel--single .video-carousel__dots {
    display: none;
}

@media (max-width: 600px) {
    .video-carousel__arrow {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}
