/* timeline.css - обновленная версия */
.timeline-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.timeline-container {
    position: relative;
}

/* Центральная вертикальная пунктирная линия */
.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 8px,
        #2196F3 8px,
        #2196F3 16px
    );
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin-bottom: 80px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Изображения слева */
.timeline-image {
    width: 48%;
    position: relative;
    padding-right: 40px;
    text-align: right;
}

.timeline-image-content {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.25);
    background: #fff;
    margin-left: auto;
    position: relative;
    z-index: 2;
}

.timeline-image-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.timeline-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2196F3, #21CBF3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
}

/* Горизонтальный пунктир от изображения к центру */
.timeline-image::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 40px;
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        transparent,
        transparent 4px,
        #2196F3 4px,
        #2196F3 8px
    );
    transform: translateY(-50%);
}

/* Текстовые блоки справа */
.timeline-content {
    width: 48%;
    position: relative;
    padding-left: 40px;
}

/* Горизонтальный пунктир от центра к тексту */
.timeline-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 40px;
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        transparent,
        transparent 4px,
        #2196F3 4px,
        #2196F3 8px
    );
    transform: translateY(-50%);
}

.timeline-content-box {
    background: white;
    border: 2px solid #2196F3;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(33, 150, 243, 0.15);
}

/* Вертикальный пунктир от текстового блока к следующему */
.timeline-content-box::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -40px;
    width: 1px;
    height: 40px;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 4px,
        #2196F3 4px,
        #2196F3 8px
    );
    transform: translateX(-50%);
    z-index: 2;
}

/* Убираем нижнюю линию у последнего элемента */
.timeline-item:last-child .timeline-content-box::after {
    display: none;
}

/* Заголовок в текстовом блоке (справа сверху) */
.timeline-content h3 {
    color: #2196F3;
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    position: relative;
    padding-left: 15px;
}

/* Декоративная черточка перед заголовком */
.timeline-content h3::before {
    content: '-';
    position: absolute;
    left: 0;
    top: 0;
    color: #2196F3;
    font-weight: bold;
}

/* Основной текст */
.timeline-content p {
    color: #555;
    margin: 20px 0 0 0;
    line-height: 1.7;
    font-size: 16px;
    text-align: left;
    position: relative;
    padding-left: 15px;
}

/* Вертикальная линия от черточки заголовка к тексту */
.timeline-content p::before {
    content: '';
    position: absolute;
    left: 6px;
    top: -20px;
    width: 1px;
    height: 20px;
    background: #2196F3;
}

/* Адаптивность */
@media (max-width: 992px) {
    .timeline-container::before {
        left: 40px;
    }
    
    .timeline-item {
        flex-direction: column;
        margin-bottom: 60px;
    }
    
    .timeline-image,
    .timeline-content {
        width: 100%;
        padding: 0;
    }
    
    .timeline-image {
        margin-bottom: 30px;
        text-align: left;
    }
    
    .timeline-image-content {
        margin-left: 0;
    }
    
    .timeline-image::after {
        display: none;
    }
    
    .timeline-content::before {
        display: none;
    }
    
    .timeline-content-box {
        margin-left: 80px;
    }
    
    .timeline-content-box::after {
        left: -40px;
        bottom: auto;
        top: 50%;
        width: 40px;
        height: 1px;
        background: repeating-linear-gradient(
            to right,
            transparent,
            transparent 4px,
            #2196F3 4px,
            #2196F3 8px
        );
    }
    
    /* Вертикальная линия от центральной к изображению на мобильных */
    .timeline-item::before {
        content: '';
        position: absolute;
        left: 39px;
        top: 60px;
        bottom: 60px;
        width: 1px;
        background: repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 4px,
            #2196F3 4px,
            #2196F3 8px
        );
        z-index: 1;
    }
}

@media (max-width: 576px) {
    .timeline-image-content {
        width: 100px;
        height: 100px;
    }
    
    .timeline-content-box {
        margin-left: 60px;
        padding: 20px;
    }
    
    .timeline-container::before {
        left: 30px;
    }
    
    .timeline-item::before {
        left: 29px;
    }
}