@import url('https://fonts.googleapis.com/css2?family=Miniver&family=Poppins:wght@300;400;500;600;700;800;900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Candal&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,200&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Ubuntu+Condensed&display=swap');


.carousel{
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    /* margin-top: -10px; */
    z-index: 1001;
    position: relative;
}
.carousel .list .item{
    position: absolute;
    inset: 0 0 0 0;
}
.carousel .list .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(70%);
}
.carousel .list .item .content .author{
    font-weight: bold;
    letter-spacing: 10px;
}
.carousel .list .item .content{
    position: absolute;
    top: 20%;
    width: 1140px;
    max-width: 80%;
    left: 43%;
    transform: translateX(-50%);
    padding-right: 30%;
    box-sizing: border-box;
    color: white;
    text-shadow: 0 5px 10px black;

}

.carousel .list .item .content .title{
    font-weight: bold;
    font-size: 3em;
    list-style: 1.3em;
}
.carousel .list .item .content .topic{
    font-weight: bold;
    font-size: 3em;
    list-style: 1.3em;
}

.carousel .list .item .content .topic{
    color: #f16;
}
.carousel .list .item .content .description{
    max-width: 90%;
    line-height: 30px;
}

.carousel .list .item .content .buttons{
    display: grid;
    grid-template-columns: repeat(2, 130px);
    grid-template-rows: 40px;
    gap: 5px;
    margin-top: 20px;
    cursor: pointer;
}
.carousel .list .item .content button{
    border: none;
    background-color: white;
    letter-spacing: 3px;
    font-family:"Poppins", sans-serif;
    font-weight: 500;
}
.carousel .list .item .content button:nth-child(2){
    background-color: transparent;
    color: white;
    border: 1px solid white;
}

/* thumbnail */
.thumbnail{
   position: absolute;
   bottom: 10px;
   left: 50%;
    width: max-content;
    z-index: 1003;
    display: flex;
    gap: 20px;
}
.thumbnail .item{
    width: 150px;
    height: 220px;
    flex-shrink: 0;
    position: relative;
     box-shadow: 11px 19px 17px 1px rgb(0 0 0 / 94%);
}
.thumbnail .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}
.thumbnail .item .content{
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    font-style: italic;
    text-align: center;
}
.thumbnail .item .title{
    font-weight: bold;
    color: white;
    text-shadow: 5px 0px 14px black;
    
}
.thumbnail .item .description{
    color: white;
}
.arrows{
    position: absolute;
    top: 90%;
    right: 70%;
    width: 300px;
    max-width: 30%;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 5;
}
.arrows button{
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border:transparent;
    background: rgb(18 18 18 / 51%);
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    transition: 0.5s ease;
}
.arrows button:hover{
    color: rgb(18 18 18 / 51%);
    background: transparent;
    border: 1px solid  white;
}

