/* Roadmap Section */
.roadmap-section {
    padding: 80px 0;
    background: var(--light-gray);
    position: relative;
}

.roadmap-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 60px;
    position: relative;
}

.roadmap-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.leadgen-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.roadmap {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

/* SVG Path - вертикальная пунктирная линия */
.roadmap-path {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 100%;
    z-index: 2;
}

.roadmap-line {
    width: 190px;
    height: 100%;
    min-height: 1150px;
}

.roadmap-line path {
    animation: dashFlow 5s linear infinite;
}

/* Анимированный логотип */
.running-logo {
    filter: drop-shadow(0 0 8px rgba(16, 183, 125, 0.8));
    z-index: 10;
}

@keyframes dashFlow {
    0% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: -24;
    }
}

@keyframes colorPulse {

    0%,
    100% {
        stroke-opacity: 1;
        filter: drop-shadow(0 0 8px rgba(16, 183, 125, 0.6));
    }

    50% {
        stroke-opacity: 0.7;
        filter: drop-shadow(0 0 15px rgba(16, 183, 125, 0.8));
    }
}

/* Шаги роадмапа - вертикальное расположение */
.roadmap-steps {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px 0;
}

.roadmap-step {
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    display: flex;
    align-items: center;
    gap: 40px;
}

.roadmap-step.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

/* Альтернирующее расположение: слева-справа */
.roadmap-step:nth-child(odd) {
    justify-content: flex-end;
    text-align: left;
}

.roadmap-step:nth-child(even) {
    justify-content: flex-start;
    text-align: right;
}

/* Маркер шага */
.step-marker {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%) scale(0.5);
    box-shadow: 0 0 0 6px white, 0 0 0 10px rgba(16, 183, 125, 0.3);
    transition: all 0.4s ease;
    opacity: 0;
    z-index: 3;
    /* Скрываем цифры в десктопной версии */
    color: transparent;
    font-size: 0;
}

/* Создаем отверстие в центре маркера для линии */
.step-marker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    z-index: 1;
}

/* Позиционирование маркеров по центру линии */
.roadmap-step .step-marker {
    left: 50% !important;
    transform: translateX(-50%) scale(0.5);
}

.roadmap-step.reveal-active .step-marker {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.roadmap-step:hover .step-marker {
    transform: translateX(-50%) scale(1.3);
    box-shadow: 0 0 0 8px white, 0 0 0 16px rgba(16, 183, 125, 0.4);
}

/* Контент шага */
.step-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex: 1;
    max-width: 350px;
}

.roadmap-step:hover .step-content {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
    background: linear-gradient(135deg, white 0%, rgba(16, 183, 125, 0.02) 100%);
}

.step-content h3 {
    font-size: 1.3rem;
    font-weight: var(--font-weight-semibold);
    color: var(--secondary-color);
    margin-bottom: 15px;
    line-height: 1.3;
}

.step-content p {
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: var(--font-weight-semibold);
    line-height: 1.5;
    margin: 0;
}

/* Анимация появления с задержками */
.roadmap-step[data-step="1"] {
    animation-delay: 0.2s;
}

.roadmap-step[data-step="2"] {
    animation-delay: 0.4s;
}

.roadmap-step[data-step="3"] {
    animation-delay: 0.6s;
}

.roadmap-step[data-step="4"] {
    animation-delay: 0.8s;
}

.roadmap-step[data-step="5"] {
    animation-delay: 1s;
}

/* Мобильная адаптивность */
@media (max-width: 768px) {
    .roadmap-section {
        padding: 60px 0;
    }

    .roadmap-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .roadmap-steps {
        gap: 15px;
        padding: 15px 0;
    }

    .roadmap-step {
        flex-direction: column !important;
        text-align: center !important;
        gap: 20px;
        justify-content: center !important;
    }

    .roadmap-step .step-marker {
        position: relative !important;
        left: auto !important;
        transform: scale(0.5) !important;
        margin: 0 auto 15px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: white !important;
        font-weight: bold !important;
        font-size: 14px !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    }

    /* Убираем белую точку в центре для мобильной версии */
    .roadmap-step .step-marker::before {
        display: none !important;
    }

    .roadmap-step.reveal-active .step-marker {
        transform: scale(1) !important;
    }

    .roadmap-step:hover .step-marker {
        transform: scale(1.3) !important;
    }

    .step-content {
        max-width: 100%;
        padding: 25px 20px;
    }

    .step-content h3 {
        font-size: 1.2rem;
    }

    .step-content p {
        font-size: 0.9rem;
    }

    .roadmap-path {
        left: 20px;
        transform: none;
        width: 100px;
    }

    .roadmap-line {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .roadmap-section {
        padding: 50px 0;
    }

    .roadmap-title {
        font-size: 1.8rem;
    }

    .step-content {
        padding: 20px 15px;
    }

    .step-content h3 {
        font-size: 1.1rem;
    }

    .roadmap-path {
        display: none;
    }
}

/* Анимация для scroll reveal */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.roadmap-step.reveal-active {
    animation: fadeInUp 0.8s ease forwards;
}

/* Дополнительные стили для улучшения внешнего вида */
.roadmap-step:nth-child(odd) .step-content {
    margin-right: 0;
}

.roadmap-step:nth-child(even) .step-content {
    margin-left: 0;
}

/* Улучшенные hover эффекты */
.roadmap-step:hover .step-content h3 {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

/* Плавные переходы */
.roadmap-step * {
    transition: all 0.3s ease;
}