/* BLOCK: Timeline */

.block-timeline .wrap > .text-content {
    text-align: center;
}

.block-timeline .wrap > .text-content :where(h6, .h6) {
    justify-content: center;
}

.block-timeline .items-wrapper {
    position: relative;
    isolation: isolate;
    overflow-y: clip;
}

.block-timeline .items-wrapper:not(:first-child) {
    margin-top: 7.5rem;
}

.block-timeline .items-wrapper .progressbar {
    --size: 50vh;
    --size: 50dvh;
    position: absolute;
    width: 1px;
    top: calc(-1 * var(--size));
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgb(from var(--theme-ui) r g b / 0.3);
    z-index: -1;
}

.block-timeline .items-wrapper .progressbar::before {
    content: '';
    display: block;
    width: 100%;
    height: var(--size);
    position: sticky;
    top: 0;
    background-color: var(--theme-text-body);
}

.block-timeline .item .text-content :where(h3, .h3) {
    --fs: var(--font-52-22);
}

.block-timeline .item:where(.type--text.align--left) + .item:where(.type--text.align--left),
.block-timeline .item:where(.type--text.align--right) + .item:where(.type--text.align--right) {
    margin-top: 2.5rem;
}

.block-timeline .item:where(.type--text.align--left) + .item:where(.type--text.align--right),
.block-timeline .item:where(.type--text.align--right) + .item:where(.type--text.align--left) {
    margin-top: -2.5rem;
}

.block-timeline .item:where(.type--text) {
    width: 50%;
    position: relative;
}

.block-timeline .item:where(.type--text.align--left) {
    padding-right: 5rem;
}

.block-timeline .item:where(.type--text.align--right) {
    margin-left: auto;
    padding-left: 5rem;
}

.block-timeline .item:where(.type--text)::before {
    content: '';
    position: absolute;
    top: 0;
    width: 0.625rem;
    height: 0.625rem;
    aspect-ratio: 1;
    background-color: var(--c-bg-dark);
    border-radius: 50%;
    outline: 0.5rem solid var(--theme-background);
}

.block-timeline .item:where(.type--text.align--left)::before {
    right: 0;
    transform: translateX(50%);
}

.block-timeline .item:where(.type--text.align--right)::before {
    left: 0;
    transform: translateX(-50%);
}

.block-timeline:where(.theme--dark) .item:where(.type--text)::before {
    background-color: var(--c-bg-light);
}

.block-timeline .item:where(.type--text) .text-content {
    max-width: 27rem;
    text-wrap: balance;
}

.block-timeline .item:where(.type--text.align--left) .text-content {
    text-align: right;
    margin-left: auto;
}

.block-timeline .item:where(.type--text.align--left) .text-content :where(h6, .h6) {
    flex-direction: row-reverse;
}

.block-timeline .item:where(.type--text) .text-content > :not(:last-child) {
    margin-bottom: 1.875rem;
}

.block-timeline .item:where(.type--text_image) {
    position: relative;
    isolation: isolate;
    padding: 2.5rem;
    margin-block: 6.25rem;
    outline: 0.625rem solid var(--theme-background);
}

.block-timeline .item:where(.type--text_image) .bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    pointer-events: none;
    user-select: none;
}

.block-timeline .item:where(.type--text_image) .bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.block-timeline .item:where(.type--text_image) .text-content {
    padding: 3.125rem 2.8125rem;
    font-size: var(--font-16-14);
    width: 56%;
}

.block-timeline .item:where(.type--text_image) .text-content > :not(:last-child) {
    margin-bottom: 2.5rem;
}

.block-timeline .item:where(.type--text_image.align--left) .text-content {
    text-align: right;
}

.block-timeline .item:where(.type--text_image.align--left) .text-content :where(h6, .h6) {
    justify-content: flex-end;
}

.block-timeline .item:where(.type--text_image.align--right) .text-content {
    margin-left: auto;
}

