#timeline-container {
    max-width: 800px;
    margin: 40px auto;
    font-family: inherit;
    font-size: 15px;
    position: relative;
}

/* Shared timeline item styling */
.timeline-item {
    margin: 30px 0;
    position: relative;
    padding-left: 40px;
}

/* Date */
.timeline-date {
    font-size: 13px;
    color: #999;
    margin-bottom: 5px;
}

/* Bubble style for date */
.timeline-side .date-bubble {
    position: relative;
    left: -38px; /* Align bubble center over the vertical line */
    background: #fff;
    border: 2px solid #1da1f2; /* Twitter blue for visibility */
    border-radius: 50%;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    min-width: 80px;
    text-align: center;
    line-height: 1.4;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Flip bubble for RTL (Arabic) */
:dir(rtl) .timeline-side .date-bubble {
    left: auto;
    right: -38px;
}

.date-bubble::before {
    content: "\f017";
}

/* Title link */
.timeline-content a {
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    color: #1d1d1d;
}

.timeline-content a:hover {
    color: #1da1f2;
}

/* Center line style */
.timeline-line .timeline-item {
    padding-left: 0;
    text-align: center;
}

.timeline-line .timeline-item:nth-child(odd) {
    text-align: left;
    padding-left: 50%;
}

.timeline-line .timeline-item:nth-child(even) {
    text-align: right;
    padding-right: 50%;
}

.timeline-line::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: #e5e5e5;
    transform: translateX(-50%);
}

/* Side style */
.timeline-side .timeline-item {
    border-left: 2px solid #e5e5e5;
    padding-left: 20px;
}

.timeline-side .timeline-date {
    position: relative;
}

/* RTL adjustments */
:dir(rtl) .timeline-side .timeline-item {
    border-left: none;
    border-right: 2px solid #e5e5e5;
    padding-left: 0;
    padding-right: 20px;
}
:dir(rtl) .timeline-line::before {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}


.timeline-line .date-bubble {
    position: relative;
    display: inline-block;
    background: #fff;
    border: 2px solid #1da1f2; /* Blue marker (can be changed to grey) */
    border-radius: 50%;
    padding: 10px 15px;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    min-width: 90px;
    text-align: center;
    line-height: 1.4;
    z-index: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Make sure the bubble overlaps the center line */
.timeline-line .timeline-date {
    position: relative;
    z-index: 2;
}

/* Adjust line so bubbles overlap cleanly */
.timeline-line::before {
    background: #ddd; /* Neutral line color */
    z-index: 0;
}
