/* Carousel */
.carousel{
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    /* margin-top: -4rem; */
    position: absolute;
    top: 0;
}
.carousel .list .item{
    position: absolute;
    inset: 0 0 0 0;
}
.carousel .list .item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 0;
}
.carousel .list .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.carousel .list .item .content{
    position: absolute;
    top: 30%;
    width: 1200px;
    max-width: 90%;
    left: 50%;
    transform: translateX(-50%);
    padding-right: 30%;
    box-sizing: border-box;
    color: #ffffff;
    text-shadow: 0 5px 10px #0004;
}
.carousel .list .item .content .author{
    font-weight: 800;
    letter-spacing: 5px;
}
.carousel .list .item .content .title,
.carousel .list .item .content .topic{
    font-weight: 200;
    font-size: 2rem;
    line-height: 1.2em;
}
.carousel .list .item .content .topic{
    color: #FF7518;   
    font-weight: 800;
}
.content .des p{
    line-height: 24px;
}
.carousel .list .item .content .buttons{
    display: grid;
    grid-template-columns: repeat(2, 130px);
    grid-template-rows: 40px;
    gap: 8px;
    margin-top: 16px;
}
.carousel .list .item .content .buttons button{
    border: none;
    background-color: #FF7518;
    color: #ffffff;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
}
.carousel .list .item .content .buttons button:nth-child(2){
    background-color: transparent;
    color: #fff;
    border: 1px solid #eeeeee;
}
/* Social Media */
.carousel .social__media{
    z-index: 1000;
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    right: 2rem;
    bottom: 35vh;
    gap: 16px;
    z-index: 2;
}
.carousel .social__media a{ 
    color: #fff;
    font-size: 32px;
}
.carousel .social__media a:hover{
    color: #FF7518;
}
/* thumbnail */
.thumbnail{
    position: absolute;
    bottom: 50px;
    left: 50%;
    width: max-content;
    z-index: 100;
    display: flex;
    gap: 16px;
}
.thumbnail .item{
    width: 180px;
    height: 100px;
    flex-shrink: 0;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 0 8px 4px #0004;
}
.thumbnail .item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.9) 100%);
    z-index: 1; 
    border-radius: 8px;
}
.thumbnail .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.thumbnail .item .content{
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    z-index: 2;
}
.thumbnail .item .content .title{
    font-weight: 800;
    font-size: 1rem;
    color: #FF7518;
}
.thumbnail .item .content .des{
    font-weight: 300;
    color: #fff;
}
/* Arrow */
.arrow{
    position: absolute;
    top: 80%;
    right: 52%;
    width: 300px;
    max-width: 30%;
    display: flex;
    gap: 8px;
    align-items: center;
    z-index: 2;
}
.arrow button{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #eee4;
    border: none;
    font-family: monospace;
    color: #ffffff;
    font-weight: 800;
    font-size: large;
    transition: .5s;
    z-index: 100;
    cursor: pointer;
}
.arrow button:hover{
    background-color: #FF7518;
    color: #fff;
}
.carousel .list .item:nth-child(1){
    z-index: 1;
}

/* Contents Animation */
.carousel .list .item:nth-child(1) .author,
.carousel .list .item:nth-child(1) .title,
.carousel .list .item:nth-child(1) .topic,
.carousel .list .item:nth-child(1) .des,
.carousel .list .item:nth-child(1) .buttons{
    transform: translateY(50px);
    filter: blur(20px);
    opacity: 0;
    animation: showContent 0.5s 1s linear 1 forwards;
}
@keyframes showContent {
    to{
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}
.carousel .list .item:nth-child(1) .content .title{
    animation-delay: 1.2s!important;
}
.carousel .list .item:nth-child(1) .content .topic{
    animation-delay: 1.4s!important;
}
.carousel .list .item:nth-child(1) .content .des{
    animation-delay: 1.6s!important;
}
.carousel .list .item:nth-child(1) .content .buttons{
    animation-delay: 1.8s!important;
}
/* Effect Next click */
.carousel.next .list .item:nth-child(1) img{
    width: 180px;
    height: 100px;
    position: absolute;
    left: 50%;
    bottom: 50px;
    border-radius: 16px;
    animation: showImage 0.5s linear 1 forwards;
}
@keyframes showImage{
    to{
        width: 100%;
        height: 100%;
        left: 0;
        bottom: 0;
        border-radius: 0;
    }
}
.carousel.next .thumbnail .item:nth-last-child(1){
    overflow: hidden;
    animation: showThumbnail .5s linear 1 forwards;
}
.carousel.prev .list .item img{
    z-index: 100;
}
@keyframes showThumbnail{
    from{
        width: 0;
        opacity: 0;
    }
}
.carousel.next .thumbnail{
    animation: effectNext .5s linear 1 forwards;
}

@keyframes effectNext{
    from{
        transform: translateX(150px);
    }
}
/* effect prev click */
.carousel.prev .list .item:nth-child(2){
    z-index: 2;
}
.carousel.prev .list .item:nth-child(2) img{
    animation: outFrame 0.5s linear 1 forwards;
    position: absolute;
    bottom: 0;
    left: 0;
}
@keyframes outFrame{
    to{
        width: 180px;
        height: 100px;
        bottom: 50px;
        left: 50%;
        border-radius: 20px;
    }
}
.carousel.prev .thumbnail .item:nth-child(1){
    overflow: hidden;
    opacity: 0;
    animation: showThumbnail .5s linear 1 forwards;
}
.carousel.prev .list .item:nth-child(2) .author,
.carousel.prev .list .item:nth-child(2) .title,
.carousel.prev .list .item:nth-child(2) .topic,
.carousel.prev .list .item:nth-child(2) .des,
.carousel.prev .list .item:nth-child(2) .buttons{
    animation: contentOut 1.5s linear 1 forwards !important;
}
@keyframes contentOut{
    to{
        transform: translateY(-150px);
        filter: blur(20px);
        opacity: 0;
    }
}
.carousel.next .arrow button,
.carousel.prev .arrow button{
    pointer-events: none;
}
/* Time */
.time{
    width: 0;
    height: 4px;
    background-color: #FF7518;
    position: absolute;
    z-index: 100;
    top: 0;
    left: 0;
}
.carousel.next .time,
.carousel.prev .time{
    width: 100%;
    animation: timeRunning 2s linear 1 forwards;
}
@keyframes timeRunning {
    to{
        width: 0;
    }
    
}
@media screen and (max-width: 678px) {
    .carousel .list .item .content{
        padding-right: 0;
        top: 40%;
    }
    .carousel .list .item .content .title{
        font-size: 30px;
    }
    .carousel .list .item .content{
        max-width: 80%;
    }
    .thumbnail{
        display: none;
    }
    .carousel{
        height: 90vh;
    }
    .arrow{
        right: 60%;
        top: 90%;
    }
    .carousel .social__media{
        display: flex;
        flex-direction: row;
        max-width: 80%;
        bottom: 15%;
        gap: 24px;
        left: 10%;
        z-index: 2;
    }
    .carousel .social__media a{ 
        color: #fff;
        font-size: 32px;
    }
    .carousel .social__media a:hover{
        color: #FF7518;
    }
}
@media screen and (max-width: 376px) {
    .carousel .list .item .content{
        padding-right: 0;
        top: 20%;
    }
    .carousel .social__media{
        bottom: 20%;
    }
    .arrow{
        top: 85%;
        right: 60%;
    }
    .carousel .list .item .content .title{
        font-size: 24px;
    }
    .carousel .list .item .content .topic{
        font-size: 32px;
    }
    .carousel .thumbnail{
        display: none;
    }
}