﻿.large-block .image-carousel {
    aspect-ratio: 2.73/1
}

.normal-block .image-carousel {
    aspect-ratio: 1.33/1;
}

.image-carousel {
    position: relative;
    width: 100%;

    overflow: hidden;
    cursor: pointer;
}

.carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    filter: brightness(0.6);
    pointer-events: none;
}

    .carousel-image[data-index="0"],
    .carousel-image.active {
        opacity: 1;
        filter: brightness(1);
    }
/*
.image-carousel:hover .carousel-image {
    animation: carouselFade var(--cycle, 9s) infinite, carouselBright var(--cycle, 9s) infinite;
    animation-timing-function: ease-in-out;
}
*/
@keyframes carouselFade {
    0%, 18% {
        opacity: 1;
    }

    22%, 82% {
        opacity: 0;
    }

    86%, 100% {
        opacity: 1;
    }
}

@keyframes carouselBright {
    0%, 18% {
        filter: brightness(1);
    }

    22%, 82% {
        filter: brightness(0.6);
    }

    86%, 100% {
        filter: brightness(1);
    }
}

.image-carousel:not(:hover) .carousel-image {
    animation: none !important;
    opacity: 0 !important;
    filter: brightness(0.6) !important;
    transition: opacity 0.4s ease, filter 0.4s ease;
}

    .image-carousel:not(:hover) .carousel-image[data-index="0"],
    .image-carousel:not(:hover) .carousel-image.active {
        opacity: 1 !important;
        filter: brightness(1) !important;
    }
