/* General Styling & Resets */
/** {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f4f4f4;
}

header, footer {
    text-align: center;
    padding: 4rem 1rem;
    background-color: #fff;
}*/

/* Main Timeline Container */
.history-timeline {
    display: flex;
    position: relative;
}

/* Left side: Content Slides */
.timeline-content {
    width: 80%;
    position: relative;
}

.history-slide {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}
.history-slide:nth-child(odd) {
    background-color: #e9e9e9;
}
.history-slide:nth-child(even) {
    background-color: #f4f4f4;
}

.slide-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    background: #fff;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.history-slide.is-visible .slide-content {
    opacity: 1;
    transform: translateY(0);
}

.slide-content img {
    max-width: 40%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.slide-content .text-content h2 {
    color: #0056b3;
    margin-bottom: 1rem;
}

/* Right side: Sticky Navigation */
.timeline-navigation {
    width: 20%;
    position: relative;
}

.timeline-nav-list {
    position: sticky;
    top: 50%;
    transform: translateY(-50%);
    list-style: none;
    padding: 0;
    margin: 0 auto;
    width: fit-content;
}

.nav1-item {
    cursor: pointer;
    padding: 20px 20px 20px 45px;
    color: #777;
    position: relative;
    transition: color 0.3s ease;
}

/* This pseudo-element creates the line segment for each item */
.nav1-item::after {
    content: '';
    position: absolute;
    top: 50%; /* Start line from the middle of the item */
    left: 24px; /* Align with the center of the dot */
    width: 2px;
    height: 100%; /* Make the line as tall as the list item */
    background-color: #ccc;
    z-index: -1; /* Place it behind the dot of the next item */
}

/* This hides the line for the very last item */
.nav1-item:last-child::after {
    display: none;
}

.nav1-item span {
    font-size: 1.1rem;
    font-weight: bold;
}

/* This pseudo-element creates the dot for each item */
.nav1-item::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background-color: #777;
    border: 2px solid #f4f4f4; /* Use body background color for a clean "punch-out" look */
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1; /* Ensure dot is on top of the line segment */
}

.nav1-item:hover, .nav1-item.active {
    color: #0056b3;
}

.nav1-item.active::before {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-50%) scale(1.4);
}


/* --- MOBILE FRIENDLY STYLES --- */
@media (max-width: 768px) {
    /* Enable scroll-snapping for a better mobile experience */
    .timeline-content {
        scroll-snap-type: y mandatory;
    }
    .history-slide {
        scroll-snap-align: start;
    }
    
    .history-timeline {
        flex-direction: column;
    }
    .timeline-content, .timeline-navigation {
        width: 100%;
    }
    
    .slide-content {
        flex-direction: column;
        text-align: center;
        margin: 1rem;
        padding: 1.5rem;
    }

    .slide-content img {
        max-width: 80%;
        margin-bottom: 1rem;
    }

    /* Transform navigation to a sticky bottom bar */
    .timeline-navigation {
        order: 2; /* Move nav to the bottom */
        position: sticky;
        bottom: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(5px);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .timeline-nav-list {
        position: static;
        transform: none;
        display: flex;
        justify-content: space-around;
        width: 100%;
        padding: 0;
    }
    
    .nav1-item {
        padding: 10px 5px;
        flex-grow: 1;
        text-align: center;
    }

    /* Hide the vertical line segment on mobile */
    .nav1-item::after {
        display: none;
    }

    .nav1-item span {
        font-size: 0.9rem; /* Smaller font for more items */
    }

    /* On mobile, use an underline for the active state instead of a dot */
    .nav1-item::before {
        content: '';
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 0; /* Position at the bottom */
        top: auto;
        width: 0;
        height: 3px;
        background-color: #0056b3;
        border: none;
        border-radius: 0;
        transition: width 0.3s ease;
    }

    .nav1-item.active::before {
        width: 60%; /* Active item gets an underline */
        transform: translateX(-50%) scale(1);
    }
}