/* --- Variables --- */
:root {
    --primary-color: #004562;
    --inactive-color: #cacaca;
    --text-color: #231F20;
}

/* --- Timeline Container --- */
.timeline-container {
    display: flex;
    position: relative;
    width: 100%;
    max-width: 100vw;
    height: 80vh;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.timeline-container * {
    -webkit-tap-highlight-color: transparent;
}

/* --- Left Side (Navigation) --- */
.timeline-left {
    width: 30%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertically centers nav-wrapper */
    z-index: 10;
    height: 80vh;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 !important; /* remove old top padding — centering is handled by flex parent */
}

.timeline-dots {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    cursor: pointer;
}

/* Main Dot Row */
.main-dot-wrapper {
    display: flex;
    align-items: center;
    padding: 0;
    transition: all 0.3s ease;
    opacity: 0.5;
    font-weight: 600;
    font-size: 20px;
    line-height: 28px;
    color: var(--primary-color);
}

.nav-item.active .main-dot-wrapper {
    opacity: 1;
    font-size: 28px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
    margin-right: 15px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.nav-item.active .dot {
    opacity: 1;
    width: 15px;
    height: 15px;
}

.year {
    font-size: 1.1rem;
    white-space: nowrap;
}

/* Connector Column */
.connector {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
    width: 10px;
    align-items: center;
}

.nav-item:last-child .connector {
    display: none;
}

.small-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--inactive-color);
}

/* --- Right Side (Content) --- */
.timeline-right {
    width: 70%;
    height: 80vh;
	scroll-behavior: smooth;
	overscroll-behavior-y: contain;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
	scroll-snap-type: y mandatory;
    overflow-y: auto;
    -ms-overflow-style: none;
}

.timeline-right::-webkit-scrollbar {
    display: none;
}

.timeline-block {
    height: 80vh;
	scroll-snap-stop: always;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 30px 80px 30px 80px;
    box-sizing: border-box;
}

.content-box {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px 0;
    min-height: 0; /* important for flex children to shrink */
}

/* Content Styling */
.content-box h2 {
    font-size: 40px;
    line-height: 56px;
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
    flex-shrink: 0;
}

.content-box h3 {
    color: var(--primary-color);
    font-size: 32px;
    line-height: 56px;
    font-weight: 500;
    margin: 0;
    flex-shrink: 0;
}

.timeline-body {
    flex-shrink: 0;
	text-align: justify;
}

.timeline-body p {
    color: #686868;
    font-size: 16px;
    line-height: 28px;
    margin: 20px 0;
}

/* Image fills all remaining vertical space */
.timeline-image {
    flex-grow: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
    margin-top: 10px;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 20px !important;
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .timeline-container {
        height: 80vh;
    }

    .timeline-left {
        width: 20%;
        height: 80vh;
    }

    .timeline-right {
        width: 80%;
        height: 80vh;
    }

    .timeline-block {
        height: 80vh;
        padding: 20px 20px 20px 20px;
    }

    .dot {
        display: none;
    }

    .small-dot {
        width: 5px;
        height: 5px;
    }

    .year {
        white-space: normal;
        text-align: center;
        line-height: 1em;
        padding: 10px 0;
        font-size: 1rem;
    }

    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .connector {
        padding: 5px;
        align-items: center;
        gap: 7px;
    }

    .content-box h2 {
        font-size: 24px;
        line-height: 32px;
    }

    .content-box h3 {
        font-size: 16px;
        line-height: 24px;
    }

    .timeline-body p {
        margin: 10px 0;
        font-size: 14px;
        line-height: 22px;
    }

    .timeline-image {
        max-height: none; /* let flex-grow handle it instead */
    }
}