.timeline {
    display: flex;
    overflow-x: auto;
    padding: 20px 0;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    /*left: 110px;*/
    /*right: 110px;*/
    left: calc(var(--timeline-item-width) * 1.1);
    right: calc(var(--timeline-item-width) * 1.1);
    height: 2px;
    background-color: #333;
    z-index: 1;
}

.timeline-item {
    flex: 0 0 auto;
    /*width: 200px;*/
    border: 1px solid rgba(0, 0, 255, 0.2);
    margin-right: 40px;
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    --timeline-item-width: width;
}

.timeline-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/*.timeline-item::after,*/
.timeline-item::before{
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 2px;
    /*background-color: #333;*/
    background-color: rgba(0, 0, 255, 0.2);
}

.timeline-item::before {
    left: -30px;
}

/*.timeline-item::after {*/
/*    right: -30px;*/
/*}*/

.timeline-item:first-child::before,
.timeline-item:last-child::after {
    display: none;
}

.timeline-date {
    font-weight: bold;
    margin-bottom: 10px;
    color: #4a4a4a;
}

.timeline-content {
    font-size: 14px;
    color: #666;
}

@media (max-width: 600px) {
    /*.timeline-item {*/
    /*    width: 150px;*/
    /*}*/

    .timeline::before {
        left: 85px;
        right: 85px;
    }
}