body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #222;
}

.slideshow {
    list-style: none;
    margin: 27px 0 0;
    padding: 0;
    position: relative;
    width: 100%;
    height: 120px;   /* Change from 100vh to a fixed height */
    overflow: hidden;
}

.slideshow li {
    position: absolute;
    width: 100%;
    height: 100%;
}

.slideshow li span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    opacity: 0;
    animation: textAnimation 25s linear infinite;
}

/* Animation Delay */
.slideshow li:nth-child(1) span {
    animation-delay: 0s;
}

.slideshow li:nth-child(2) span {
    animation-delay: 5s;
}

.slideshow li:nth-child(3) span {
    animation-delay: 10s;
}

.slideshow li:nth-child(4) span {
    animation-delay: 15s;
}

.slideshow li:nth-child(5) span {
    animation-delay: 20s;
}

/* Text Animation */
@keyframes textAnimation {
    0% {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    8% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    17% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    25% {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    100% {
        opacity: 0;
    }
}