@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 */
.tscarousel{
    height: 100vh;
    margin-top: -50px;
    width: 100vw;
    overflow: hidden;
    position: relative;
}
.tscarousel .list .item{
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0 0 0 0;
}
.tscarousel .list .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tscarousel .list .item .content{
    position: absolute;
    top: 45%;
    width: 900px;
    max-width: 80%;
    left: 26%;
    transform: translateX(-50%);
    padding-right: 4%;
    box-sizing: border-box;
    color: #000000;
    text-shadow: 0 5px 10px white;
    background: rgba(255, 255, 255, 0.4); /* Transparan putih 40% */
    border-radius: 15px; /* Sudut melengkung */
    padding: 20px; /* Tambahkan padding untuk jarak konten */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Bayangan lembut */
}


/* Untuk layar monitor sedang (laptop besar, 1366px hingga 1599px) */
@media (min-width: 1366px) and (max-width: 1599px) {
    .tscarousel .list .item .content {
        width: 642px; /* Lebar sedikit dikurangi */
        font-size: 13px; /* Ukuran font proporsional */
    }
}

/* Untuk laptop standar (1024px hingga 1365px) */
@media (min-width: 1024px) and (max-width: 1365px) {
    .tscarousel .list .item .content {
        width: 414px; /* Gunakan lebar relatif */
        font-size: 10px; /* Font lebih kecil */
        top: 45%;
    }
}

/* Untuk tablet (768px hingga 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .tscarousel .list .item .content {
        width: 300px; /* Lebar lebih kecil */
        padding: 15px; /* Padding lebih kecil */
        font-size: 9px;
    }
}

/* Untuk ponsel besar (481px hingga 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .tscarousel .list .item .content {
        width: 90%; /* Hampir penuh layar */
        padding: 10px;
        font-size: 13px;
        border-radius: 12px; /* Radius sedikit lebih kecil */
    }
}

/* Untuk ponsel kecil (max 480px) */
@media (max-width: 480px) {
    .tscarousel .list .item .content {
        width: 95%; /* Hampir penuh layar */
        padding: 10px;
        font-size: 12px;
        border-radius: 10px; /* Radius lebih kecil */
    }
}




.tscarousel .list .item .author{
    font-weight: bold;
    letter-spacing: 10px;
}
.tscarousel .list .item .title,
.tscarousel .list .item .topic{
    font-size: 2.5em;
    font-weight: bold;
    line-height: 1.3em;
}
.tscarousel .list .item .topic{
    color: #f1683a;
}
.tscarousel .list .item .buttons{
    display: grid;
    grid-template-columns: repeat(2, 130px);
    grid-template-rows: 40px;
    gap: 5px;
    margin-top: 20px;
}
.tscarousel .list .item .buttons button{
    border: none;
    background-color: #e8bf6f;
    letter-spacing: 1px;
    font-family: Poppins;
    font-weight: 500;
    cursor: pointer;
}
.tscarousel .list .item .buttons button:nth-child(2){
    background-color: transparent;
    border: 1px solid #fff;
    color: #eee;
}
/* thumbail */
.tsthumbnail{
    position: absolute;
    bottom: 50px;
    left: 50%;
    width: max-content;
    z-index: 100;
    display: flex;
    gap: 20px;
}
.tsthumbnail .item{
    width: 150px;
    height: 220px;
    flex-shrink: 0;
    position: relative;
}
.tsthumbnail .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}
.tsthumbnail .item .content{
    color: #fff;
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
}
.tsthumbnail .item .content .title{
    font-weight: 500;
}
.tsthumbnail .item .content .description{
    font-weight: 300;
}
/* tsarrows */
.tsarrows{
    position: absolute;
    top: 87%;
    right: 40%;
    z-index: 100;
    width: 300px;
    max-width: 30%;
    display: flex;
    gap: 10px;
    align-items: center;
}
.tsarrows button{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #eee4;
    border: none;
    color: #fff;
    font-family: monospace;
    font-weight: bold;
    transition: .5s;
}
.tsarrows button:hover{
    background-color: #fff;
    color: #b69595;
}

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

/* animation text in first item */

.tscarousel .list .item:nth-child(1) .content .author,
.tscarousel .list .item:nth-child(1) .content .title,
.tscarousel .list .item:nth-child(1) .content .topic,
.tscarousel .list .item:nth-child(1) .content .des,
.tscarousel .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;
    }
}
.tscarousel .list .item:nth-child(1) .content .title{
    animation-delay: 1.2s!important;
}
.tscarousel .list .item:nth-child(1) .content .topic{
    animation-delay: 1.4s!important;
}
.tscarousel .list .item:nth-child(1) .content .des{
    animation-delay: 1.6s!important;
}
.tscarousel .list .item:nth-child(1) .content .buttons{
    animation-delay: 1.8s!important;
}
/* create animation when next click */
.tscarousel.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: 0;
    }
}

.tscarousel.next .tsthumbnail .item:nth-last-child(1){
    overflow: hidden;
    animation: showThumbnail .5s linear 1 forwards;
}
.tscarousel.prev .list .item img{
    z-index: 100;
}
@keyframes showThumbnail{
    from{
        width: 0;
        opacity: 0;
    }
}
.tscarousel.next .tsthumbnail{
    animation: effectNext .5s linear 1 forwards;
}

@keyframes effectNext{
    from{
        transform: translateX(150px);
    }
}

/* running time */

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

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


/* prev click */

.tscarousel.prev .list .item:nth-child(2){
    z-index: 2;
}

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

.tscarousel.prev .tsthumbnail .item:nth-child(1){
    overflow: hidden;
    opacity: 0;
    animation: showThumbnail .5s linear 1 forwards;
}
.tscarousel.next .tsarrows button,
.tscarousel.prev .tsarrows button{
    pointer-events: none;
}
.tscarousel.prev .list .item:nth-child(2) .content .author,
.tscarousel.prev .list .item:nth-child(2) .content .title,
.tscarousel.prev .list .item:nth-child(2) .content .topic,
.tscarousel.prev .list .item:nth-child(2) .content .des,
.tscarousel.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) {
    .tscarousel .list .item .content{
        padding-right: 0;
        top: 17%;
        left: 50%;
    }
    .tscarousel .list .item .content .title{
        font-size: 30px;
    }
}