/* 时间轴页面专用样式 */
.timeline-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.timeline-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 60px 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.timeline-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
}

.timeline-header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.timeline {
    position: relative;
    padding: 20px 0;
    padding-top: 50px; /* 为顶部箭头留出空间 */
}

/* 旧时间轴线已移除，箭头元素自身即为时间轴线 */
.timeline::before {
    content: none;
}

/* 时间轴底部装饰圆点 */
.timeline::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-primary-dark);
    transform: translateX(-50%);
    box-shadow: 0 0 0 4px var(--color-bg), 0 0 0 5px var(--color-border);
    z-index: 2;
}

/* 时间轴一体化：箭头头部 + 线条合为一体，随内容自动延伸 */
.timeline-arrow-top {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    /* 渐变：箭头头部（前18px）从极浅青到主色青的多段渐变，线条部分从主色青渐变到深青 */
    background: linear-gradient(to bottom, #ccfbf1 0px, #99f6e4 4px, #5eead4 8px, #2dd4bf 12px, #0d9488 18px, var(--color-primary-dark) 100%);
    /* 箭头高度固定 18px，shaft 宽度 42%-58% ≈ 4px */
    clip-path: polygon(50% 0px, 100% 18px, 58% 18px, 58% 100%, 42% 100%, 42% 18px, 0% 18px);
    z-index: 1;
}

.year-section {
    margin-bottom: 60px;
    position: relative;
}

.year-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.year-title h2 {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.8em;
    font-weight: 300;
    box-shadow: 0 5px 15px rgba(13, 148, 136, 0.3);
    position: relative;
    z-index: 2;
}

.events-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.event-item {
    display: flex;
    align-items: center;
    position: relative;
    width: 50%;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: calc(var(--item-index, 0) * 0.1s);
}

/* 奇数项：左半边，图片靠右（靠近中线） */
.event-item:nth-child(odd) {
    flex-direction: row-reverse;
    padding-right: 30px;
}

/* 偶数项：右半边，图片靠左（靠近中线） */
.event-item:nth-child(even) {
    margin-left: 50%;
    padding-left: 30px;
    flex-direction: row; /* 覆盖 style.css 的 row-reverse，使图片靠近中线 */
}

.event-item:nth-child(odd) .event-content {
    margin-right: 50px;
    text-align: right;
}

.event-item:nth-child(even) .event-content {
    margin-left: 50px;
    text-align: left;
}

.event-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 2;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-content {
    flex: 1;
    background: var(--color-bg-card);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    transition: all var(--transition-base);
}

.event-content:hover,
.event-content.hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--color-primary);
}

.event-content h3 {
    color: var(--color-text);
    font-size: 1.4em;
    margin-bottom: 10px;
    font-weight: 500;
}

.event-content p {
    color: var(--color-text-light);
    line-height: 1.6;
    margin: 0;
}

.event-date {
    position: absolute;
    top: -15px;
    background: var(--color-primary);
    color: #fff;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 300;
}

.event-item:nth-child(odd) .event-date { right: 20px; }
.event-item:nth-child(even) .event-date { left: 20px; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .timeline-container { padding: 12px; }
    .timeline { padding: 10px 0; padding-top: 30px; }
    .timeline::after { left: 24px; }
    .timeline-arrow-top {
        left: 25.5px;
        width: 20px;
        top: 2px;
    }
    .timeline-header { padding: 30px 15px; margin-bottom: 30px; }
    .timeline-header h1 { font-size: 1.6em; }
    .timeline-header p { font-size: 1em; }
    .year-section { margin-bottom: 40px; }
    .year-title { margin-bottom: 25px; }
    .year-title h2 { font-size: 1.3em; padding: 10px 22px; }
    .events-container { gap: 20px; }

    .event-item,
    .event-item:nth-child(odd),
    .event-item:nth-child(even) {
        flex-direction: row;
        width: 100%;
        margin-left: 0;
        padding: 0;
        align-items: flex-start;
    }
    .event-image {
        width: 48px;
        height: 48px;
        border-width: 3px;
        flex-shrink: 0;
    }
    .event-item:nth-child(odd) .event-content,
    .event-item:nth-child(even) .event-content {
        margin-left: 12px; margin-right: 0; text-align: left;
        flex: 1;
        min-width: 0;
        padding: 14px 16px;
    }
    .event-content h3 { font-size: 1.05em; margin-bottom: 6px; }
    .event-content p { font-size: 0.88em; line-height: 1.5; }
    .event-date {
        position: static;
        display: inline-block;
        margin-bottom: 6px;
        padding: 3px 10px;
        font-size: 0.8em;
    }
    .event-item:nth-child(odd) .event-date,
    .event-item:nth-child(even) .event-date { left: auto; right: auto; }
}

@media (max-width: 480px) {
    .timeline::after { left: 18px; }
    .timeline-arrow-top {
        left: 19.5px;
        width: 18px;
    }
}

.timeline-empty {
    text-align: center;
    padding: 50px;
    color: var(--color-text-light);
}
