/* carousel */
.carousel{
    height: 75vh;
}

.featured-slider-overlay {
    position: absolute; 
    background: linear-gradient(rgb(41 48 75 / 47%), rgb(74 100 198 / 31%));
    display: flex;
    align-items: center;
    justify-content: center;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 1rem;
    height:100%;
    z-index: 10;
 }

.carousel .list .item{
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0 0 0 0;
    border: 4px solid #dedede;
    border-radius: 15px;
}

.carousel .list .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}
.carousel .list .item .content{
    position: absolute;
    top: 15%;
    width: 1140px;
    max-width: 83%;
    left: 45%;
    transform: translateX(-50%);
    padding-right: 35%;
    box-sizing: border-box;
    color: #fff;
    text-shadow: 0 5px 10px #0004;
}
.carousel .list .item .author{
    font-weight: bold;
    letter-spacing: 10px;
    font-size: 2.5em;
    font-family: 'Open Sans';
    text-shadow: 1px 2px 5px #000000a4;
}
.carousel .list .item .title{
    font-size: 1.8em;
    font-weight: 600;
    line-height: 1.3em;
    font-family: 'Open Sans';
    padding: 20px 0 0;
    text-shadow: 1px 2px 10px #000000a4;
}

.carousel .list .item .topic{
    font-size: 1.2em;
    font-weight: 500;
    line-height: 1.5em;
    padding: 15px 0;
    font-family: 'Open Sans';
    text-shadow: 1px 2px 10px #000000a4;
}

.carousel .list .item .topic{
    color: #f3f5ff;
    text-shadow: 0px 2px 10px #000000a4;
}
.carousel .list .item .des{
    font-size: 1em;
    font-weight: 400;
    color: #f3f5ff;
    text-shadow: 0px 2px 10px #000000a4;
}
.carousel .list .item .buttons{
    display: grid;
    grid-template-columns: repeat(2, 180px);
    grid-template-rows: 40px;
    gap: 5px;
    margin-top: 20px;
}
.carousel .list .item .buttons button{
    border: none;
    background-color: #eee;
    letter-spacing: 3px;
    font-family: 'Open Sans';
    font-weight: 500;
} 

.carousel .list .item .buttons button:hover {
    background-color: #29304B;
    border: 1px solid #fff;
}
.carousel .list .item .buttons button:hover > a {
    color:#eee !important;
}

.carousel .list .item .buttons button:nth-child(2){
    background-color: transparent;
    border: 1px solid #fff;
    color: #eee;
}
/* thumbail */
.thumbnail{
    position: absolute;
    bottom: 50px;
    left: 51%;
    width: max-content;
    z-index: 1;
    display: flex;
    gap: 10px;
}
.thumbnail .item{
    width: 150px;
    height: 220px;
    flex-shrink: 0;
    position: relative;
}
.thumbnail .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    border:2px solid #7272726b;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 5px 0px, rgba(0, 0, 0, 0.1) 0px 0px 1px 0px;
}
.thumbnail .item .content{
    color: #fff;
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
}
.thumbnail .item .content .title{
    font-weight: 500;
}
.thumbnail .item .content .description{
    font-weight: 300;
}
/* arrows */
.arrows{
    cursor:pointer;
    position: absolute;
    top: 80%;
    right: 66.5%;
    z-index: 100;
    width: 300px;
    max-width: 30%;
    display: flex;
    gap: 10px;
    align-items: center;
}
.arrows button{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #eee4;
    border: none;
    color: #fff;
    background-color: #eee4;
    font-family: monospace;
    font-weight: bold;
    transition: .5s;
}
.arrows button:hover{
    background-color: #fff;
    color: #000;
}

/* animation */
.carousel .list .item:nth-child(1){
    z-index: 1;
}

/* animation text in first item */

.carousel .list .item:nth-child(1) .content .author,
.carousel .list .item:nth-child(1) .content .title,
.carousel .list .item:nth-child(1) .content .topic,
.carousel .list .item:nth-child(1) .content .des,
.carousel .list .item:nth-child(1) .content .buttons
{
    transform: translateY(50px);
    filter: blur(20px);
    opacity: 0;
    animation: showContent .5s 1s linear 1 forwards;
}
@keyframes showContent{
    to{
        transform: translateY(0px);
        filter: blur(0px);
        opacity: 1;
    }
}
.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;
}
/* create animation when next click */
.carousel.next .list .item:nth-child(1) img{
    width: 150px;
    height: 220px;
    position: absolute;
    bottom: 50px;
    left: 50%;
    border-radius: 30px;
    animation: showImage .5s linear 1 forwards;
}
@keyframes showImage{
    to{
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 10px;
    }
}

.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);
    }
}

/* running time */

.carousel .time{
    position: absolute;
    z-index: 1000;
    width: 0%;
    height: 3px;
    background-color: #f1683a;
    left: 0;
    top: 0;
    display: none;
}

.carousel.next .time,
.carousel.prev .time{
    animation: runningTime 3s linear 1 forwards;
}
@keyframes runningTime{
    from{ width: 100%}
    to{width: 0}
}


/* 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: 150px;
        height: 220px;
        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.next .arrows button,
.carousel.prev .arrows button{
    pointer-events: none;
}
.carousel.prev .list .item:nth-child(2) .content .author,
.carousel.prev .list .item:nth-child(2) .content .title,
.carousel.prev .list .item:nth-child(2) .content .topic,
.carousel.prev .list .item:nth-child(2) .content .des,
.carousel.prev .list .item:nth-child(2) .content .buttons
{
    animation: contentOut 1.5s linear 1 forwards!important;
}

@keyframes contentOut{
    to{
        transform: translateY(-150px);
        filter: blur(20px);
        opacity: 0;
    }
}
@media screen and (max-width: 678px) {
    .carousel {
        overflow: hidden;
    }
    .carousel .list .item .content{
        padding-right: 0;
        top:10% !important;
    }
    .carousel .list .item .content .title{
        font-size: 20px;
        text-align: center;
    }
    .thumbnail .item {
        width: 70px;
        height: 100px;
    }
    .carousel .list .item .content {
        left: 50% !important;
    }
    .carousel .list .item .title {
        padding: 10px 0 0 !important;
    }
    .carousel .list .item .author {
        font-size: 1.3em !important;
        text-align: center;
        letter-spacing: 6px !important;
    }
    .carousel .list .item .topic {
        font-size: 1em !important;
        line-height: 1.8em !important;
        text-align: center;
        padding: 10px 0 !important;
    }
    .carousel .list .item .des {
        font-size: 0.8em !important;
        text-align: center;
    }
    .carousel .list .item .buttons {
        margin-top: 10px !important;
        grid-template-columns: unset !important;
    }
    .arrows {
        top: 82% !important;
        right: 50% !important;
    }
}