/* Timeline Slider Styles */
.timeline-container {
    position: relative;
/*     min-height: 100vh; */
/*     background-color: #1a1a1a; */
    color: #ffffff;
/*     padding: 2rem; */
/*     background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)); */
}

.timeline-content {
    max-width: 1240px;
    margin: 0 auto;
}

.timeline-slide {
    position: relative;
/*     background-color: rgba(255, 255, 255, 0.1); */
/*     backdrop-filter: blur(8px); */
/*     border-radius: 0.5rem; */
    padding: 2rem;
    margin-bottom: 4rem;
    display: none;
    overflow: hidden;
    min-height: 300px;
}

.timeline-slide.active {
    display: block;
/*     animation: slideIn 0.5s ease-in-out; */
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-date {
    position: absolute;
    top: -1rem;
    left: 2rem;
    background-color: #ffffff;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.timeline-month {
    font-size: 0.875rem;
    font-weight: 500;
    color: #666666;
    text-align: center;
}

.timeline-year {
    font-size: 1.875rem;
    font-weight: 700;
    color: #006837;
    text-align: center;
}

.timeline-details {
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

.timeline-description {
    color: rgba(255, 255, 255, 1);
/*     white-space: pre-line; */
/*     line-height: 1rem; */
    margin-bottom: 1rem;
    font-weight: 400;
}

.timeline-meta {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-category {
    display: inline-block;
    background-color: rgba(0, 104, 55, 0.2);
    color: #00a86b;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.timeline-subcategory {
    color: #999999;
    font-size: 0.875rem;
}

.timeline-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    border-radius: 0 0.5rem 0.5rem 0;
}

.timeline-track {
    position: relative;
    height: 5rem;
    margin: 4rem 1rem 0 1rem;
/*     background: linear-gradient(to right, #333, #333); */
    background-size: 100% 1px;
    background-position: center;
    background-repeat: no-repeat;
}

.timeline-years {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
    align-items: center;
    height: 100%;
    position: relative;
    width: 100%;
    padding: 0 0.5rem;
}

.timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
/*     transition: all 0.3s ease; */
    position: relative;
    justify-self: center;
}

.timeline-marker:hover .timeline-marker-line {
    background-color: #006837;
    transform: scaleY(1.2);
}

/* Year Markers - Main markers with labels */
.timeline-marker.year-marker {
    z-index: 5;
}

.timeline-marker.year-marker .timeline-marker-line {
    width: 4px;
    height: 2rem;
    background-color: rgba(174, 174, 183, 1);
/*     transition: all 0.3s ease; */
}

.timeline-marker.year-marker .timeline-marker-year {
    font-size: 21px;
    color: #999999;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
}

.timeline-marker.year-marker.active .timeline-marker-line {
    background-color: #006837;
    height: 3rem;
}

.timeline-marker.year-marker.active .timeline-marker-year {
    color: #006837;
    font-weight: 700;
}
 .timeline-marker.year-marker.active {
    top: -32px!important;
}
/* Post Markers - Sub-event markers */
.timeline-marker.post-marker {
    z-index: 3;
    grid-column: span 1;
}

.timeline-marker.post-marker .timeline-marker-line {
    width: 1px;
    height: 1rem;
    background-color: #666666;
    transition: all 0.3s ease;
}

.timeline-marker.post-marker.active .timeline-marker-line {
    background-color: #006837;
    height: 1.5rem;
    width: 2px;
}

.timeline-marker.post-marker:hover .timeline-marker-line {
    background-color: #00a86b;
    height: 1.25rem;
}

.timeline-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 3rem;
    background-color: #006837;
    transition: left 0.3s ease;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 104, 55, 0.5);
}

.timeline-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.nav-button {
    width: 3rem;
    padding: 0;
    height: 3rem;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid #fff;
    /* border: none; */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #ffffff;
    backdrop-filter: blur(8px);

}

.nav-button:hover {
    background-color: #fff;
    transform: scale(1.1);
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}


.nav-button:focus {
    color: #000;
    background-color: #ffffff;
}
.nav-button svg path {
    fill: #fff;
}
.nav-button:focus svg path ,.nav-button:hover svg path {
    fill: #000;
}
.nav-button:disabled:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .timeline-years {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 0.75rem;
    }
    
    .timeline-marker.year-marker .timeline-marker-year {
        font-size: 0.7rem;
    }
}

