:root {
    --primary-color: #00182E;
    --secondary-color: #00498c;
    --line-color: #e0e0e0;
    --card-bg: #f8f9fa;
    --text-color: #333;
}

.timeline-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.timeline-group {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-year {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    background-color: white;
    padding: 0.5rem 1rem;
    display: inline-block;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    position: sticky;
    top: 80px; /* 고정될 위치 */
    z-index: 2;
    margin-left: calc(50% - 60px); /* 가운데 정렬 */
}

.timeline-items {
    position: relative;
    padding-top: 2rem;
}

/* The central timeline bar */
.timeline-items::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background-color: var(--line-color);
    z-index: -1;
}

.timeline-item {
    position: relative;
    width: 50%;
    margin-bottom: 2rem;
}

/* The dot on the timeline */
.timeline-item::after {
    content: '';
    position: absolute;
    top: 1rem;
    width: 15px;
    height: 15px;
    background-color: white;
    border: 3px solid var(--secondary-color);
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 2rem;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 2rem;
}

.timeline-item:nth-child(odd)::after {
    right: -7.5px;
    transform: translateX(50%);
}

.timeline-item:nth-child(even)::after {
    left: -7.5px;
    transform: translateX(-50%);
}

.timeline-content {
    background: var(--card-bg);
    padding: 1.2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-top: 3px solid var(--secondary-color);
}

.timeline-content p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-color);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .timeline-year {
        margin-left: 0;
    }
    
    .timeline-items::before {
        left: 8px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 2.5rem;
        padding-right: 0;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item::after {
        left: 8px;
        transform: translateX(-50%);
    }
    
    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 8px;
        transform: translateX(-50%);
    }
}