/* General */

.acf-block.timeline {
    position: relative;
    overflow: visible;
    background:
        radial-gradient(circle at 8% 20%, rgba(216, 235, 234, .62), transparent 22%),
        radial-gradient(circle at 92% 72%, rgba(184, 168, 141, .13), transparent 18%),
        var(--cream);
}

.timeline .timeline-head {
    display: grid;
    grid-template-columns: .82fr 1.18fr;
    gap: 70px;
    align-items: end;
    margin-bottom: 62px;
}

.timeline .timeline-head .lead {
    margin: 0;
}

.timeline .timeline-scroll-hint {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    color: var(--teal-dark);
    font-weight: 700;
    font-size: .92rem;
}

.timeline .timeline-mouse {
    position: relative;
    width: 24px;
    height: 36px;
    border: 2px solid currentColor;
    border-radius: 14px;
}

.timeline .timeline-mouse::after {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 4px;
    height: 7px;
    border-radius: 4px;
    background: currentColor;
    content: "";
    transform: translateX(-50%);
    animation: timeline-scroll-dot 1.8s ease-in-out infinite;
}

@keyframes timeline-scroll-dot {
    0% {
        opacity: 0;
        transform: translate(-50%, 0);
    }
    30% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, 12px);
    }
}

.timeline .timeline-wrap {
    position: relative;
    padding: 18px 0;
}

.timeline .timeline-track {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(86, 178, 184, .18);
    transform: translateX(-50%);
}

.timeline .timeline-progress {
    position: absolute;
    inset: 0 0 auto;
    height: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--teal), var(--teal-dark));
    box-shadow: 0 0 22px rgba(86, 178, 184, .35);
    transition: height .08s linear;
}

.timeline .timeline-progress::after {
    position: absolute;
    bottom: -7px;
    left: 50%;
    width: 16px;
    height: 16px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: var(--teal-dark);
    box-shadow: 0 5px 18px rgba(13, 26, 41, .18);
    content: "";
    transform: translateX(-50%);
}

.timeline .timeline-year-float {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 9;
    width: max-content;
    margin: 0;
    padding: 9px 18px;
    background: var(--navy);
    border-radius: 999px;
    box-shadow: 0 10px 26px rgba(13, 26, 41, .18);
    color: #fff;
    font-weight: 700;
    letter-spacing: .08em;
    transform: translate(-50%, -20px);
}

.timeline .timeline-year-float.is-stuck {
    position: fixed;
    top: 112px;
}

.timeline .timeline-year-float.is-bottom {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 50% !important;
}

.timeline .timeline-list {
    display: grid;
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline .timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 86px 1fr;
    align-items: center;
    min-height: 310px;
}

.timeline .timeline-item:nth-child(odd) .timeline-card {
    grid-column: 1;
    transform: translateX(-60px) scale(.97);
    transform-origin: right center;
}

.timeline .timeline-item:nth-child(even) .timeline-card {
    grid-column: 3;
    transform: translateX(60px) scale(.97);
    transform-origin: left center;
}

.timeline .timeline-node {
    z-index: 4;
    grid-column: 2;
    grid-row: 1;
    width: 22px;
    height: 22px;
    margin: auto;
    background: #fff;
    border: 5px solid var(--teal);
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(86, 178, 184, .11);
    transition: transform .35s ease, background .35s ease, border-color .35s ease;
}

.timeline .timeline-item.is-active .timeline-node {
    background: var(--teal-dark);
    border-color: #fff;
    box-shadow: 0 0 0 9px rgba(86, 178, 184, .19), 0 0 28px rgba(86, 178, 184, .4);
    transform: scale(1.25);
}

.timeline .timeline-card {
    position: relative;
    display: grid;
    overflow: hidden;
    gap: 22px;
    padding: 26px;
    background: rgba(255, 255, 255, .95);
    border: 1px solid rgba(13, 26, 41, .08);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    transition:
        opacity .7s cubic-bezier(.25, .46, .45, .94),
        transform .7s cubic-bezier(.25, .46, .45, .94),
        box-shadow .28s ease,
        border-color .28s ease;
}

.timeline .timeline-card.has-image {
    grid-template-columns: minmax(0, 1fr) 150px;
}

.timeline .timeline-item.is-visible .timeline-card {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.timeline .timeline-card:hover {
    border-color: rgba(86, 178, 184, .42);
    box-shadow: var(--shadow);
}

.timeline .timeline-year {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--teal-dark);
    font-weight: 700;
    letter-spacing: .06em;
}

.timeline .timeline-card p {
    margin: 10px 0 0;
    color: rgba(13, 26, 41, .72);
}

.timeline .timeline-card h3 {
    margin-top: .2rem;
}

.timeline .timeline-card-image {
    position: relative;
    z-index: 1;
    min-height: 170px;
    overflow: hidden;
    background: var(--ice);
    border-radius: 17px;
}

.timeline .timeline-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive */

@media only screen and (max-width: 991.98px) {
    .timeline .timeline-head {
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .timeline .timeline-track {
        left: 28px;
        transform: none;
    }

    .timeline .timeline-year-float {
        left: 28px;
    }

    .timeline .timeline-year-float.is-stuck {
        left: 28px;
    }

    .timeline .timeline-item {
        grid-template-columns: 58px 1fr;
        min-height: auto;
    }

    .timeline .timeline-item:nth-child(odd) .timeline-card,
    .timeline .timeline-item:nth-child(even) .timeline-card {
        grid-column: 2;
        transform: translateX(45px) scale(.98);
    }

    .timeline .timeline-item.is-visible .timeline-card {
        transform: none;
    }

    .timeline .timeline-node {
        grid-column: 1;
    }
}

@media only screen and (max-width: 700px) {
    .acf-block.timeline {
        overflow: visible;
    }

    .timeline .timeline-head {
        margin-bottom: 42px;
    }

    .timeline .timeline-scroll-hint {
        display: none;
    }

    .timeline .timeline-year-float {
        left: 19px;
        font-size: .82rem;
    }

    .timeline .timeline-year-float.is-stuck {
        top: 94px;
        left: 19px;
    }

    .timeline .timeline-track {
        left: 19px;
    }

    .timeline .timeline-item {
        grid-template-columns: 40px 1fr;
    }

    .timeline .timeline-node {
        width: 18px;
        height: 18px;
        border-width: 4px;
    }

    .timeline .timeline-card,
    .timeline .timeline-card.has-image {
        grid-template-columns: 1fr;
        gap: 17px;
        padding: 22px;
    }

    .timeline .timeline-card-image {
        min-height: 0;
    }

    .timeline .timeline-card-image img {
        aspect-ratio: 4 / 3;
    }
}

@media (prefers-reduced-motion: reduce) {
    .timeline .timeline-mouse::after {
        animation: none;
    }

    .timeline .timeline-card {
        opacity: 1 !important;
        transform: none !important;
    }

    .timeline .timeline-progress {
        height: 100% !important;
    }
}
