.timeline {
    margin-bottom: 2.22rem;
}

.timeline .slide-container {
    margin-top: 2rem;
    position: relative;
}

.timeline .timeline-slides {
    display: flex;
    flex-flow: row nowrap;
    align-items: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-top: 1rem;
}

.timeline .timeline-slides article {
    flex: 1 0 100%;
    position: relative;
    text-align: center;
    scroll-snap-align: center;
    overflow: clip;
}
.timeline .timeline-slides article .content {
    max-height: 20svh;
    overflow: hidden;
    position: relative;
    transition: max-height 0.15s ease-in-out;
}
.timeline .timeline-slides article .content .readmore {
    position:absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
}
.timeline .timeline-slides article .content .readmore::before {
    content: '';
    position:absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent,white);
}
.timeline .timeline-slides article .content .readmore button {
    position: relative;
    box-shadow: 0px 0px 30px 30px white;
}
.timeline .timeline-slides article .content.show {
    max-height: 200svh;
}
.timeline .timeline-slides article .content.show .readmore {
    display: none;
}
.timeline .timeline-slides p {
    max-width: min(100%,768px);
    margin: 1em auto;
    position: relative;
}

.timeline .timeline-slides h3.year {
    font-family:  var(--heading-type);
    font-size: 16.667rem;
    color: var(--optris-grey-blue-20);
    position: absolute;
    margin: 0;
    line-height: 0.9;
    width: 100%;
    will-change: transform;
    pointer-events: none;
}

.timeline .timeline-slides img {
    position: relative;
    max-width: min(100%,540px);
    margin-top: 2rem;
    will-change: transform;
    max-height: 25svh;
    width: 100%;
    object-fit: contain;
}

.timeline .timeline-arrows {
    display: flex;
    gap: 1em;
    position: absolute;
    right: 0;
    bottom: 50%;
    width: 100%;
    justify-content: space-between;
    transform: translateY(-100%);
}

.timeline .timeline-arrows button {
    background-color: transparent;
    aspect-ratio: 1/1;
    color: var(--optris-blue);
    border: 1px solid var(--optris-blue);
    width: 2.22rem;
    padding: 0;
    border-radius: 4px;
}

.timeline .timeline-arrows button::after {
    font-size: 2em;
}

.timeline .timeline-arrows button:focus-visible {
    background-color: var(--optris-blue);
    color: white;
}

@media (hover: hover) {
    .timeline .timeline-arrows button:hover {
        background-color: var(--optris-blue);
        color: white;
    }
}

.timeline-nav {
    margin-top: 0px;
    border-top: 1px var(--optris-grey-blue-10) solid;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
}
.timeline-nav button {
    background-color: transparent;
    padding: 1rem;
    color: var(--optris-blue);
    transition: font-weight 0.15s ease-in-out;
}
@media (hover: hover) {
    .timeline-nav button:hover {
        font-weight: 700;
    }
}
.timeline-nav button.active {
    font-weight: 700;
}

.timeline .timeline-slides article h3.year {
    transform: translateX(calc(50% * var(--percent)));
}

.timeline .timeline-slides article img {
    transform: translateX(calc(-20% * var(--percent)));
}

@media screen and (max-width: 768px) {
    .timeline .timeline-slides h3.year {
        font-size: 70px;
        margin-top: 0.5em;
    }
    .timeline .timeline-arrows {
        position: relative;
        bottom: auto;
        width: 100%;
        justify-content: space-between;
        /* transform: translateY(2.778rem); */
    }
    .timeline .timeline-arrows button {
        width: 4rem;
        background-color: white;
    }
    .timeline .timeline-arrows button::after {
        font-size: 3.33rem;
    }
    .timeline .timeline-nav {
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
        flex-flow: row nowrap;
        pointer-events: none;
        border: none;
    }
    .timeline .timeline-nav button {
        flex: 1 0 100%;
        scroll-snap-align: center;
        font-size: 2em;
    }
}