/* Mobile Horizontal Scrolling */
@media (max-width: 768px) {
    .timeline-container {
        padding: 1rem;
    }
    
    .timeline-slide {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .timeline-image {
        width: 100%;
        height: 200px;
        position: relative;
        margin-top: 1rem;
        opacity: 0.6;
/*         border-radius: 0.5rem; */
    }
    
    .timeline-details {
        margin-top: 2rem;
    }
    
    .timeline-track {
/*         margin: 2rem 0 0 0; */
/*         height: 4rem; */
        overflow-x: auto;
        overflow-y: hidden;
/*         padding: 0 1rem; */
        /* Custom scrollbar styling */
        scrollbar-width: thin;
        scrollbar-color: #006837 rgba(255, 255, 255, 0.1);
    }
    
    .timeline-track::-webkit-scrollbar {
        height: 4px;
    }
    
    .timeline-track::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }
    
    .timeline-track::-webkit-scrollbar-thumb {
        background: #006837;
        border-radius: 2px;
    }
    
    .timeline-track::-webkit-scrollbar-thumb:hover {
        background: #00a86b;
    }
    
    .timeline-years {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        width: max-content;
        min-width: 100%;
        padding: 0 0.5rem;
        align-items: center;
        height: 100%;
    }
    
    .timeline-marker {
        flex-shrink: 0;
        min-width: 50px;
    }
    
    .timeline-marker.year-marker .timeline-marker-year {
        font-size: 0.625rem;
        white-space: nowrap;
    }
    
    .timeline-marker.year-marker .timeline-marker-line {
        height: 1.5rem;
    }
    
    .timeline-marker.year-marker.active .timeline-marker-line {
        height: 2rem;
    }
    
    .timeline-marker.post-marker {
        min-width: 30px;
    }
    
    .timeline-marker.post-marker .timeline-marker-line {
        height: 0.75rem;
    }
    
    .timeline-marker.post-marker.active .timeline-marker-line {
        height: 1rem;
    }
    
    /* Scroll indicator hint */
    .timeline-track::after {
        content: "← Scroll →";
        position: absolute;
        bottom: -1.5rem;
        right: 1rem;
        font-size: 0.7rem;
        color: #666;
        opacity: 0.7;
        pointer-events: none;
        animation: fadeInOut 3s ease-in-out infinite;
    }
    
    @keyframes fadeInOut {
        0%, 100% { opacity: 0.3; }
        50% { opacity: 0.7; }
    }
}

@media (max-width: 480px) {
	.timeline-track {
    	display: none;
	}
	.timeline-marker.year-marker.active .timeline-marker-line {
    	margin-right: 0;
    }
	
    .timeline-container {
        padding: 0rem;
    }
    
    .timeline-slide {
        padding: 1rem;
        margin-bottom: 1.5rem;
        min-height: 250px;
    }
    
    .timeline-date {
        left: 1rem;
        padding: 0.75rem;
    }
    
    .timeline-month {
        font-size: 0.75rem;
    }
    
    .timeline-year {
        font-size: 1.5rem;
    }
    
    .timeline-title {
        font-size: 1.25rem;
    }
    
    .timeline-description {
        font-size: 0.9rem;
    }
    
    .timeline-track {
        padding: 0 0.5rem;
        height: 3.5rem;
    }
    
    .timeline-years {
        gap: 0.75rem;
    }
    
    .timeline-marker {
        min-width: 40px;
    }
    
    .timeline-marker.year-marker .timeline-marker-year {
        font-size: 0.55rem;
        margin-top: 0.25rem;
    }
    
    .timeline-marker.post-marker {
        min-width: 25px;
    }
    
    .nav-button {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .timeline-navigation {
        margin-top: 1.5rem;
    }
    
    .timeline-track::after {
        font-size: 0.6rem;
        bottom: -1.25rem;
    }
	.timeline-indicator {
		display:none;
    	position: absolute;
		top: 20%;
	}
	.timeline-marker.year-marker::before { 
    background: none!important; 
	}
}

.timeline-slide.active {
    min-height: 400px;
}
.timeline-marker.year-marker.active .timeline-marker-line {
    height: 6rem!important;
    /* margin-top: -23px; */
    margin-right: -2px!important;
}
.timeline-details {
		width: 500px;
}

@media(max-width:850px){
	.timeline-details {
		width:100%;
	}

	.timeline-slide.active {
		flex-direction: column!important;
	}
}
/* Grid Layout Adjustments for Better Distribution on Desktop */
@media (min-width: 769px) {
    .timeline-years {
        grid-template-columns: repeat(auto-fit, minmax(10px, 1fr));
/*         gap: 1.5rem; */
    }
}

/* Ensure proper spacing for post markers in grid */
.timeline-marker.post-marker {
    margin: 0 auto;
}

/* Better alignment for mixed year and post markers */
.timeline-years > * {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

/* Smooth scrolling behavior */
.timeline-track {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.timeline-marker:focus {
    outline: 2px solid #006837;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Active marker auto-scroll on mobile */
@media (max-width: 768px) {
    .timeline-marker.active {
        scroll-margin: 2rem;
    }
}




.timeline-years {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    /* gap: 1rem; */
    align-items: center;
    height: 100%;
    position: relative;
    width: 100%;
    padding: 0 0.5rem;
}