/* Timeline Container */
.timeline {
    position: relative;
    margin: 2rem 0;
    padding: 0;
    list-style: none;
}

/* Central Vertical Line */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: var(--primary-color);
    transform: translateX(-50%);
    z-index: 0;
    /* Ensures the line is behind the content */
}

/* Timeline Item */
.timeline-item {
    position: relative;
    margin: 2rem 0;
}

/* Year Marker */
.timeline-item::before {
    content: attr(data-year);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 1;
    /* Ensures years appear above the line */
}

/* Content Box */
.timeline-item .content {
    position: relative;
    width: 45%;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    z-index: 2;
    /* Ensures content appears above the year markers */
}

/* Content Box Left */
.timeline-item .content.left {
    left: 3%;
    /* Align to the left side of the timeline */
    transform: translateX(-10%);
}


/* Content Box Right */
.timeline-item .content.right {
    left: 52%;
    transform: translateX(10%);
}

/* Add spacing to prevent overlapping */
.timeline-item:nth-child(odd) .content {
    margin-top: 1rem;
    /* Spacing for odd items */
}

.timeline-item:nth-child(even) .content {
    margin-bottom: 1rem;
    /* Spacing for even items */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .timeline {
        padding: 0 10px;
    }
    .timeline::before {
        left: 30px;
    }

    .timeline-item::before {
        left: 30px;
        transform: translate(-50%, -50%);
    }

    .timeline-item .content {
        width: 75%;
    }

    .timeline-item .content.left {
        left: 100px;
        transform: translateX(0);
    }

    .timeline-item .content.right {
        left: 100px;
        transform: translateX(0);
    }
}

.timeline-item {
    opacity: 0;
    /* Initially hidden */
    transform: translateY(20px);
    /* Slide down slightly */
    transition: all 0.6s ease-in-out;
    /* Smooth transition for appearance */
}

.timeline-item.visible {
    opacity: 1;
    /* Fully visible */
    transform: translateY(0);
    /* Reset position */
}

.timeline::before {
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    /* Gradient line */
    animation: pulse 2s infinite;
    /* Add glowing animation */
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 10px var(--primary-color);
    }

    50% {
        box-shadow: 0 0 20px var(--secondary-color);
    }
}

.timeline-item .content {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item .content:hover {
    transform: scale(1.05);
    /* Slight zoom */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* Add a shadow */
}

.timeline-item.active .content {
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#active-leader {
    position: fixed;
    top: 7.5%;
    right: -300px;
    /* Start off-screen */
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    /* Start invisible */
    transition: all 0.5s ease-in-out;
    /* Smooth transition for slide and fade */
}

/* When the leader div should be in view */
#active-leader.show {
    right: 20px;
    /* Move into position */
    opacity: 1;
    /* Fade in */
}

#active-leader h4 {
    margin-bottom: 0.5rem;
}

#active-leader p {
    font-weight: bold;
    font-size: 1rem;
}

blockquote {
    background-color: #ebeaea; /* Light background color */
    border-left: 5px solid var(--primary-color) ; /* Blue border to the left */
    padding: 1.5rem; /* Padding for space inside the blockquote */
    margin: 2rem 0; /* Margin to separate from surrounding content */
    font-style: italic; /* Italicize the quote text */
    color: #555; /* Slightly darker text color for contrast */
    font-size: 1.1rem; /* Slightly larger font size for emphasis */
    border-radius: 8px; /* Rounded corners for a soft look */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Light shadow for a lifted effect */
    position: relative; /* For positioning the citation */
}