﻿.timeline-container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 1rem;
}

.timeline-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: -3;
    position: relative;
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr 160px 1fr;
    width: 100%;
    margin-inline: auto;
    view-timeline-name: --section;
    margin-block: 0 120px
}

    .timeline-item:last-child {
        margin-block: 0;
    }

.timeline-left {
    text-align: right;
    padding-right: 2rem;
}

    .timeline-left h3 {
        font-size: calc(2.5rem + 1vmin);
        font-weight: 700;
        letter-spacing: -0.02em;
        line-height: 1;
        margin-bottom: 0;
    }

    .timeline-left span {
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #6b7280;
    }

.timeline-left-date {
    position: sticky;
    top: 50vh;
}

.timeline-center {
    display: flex;
    justify-content: center;
    z-index: 1;
}

.timeline-circle {
    width: 14px;
    height: 14px;
    background: var(--catalina-blue);
    border-radius: 50%;
    position: sticky;
    top: 49vh;
    margin: 0.5rem;
    box-shadow: 0 0 0 10px white;
}

.timeline-progress {
    width: 3px;
    height: 100%;
    position: absolute;
    z-index: -2;
    background-color: var(--catalina-blue);
    mask-image: linear-gradient( to bottom, transparent 0%, rgba(0,0,0,0.2) 10px, rgba(0,0,0,0.6) 25px, black 60px );
}

.timeline-progress-bar {
    width: 3px;
    height: 50vh;
    position: fixed;
    bottom: 50vh;
    z-index: -1;
    background-image: linear-gradient(var(--bright-blue) 30%, var(--cardinal-red) 50%, var(--vegas-gold));
}

.timeline-left {
    animation-name: fadeSection;
    animation-timeline: --section;
    animation-duration: 1s;
    animation-fill-mode: both;
    animation-range: entry 40%;
    animation-timing-function: ease-out;
    will-change: opacity;
}

.timeline-right {
    will-change: opacity, scale;
    animation: fadeInImage linear;
    animation-timeline: view();
    animation-range: entry;
    padding: 2rem;
}

    .timeline-right h4 {
        font-size: calc(1.3rem + 1vmin);
        font-weight: 600;
        padding-block: 0.5rem;
    }

    .timeline-right p {
        font-size: 1rem;
        color: #444;
        margin-bottom: 0.75rem;
    }

    .timeline-right strong {
        color: var(--catalina-blue);
        font-weight: 600;
    }


.timeline-events {
    list-style: none;
    padding: 0;
}

    .timeline-events li {
        font-size: 1.1rem;
        margin-block: 1.25rem;
        padding-left: 1rem;
        border-left: 3px solid var(--catalina-blue);
        line-height: 1.5;
    }

    .timeline-events .year {
        font-weight: 700;
        color: var(--catalina-blue);
        display: block;
    }

@keyframes fadeInImageFirstChild {
    from {
        scale: 0.25;
        opacity: 0;
    }

    to {
        scale: 1;
        opacity: 1;
    }
}


@keyframes fadeInImage {
    from {
        scale: 0.75;
        opacity: 0;
    }

    to {
        scale: 1;
        opacity: 1;
    }
}

@keyframes fadeSection {
    from {
        opacity: 0.25;
    }

    to {
        opacity: 1;
    }
}


@media screen and (max-width: 767px) {
    .timeline-item {
        grid-template-columns: 64px 1fr
    }

    .timeline-progress {
        left: 13px;
    }

    .timeline-center {
        grid-area: 1 / 1 / 3 / 2;
        justify-content: flex-start;
    }

    .timeline-left {
        text-align: start;
    }
}
