/* ============================================================
   努比成長時間軸 — 左右交叉版型
   結構：1. 頁面容器  2. 主軸線  3. 卡片左右交錯  4. 徽章
        5. 卡片內文排版  6. RWD（≤860px 收成單欄）
   ============================================================ */


/* 1. 頁面容器 ------------------------------------------------ */

html.about-timeline-page {
    font-size: 16px;
}

.about-timeline {
    max-width: 960px;
    margin: 0 auto 80px;
}


/* 2. 主軸線：容器中央一條漸層直線 ----------------------------- */

.timeline {
    list-style: none;
    position: relative;
    margin: 0;
    padding: 18px 0 4px;
}

.timeline::before {
    content: "";
    position: absolute;
    top: -4px;
    bottom: -4px;
    left: 50%;
    width: 4px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, var(--light-yellow) 0%, var(--primary-yellow) 45%, var(--primary-brown) 100%);
    border-radius: 8px;
    pointer-events: none;
}


/* 3. 卡片左右交錯：奇數掛左邊、偶數掛右邊 ----------------------- */

.timeline-item {
    position: relative;
    width: calc(50% - 34px);
    margin: 0 0 32px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item:nth-of-type(odd) {
    margin-right: auto;
}

.timeline-item:nth-of-type(even) {
    margin-left: auto;
    margin-top: -12px;
    /* 偶數項目往上偏移，讓交錯節奏更明顯 */
}


/* 4. 徽章：圓形數字／「現在」，同時是卡片與主軸線的連接點 -------- */

.timeline-item__marker {
    position: absolute;
    top: 14px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fffdf5;
    border: 2px solid var(--primary-yellow);
    color: var(--primary-dark-brown);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.timeline-item:nth-of-type(odd) .timeline-item__marker {
    right: -56px;
}

.timeline-item:nth-of-type(even) .timeline-item__marker {
    left: -56px;
}

.timeline-item--current .timeline-item__marker {
    background: var(--primary-yellow);
    color: #fff;
}


/* 5. 卡片內文排版：標題 → 小標籤 → 段落 ------------------------- */

.timeline-item__body {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--radius-card);
    padding: 20px 24px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.timeline-item__body h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-dark-brown);
}

.timeline-item__label {
    margin: 0 0 4px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-brown);
}

.timeline-item__body p {
    margin: 0 0 12px;
    line-height: 1.75;
    color: var(--black);
    text-align: left;
}

.timeline-item__body p:last-child {
    margin-bottom: 0;
}

.timeline-item__body figure {
    margin: 14px 0 0;
}

.timeline-item__body img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}


/* 6. RWD：≤860px 主軸移到左側，卡片收成單欄不再交錯 -------------- */

@media (max-width: 860px) {
    .timeline::before {
        left: 18px;
        transform: none;
    }

    .timeline-item,
    .timeline-item:nth-of-type(odd),
    .timeline-item:nth-of-type(even) {
        width: calc(100% - 44px);
        margin: 0 0 28px 44px;
    }

    .timeline-item:nth-of-type(odd) .timeline-item__marker,
    .timeline-item:nth-of-type(even) .timeline-item__marker {
        left: -44px;
        right: auto;
    }

    .timeline-item__body {
        padding: 16px 18px;
    }
}
