/* --- 3D Timeline Styling --- */
.timeline-section {
    position: relative;
    overflow: hidden;
}

.timeline-3d-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline-progress-bar {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(-50%);
    z-index: 1;
    border-radius: 2px;
}

.timeline-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to bottom, var(--neon-red, #d11a2a), #ff4d4d);
    box-shadow: 0 0 15px var(--neon-red, #d11a2a);
    border-radius: 2px;
    height: 0%;
    transition: height 0.1s ease-out;
}

.timeline-container {
    position: relative;
    z-index: 2;
    perspective: 1200px; /* 3D effect container */
}

.timeline-node {
    display: flex;
    justify-content: flex-end;
    padding-right: 50%;
    position: relative;
    margin-bottom: 4rem;
    width: 100%;
    opacity: 0;
    transform: translateY(100px) translateZ(-100px) rotateX(15deg);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-node.right {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 50%;
}

.timeline-node.visible {
    opacity: 1;
    transform: translateY(0) translateZ(0) rotateX(0);
}

@keyframes gradientSweepTimeline {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.timeline-content {
    width: 85%;
    background: linear-gradient(135deg, rgba(209, 26, 42, 0.4), rgba(255, 255, 255, 0.15), rgba(209, 26, 42, 0.4));
    background-size: 200% 200%;
    animation: gradientSweepTimeline 4s ease infinite;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    backdrop-filter: blur(25px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), inset 0 0 15px rgba(209, 26, 42, 0.2);
    cursor: pointer;
    z-index: 2;
}

.timeline-node:not(.right) .timeline-content {
    margin-right: 30px;
    text-align: right;
}

.timeline-node.right .timeline-content {
    margin-left: 30px;
    text-align: left;
}

/* 3D Glowing line connector */
.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: -1;
    transition: all 0.4s ease;
}

.timeline-node:not(.right) .timeline-content::before {
    right: -30px;
}

.timeline-node.right .timeline-content::before {
    left: -30px;
}

/* Center dot */
.timeline-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: #0a0a0a;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    transition: all 0.4s ease;
}

/* Hover effects */
.timeline-content:hover {
    border-color: rgba(209, 26, 42, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(209, 26, 42, 0.1);
}

.timeline-content:hover::before {
    background: var(--neon-red, #d11a2a);
    box-shadow: 0 0 10px var(--neon-red, #d11a2a);
}

.timeline-node:hover .timeline-dot {
    background: var(--neon-red, #d11a2a);
    border-color: #fff;
    box-shadow: 0 0 20px var(--neon-red, #d11a2a);
    transform: translate(-50%, -50%) scale(1.3);
}

.date-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, rgba(209, 26, 42, 0.2), transparent);
    border-radius: 30px;
    color: var(--neon-red, #d11a2a);
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    border: 1px solid rgba(209, 26, 42, 0.3);
    letter-spacing: 1px;
}

.event-title {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .timeline-progress-bar {
        left: 20px;
    }
    .timeline-dot {
        left: 20px;
    }
    .timeline-node, .timeline-node.right {
        justify-content: flex-start;
        padding-left: 50px;
        padding-right: 0;
    }
    .timeline-node:not(.right) .timeline-content {
        margin-right: 0;
        margin-left: 0;
        text-align: left;
    }
    .timeline-node.right .timeline-content {
        margin-left: 0;
    }
    .timeline-node:not(.right) .timeline-content::before,
    .timeline-node.right .timeline-content::before {
        left: -30px;
        right: auto;
        width: 30px;
    }
    .timeline-content {
        width: 100%;
    }
}