.block-timeline .item--large {
    width: calc(100% + 2 * var(--offset, 0px));
    margin-block: 3.75rem 0;
    margin-left: calc(-1 * var(--offset, 0px));
    padding: 3.625rem var(--pad, var(--page-padding, 0px));
    background-color: var(--theme-background);
}

.block-timeline .item--large:where(.type--text_image) {
    height: 200vh;
}

.block-timeline .item--large:where(.type--text_image)::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(180deg, var(--theme-background) 0%, rgb(from var(--theme-background) r g b / .6) 35%, transparent 57.29%);
    z-index: -1;
    pointer-events: none;
    user-select: none;
}

.block-timeline .item--large::before {
    left: 50%;
    transform: translateX(-50%);
}

.block-timeline .item--large:where(.type--text_image)::before {
    content: '';
    position: absolute;
    top: 0;
    width: 0.625rem;
    height: 0.625rem;
    aspect-ratio: 1;
    background-color: var(--c-bg-dark);
    border-radius: 50%;
    outline: 0.5rem solid var(--theme-background);
}

.block-timeline:where(.theme--dark) .item--large:where(.type--text_image)::before {
    background-color: var(--c-bg-light);
}

.block-timeline .item--large .text-content {
    max-width: unset;
    width: 100%;
    text-wrap: unset;
    text-align: center;
}

.block-timeline .item--large .text-content :where(h6, .h6) {
    justify-content: center;
}

.block-timeline .item--large .text-content > :not(:last-child) {
    margin-bottom: 3.75rem;
}

.block-timeline .item--large .text-content :where(h1, h2, .h1, .h2) {
    --fs: var(--font-240-62);
}

.block-timeline .item--large .text-content :where(h1, h2, .h1, .h2):not(:last-child) {
    margin-bottom: 5rem;
}

@media screen and (width <= 620px) {
    .block-timeline .items-wrapper:not(:first-child) {
        margin-top: 3.75rem;
    }

    .block-timeline .item:where(.type--text.align--left) {
        padding-right: 2rem;
    }

    .block-timeline .item:where(.type--text.align--right) {
        padding-left: 2rem;
    }

    .block-timeline .item:where(.type--text.align--left) + .item:where(.type--text.align--right),
    .block-timeline .item:where(.type--text.align--right) + .item:where(.type--text.align--left) {
        margin-top: -1.25rem;
    }

    .block-timeline .item:where(.type--text)::before {
        width: 0.5rem;
        height: 0.5rem;
        outline-width: 0.375rem;
    }

    .block-timeline .item:where(.type--text) .text-content > :not(:last-child) {
        margin-bottom: 1.25rem;
    }

    .block-timeline .item:not(.item--large):where(.type--text_image) {
        display: flex;
        align-items: flex-end;
        margin-block: 3.75rem;
        padding: 1.25rem;
        aspect-ratio: 0.76;
    }

    .block-timeline .item:not(.item--large):where(.type--text_image) .text-content {
        width: 100%;
        text-align: center;
        padding: 2.5rem 1.5rem;
    }

    .block-timeline .item:not(.item--large):where(.type--text_image) .text-content > :not(:last-child) {
        margin-bottom: 1.5rem;
    }

    .block-timeline .item:not(.item--large):where(.type--text_image) .text-content :where(h6, .h6) {
        justify-content: center;
    }

    .block-timeline .item--large {
        padding-block: 2rem;
    }

    .block-timeline .item--large:where(.type--text_image) {
        height: 100vh;
    }

    .block-timeline .item--large .text-content {
        padding: 0;
    }

    .block-timeline .item--large .text-content > :not(:last-child),
    .block-timeline .item--large .text-content :where(h1, h2, .h1, .h2):not(:last-child) {
        margin-bottom: 2.8125rem;
    }

    .block-timeline .item--large:where(.type--text_image)::after {
        background-image:
            linear-gradient(180deg, var(--theme-background) 0%, transparent 38.08%),
            linear-gradient(180deg, var(--theme-background) 0%, rgb(from var(--theme-background) r g b / .6) 29.43%, transparent 57.29%);
    }

}