/* history.css - 對位記事時間軸專屬樣式 */

.history-page {
    background-color: #fafafa;
}

.timeline-section {
    position: relative;
    overflow-x: hidden;
}

.timeline {
    position: relative;
    padding: 30px 0;
}

/* 中央垂直線 (桌機版) */
@media (min-width: 768px) {
    .timeline::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        width: 2px;
        background: #e0e0e0;
        transform: translateX(-50%);
    }
}

.timeline-item {
    position: relative;
    margin-bottom: 80px;
}
.timeline-item:last-child {
    margin-bottom: 0;
}

/* 時間軸圓點 */
.timeline-badge {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 0 4px rgba(255, 196, 83, 0.2);
    z-index: 2;
}

/* 桌機版：圓點在中央，左右交錯 */
@media (min-width: 768px) {
    .timeline-badge {
        left: 50%;
        transform: translate(-50%, -50%);
    }

    /* 奇數：文字在左，圖片在右 */
    .timeline-item:nth-child(odd) .timeline-text {
        text-align: right;
        padding-right: 60px;
        order: 1;
    }
    .timeline-item:nth-child(odd) .timeline-image {
        padding-left: 60px;
        order: 2;
    }

    /* 偶數：圖片在左，文字在右 */
    .timeline-item:nth-child(even) .timeline-text {
        text-align: left;
        padding-left: 60px;
        order: 2;
    }
    .timeline-item:nth-child(even) .timeline-image {
        padding-right: 60px;
        order: 1;
    }
}

/* 手機版響應式設計：線條靠左，內容皆往右靠 */
@media (max-width: 767.98px) {
    .timeline::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 20px;
        width: 2px;
        background: #e0e0e0;
    }
    .timeline-badge {
        left: 20px;
        top: auto;
        transform: translate(-50%, 0);
        margin-top: 10px;
    }

    .timeline-item {
        margin-bottom: 50px;
    }

    .timeline-text {
        padding-left: 50px;
        margin-bottom: 20px;
        order: 1;
        text-align: left;
    }

    .timeline-image {
        padding-left: 50px;
        order: 2;
    }
}

/* 內容排版 */
.timeline-text .year {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-yellow, #ffc453);
    letter-spacing: 0.05em;
    margin-bottom: 15px;
    font-family: 'Inter', sans-serif;
    line-height: 1;
}

@media (max-width: 767.98px) {
    .timeline-text .year {
        font-size: 2.2rem;
    }
}

.timeline-text .title {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: #222;
    line-height: 1.4;
}

.timeline-text .desc {
    color: #666;
    line-height: 1.8;
    font-size: 1.1rem;
}

/* 圖片框陰影與圓角 */
.timeline-image .image-placeholder {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); border: none;
}

/* 部分變體樣式 (如巡演可調整圖片比例等，已在 Bootstrap class 中設定) */
