/* Timeline Enhancements */
.timeline-container {
    position: relative;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom,
            transparent,
            rgba(59, 130, 246, 0.5),
            rgba(147, 51, 234, 0.5),
            rgba(236, 72, 153, 0.5),
            transparent);
    box-shadow: 0 0 15px rgba(147, 51, 234, 0.3);
    border-radius: 4px;
}

.timeline-event {
    position: relative;
    margin-bottom: 4rem;
}

.timeline-content {
    position: relative;
    width: 45%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-content:hover {
    transform: translateY(-5px) scale(1.02);
    z-index: 10;
}

.timeline-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.timeline-content:hover .timeline-card {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.timeline-dot-wrapper {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    z-index: 10;
}

.timeline-dot {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 4px solid #1e293b;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 0 20px rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.timeline-event:hover .timeline-dot {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.3), 0 0 30px rgba(59, 130, 246, 0.6);
    border-color: #3b82f6;
}

.timeline-date {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.timeline-year-label {
    position: absolute;
    top: -2.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    opacity: 0.2;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.05em;
    z-index: 0;
    transition: all 0.3s ease;
}

.timeline-event:nth-child(odd) .timeline-year-label {
    right: -2rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.timeline-event:nth-child(even) .timeline-year-label {
    left: -2rem;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.timeline-event:hover .timeline-year-label {
    opacity: 0.5;
    transform: scale(1.1);
}

/* Alternating Layout */
.timeline-event:nth-child(odd) {
    display: flex;
    flex-direction: row-reverse;
}

.timeline-event:nth-child(even) {
    display: flex;
    flex-direction: row;
}

.timeline-event:nth-child(odd) .timeline-content {
    text-align: left;
    margin-right: auto;
    margin-left: 0;
    padding-right: 3rem;
}

.timeline-event:nth-child(even) .timeline-content {
    text-align: left;
    margin-left: auto;
    margin-right: 0;
    padding-left: 3rem;
}

.timeline-event:nth-child(even) .timeline-card {
    align-items: flex-start;
}

@media (max-width: 768px) {
    .timeline-line {
        left: 1rem;
    }

    .timeline-event,
    .timeline-event:nth-child(odd),
    .timeline-event:nth-child(even) {
        flex-direction: row;
        justify-content: flex-start;
    }

    .timeline-dot-wrapper {
        left: 1rem;
        transform: translateX(-50%);
    }

    .timeline-content,
    .timeline-event:nth-child(odd) .timeline-content,
    .timeline-event:nth-child(even) .timeline-content {
        width: calc(100% - 4rem);
        margin-left: 4rem;
        margin-right: 0;
        text-align: left;
        padding: 0;
    }

    .timeline-year-label {
        display: none;
    }

    .timeline-container {
        padding: 1rem 0;
    }

    .timeline-card {
        padding: 1rem;
    }
}