/*---*\
Homepage Steps
Centered timeline with numbered circles, blue panel, and CTA.

KEY FEATURES:
- Horizontal connector on 768px+ and vertical spine on small screens, aligned through marker centers
- `--steps-section-count` on the list (from PHP) sets horizontal inset so the line matches first/last step

IMPLEMENTATION NOTES:
- Numbers use a serif stack; labels use the theme body font
- Colors mirror global.css / header.css: bg-blue #081542, primary #2C86EF,
  secondary #1434A4, on-dark text #FFFFFF (see .bg-blue, .btn, .btn-secondary)
\*---*/

.steps-section {
    padding: 60px 0;
}

.steps-section__panel {
    position: relative;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 40px 24px 48px;
    text-align: center;
    color: #FFFFFF;
    background: #081542;
    border-radius: 16px;
    overflow: hidden;
}

.steps-section__heading {
    margin: 0 0 16px;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    color: #FFFFFF;
}

.steps-section__subtitle {
    max-width: 42rem;
    margin: 0 auto 40px;
    font-size: 1rem;
    line-height: 1.5;
    color: #FFFFFF;
    opacity: 0.95;
}

.steps-section__timeline {
    position: relative;
    margin-bottom: 40px;
}

.steps-section__list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin: 0;
    padding: 0 0 0 12px;
    list-style: none;
    text-align: left;
}

/*
 * global.css styles all ol li with ::before counters — steps use custom circle markers only.
 */
.steps-section__list .steps-section__item {
    counter-increment: none;
}

.steps-section__list .steps-section__item::before {
    content: none;
}

/*
 * Vertical spine: centered on 56px markers (12px list padding + half marker − half line).
 * top/bottom inset = half marker so line runs first-circle → last-circle (not past edges).
 */
.steps-section__list::before {
    content: "";
    position: absolute;
    left: calc(12px + 56px / 2 - 1px);
    top: calc(56px / 2);
    bottom: calc(56px / 2);
    width: 2px;
    background-color: #FFFFFF;
}

.steps-section__item {
    position: relative;
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: start;
    column-gap: 16px;
    margin: 0;
    padding: 0;
}

.steps-section__marker {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    background-color: #1434A4;
    box-sizing: border-box;
}

.steps-section__number {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 1.375rem;
    font-weight: 400;
    line-height: 1;
    color: #FFFFFF;
}

.steps-section__label {
    display: block;
    padding-top: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
    color: #FFFFFF;
}

.steps-section__actions {
    display: flex;
    justify-content: center;
}

.steps-section__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 36px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    color: #FFFFFF;
    background-color: #2C86EF;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(8, 21, 66, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.steps-section__cta:focus-visible {
    outline: 2px solid #CCE0F7;
    outline-offset: 3px;
}

@media (min-width: 768px) {
    .steps-section__panel {
        padding: 48px 40px 56px;
    }

    .steps-section__list {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 8px;
        padding: 48px 0 0;
        text-align: center;
    }

    /*
     * Horizontal connector through row of markers — top must match padding-top + half marker
     * (padding-top creates space above flex row for the line to sit in the same band as circles).
     */
    .steps-section__list::before {
        top: calc(48px + 56px / 2 - 1px);
        right: calc(50% / var(--steps-section-count, 3));
        bottom: auto;
        left: calc(50% / var(--steps-section-count, 3));
        width: auto;
        height: 2px;
    }

    .steps-section__item {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        row-gap: 16px;
        min-width: 0;
    }

    .steps-section__label {
        max-width: 11rem;
        margin: 0 auto;
        padding-top: 0;
        text-align: center;
    }
}

@media (min-width: 1200px) {
    .steps-section__panel {
        padding: 56px 48px 64px;
    }

    .steps-section__subtitle {
        margin-bottom: 48px;
    }

    .steps-section__list {
        padding-top: 56px;
    }

    .steps-section__list::before {
        top: calc(56px + 56px / 2 - 1px);
    }

    .steps-section__cta:hover {
        background-color: #1434A4;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(8, 21, 66, 0.45);
    }
}

@media (prefers-reduced-motion: reduce) {
    .steps-section__cta {
        transition-duration: 0.01ms;
    }

    .steps-section__cta:hover {
        transform: none;
    }
}
