/* Basic reset */
.timeline-point,
.timeline-line {
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline-container {
    position: relative;
    width: 100%;
    overflow-x: auto;
    /* Allow horizontal scrolling if necessary */
    padding: 0;
    white-space: nowrap;
    transition: padding 0.3s ease;
    /* Smooth transition for dynamic padding adjustment */
}

/* Line */
.timeline-line {
    position: absolute;
    width: 100%;
    height: 4px;
    background: #333;
    left: 0;
    transform: translateY(-50%);
}

.timeline-point span::before {
    content: "";
    position: absolute;
    top: 100%;
    /* Adjust based on exact positioning */
    left: 50%;
    /* Adjust this value to align with the center of the span if necessary */
    width: 3px;
    /* Line width */
    height: 20px;
    /* Line height, adjust as needed to connect to the .timeline-line */
    background-color: #000;
    /* Line color */
    transform: translateX(-50%);
}

/* Points */
.timeline-point {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-width: 120px;
    margin: 0 20px;
    cursor: pointer;
}

.timeline-point>span {
    padding: 0 1rem;
    background: #FECE00;
    color: #2C3377;
    font-size: 1.6rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    position: relative;
    z-index: 2;
}

/* Arrow for the title box */
.timeline-point>span::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.timeline-point:nth-child(odd)>span::after {
    top: 100%;
    left: 50%;
    border-width: 10px 10px 0 10px;
    border-color: #FECE00 transparent transparent transparent;
}

.timeline-point:nth-child(even)>span::after {
    bottom: 100%;
    left: 50%;
    border-width: 0 10px 10px 10px;
    border-color: transparent transparent #FECE00 transparent;
}

/* Description boxes */
.timeline-point>div {
    display: none;
    position: absolute;
    max-width: 300px;
    padding: 10px;
    background: white;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0;
    z-index: 1;
}

.timeline-point:hover>div {
    display: flex;
    flex-direction: column;
}

.timeline-point:nth-child(odd)>span {
    top: calc(100% + 20px);
}

.timeline-point:nth-child(even)>span {
    bottom: calc(100% + 20px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1 !important;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .timeline-point {
        min-width: 100px;
    }

    .timeline-point>span {
        font-size: 1.4rem;
        padding: 0.5rem;
        max-width: 150px;
    }

    .timeline-point>div {
        max-width: 250px;
    }
}

.timeline-legend h2 {
    margin-left: auto !important;
    text-align: center;
    text-transform: uppercase;
    background: #FECE00;
    max-width: 250px;
    font-size: 2.7rem;
    margin-top: -50px;
}

.timeline-next {
    position: absolute;
    top: 900px;
    text-align: center;
    max-width: calc(100vw - ((100vw - 1170px)));
}

.timeline-legend p {
    margin-top: 50px;
}

.timeline-point>span {
    font-size: 2rem;
    padding: 5px;
    padding-left: 15px;
    padding-right: 15px;
}

.timeline-point {
    padding: 0 40px;
    margin: 0 5px;
}

.timeline-point:nth-child(odd)>span {
    top: 90px !important;
}

.timeline-point:nth-child(odd)>div {
    top: 150px !important;

}

.top-card.hidden {
    display:none !important;
}


.timeline-point div p {
    white-space: pre-wrap;
    /* Preserves white spaces and wraps text */
    overflow-wrap: break-word;
    /* Ensures long words do not overflow */
}

.timeline-point:nth-child(even)>span {
    top: 200px !important;
}

.timeline-point:nth-child(even)>div {
    top: 260px !important;
}

.timeline-point div h3 {
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.timeline-legend {
    margin-top: 50px;
    text-align: center;
}

.timeline-line {
    background: #2C3377;
    top: 200px;
    width: 5700px;
}

.timeline-container {
    width: 100% !important;
    height: auto !important;
    padding-left: 25px;
    overflow-y: hidden !important;
    padding-right: 25px;
}