/* Timeline Section */
.timeline-section {
    padding: 6rem 0;
    position: relative;
}

.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(0, 94, 184, 0.1);
    transform: translateX(-50%);
    z-index: 0;
}

/* Animated progress bar */
.timeline-progress {
    position: absolute;
    left: 50%;
    top: 0;
    width: 6px;
    height: 0%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    transform: translateX(-50%);
    z-index: 1;
    box-shadow: 0 0 20px var(--primary), 0 0 40px var(--primary)80;
    transition: height 0.3s ease-out;
    border-radius: 3px;
}

.timeline-item {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
    opacity: 1;
    /* Visible by default */
    visibility: visible;
    /* Ensure visibility */
    transform: translateY(0);
    /* No initial offset */
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    width: 60px;
    height: 60px;
    background: var(--bg-body);
    /* Transparent initially, fills when activated */
    border: 4px solid rgba(0, 94, 184, 0.3);
    /* Subtle border initially */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: rgba(0, 94, 184, 0.5);
    /* Dimmed initially */
    font-size: 1.2rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 8px var(--bg-body);
    transition: all 0.4s ease;
}

/* Neon glow effect on active */
.timeline-item.active .timeline-marker {
    animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {

    0%,
    100% {
        box-shadow: 0 0 0 8px var(--bg-body), 0 0 20px currentColor, 0 0 40px currentColor;
    }

    50% {
        box-shadow: 0 0 0 8px var(--bg-body), 0 0 30px currentColor, 0 0 60px currentColor;
    }
}

.timeline-content {
    width: 45%;
    margin-left: auto;
    /* Default for even items (right side) */
    margin-right: 0;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
    /* For odd items (left side) */
    margin-left: 0;
    text-align: right;
}

.timeline-item:nth-child(odd) .timeline-list {
    align-items: flex-end;
}

.timeline-item:nth-child(odd) .timeline-list li {
    flex-direction: row-reverse;
}

.timeline-list {
    list-style: none;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.timeline-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-main);
}

.timeline-list li i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

/* Responsive Timeline */
/* Mobile Timeline Responsive */
@media (max-width: 768px) {
    .timeline-container {
        padding: 1.5rem 0;
    }

    .timeline-line {
        left: 20px;
        transform: none;
        width: 3px;
    }

    .timeline-progress {
        left: 20px;
        width: 3px;
    }

    .timeline-item {
        flex-direction: row !important;
        justify-content: flex-start;
        margin-bottom: 2.5rem;
        padding-left: 0;
    }

    .timeline-marker {
        left: 20px;
        transform: translateX(-50%);
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }

    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        margin-right: 0 !important;
        text-align: left !important;
        padding: 1.25rem;
    }

    .timeline-content h3 {
        font-size: 1.25rem;
    }

    .timeline-content p {
        font-size: 0.95rem;
    }

    .timeline-item:nth-child(odd) .timeline-list,
    .timeline-item:nth-child(even) .timeline-list {
        align-items: flex-start;
    }

    .timeline-list {
        padding-left: 1rem;
    }

    .timeline-list li {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
}

/* Small Mobile Timeline */
@media (max-width: 480px) {
    .timeline-marker {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .timeline-content {
        width: calc(100% - 50px);
        margin-left: 50px !important;
        padding: 1rem;
    }

    .timeline-content h3 {
        font-size: 1.1rem;
    }

    .timeline-content p {
        font-size: 0.9rem;
    }

    .timeline-list li {
        font-size: 0.85rem;
    }
}