/* Modern Vertical Timeline */
.timeline-section {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(to right, #f8f9fa 0%, #ffffff 100%);
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

/* Center line */
.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background: linear-gradient(to bottom, var(--primary) 0%, var(--primary-dark) 100%);
    top: var(--spacing-md);
    bottom: var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
    opacity: 0.8;
}

.timeline-item {
    position: relative;
    width: calc(50% - 40px);
    margin-bottom: var(--spacing-2xl);
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Enhanced entry animations */
.timeline-item.animate {
    opacity: 1;
    transform: translateX(0);
}

/* Alternating items with different animations */
.timeline-item:nth-child(even) {
    left: 50%;
    margin-left: 80px;
    transform: translateX(50px);
}

/* Staggered animation delays */
.timeline-item:nth-child(1) { transition-delay: 0.1s; }
.timeline-item:nth-child(2) { transition-delay: 0.2s; }
.timeline-item:nth-child(3) { transition-delay: 0.3s; }
.timeline-item:nth-child(4) { transition-delay: 0.4s; }

/* Connecting dots */
.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    top: 20px;
    right: -52px;
    border: 3px solid #fff;
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.2);
    transform: scale(0);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -52px;
}

.timeline-item.animate .timeline-dot {
    transform: scale(1);
}

/* Content styling */
.timeline-content {
    padding: var(--spacing-md) var(--spacing-lg);
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.timeline-item.animate .timeline-content {
    opacity: 1;
    transform: translateY(0);
}

/* Arrow pointing to the line */
.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    right: -15px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 15px solid white;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -15px;
    border-left: none;
    border-right: 15px solid white;
}

/* Date badge */
.timeline-date {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 3px 10px rgba(var(--primary-rgb), 0.2);
}

/* Icon styling */
.timeline-icon {
    width: 45px;
    height: 45px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.timeline-icon i {
    font-size: var(--text-md);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: calc(100% - 80px);
        margin-left: 80px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
        margin-left: 80px;
    }
    
    .timeline-dot {
        left: -45px;
        right: auto;
    }
    
    .timeline-item:nth-child(even) .timeline-dot {
        left: -45px;
    }
    
    .timeline-content::before {
        left: -15px;
        border-right: 15px solid white;
        border-left: none;
    }
    
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -15px;
        border-right: 15px solid white;
        border-left: none;
    }
}

/* Print styles */
@media print {
    .timeline::after {
        display: none;
    }
    
    .timeline-item {
        opacity: 1;
        transform: none;
        page-break-inside: avoid;
    }
}

/* Typography adjustments using design system variables */
.timeline-content h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--heading-primary);
    margin-bottom: var(--spacing-xs);
    line-height: 1.4;
}

.timeline-content p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: 0;
}

.timeline-date {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-icon i {
    font-size: var(--text-md);
}

/* Adjust spacing using design system variables */
.timeline-section {
    padding: var(--spacing-2xl) 0;
}

.timeline {
    padding: var(--spacing-xl);
}

.timeline-content {
    padding: var(--spacing-md) var(--spacing-lg);
}

/* Section title styling matching other pages */
.timeline-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.timeline-header .section-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--heading-primary);
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-header .section-subtitle {
    font-size: var(--text-md);
    color: var(--text-secondary);
    font-weight: var(--font-medium);
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
}

/* Add subtle parallax effect on scroll */
@media (min-width: 769px) {
    .timeline-item {
        transform-style: preserve-3d;
        perspective: 1000px;
    }

    .timeline-content {
        transform: translateZ(0);
        transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .timeline-item.animate .timeline-content {
        transform: translateZ(20px);
    }
}

/* Optional: Add decorative elements */
.timeline-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary), transparent);
    opacity: 0.1;
}

/* Optional: Add subtle pattern */
.timeline-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--neutral-200) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
    pointer-events: none;
}

.timeline-nav {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
}

.timeline-nav-item {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    border: 1px solid var(--neutral-200);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-nav-item:hover,
.timeline-nav-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.timeline-progress {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neutral-300);
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: var(--primary);
    transform: scale(1.5);
}

.timeline-content {
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px) translateZ(30px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}