:root
{
    --body-padding-top: 100px;
    --animated-delay: 0;
}

nav li.active a {
    color: #999;
}



.carousel {
    width: 100vw;
    height: 600px;
    overflow: hidden;
    background: #fff;
    position: relative;
}

.carousel .carousel-slide
{
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    animation: fadeInOut 24s infinite;
}

.carousel .carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomEffect 8s ease-in-out infinite;
}


.carousel .carousel-slide:nth-child(1) {animation-delay: 0s;}
.carousel .carousel-slide:nth-child(2) {animation-delay: 8s;}
.carousel .carousel-slide:nth-child(3) {animation-delay: 16s;}

.carousel .carousel-slide:nth-child(1) img {animation-delay: 0s;}
.carousel .carousel-slide:nth-child(2) img {animation-delay: 8s;}
.carousel .carousel-slide:nth-child(3) img {animation-delay: 16s;}



.carousel .carousel-slide-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-family: var(--font-family);
    font-size: 2em;
    text-align: center;
    z-index: 2;
    opacity: 0;
    animation: titleFadeIn 8s ease-in infinite;
    animation-fill-mode: forwards;
    text-shadow: 0 0 10px #000;

    padding: 5px 10px;
}

.carousel .carousel-slide-title mark {
    padding-left:  10px;
    padding-right:  10px;
    text-shadow: none;
    background-color: lightpink;
    color: black;
}


.carousel .carousel-slide:nth-child(1) .carousel-item-title {
    animation-delay: 0s;
}

.carousel .carousel-slide:nth-child(2) .carousel-item-title {
    animation-delay: 8s;
}

.carousel .carousel-slide:nth-child(3) .carousel-item-title {
    animation-delay: 16s;
}


@keyframes fadeInOut {
    0%, 31.25% { opacity: 1; }
    33.33%, 100% { opacity: 0; }
}

@keyframes zoomEffect {
    0% { transform: scale(1); }
    75% { transform: scale(1.05); }
    100% { transform: scale(1.1); }
}

@keyframes titleFadeIn {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

@media only screen and (max-width: 1024px) {

    :root {
        --body-padding-top: 80px;
    }



    .carousel {height: 400px}
    .carousel .carousel-slide-title {font-size: 28px; white-space: nowrap; padding: 40px}
    .carousel .carousel-slide-title mark {
        display: block;
    }


}
