:root {
    --height: calc( 60vh - 50px );
    --width: 1050px;

    @media (max-width: 1000px){
        --height: calc( 40vh - 50px);
    }
    
    @media (max-width: 600px){
        -width: 100px;
    }
}

.carousel {
    display: grid;
    transform: translate3d(0,0,0.1px);
    overflow: hidden;

    @media (max-width: 600px){
        display: none;
    }
}

.carousel__list {
    display: flex;
    overflow: hidden;
    list-style: none;

    

    padding: 2em 0 3em;
    margin: -2em 0 -3em;
    
    @media (max-width: 600px){
        flex-direction: column;
        gap: 10px;
    }
}

.carousel__item {
    display: grid;
    position: relative;
    align-content: start;
    margin: 0 10px;

    padding: 0;
    flex: 1 1 10%;
    height: var(--height);
    overflow: hidden;
    background: rgba(255,255,255,0.2);
    border-radius: 16px;
    transform: translate3d(0,0,0.1px);
    box-shadow: rgba(0, 0, 0, 0.4) 0px 3px 15px 2px, rgba(0, 0, 0, 0.2) 0px 12px 28px 0px, rgba(0, 0, 0, 0.1) 0px 2px 4px 0px, rgba(255, 255, 255, 0.05) 0px 0px 0px 1px inset;

    @media (max-width: 600px){
        margin: 10 0px;
        flex: 1 1 50%;
    }

}

.carousel__item::before {
    content: "";
    position: absolute;
    inset: -20px;
    z-index: 2;
}

.carousel__item,
.carousel__item * {
    transition: all .6s cubic-bezier(.55,.24,.18,1);
}

.carousel__image,
.carousel__contents {
    width: var(--width);
    height: auto;
}

.carousel__item:hover {
    flex-basis: calc( var(--width) / 2 );
    transition: all 0.3s ease;
}

.carousel__item[data-active] {
    flex-basis: var(--width);
    flex-grow: 0;

    video{
        object-fit: contain;
    }
}

.carousel__item:nth-child(3),
.carousel__item:nth-child(10) {
    flex: 0 0 10px;
}

.carousel__item:nth-child(2),
.carousel__item:nth-child(11) {
    flex: 0 0 5px;
    transform: translateX(-50px);

    @media (max-width: 600px){
        transform: translateX(0px);
    }
}

.carousel__item:nth-child(11) {
    transform: translateX(50px);

    @media (max-width: 600px){
        transform: translateX(0px) translateY(50px);
    }
}

.carousel__item:nth-child( 1 ),
.carousel__item:nth-child( n + 12 ) {
    flex: 0 0 0px;
    margin: 0;
    box-shadow: none;
    opacity: 0!important;
}

.carousel__item:not(:nth-child( n + 5 )) video,
.carousel__item:nth-child( n + 9 ) video {
    opacity: 0.8;
}

.carousel__item:not(:nth-child( n + 4 )) *,
.carousel__item:nth-child( n + 10 ) * {
    opacity: 0!important;
}

[data-active],
[data-active] * {
    opacity: 1!important;
    filter: none!important;
    
}

.carousel__item video {
    display: block;
    position: absolute;
    width: var(--width);
    height: 100%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    aspect-ratio: 2/3;
    object-fit: contain;
    filter: saturate(0.2) contrast(0.75) brightness(1.1);

    @media (max-width: 600px){
        object-fit: cover;
    }
}

.carousel__item::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(180deg, rgba(2,0,36,0) 30%, rgba(221, 118, 118, 0.5) 60%, rgba(255, 0, 0, 0.6) 100%);
    opacity: 0.5;
    transition: all .6s cubic-bezier(.55,.24,.18,1);
}

[data-active].carousel__item::after {
     transform: translateY(100%); 
}


.carousel__contents {
    display: flex;
    flex-direction: column-reverse;
    justify-content: start;
    min-height: 200px;
    padding: 1em;
    background-image: radial-gradient( ellipse at 0px 0px, rgba(0,0,0,0.4) 20%, transparent 50% );
    background-size: 170% 200px;
    background-repeat: no-repeat;
    transform: translateX(-50%);
    z-index: 1;
    transition-duration: 1s;
    opacity: 0;

    @media (max-width: 600px){
        min-width: auto;
        min-height: 20px;
    }
    
}
[data-active] .carousel__contents {
    transform: translateX(0px); 
    transition-duration: 0.66s;
    opacity: 1;
}
.carousel__contents * {
    margin: 0;
    line-height: 1.3;
}
.carousel__contents .slide__title {
    font-family: "ＭＳ Ｐゴシック";
    color: #e8eff4;
    font-size: 1.75em;
    font-weight: 600;
    letter-spacing: .8px;
    text-shadow: 0 1px 0 rgba(0,0,0,0.3);
}