:root {
    --primary-color: #3498db;
}

.custom-timeline-wrapper {
    overflow-x: auto;
    padding-bottom: 20px;
}

.custom-timeline {
    position: relative;
    padding: 60px 0 20px;
    margin-top: 50px;
    width: calc(200% + 120px);
    transition: all 0.3s ease;
}

.custom-timeline-line {
    position: absolute;
    top: 60px;
    left: 60px;
    right: 0;
    height: 4px;
    background-color: var(--primary-color);
}

.custom-timeline-marks {
    position: relative;
    height: 40px;
    padding-left: 60px;
}

.custom-timeline-mark {
    position: absolute;
    top: 10px;
    transform: translateX(-50%);
    text-align: center;
    font-size: 0.8em;
}

.custom-timeline-mark::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    height: 10px;
    width: 1px;
    background-color: #dee2e6;
}

.custom-timeline-mark.year::before {
    height: 20px;
}

.custom-events-container {
    position: relative;
    height: 360px;
    padding-left: 60px;
}

.custom-event {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
}

.custom-event-content {
    position: relative;
    background-color: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 120px;
}

.custom-event-content::before {
    content: '';
    position: absolute;
    left: 50%;
    width: 2px;
    background-color: var(--primary-color);
    transform: translateX(-50%);
}

.custom-event:nth-child(odd) .custom-event-content::before {
    top: -30px;
    height: 30px;
}

.custom-event:nth-child(even) .custom-event-content::before {
    top: -60px;
    height: 60px;
}

.custom-event-content:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.custom-event-date {
    font-size: 0.8em;
    font-weight: bold;
    margin-bottom: 5px;
}

.custom-event-name {
    color: #333;
    font-size: 0.9em;
}

.custom-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    z-index: 1030;
}

.custom-controls .btn {
    margin: 0 5px;
}

.custom-controls-wrapper {
    position: relative;
    height: 80px; /* Adjust this value as needed */
    margin-top: 20px;
}

.custom-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    z-index: 1030;
    background-color: rgba(255, 255, 255, 0.8); /* Optional: adds a slight background */
    padding: 10px;
    border-radius: 5px;
}

.custom-controls .btn {
    margin: 0 5px;
}

/* Ensure the timeline doesn't overflow on smaller screens */
@media (max-width: 768px) {
    .custom-timeline-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}