.banner {
    height: 700px;
    /* 增加高度以适应大图 */
    background: url('/images/timeline/发展历程banner.png') no-repeat center center;
    background-size: cover;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    /* 给 fixed header 留出空间，防止内容被遮挡 */
}

/* Timeline Container */
.timeline {
    position: relative;
    padding: 40px 0;
    margin: 0 auto;
}

/* Central Line */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    width: 2px;
    height: 100%;
    background: #409EFF;
    z-index: 0;
}

/* Timeline Item Container */
.timeline-item {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 60px;
    position: relative;
    width: 100%;
}

/* Even Items (Right side content, Left side date) */
.timeline-item:nth-child(even) {
    flex-direction: row;
}

/* Timeline Content Card */
.timeline-content {
    width: 35%;
    background: white;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.timeline-img-container{
    padding: 12px;
}

/* Positioning for Odd Items (Left side) */
.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
    margin-right: calc(50% + 90px);
}

/* Positioning for Even Items (Right side) */
.timeline-item:nth-child(even) .timeline-content {
    margin-left: calc(50% + 90px);
    margin-right: auto;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Center Date Pill (The Axis Label) */
.timeline-date {
    position: absolute;
    width: 150px;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient( 90deg, #419DFD 0%, #4449FA 100%);
    color: white;
    padding: 6px 24px;
    border-radius: 20px;
    z-index: 10;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(64, 158, 255, 0.3);
    white-space: nowrap;
    text-align: center;
}

/* Image Styles */
.timeline-img {
    width: 100%;
    height: 220px;
    display: block;
    object-fit: cover;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 5px;
}

/* Date Bar Inside Card */
.timeline-card-date {
    display: flex;
    align-items: center;
}
.timeline-card-date-text{
    width: 120px;
    background-color: #DCECFF;
    color: #003D8F;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 1px solid #e6f3ff;
    padding: 6px;
    text-align: center;
}

.timeline-item:nth-child(odd) .timeline-card-date-text {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

/* Right Card (Even) -> Date on Left */
.timeline-item:nth-child(even) .timeline-card-date-text {
     border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

/* Date Alignment based on Card Position */
/* Left Card (Odd) -> Date on Right */
.timeline-item:nth-child(odd) .timeline-card-date {
    justify-content: flex-end;
}

/* Right Card (Even) -> Date on Left */
.timeline-item:nth-child(even) .timeline-card-date {
    justify-content: flex-start;
}

/* Description Text */
.timeline-text {
    color: #555;
    line-height: 1.7;
    font-size: 15px;
    padding: 12px;
}

.timeline-text p {
    margin: 0;
    text-align: justify;
}

/* Responsive Design */
@media (max-width: 992px) {
    .banner{
        height: 250px;
        padding-top: 60px;
    }
    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        margin-left: 30px;
        padding-left: 30px;
        margin-bottom: 40px;
    }
    
    .timeline-item:nth-child(even) {
        flex-direction: column;
    }

    /* Reset positioning for mobile */
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 0;
        margin-right: 0;
        margin-top: 15px;
    }

    .timeline-date {
        position: static;
        transform: none;
        display: inline-block;
        margin-bottom: 0; /* Controlled by content margin-top */
        margin-left: -42px; /* Pull back to line */
        font-size: 14px;
        padding: 4px 16px;
    }

    .timeline-content {
        width: 90%;
        max-width: 100%;
        margin-top: 15px; /* Smaller gap for mobile */
    }
    
    .timeline-img {
        height: 180px;
    }

    /* Reset date alignment for mobile */
    .timeline-item:nth-child(odd) .timeline-card-date,
    .timeline-item:nth-child(even) .timeline-card-date {
        justify-content: flex-start;
    }
}
