/* =====================================================
   GLOBAL
===================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Dölj ev. textinnehåll i span (01, 02 osv) */
.cb-slideshow li span {
    font-size: 0;
}

/* =====================================================
   SLIDESHOW CONTAINER
===================================================== */

.cb-slideshow,
.cb-slideshow::after {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.cb-slideshow::after {
    content: '';
    background: transparent url(../img/pattern.png) repeat;
}

/* =====================================================
   BACKGROUND IMAGES
===================================================== */

.cb-slideshow li span {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    animation: imageAnimation 36s linear infinite;
    will-change: opacity, transform;
}

/* =====================================================
   TITLE OVERLAY
===================================================== */

.cb-slideshow li div {
    position: absolute;
    bottom: 6vh;
    width: 100%;
    text-align: center;
    opacity: 0;
    animation: titleAnimation 36s linear infinite;
    z-index: 2;
}

.cb-slideshow li div h3 {
    font-family: 'BebasNeueRegular', 'Arial Narrow', Arial, sans-serif;
    font-size: clamp(42px, 7vw, 140px);
    line-height: 1;
    padding: 0 1.25rem;
    color: rgba(255,255,255,0.85);
}

/* =====================================================
   IMAGES + DELAYS
===================================================== */

.cb-slideshow li:nth-child(1) span { background-image: url(../img/1.jpg); }

.cb-slideshow li:nth-child(2) span {
    background-image: url(../img/2.jpg);
    animation-delay: 6s;
}
.cb-slideshow li:nth-child(3) span {
    background-image: url(../img/3.jpg);
    animation-delay: 12s;
}
.cb-slideshow li:nth-child(4) span {
    background-image: url(../img/4.jpg);
    animation-delay: 18s;
}
.cb-slideshow li:nth-child(5) span {
    background-image: url(../img/5.jpg);
    animation-delay: 24s;
}
.cb-slideshow li:nth-child(6) span {
    background-image: url(../img/6.jpg);
    animation-delay: 30s;
}

/* Title delays */

.cb-slideshow li:nth-child(2) div { animation-delay: 6s; }
.cb-slideshow li:nth-child(3) div { animation-delay: 12s; }
.cb-slideshow li:nth-child(4) div { animation-delay: 18s; }
.cb-slideshow li:nth-child(5) div { animation-delay: 24s; }
.cb-slideshow li:nth-child(6) div { animation-delay: 30s; }

/* =====================================================
   IMAGE ZOOM ANIMATION (ORIGINAL STYLE)
===================================================== */

@keyframes imageAnimation {
    0% {
        opacity: 0;
        transform: scale(1);
    }
    8% {
        opacity: 1;
        transform: scale(1.05);
    }
    17% {
        opacity: 1;
        transform: scale(1.1);
    }
    22% {
        opacity: 0;
        transform: scale(1.1) translateY(-20%);
    }
    25% {
        opacity: 0;
        transform: scale(1.1) translateY(-100%);
    }
    100% {
        opacity: 0;
    }
}

/* =====================================================
   TITLE ANIMATION
===================================================== */

@keyframes titleAnimation {
    0% {
        opacity: 0;
        transform: translateY(-200%);
    }
    8% {
        opacity: 1;
        transform: translateY(0);
    }
    17% {
        opacity: 1;
        transform: translateY(0);
    }
    19% {
        opacity: 0;
        transform: translateY(100%);
    }
    100% {
        opacity: 0;
    }
}

/* =====================================================
   FALLBACK
===================================================== */

.no-cssanimations .cb-slideshow li span {
    opacity: 1;
}

/* ====================================*
