/* ========================================
   5. СХЕМА РАБОТЫ
   ======================================== */

/* Max 7 шагов в строку, остальное - на вторую строку */
.vb-workflow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--vb-gap);
    justify-content: center;
    max-width: 100%;
}

/* На широких экранах - макс 7 колонок */
@media (min-width: 1200px) {
    .vb-workflow {
        grid-template-columns: repeat(7, 1fr);
    }
}

.vb-workflow__step {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
}

.vb-workflow__number {
    width: 56px;
    height: 56px;
    background: var(--vb-gradient);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.vb-workflow__step:not(:last-child)::after {
    content: '🡒';
    position: absolute;
    top: 3rem;
    right: -2rem;
}

.vb-workflow__title {
    font-size: 1.25rem;
    color: var(--vb-color-heading, #000);
    margin: 0 0 0.5rem;
}

.vb-workflow__text {
    color: var(--vb-color-text);
    margin: 0;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .vb-workflow__step::after {
        display: none;
    }
}


@media (max-width: 768px) {

    /* Workflow: allow horizontal swipe instead of squeezing into a tight grid */
    .vb-workflow {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        /* Центрируем первый блок */
        padding: 0.25rem 0.75rem 0.75rem calc(50% - 120px);
    }

    .vb-workflow__step {
        flex: 0 0 80%;
        min-width: 240px;
        max-width: 320px;
        scroll-snap-align: start;
    }

    /* Keep the connector line short inside the scroll gap */
    .vb-workflow__step:not(:last-child)::after {
        right: -0.75rem;
        width: 1.5rem;
    }
}
