/* ============================================== */
/* ===  CSS for Horizontal Timeline (Green)   === */
/* ============================================== */

.horizontal-timeline-section {
    padding: 60px 20px;
    background-color: #4CAF50; /* --- GREEN BACKGROUND --- */
    overflow: hidden; 
}

/* Title Color */
.horizontal-timeline-section .section-title {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    display: block; 
    margin-bottom: 40px; 
    color: #ffffff; /* --- WHITE TEXT --- */
    border-bottom-color: #ffffff; /* White underline */
}

/* Main wrapper */
.timeline-wrapper {
    max-width: 1000px; 
    margin: 0 auto;
    position: relative;
}

/* Navigation bar */
.timeline-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between; 
    margin-bottom: 30px; 
    background-color: rgba(255, 255, 255, 0.2); /* --- SEMI-TRANSPARENT WHITE BACKGROUND --- */
    border-radius: 50px; 
    padding: 5px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

/* Arrow buttons */
.nav-arrow {
    background-color: #f98930; /* --- ORANGE BACKGROUND --- */
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    flex-shrink: 0; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow:hover:not(:disabled) {
    background-color: #e07828; 
    transform: scale(1.1);
}

.nav-arrow:disabled {
    background-color: rgba(255, 255, 255, 0.5); /* Lighter, disabled look */
    color: #a0a0a0;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Container for scrollable years */
.timeline-years {
    flex-grow: 1; 
    overflow-x: auto; 
    scrollbar-width: thin; 
    scrollbar-color: #f98930 rgba(255, 255, 255, 0.2); /* Orange thumb, light track */
    padding: 10px 0; 
    margin: 0 10px; 
    position: relative; 
}

/* Scrollbar styles */
.timeline-years::-webkit-scrollbar {
    height: 6px; 
}
.timeline-years::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.2); /* Light track */
    border-radius: 3px;
}
.timeline-years::-webkit-scrollbar-thumb {
    background-color: #f98930; /* Orange thumb */
    border-radius: 3px;
}

/* Center indicator line */
.timeline-years::after {
    content: '';
    position: absolute;
    top: 0px; 
    bottom: 0px; 
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    background-color: rgba(255, 255, 255, 0.6); /* --- SEMI-TRANSPARENT WHITE LINE --- */
    z-index: 1;
    border-radius: 1.5px;
}


/* Track holding year buttons */
.years-track {
    display: flex;
    gap: 15px; 
    padding: 0 45%; 
    position: relative;
    z-index: 2; 
}

/* Individual year button */
.timeline-year-btn {
    flex-shrink: 0; 
    padding: 8px 15px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffffff; /* --- WHITE TEXT --- */
    background-color: transparent; 
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative; 
}

.timeline-year-btn:hover {
    color: #f98930; /* Orange text on hover */
    background-color: rgba(255, 255, 255, 0.8); /* --- LIGHTER WHITE BACKGROUND on hover --- */
}

.timeline-year-btn.active {
    color: white;
    background-color: #f98930; /* --- ORANGE BACKGROUND for active --- */
    transform: scale(1.15); 
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* Container for displayed event content */
.timeline-content-display {
    margin-top: 30px;
    padding: 25px 30px;
    background-color: #ffffff; /* --- WHITE BACKGROUND --- */
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #eee;
    min-height: 200px; 
    opacity: 0; 
    transition: opacity 0.5s ease; 
}

/* Class added by JS for fade-in effect */
.timeline-content-display.fade-in {
    opacity: 1;
}


#event-year {
    font-size: 1.8rem;
    font-weight: bold;
    color: #f98930; /* --- ORANGE TEXT --- */
    margin-bottom: 15px;
}

#event-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #444; /* Dark grey text for readability */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .horizontal-timeline-section {
        padding: 40px 15px;
    }
    .timeline-navigation {
        padding: 5px;
        border-radius: 30px; 
    }
    .nav-arrow {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    .timeline-years {
        margin: 0 5px; 
    }
    .years-track {
        gap: 10px; 
        padding: 0 40%; 
    }
    .timeline-year-btn {
        padding: 6px 12px;
        font-size: 1rem;
    }
     .timeline-year-btn.active {
        transform: scale(1.1); 
    }
     .timeline-content-display {
        padding: 20px;
        min-height: 180px; 
    }
    #event-year {
        font-size: 1.5rem;
    }
    #event-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .years-track {
        padding: 0 35%; 
    }
     .timeline-year-btn {
        padding: 5px 10px;
        font-size: 0.9rem;
    }
     .timeline-content-display {
        min-height: 150px; 
    }
}