/* ----------------------------------------
   Feature Steps Shortcode
   ---------------------------------------- */

.feature-steps {
    padding: 60px 0;
    width: 100%;
    box-sizing: border-box;
}

.feature-steps__inner {
    max-width: var(--content-width);
    margin: 0 auto;
}

/* Scroll wrap — row on top, controls below */

.feature-steps__scroll-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-steps__controls {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.feature-steps__scroll-wrap .feature-steps__controls .feature-steps__arrow {
    width: 38px !important;
    height: 38px !important;
    min-width: unset !important;
    border-radius: 0 !important;
    border: 2px solid var(--e-global-color-91c36e3) !important;
    background: var(--e-global-color-91c36e3) !important;
    background-color: var(--e-global-color-91c36e3) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: inherit !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    transition: background 0.2s, color 0.2s;
}

.feature-steps__scroll-wrap .feature-steps__controls .feature-steps__arrow:hover {
    background: #fff !important;
    background-color: #fff !important;
    color: var(--e-global-color-91c36e3) !important;
        border: 2px solid white !important;

}

.feature-steps__scroll-wrap .feature-steps__controls .feature-steps__arrow:disabled {
    opacity: 0.35 !important;
    cursor: default !important;
}

/* Row — horizontally scrollable, shows 4 steps at a time */

.feature-steps__row {
    width: 100%;
    display: flex;
    align-items: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #374151 transparent;
    padding-bottom: 8px;
}

.feature-steps__row::-webkit-scrollbar {
    height: 4px;
}

.feature-steps__row::-webkit-scrollbar-track {
    background: transparent;
}

.feature-steps__row::-webkit-scrollbar-thumb {
    background-color: #374151;
    border-radius: 2px;
}

/* Individual step — fixed at ~170px; connectors fill the remaining space so
   exactly 4 steps fill the container. A 5th overflows into horizontal scroll.
   Connector formula: (100% - 4 × 170px) / 3 = calc((100% - 680px) / 3) */

.feature-steps__step {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    flex: 0 0 170px;
    position: relative;
    z-index: 1;
}

/* Extends the line from the circle's right edge to the step's right edge,
   closing the gap before the connector picks up */
.feature-steps__step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 21px;
    left: 45px;
    right: 0;
    height: 2px;
    background-color: var(--e-global-color-91c36e3);
    z-index: 0;
}

.feature-steps__number {
    background-color: var(--e-global-color-91c36e3);
    display: block;
    width: 45px;
    padding: 10px;
    text-align: center;
    border-radius: 100%;
    height: 45px;
    color: #fff;
    font-size: 22px;
    line-height: 25px;
    font-weight: 700;
    margin-bottom: 10px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.feature-steps__text {
    font-family: var(--e-global-typography-primary-font-family), Sans-serif;
    font-weight: 700;
    color: var(--e-global-color-secondary);
    font-size: 1.75rem;
    line-height: 1.1;
    margin: 0;
}

/* Connector line between steps */

.feature-steps__connector {
    flex: 0 0 calc((100% - 680px) / 3);
    min-width: 40px;
    height: 2px;
    background-color: var(--e-global-color-91c36e3);
    margin-top: 21px; /* align with centre of 45px circle */
}

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

@media (max-width: 1024px) {
    /* Show 3 steps: 3 × 170px + 2 connectors = 100%
       Connector formula: (100% - 510px) / 2 */
    .feature-steps__connector {
        flex: 0 0 calc((100% - 510px) / 2);
        min-width: 20px;
    }
}

@media (max-width: 767px) {
    /* Show 1 step: full width, no connecting line */
    .feature-steps__step {
        flex: 0 0 100%;
    }

    .feature-steps__step:not(:last-child)::after {
        display: none;
    }

    .feature-steps__connector {
        flex: 0 0 0;
        min-width: 0;
        background: none;
    }
}
