@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');

body {
    font-family: Poppins;
    background-color: black;
    color: #eee;
    margin: 0;
    font-size: 12px;
}

a {
    text-decoration: none;
    color: #eee;
}

header {
    width: 1140px;
    max-width: 80%;
    margin: auto;
    height: 50px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 100;
}

header a {
    margin-right: 40px;
}

/* Carousel */
.carousel {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    margin-top: -50px;
    position: relative;
}

.carousel .list .items {
    position: absolute;
    inset: 0 0 0 0;
}

.carousel .list .items img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel .list .items .content {
    position: absolute;
    top: 20%;
    width: 1140px;
    max-width: 80%;
    left: 50%;
    transform: translateX(-50%);
    padding-right: 30%;
    box-sizing: border-box;
    color: #fff;
    text-shadow: 0 5px 10px #0004;
}

.carousel .list .items .content .author {
    font-weight: bold;
    letter-spacing: 10px;
}

.carousel .list .items .content .title {
    font-weight: bold;
    font-size: 5em;
    list-style: 1.3em;
}

.carousel .list .items .content .topic {
    color: #f1683a;
    font-weight: bold;
    font-size: 5em;
    line-height: 0.8;
    margin-bottom: 20px;
}

.carousel .list .items .content .buttons {
    display: grid;
    grid-template-columns: repeat(2, 130px);
    grid-template-rows: 40px;
    gap: 5px;
    margin-top: 20px;
}

.carousel .list .items .content button {
    border: none;
    background-color: #eee;
    color: #f1683a;
    letter-spacing: 3px;
    font-family: Poppins;
    font-weight: 500;
}

.carousel .list .items .content button:nth-child(2) {
    background-color: #f1683a;
    color: #eee;
    border: 1px solid #eee;
}

/* Thumbnails */
.thumbnail {
    position: absolute;
    bottom: 50px;
    left: 50%;
    width: max-content;
    z-index: 100;
    display: flex;
}

.thumbnail .items {
    width: 150px;
    height: 220px;
    flex-shrink: 0;
    position: relative;
    margin-right: 5px;
}

.thumbnail .items img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    border: 1px #eee solid;
}

.thumbnail .items .content {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
}

.thumbnail .items .content .title {
    font-weight: bold;
}

/* Arrows */
.arrows {
    position: absolute;
    top: 80%;
    right: 52%;
    width: 300px;
    max-width: 30%;
    display: flex;
    gap: 10px;
}

.arrows button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #eee8;
    border: none;
    font-family: monospace;
    color: #f1683a;
    font-weight: bold;
    font-size: large;
    border: 1px solid #f1683a;
    transition: .5s;
    z-index: 100;
}

.arrows button:hover {
    background-color: #eee;
    color: #f1683a;
}

.carousel .list .items:nth-child(1) {
    z-index: 1;
}

.carousel .list .items:nth-child(1) .author,
.carousel .list .items:nth-child(1) .title,
.carousel .list .items:nth-child(1) .topic,
.carousel .list .items:nth-child(1) .des,
.carousel .list .items: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 .items:nth-child(1) .title {
    animation-delay: 1.2s;
}

.carousel .list .items:nth-child(1) .topic {
    animation-delay: 1.4s;
}

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

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

/* Effect Next Click */
.carousel.next .list .items: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 .items:nth-child(1) {
    width: 0;
    overflow: hidden;
    animation: showThumbnails .5s linear 1 forwards;
}

@keyframes showThumbnails {
    to {
        width: 150px;
    }
}

.carousel.next .thumbnail {
    transform: translateX(150px);
    animation: transformThumbnail .5s linear 1 forwards;
}

@keyframes transformThumbnail {
    to {
        transform: translateX(0);
    }
}

.carousel.prev .list .items:nth-child(2) {
    z-index: 2;
}

.carousel.prev .list .items: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 .items:nth-child(1){
    width: 0;
    overflow: hidden;
    opacity: 0;
    animation: showThumbnails 0.5s linear 1 forwards;
}

.carousel.prev .list .items:nth-child(2) .author,
.carousel.prev .list .items:nth-child(2) .title,
.carousel.prev .list .items:nth-child(2) .topic,
.carousel.prev .list .items:nth-child(2) .des,
.carousel.prev .list .items:nth-child(2) .buttons {
    animation: contentOut 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 */
.time {
    width: 0%;
    height: 5px;
    background-color: #f1683a;
    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 .items .content {
        padding-right: 0;
    }
    .carousel .list .items .content .title
    {
        font-size: 30px;
    }
    .carousel .list .items .content .topic
    {
        font-size: 40px;
    }
    .carousel .list .items .content .buttons {
        display: grid;
        grid-template-columns: 100px;
        grid-template-rows: repeat(2, 40px);
        gap: 5px;
        margin-top: 20px;
    }
    .thumbnail .items {
        width: 75px;
        height: 110px;
        flex-shrink: 0;
        position: relative;
    }
    @keyframes outImage {
        to {
            width: 75px;
            height: 110px;
            border-radius: 20px;
            left: 50%;
            bottom: 50px;
        }
        
    .carousel.next .list .items:nth-child(1) img {
        width: 75px;
        height: 110px;
        position: absolute;
        left: 50%;
        bottom: 50px;
        border-radius: 20px;
        animation: showImage 0.5s linear 1 forwards;
    }
    
    @keyframes showThumbnails {
        to {
          width: 75px;
        }
    }
    .carousel.next .thumbnail {
        transform: translateX(75px);
        animation: transformThumbnail .5s linear 1 forwards;
    }
    .thumbnail {
        position: absolute;
        bottom: 50px;
        left: 50%;
        width: max-content;
        z-index: 100;
        display: flex;
        padding-right: 5px;
    }
    .thumbnail .items .content {
        position: absolute;
        bottom: 10px;
        left: 10px;
        right: 20px;
    }
  
}
