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

a{
    text-decoration: none;
}
/* header{
    width: 1140px;
    max-width: 80%;
    margin: auto;
    height: 50px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 100;
}
header a{
    color: #eee;
    margin-right: 40px;
} */
/* carousel */
.carousel{
    height: 100vh;
    margin-top: -50px;
    width: 100vw;
    overflow: hidden;
    position: relative;
}
.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;
}
.carousel .list .item .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 .item .author{
    font-weight: bold;
    letter-spacing: 10px;
}
.carousel .list .item .title,
.carousel .list .item .topic{
    font-size: 5em;
    font-weight: bold;
    line-height: 1.3em;
}
.carousel .list .item .topic{
    color: #f1683a;
}
.carousel .list .item .buttons{
    display: grid;
    grid-template-columns: repeat(2, 130px);
    grid-template-rows: 40px;
    gap: 5px;
    margin-top: 20px;
}
.carousel .list .item .buttons button{
    border: none;
    background-color: #eee;
    letter-spacing: 3px;
    font-family: Poppins;
    font-weight: 500;
}
.carousel .list .item .buttons button:nth-child(2){
    background-color: transparent;
    border: 1px solid #fff;
    color: #eee;
}
/* thumbail */
.thumbnail{
    position: absolute;
    bottom: 50px;
    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{
    color: #fff;
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
}
.thumbnail .item .content .title{
    font-weight: 500;
}
.thumbnail .item .content .description{
    font-weight: 300;
}
/* arrows */
.arrows{
    position: absolute;
    top: 80%;
    right: 52%;
    z-index: 100;
    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: #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 */

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

.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(150px);
    }
}

/* running time */

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

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


/* 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: 150px;
        height: 220px;
        bottom: 50px;
        left: 50%;
        border-radius: 20px;
    }
}

.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;
}
.carousel.prev .list .item:nth-child(2) .content .author,
.carousel.prev .list .item:nth-child(2) .content .title,
.carousel.prev .list .item:nth-child(2) .content .topic,
.carousel.prev .list .item:nth-child(2) .content .des,
.carousel.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;
    }
}
/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    /* Carousel container adjustments */
    .carousel {
        height: 70vh;
        margin-top: 0;
    }
    
    /* Content positioning and sizing for mobile */
    .carousel .list .item .content {
        top: 25%;
        width: 90%;
        max-width: 90%;
        padding-right: 0;
        padding-left: 20px;
        padding-right: 20px;
        text-align: left;
    }
    
    /* Title and topic responsive sizing */
    .carousel .list .item .content .title,
    .carousel .list .item .content .topic {
        font-size: 2.5em;
        line-height: 1.2em;
        margin-bottom: 10px;
    }
    
    /* Description text */
    .carousel .list .item .content .des {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 20px;
        max-width: 100%;
    }
    
    /* Button adjustments */
    .carousel .list .item .buttons {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(2, 45px);
        gap: 10px;
        margin-top: 15px;
        max-width: 200px;
    }
    
    .carousel .list .item .buttons button {
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 5px;
        font-weight: 600;
    }
    
    /* Hide thumbnails completely on mobile */
    .thumbnail {
        display: none;
    }
    
    /* Arrow positioning for mobile */
    .arrows {
        top: 80%;
        right: 50%;
        transform: translateX(50%);
        width: 120px;
        max-width: 120px;
        justify-content: center;
    }
    
    .arrows button {
        width: 45px;
        height: 45px;
        font-size: 16px;
        background-color: rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(10px);
    }
}

/* Extra small devices */
@media screen and (max-width: 480px) {
    .carousel {
        height: 65vh;
    }
    
    .carousel .list .item .content {
        top: 30%;
        width: 95%;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .carousel .list .item .content .title,
    .carousel .list .item .content .topic {
        font-size: 2em;
        line-height: 1.1em;
    }
    
    .carousel .list .item .content .des {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .carousel .list .item .buttons {
        max-width: 180px;
    }
    
    .carousel .list .item .buttons button {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .thumbnail {
        display: none; /* Keep thumbnails hidden on small mobile */
    }
    
    .arrows {
        top: 75%;
        width: 100px;
    }
    
    .arrows button {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* Landscape orientation adjustments */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .carousel .list .item .content {
        top: 15%;
    }
    
    .carousel .list .item .content .title,
    .carousel .list .item .content .topic {
        font-size: 2.2em;
    }
    
    .thumbnail {
        display: none; /* Keep thumbnails hidden in landscape mobile */
    }
    
    .arrows {
        top: 65%;
    }
}

/* Mobile touch and interaction improvements */
@media screen and (max-width: 768px) {
    /* Improve touch targets */
    .arrows button {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Add hover effects for mobile (touch) */
    .arrows button:active {
        transform: scale(0.95);
        background-color: rgba(255, 255, 255, 0.6);
    }
    
    /* Ensure carousel content doesn't interfere with mobile header */
    .carousel {
        position: relative;
        z-index: 1;
    }
    
    /* Prevent text selection on carousel elements */
    .carousel .list .item .content {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* Thumbnails are hidden on mobile, so no scrolling needed */
    
    /* Better button visibility on mobile */
    .carousel .list .item .buttons button {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
    }
    
    .carousel .list .item .buttons button:active {
        transform: translateY(1px);
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    }
}

/* High DPI displays */
@media screen and (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2) {
    .carousel .list .item .content .title,
    .carousel .list .item .content .topic {
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
    }
}