.carousel {
    
    height: 100vh;
    position: relative;
    overflow: hidden;   
    
    
}

.carousel .list .item
{
    position: absolute;
    inset: 0 0 0 0;
    
}
.carousel .list .item img
{
    width: 100%;
    height: 100%;
    object-fit: cover;


}
.carousel .list .item .content {
    position: absolute;
    top: 20%;
    left: 80px;         /* push it from left edge */
    transform: none;    /* remove centering */
    width: 600px;       /* restrict width */
    max-width: 90%;
    color: white;
    text-align: left;   /* keep text aligned left */
    padding-right: 0;   /* remove extra right padding */
    box-sizing: border-box;
}

.carousel .list .content .no,
.carousel .list .content .tittle
{
    font-size: 45px;
}
.carousel .list .button
{
    text-align: start;
    margin-top: 25px;
}
.thumbnail
{
    position: absolute;
    bottom: 50px;
    color: white;
    left: 50%;
    width: max-content;
    z-index: 100;
    display: flex;
    gap: 20px; 
}
.thumbnail .item
{
    width: 150px;
    height: 220px;
    flex-shrink: 0;
    position: relative;
}
.thumbnail .item img
{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    

}
.thumbnail .item .content
{
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;    
}
.arrows
{
    position: absolute;
    top: 80%;
    right: 52%;
    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: white;
    font-weight: bold;
    font-size: large;
    transition: .5s;
    z-index: 100;

}
.arrows button:hover
{
    background-color: #eee;
    color: #555;
}

.carousel .list .item:nth-child(1){
    z-index: 1;
}
.carousel .list .item:nth-child(1) .no,
.carousel .list .item:nth-child(1) .tittle,
.carousel .list .item:nth-child(1) .button{
    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) .no
{
    animation-delay: 1.3s;
}
.carousel .list .item:nth-child(1) .tittle{

    animation-delay: 1.4s;

}
.carousel .list .item:nth-child(1) .button
{
    animation-delay: 1.8s;
}

.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; /* fixed case */
}

@keyframes showImage {
    to {
        width: 100% ;
        height: 100%;
        left: 0;
        bottom: 0;
        border-radius: 0;
    }
}

.carousel.next .thumbnail .item:nth-last-child(1) { /* fixed selector */
    width: 0;
    overflow: hidden;
    animation: showthumbnail 0.5s linear 1 forwards;
}

.carousel.prev .list .item:nth-child(2) .no,  /* fixed selector */
.carousel.prev .list .item:nth-child(2) .tittle,
.carousel.prev .list .item:nth-child(2) .button {
    animation: contentout 1.5s linear 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);
    }
}

.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.prev .list .item:nth-child(2).no,
.carousel.prev .list .item:nth-child(2).tittle,
.carousel.prev .list .item:nth-child(2).button
{
    animation: contentout 1.5s linear forwards;
}

@keyframes contentout{
    to{
        transform: translateX(-150px);
        filter: blur(20px);
        opacity: 0;
    }
}

.carousel.next .arrows button,
.carousel.prev .arrows button{
    pointer-events: none;
}
@media screen and (max-width:678px){
    .carousel .list .item .content{
        padding-right: 0;
    }
    .carousel .list .item .content .tittle
    {
        font-size: 30px;
    }
}
/* Fade/slide in from LEFT instead of bottom */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-120px);
    filter: blur(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

/* Animate active big slide */
.carousel.next .list .item:nth-child(1) .content,
.carousel.prev .list .item:nth-child(2) .content {
  animation: fadeInLeft 0.7s ease forwards;
}

/* Animate title and text inside with stagger */
.carousel.next .list .item:nth-child(1) .content .title,
.carousel.prev .list .item:nth-child(2) .content .title {
  animation: fadeInLeft 0.7s ease forwards;
  animation-delay: 0.2s;
}

.carousel.next .list .item:nth-child(1) .content .name,
.carousel.prev .list .item:nth-child(2) .content .name {
  animation: fadeInLeft 0.7s ease forwards;
  animation-delay: 0.4s;
}

.carousel.next .list .item:nth-child(1) .content .des,
.carousel.prev .list .item:nth-child(2) .content .des {
  animation: fadeInLeft 0.7s ease forwards;
  animation-delay: 0.6s;
}
@media screen and (max-width: 768px) {
  .carousel .list .item .content {
    left: 20px;
    width: calc(100% - 40px);
    top: 15%;
  }
}

