/* BLOCK: Step By Step */

.block-step-by-step .main-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 4.1875rem 1.875rem;
}

.block-step-by-step .content-item {
    flex-basis: 34%;
}

.block-step-by-step .content-item--start {
    margin-right: auto;
}

.block-step-by-step .content-item--end {
    margin-left: auto;
    align-self: flex-end;
}

.block-step-by-step .content-item .text-content:not(:last-child) {
    margin-bottom: 3.125rem;
}

.block-step-by-step .step {
    flex-basis: 27.5%;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.block-step-by-step .step__meta {
    display: flex;
    align-items: center;
    gap: 0.9375rem;
    margin-bottom: 0.3125rem;
    position: relative;
}

.block-step-by-step .step:nth-child(3n):not(.step--last) .step__meta::before {
    content: '';
    position: absolute;
    left: 100%;
    display: block;
    width: var(--offset, 0px);
    width: 100vw;
    height: 1px;
    opacity: .2;
}

.block-step-by-step .step:nth-child(3n+4) .step__meta::before {
    content: '';
    position: absolute;
    right: calc(100% + 0.9375rem);
    display: block;
    width: calc(var(--offset, 0px) - 0.9375rem);
    width: 100vw;
    height: 1px;
    opacity: .2;
}

.block-step-by-step:where(.theme--lightest,.theme--lighter,.theme--light) .step__meta::before {
    background-color: var(--c-bg-darkest);
}

.block-step-by-step:where(.theme--darkest,.theme--darker,.theme--dark) .step__meta::before {
    background-color: var(--c-bg-lightest);
}

.block-step-by-step .step__number {
    display: grid;
    place-items: center;
    width: 2.625rem;
    height: 2.625rem;
    aspect-ratio: 1;
    font-family: var(--ff-borna);
    font-size: var(--font-19-15);
    font-weight: 500;
    line-height: 1.1;
}

.block-step-by-step:where(.theme--lightest,.theme--lighter,.theme--light) .step__number {
    background-color: var(--c-bg-dark);
    color: var(--c-text-lighter);
}

.block-step-by-step:where(.theme--darkest,.theme--darker,.theme--dark) .step__number {
    background-color: var(--c-bg-light);
    color: var(--c-text-darker);
}

.block-step-by-step .step:not(.step--last) .step__line {
    display: block;
    flex-grow: 1;
    flex-basis: 1px;
    height: 1px;
    opacity: .2;
}

.block-step-by-step:where(.theme--lightest,.theme--lighter,.theme--light) .step__line {
    background-color: var(--c-bg-darkest);
}

.block-step-by-step:where(.theme--darkest,.theme--darker,.theme--dark) .step__line {
    background-color: var(--c-bg-lightest);
}

.block-step-by-step .step__image {
    width: 100%;
    height: auto;
    aspect-ratio: 0.91;
    object-fit: cover;
    margin-top: auto;
}

@media screen and (width <= 620px) {
    .block-step-by-step .main-wrapper {
        display: block;
    }

    .block-step-by-step .content-item--start {
        margin-bottom: 3.75rem;
    }

    .block-step-by-step .content-item--end {
        margin-top: 3.75rem;
    }

    .block-step-by-step .content-item .text-content:not(:last-child) {
        margin-bottom: 2.1875rem;
    }

    .block-step-by-step .step {
        display: grid;
        gap: 1.5rem;
        grid-template: auto auto / auto 1fr;
    }

    .block-step-by-step .step:not(.step--last) {
        margin-bottom: 2.5rem;
    }

    .block-step-by-step .step__meta {
        grid-column: 1;
        grid-row: 1 / span 2;
        flex-direction: column;
        margin-bottom: -1.5625rem;
    }

    .block-step-by-step .step__meta::before {
        display: none !important;
    }

    .block-step-by-step .step__number {
        width: 2rem;
        height: 2rem;
    }

    .block-step-by-step .step__line {
        height: auto;
        width: 1px;
    }

    .block-step-by-step .step__image {
        aspect-ratio: 1.589;
    }
}