/**
 * Steps / Timeline — modern process section
 */

.steps {
    --steps-marker-size: 52px;
    --steps-gap: 28px;
    --steps-line: rgba(55, 178, 14, 0.28);
    --steps-line-strong: rgba(55, 178, 14, 0.55);
}

.steps .block-intro {
    margin-block-end: 48px;
}

.steps .block-intro__heading {
    font-size: var(--h2-font-size);
}

/* -------------------------------------------------------------------------- */
/* List                                                                       */
/* -------------------------------------------------------------------------- */

.steps__list {
    display: flex;
    flex-direction: column;
    gap: var(--steps-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

/* -------------------------------------------------------------------------- */
/* Shared item                                                                */
/* -------------------------------------------------------------------------- */

.steps__item {
    position: relative;
    display: grid;
    grid-template-columns: var(--steps-marker-size) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    text-align: left;
}

.steps__rail {
    position: relative;
    display: flex;
    justify-content: center;
    width: var(--steps-marker-size);
}

.steps__marker {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: var(--steps-marker-size);
    height: var(--steps-marker-size);
    color: var(--header-green);
    background:
        linear-gradient(var(--white), var(--white)) padding-box,
        linear-gradient(145deg, var(--heading-accent-lime), var(--color-primary) 55%, var(--header-green)) border-box;
    border: 2px solid transparent;
    border-radius: 50%;
    box-shadow:
        0 0 0 6px rgba(55, 178, 14, 0.08),
        0 10px 24px rgba(0, 112, 74, 0.14);
    transition:
        transform 0.3s var(--anim-ease),
        box-shadow 0.3s var(--anim-ease);
}

.steps__item:hover .steps__marker {
    transform: scale(1.06);
    box-shadow:
        0 0 0 8px rgba(55, 178, 14, 0.12),
        0 14px 28px rgba(0, 112, 74, 0.18);
}

.steps__marker .rt-icon,
.steps__marker svg {
    width: 22px;
    height: 22px;
}

.steps__number {
    font-family: var(--display-heading-font);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.04em;
    line-height: 1;
}

.steps__body {
    min-width: 0;
    color: var(--color-text);
    text-align: left;
    --body-text-color: var(--color-text-muted);
    --body-text-color-strong: var(--color-text);
}

.steps__title {
    margin-block: 0 8px;
    font-family: var(--entities-font);
    font-size: 1.2rem;
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: -0.02em;
    color: var(--header-green);
    text-align: left;
}

.steps__content,
.steps__content :where(p, li, a, strong, em, span) {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--small-font-size);
    line-height: 1.55;
    text-align: left;
}

.steps__content > *:first-child {
    margin-block-start: 0;
}

.steps__content > *:last-child {
    margin-block-end: 0;
}

.steps__content p {
    margin-block: 0 0.5em;
}

.steps__content p:last-child {
    margin-block-end: 0;
}

/* -------------------------------------------------------------------------- */
/* Steps display — open process columns                                       */
/* -------------------------------------------------------------------------- */

.steps--steps .steps__item {
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.steps--steps .steps__item::before {
    display: none;
}

.steps--steps .steps__item:hover {
    transform: none;
    box-shadow: none;
}

.steps--steps .steps__body {
    padding-block-start: 6px;
}

/* Dark / brand — readable light copy */
.steps--steps.steps--bg-primary .steps__title,
.steps--steps.steps--bg-brand .steps__title,
.steps--steps.steps--bg-dark .steps__title,
.steps--steps.steps--bg-gradient .steps__title {
    color: var(--white);
}

.steps--steps.steps--bg-primary .steps__content,
.steps--steps.steps--bg-primary .steps__content :where(p, li, a, strong, em, span),
.steps--steps.steps--bg-brand .steps__content,
.steps--steps.steps--bg-brand .steps__content :where(p, li, a, strong, em, span),
.steps--steps.steps--bg-dark .steps__content,
.steps--steps.steps--bg-dark .steps__content :where(p, li, a, strong, em, span),
.steps--steps.steps--bg-gradient .steps__content,
.steps--steps.steps--bg-gradient .steps__content :where(p, li, a, strong, em, span) {
    color: rgba(255, 255, 255, 0.86);
}

.steps--steps.steps--bg-primary .steps__marker,
.steps--steps.steps--bg-brand .steps__marker,
.steps--steps.steps--bg-dark .steps__marker,
.steps--steps.steps--bg-gradient .steps__marker {
    color: var(--header-green);
    background:
        linear-gradient(var(--white), var(--white)) padding-box,
        linear-gradient(145deg, #fff, var(--heading-accent-lime) 60%, var(--color-primary)) border-box;
    box-shadow:
        0 0 0 6px rgba(255, 255, 255, 0.12),
        0 10px 24px rgba(0, 0, 0, 0.2);
}

.steps--steps.steps--bg-primary,
.steps--steps.steps--bg-brand,
.steps--steps.steps--bg-dark,
.steps--steps.steps--bg-gradient {
    --steps-line: rgba(255, 255, 255, 0.22);
    --steps-line-strong: rgba(255, 255, 255, 0.5);
}

/* -------------------------------------------------------------------------- */
/* Timeline display — rail + plain text                                       */
/* -------------------------------------------------------------------------- */

.steps--timeline {
    --steps-marker-size: 56px;
    --steps-gap: 0;
}

.steps--timeline .steps__list {
    max-width: 44rem;
    gap: 0;
    margin-inline: auto;
}

.steps--timeline .steps__item {
    grid-template-columns: var(--steps-marker-size) minmax(0, 1fr);
    gap: 20px;
    padding-block: 0 32px;
    justify-items: start;
    text-align: left;
}

.steps--timeline .steps__item:last-child {
    padding-block-end: 0;
}

.steps--timeline .steps__rail::before {
    content: "";
    position: absolute;
    left: 50%;
    top: var(--steps-marker-size);
    bottom: -32px;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(
        to bottom,
        var(--steps-line-strong) 0%,
        var(--steps-line) 70%,
        transparent 100%
    );
}

.steps--timeline .steps__item:last-child .steps__rail::before {
    display: none;
}

.steps--timeline .steps__marker {
    width: var(--steps-marker-size);
    height: var(--steps-marker-size);
}

.steps--timeline .steps__body {
    padding: 8px 0 0;
    text-align: left;
}

.steps--timeline .steps__title {
    margin-block-end: 10px;
    font-size: 1.25rem;
}

.steps--timeline .steps__content,
.steps--timeline .steps__content :where(p, li, a, strong, em, span) {
    font-size: var(--body-font-size);
}

.steps--timeline.steps--bg-primary,
.steps--timeline.steps--bg-brand,
.steps--timeline.steps--bg-dark,
.steps--timeline.steps--bg-gradient {
    --steps-line: rgba(255, 255, 255, 0.22);
    --steps-line-strong: rgba(255, 255, 255, 0.5);
}

.steps--timeline.steps--bg-primary .steps__marker,
.steps--timeline.steps--bg-brand .steps__marker,
.steps--timeline.steps--bg-dark .steps__marker,
.steps--timeline.steps--bg-gradient .steps__marker {
    color: var(--header-green);
    background:
        linear-gradient(var(--white), var(--white)) padding-box,
        linear-gradient(145deg, #fff, var(--heading-accent-lime) 60%, var(--color-primary)) border-box;
    box-shadow:
        0 0 0 6px rgba(255, 255, 255, 0.12),
        0 10px 24px rgba(0, 0, 0, 0.2);
}

.steps--timeline.steps--bg-primary .steps__title,
.steps--timeline.steps--bg-brand .steps__title,
.steps--timeline.steps--bg-dark .steps__title,
.steps--timeline.steps--bg-gradient .steps__title {
    color: var(--white);
}

.steps--timeline.steps--bg-primary .steps__content,
.steps--timeline.steps--bg-primary .steps__content :where(p, li, a, strong, em, span),
.steps--timeline.steps--bg-brand .steps__content,
.steps--timeline.steps--bg-brand .steps__content :where(p, li, a, strong, em, span),
.steps--timeline.steps--bg-dark .steps__content,
.steps--timeline.steps--bg-dark .steps__content :where(p, li, a, strong, em, span),
.steps--timeline.steps--bg-gradient .steps__content,
.steps--timeline.steps--bg-gradient .steps__content :where(p, li, a, strong, em, span) {
    color: rgba(255, 255, 255, 0.86);
}

/* -------------------------------------------------------------------------- */
/* Alignment — intro can center; step copy stays left                         */
/* -------------------------------------------------------------------------- */

.steps--timeline .steps__list,
.steps--align-center.steps--timeline .steps__list {
    margin-inline: auto;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (min-width: 768px) {
    .steps--steps .steps__list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px 40px;
        position: relative;
    }

    .steps--steps .steps__item {
        grid-template-columns: 1fr;
        justify-items: start;
        gap: 18px;
        padding: 0;
        min-height: 100%;
        text-align: left;
    }

    .steps--steps .steps__rail {
        width: auto;
        justify-content: flex-start;
    }

    .steps--steps .steps__marker {
        width: 58px;
        height: 58px;
    }

    .steps--steps .steps__number {
        font-size: 1.2rem;
    }

    .steps--steps .steps__marker .rt-icon,
    .steps--steps .steps__marker svg {
        width: 24px;
        height: 24px;
    }

    .steps--steps .steps__body {
        padding-block-start: 0;
        max-width: 28rem;
    }

    .steps--timeline .steps__list {
        max-width: 42rem;
        margin-inline: auto;
    }

    .steps--timeline .steps__item {
        gap: 24px;
        padding-block-end: 36px;
    }

    .steps--timeline .steps__rail::before {
        bottom: -36px;
    }

    .steps--timeline .steps__body {
        padding: 10px 0 0;
    }
}

@media (min-width: 1200px) {
    .steps--steps .steps__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 36px 48px;
    }

    /* Horizontal connector through markers */
    .steps--steps .steps__list::before {
        content: "";
        position: absolute;
        top: calc(var(--steps-marker-size) / 2 + 3px);
        left: calc(29px);
        right: calc(29px);
        height: 2px;
        background: linear-gradient(
            90deg,
            transparent,
            var(--steps-line-strong) 8%,
            var(--steps-line-strong) 92%,
            transparent
        );
        pointer-events: none;
        z-index: 0;
        opacity: 0.5;
    }

    .steps--steps .steps__marker {
        position: relative;
        z-index: 1;
        width: 58px;
        height: 58px;
    }

    .steps--steps .steps__list::before {
        top: 29px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .steps__item,
    .steps__item:hover,
    .steps__marker,
    .steps__item:hover .steps__marker {
        transition: none;
        transform: none;
    }
}