.carousel .list .item:nth-child(1){
    z-index: 1;
}
.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) .description,
.carousel .list .item:nth-child(1) .buttons{
    transform: translateY(50px);
    filter: blur(20px);
    opacity: 0;
    animation: showContent 0.5s linear 1 forwards;
}
@keyframes showContent{
    to{
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}
.carousel .list .item:nth-child(1) .title{
    animation-delay: 1.2s;
}
.carousel .list .item:nth-child(1) .topic{
    animation-delay: 1.4s;
}

.carousel .list .item:nth-child(1) .description{
    animation-delay: 1.6s;
}

.carousel .list .item:nth-child(1) .buttons{
    animation-delay: 1.8s;
}

/*Next onclick effect */
.carousel.next .list .item:nth-child(1) img{
   width: 150px;
   height: 220px;
   position: absolute;
   left: 50%;
   bottom: 50px;
   border-radius: 20px;
   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){
    width: 0;
    overflow: hidden;
    animation: showThumbnail 0.5s linear 1 forwards;
}

@keyframes showThumbnail {
    to{
        width: 150px;
    }
    
}
.carousel.next .thumbnail{
    transform: translateX(150px);
    animation: transformThumbnail 0.5s linear 1 forwards;
}
@keyframes transformThumbnail {
    to{
        transform: translateX(0);
    }
}
/* Previous effect */
.carousel.prev .list .item:nth-child(2){
   z-index: 2;
}

.carousel.prev .list .item:nth-child(2) img{
    position: absolute;
    bottom: 0;
    left: 0;
    animation: outImage 0.5s linear 1 forwards;
}

@keyframes outImage{
    to{
        width: 150px;
        height: 220px;
        border-radius: 20px;
        left: 50%;
        bottom: 50px;
    }
}

.carousel.prev .thumbnail .item:nth-child(1){
    width: 0;
    overflow: hidden;
    opacity: 0;
    animation: showThumbnail 0.5s linear 1 forwards;

}

.carousel .list .item:nth-child(2) .author,
.carousel .list .item:nth-child(2) .title,
.carousel .list .item:nth-child(2) .topic,
.carousel .list .item:nth-child(2) .description,
.carousel .list .item:nth-child(2) .buttons { 
    animation: contentOut 0.5s 1s linear 1 forwards;
}

@keyframes contentOut{
    to{
        transform: translateY(-150px);
        filter: blur(20px);
        opacity: 0;
    }
}

.carousel.next .arrows button,
.carousel.prev .arrows button{
    pointer-events: none;
}

.time{
    width: 0%;
    height: 5px;
    background-color: rgb(255, 60, 0);
    position: absolute;
    z-index: 1000;
    top: 12%;
    left: 0;
}
.carousel.next .time,
.carousel.prev .time{
    width: 100%;
    animation: timeRunning 2s linear 1 forwards;
}
@keyframes timeRunning {
    to{
        width: 0;

    }
    
}
/* and (orientation: landscape) */

@media screen and (max-width: 800px)  {
    /* .carousel{
        overflow: scroll;
        height: 200vh;
    } */
   
    .carousel .list .item .content{
        position: absolute;
        padding-right: 0;
    }
    .carousel .list .item .content .title,
    .carousel .list .item .content .topic{
        font-size: 2em;
    }
    .thumbnail{
    /* display: none; */
   position: absolute;
   bottom: 85px;
    }
    .thumbnail .item{
        width: 100px;
        height: 150px;

    }
    .thumbnail .item img{
        width: 100%;
        height: 100%;
        border-radius: 10px;
    }
    .thumbnail .item .content{
        position: absolute;
        bottom: 5px;
        left: 0;
        right: 0;
        font-size: 0.6em;
        text-align: left;
    }
    .arrows{
    position: absolute;
    bottom: 0;
    right: 0;
    width: 300px;
}
.carousel .list .item .content{
    top: 15%;
}
    
}
@media  screen and (max-width: 450px) {
    .carousel .list .item .content{
        width: 90%;
        left: 50%;
        transform: translateX(-50%);
    }
    .carousel .list .item .content {
        position: absolute;
        top: 13%;
        width: 1140px;
        max-width: 80%;
        left: 43%;
        transform: translateX(-50%);
        padding-right: 0;
        box-sizing: border-box;
        color: white;
        text-shadow: 0 5px 10px black;
}
    .carousel .list .item .content .title,
    .carousel .list .item .content .topic{
        font-size: 1.5em;
    }
    .thumbnail{
        /* display: none; */
    }
    .arrows{
        width: 100%;
        right: 0;
        bottom: 0;
    }
    
}
/* 
@media screen and (max-width: 450px) and (orientation: landscape){
    .thumbnail{
        left: 82%;
        bottom: 0px;
    } 
    .thumbnail .item{
        width: 100px;
        height: 100px;
    }
    .carousel .list .item .content .description{
        max-width: 100%;     
    }
} */
