body {
    box-sizing: border-box;
}


.slide-enter {
    animation: slideIn 0.8s ease-in-out;
}

.slide-exit {
    animation: slideOut 0.8s ease-in-out;
}

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}


.hero-overlay {
    background: linear-gradient(45deg, #d79df2cc, rgba(118, 75, 162, 0.8));
}

a {
    text-decoration: none;
}



/* carousel */
.carousel {
    position: relative;
    width: 100%;
    min-height: 100svh;
    height: 100svh;
    overflow: hidden;
    background: #061a1f;
}

.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: 25%;
    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: 4em;
    font-weight: bold;
    line-height: 1.3em;
}

.carousel .list .item .topic {
    color: #ffffff;
}

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

/* =========================
   HERO RESPONSIVE FIXES
   ========================= */

@media (max-width: 768px) {
    .carousel .list .item .content {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        max-width: 92%;
        padding-right: 0;
        text-align: left;
    }

    .carousel .list .item .topic {
        font-size: clamp(2rem, 6vw, 2.6rem);
        line-height: 1.15;
        margin-bottom: 12px;
    }

    .carousel .list .item .des h3 {
        font-size: clamp(1rem, 3.8vw, 1.2rem);
        font-weight: 600;
        margin-bottom: 12px;
    }

    .carousel .list .item .des {
        font-size: 0.95rem;
        line-height: 1.6;
        max-width: 100%;
    }
}

@media (max-width: 390px) {
    .carousel .list .item .topic {
        font-size: 1.9rem;
    }

    .carousel .list .item .des {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .carousel .list .item::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(to bottom,
                rgba(6, 26, 31, 0.65),
                rgba(6, 26, 31, 0.85));
        z-index: 1;
    }

    .carousel .list .item .content {
        z-index: 2;
    }
}

@media (max-width: 768px) {
    .carousel .list .item {
        position: absolute;
        inset: 0;
    }

    .carousel .list .item::after {
        z-index: 1;
    }

    .carousel .list .item .content {
        position: relative;
        z-index: 2;
    }
}

@media (max-width: 768px) {
    .carousel .list .item .content {
        padding-top: 20px;
        padding-bottom: 40px;
    }
}

/* =========================
   CAROUSEL VISIBILITY FIX
   ========================= */

.carousel .list .item {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.carousel .list .item.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* --- CAROUSEL VISIBILITY SAFETY NET --- */
.carousel .list .item {
    visibility: hidden;
    pointer-events: none;
}

.carousel .list .item.active {
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

/* Failsafe: first slide visible even before JS */
.carousel .list .item:first-child {
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
}

.carousel .list .item img {
    opacity: 1 !important;
    filter: none;
    position: absolute;
    inset: 0;
    z-index: 0;
}

.carousel .list .item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
            rgba(6, 26, 31, 0.65) 0%,
            rgba(6, 26, 31, 0.35) 0%,
            rgba(6, 26, 31, 0.1) 0%,
            rgba(6, 26, 31, 0) 0%);
    z-index: 1;
}

.carousel .list .item .content {
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .carousel .list .item img {
        transform: scale(1.03);
    }
}

/* Dots navigation */
.dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 12px;
    z-index: 100;
}

.dots button {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dots button.active {
    background-color: #fff;
    border-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.dots button:hover {
    background-color: #fff;
    opacity: 0.8;
}

/* 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: rgb(7, 1, 1);
    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: 50px;
    height: 70px;
    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: 1o0;
    }
}

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

@media screen and (max-width: 678px) {
    .carousel .list .item .content {
        padding-right: 0;
    }

    .carousel .list .item .content .title {
        font-size: 30px;
    }
}