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

/* carousel */
.carousel{
    height: 70vh;
    margin-top: auto;
    margin-bottom: 7.14rem;
    padding: 1rem;
    width: 70vw;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.carousel .list .item{
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0 0 0 0;
}
.carousel .list .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* thumbail */
.thumbnail{
    position: absolute;
    bottom: 3%;
    left: 50%;
    width: max-content;
    z-index: 100;
    display: flex;
    gap: 1.25rem;
    z-index: 4;
    background-color: rgba(255, 250, 240, 0.453);
    border-radius: .625rem;
    backdrop-filter: blur(1rem);
}
.thumbnail .item{
    width: 5.125rem;
    height: 5.125rem;;
    flex-shrink: 0;
    position: relative;
}
.thumbnail .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1.25rem;
}
/* arrows */
.arrows{
    position: absolute;;
    bottom: 7%;
    right: 52%;
    z-index: 100;
    width: 18.75rem;
    max-width: 30%;
    display: flex;
    gap: .625rem;
    align-items: center;
}
.arrows button{
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: rgba(141, 134, 134, 0.758);
    border: none;
    color: #fff;
    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 */

@keyframes showContent{
    to{
        transform: translateY(0rem);
        filter: blur(0rem);
        opacity: 1;
    }
}
/* create animation when next click */
.carousel.next .list .item:nth-child(1) img{
    width: 9.375rem;
    height: 13.75rem;
    position: absolute;
    bottom: 3.125rem;
    left: 50%;
    border-radius: 1.875rem;
    animation: showImage .5s linear 1 forwards;
}
@keyframes showImage{
    to{
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        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(9.375rem);
    }
}


/* 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: 9.375rem;
        height: 13.75rem;
        bottom: 3.125rem;
        left: 50%;
        border-radius: 1.25rem;
    }
}

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