/* =========================================
   YOUTUBE VIDEO CAROUSEL
   EXACTLY 3 VIDEOS DESKTOP
   ========================================= */

.yvc-carousel {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

    padding: 20px 0 70px;

    overflow: hidden;
}


/* =========================================
   VIEWPORT
   ========================================= */

.yvc-viewport {
    position: relative;

    width: 100%;
    max-width: 100%;

    margin: 0;
    padding: 20px 0 25px;

    box-sizing: border-box;

    overflow: hidden !important;

    /*
     * Very important.
     * Prevent transformed/cloned slides from
     * appearing outside this area.
     */
    clip-path: inset(0);

    contain: paint;
}


/* =========================================
   TRACK
   ========================================= */

.yvc-track {
    display: flex;

    align-items: center;

    gap: 30px;

    margin: 0;
    padding: 0;

    box-sizing: border-box;

    will-change: transform;

    transition:
        transform 450ms cubic-bezier(.22,.61,.36,1);
}


/* =========================================
   SLIDES
   ========================================= */

.yvc-slide {

    /*
     * JS will replace this with exact pixel width.
     */
    flex: 0 0 auto;

    width: auto;

    min-width: 0;

    margin: 0;
    padding: 0;

    box-sizing: border-box;

    transform: scale(.92);

    transform-origin: center center;

    opacity: .95;

    transition:
        transform 350ms ease,
        opacity 350ms ease;

    z-index: 1;
}


/* =========================================
   CENTER VIDEO
   ========================================= */

.yvc-slide.yvc-center {

    transform: scale(1.06);

    opacity: 1;

    z-index: 5;
}


/* =========================================
   CARD
   ========================================= */

.yvc-card {

    position: relative;

    display: block;

    width: 100%;

    aspect-ratio: 16 / 9;

    margin: 0;
    padding: 0;

    border: 0;

    border-radius: 16px;

    overflow: hidden;

    background: #111;

    cursor: pointer;

    appearance: none;

    box-shadow:
        0 2px 8px rgba(0,0,0,.08);
}


/* =========================================
   THUMBNAIL
   ========================================= */

.yvc-thumbnail {

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
	    border-radius: 12px;
}


/* =========================================
   OVERLAY
   ========================================= */

.yvc-thumbnail-overlay {

    position: absolute;

    inset: 0;

    background:
        rgba(0,0,0,.03);

    pointer-events: none;
}


/* =========================================
   PLAY BUTTON
   ========================================= */

.yvc-play {

    position: absolute;

    left: 50%;
    top: 50%;

    width: 52px;
    height: 52px;

    transform:
        translate(-50%, -50%);

    display: grid;

    place-items: center;
}


.yvc-play svg {

    width: 52px;
    height: 52px;

    display: block;

    filter:
        drop-shadow(
            0 2px 5px rgba(0,0,0,.25)
        );
}


.yvc-play circle {

    fill: #fff;
}


.yvc-play path {

    fill: #222;
}


/* =========================================
   NAVIGATION
   ========================================= */

.yvc-controls {

    position: absolute;

    left: 0;
    right: 0;

    bottom: 5px;

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 12px;
}


.yvc-nav {

    width: 48px;
    height: 48px;

    padding: 0;

    border:
        1px solid #d4d0cc;

    border-radius: 12px;

    background: transparent;

    color: #222;

    font-size: 28px;

    line-height: 1;

    cursor: pointer;

    display: grid;

    place-items: center;
}


.yvc-nav:hover {

    background:
        rgba(0,0,0,.04);
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 1100px) {

    .yvc-slide.yvc-center {

        transform:
            scale(1.03);
    }
}


@media (max-width: 700px) {

    .yvc-carousel {

        padding:
            10px 0 60px;
    }

    .yvc-viewport {

        padding:
            10px 0 20px;
    }

    .yvc-track {

        gap: 14px;
    }

    .yvc-slide {

        transform:
            scale(1);
    }

    .yvc-slide.yvc-center {

        transform:
            scale(1);
    }

    .yvc-nav {

        width: 42px;
        height: 42px;

        font-size: 24px;
    }
}


/* =========================================
   POPUP
   ========================================= */

.yvc-modal {

    position: fixed;

    inset: 0;

    z-index: 999999;

    display: none;

    align-items: center;

    justify-content: center;

    padding: 20px;

    box-sizing: border-box;
}


.yvc-modal.is-open {

    display: flex;
}


.yvc-modal-backdrop {

    position: absolute;

    inset: 0;

    background:
        rgba(0,0,0,.78);
}


.yvc-modal-dialog {

    position: relative;

    z-index: 2;

    width: min(1400px, 95vw);

    background: #111;

    overflow: hidden;

    border-radius: 6px;
}


.yvc-modal-video {

    width: 100%;

    aspect-ratio: 16 / 9;

    background: #000;
}


.yvc-modal-video iframe {

    width: 100%;
    height: 100%;

    display: block;

    border: 0;
}


.yvc-modal-close {

    position: absolute;

    top: 12px;
    right: 12px;

    z-index: 10;

    width: 42px;
    height: 42px;

    border: 0;

    border-radius: 50%;

    background:
        rgba(0,0,0,.6);

    color: #fff;

    font-size: 30px;

    cursor: pointer;
}


html.yvc-modal-open,
body.yvc-modal-open {

    overflow: hidden !important;
}

/* ============================================
   FORCE EXACTLY 3 VIDEOS
   ============================================ */

.yvc-carousel .yvc-viewport {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    box-sizing: border-box !important;
}

.yvc-carousel .yvc-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 30px !important;
    width: max-content !important;
    max-width: none !important;
    align-items: center !important;
}

.yvc-carousel .yvc-slide {
    flex: 0 0 calc(
        (100vw - 60px) / 3
    ) !important;

    width: calc(
        (100vw - 60px) / 3
    ) !important;

    max-width: calc(
        (100vw - 60px) / 3
    ) !important;

    min-width: 0 !important;

    box-sizing: border-box !important;

    transform: scale(.90) !important;

    position: relative !important;
}

.yvc-carousel .yvc-slide.yvc-center {
    transform: scale(1.06) !important;
    z-index: 20 !important;
}


/* ============================================
   DESKTOP
   ============================================ */

@media (min-width: 1101px) {

    .yvc-carousel .yvc-viewport {
        width: 100% !important;
        overflow: hidden !important;
    }

    .yvc-carousel .yvc-slide {
        flex-basis: calc(
            (100vw - 60px) / 3
        ) !important;

        width: calc(
            (100vw - 60px) / 3
        ) !important;

        max-width: calc(
            (100vw - 60px) / 3
        ) !important;
    }
}


/* ============================================
   TABLET
   ============================================ */

@media (min-width: 701px) and (max-width: 1100px) {

    .yvc-carousel .yvc-slide {

        flex-basis: calc(
            (100vw - 40px) / 2
        ) !important;

        width: calc(
            (100vw - 40px) / 2
        ) !important;

        max-width: calc(
            (100vw - 40px) / 2
        ) !important;

        transform: scale(.96) !important;
    }

    .yvc-carousel .yvc-slide.yvc-center {
        transform: scale(1.02) !important;
    }
}


/* ============================================
   MOBILE
   ============================================ */

@media (max-width: 700px) {

    .yvc-carousel .yvc-track {
        gap: 14px !important;
    }

    .yvc-carousel .yvc-slide {

        flex-basis: 100% !important;

        width: 100% !important;

        max-width: 100% !important;

        transform: scale(1) !important;
    }

    .yvc-carousel .yvc-slide.yvc-center {
        transform: scale(1) !important;
    }
}