/**
 * Круговая схема этапов (шаблон cycle компонента block:steps).
 * Цвета и отступы — из дизайн-системы.
 */

.cycle-block {
    max-width: 1170px;
    margin: 0 auto var(--block-margin-bottom, 135px) !important;
    padding: 0 15px;
}
.cycle-block .steps-block__title,
.cycle-block .main-caption {
    text-align: center;
    margin: 0 auto var(--block-title-margin, 40px) !important;
}

/* Квадратное поле, внутри которого раскладывается круг */
.cycle {
    position: relative;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
}

/* Дуги со стрелками */
.cycle__arrows {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}
.cycle__ring {
    fill: none;
    stroke: url(#cycleRing);
    stroke-width: 1.2;
    stroke-linecap: round;
    opacity: 0.55;
}

/* Узел цикла */
.cycle__item {
    position: absolute;
    width: 180px;
    transform: translate(-50%, -50%);
    text-align: center;
}
.cycle__num {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-secondary, #0F8E97);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.cycle__num--primary { background: var(--color-primary, #FF018F); }
.cycle__num--secondary { background: var(--color-secondary, #0F8E97); }
.cycle__num--accent { background: var(--color-accent, #FFC600); color: var(--color-text, #414141); }
.cycle__num--purple { background: var(--color-purple, #5E5F94); }
.cycle__num--gray { background: var(--color-text-light, #979797); }

.cycle__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text, #414141);
    margin-bottom: 6px;
}
.cycle__text {
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    line-height: 1.45;
    color: var(--color-text-light, #979797);
}

/* Центр круга */
.cycle__core {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    text-align: center;
}
.cycle__core-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text, #414141);
}
.cycle__core-text {
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    line-height: 1.45;
    color: var(--color-text-light, #979797);
    margin-top: 8px;
}

.cycle__note {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: var(--color-text-light, #979797);
    text-align: center;
    margin: 30px auto 0;
    max-width: 640px;
}

/* Круг не помещается — разворачиваем в вертикальную цепочку */
@media (max-width: 900px) {
    .cycle {
        max-width: 320px;
        aspect-ratio: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 34px;
    }
    .cycle__arrows {
        display: none;
    }
    .cycle__core {
        position: static;
        transform: none;
        width: auto;
        order: -1;
        padding-bottom: 6px;
    }
    .cycle__item {
        position: static;
        transform: none;
        width: 100%;
        max-width: 280px;
    }
    /* стрелка вниз между шагами — в потоке, без абсолютного позиционирования:
       у .cycle__item на мобильных position: static, и absolute уводил все стрелки
       в конец блока */
    .cycle__item:not(:last-child)::after {
        content: '';
        display: block;
        width: 0;
        height: 0;
        margin: 18px auto -20px;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 8px solid #FF018F;
    }
}

@media (max-width: 768px) {
    .cycle-block {
        margin-bottom: var(--block-margin-bottom-mobile, 50px) !important;
    }
    .cycle__note {
        font-size: 13px;
        margin-top: 24px;
    }
}
