/* 成功案例 */
.timeline-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline-item {
    width: 65%;
    display: flex; 
    justify-content: center;
    align-items: center;
    padding: 15px;
    margin-bottom: 15px;
    margin-left: auto;
    margin-right: auto;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    padding-left: 40px;
    
    border-left: 4px solid #d4af37; /* 線軸 */
}

.timeline-item:hover {
    background-color: #f7f7f7;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.timeline-date {
    font-size: 16px; 
    font-weight: bold;
    color: #d4af37;
    background-color: white;
    padding: 8px 12px;
    border: 2px solid #d4af37;
    border-radius: 5px;
    text-align: center;
    width: 120px; 
    min-width: 120px; 
    margin-right: 15px;
    flex-shrink: 0;
}

/* 時間框反白 */
.timeline-item:hover .timeline-date {
    background-color: #d4af37;
    color: #f5f5f5;
}

/* 內文 */
.timeline-title {
    color: #333;
    font-size: 18px;
    line-height: 1.6;
    text-align: left;
    padding-left: 30px;
    flex-grow: 1;
}

/* 分頁按鈕 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.pagination button {
    background-color: #d4af37;
    color: white;
    border: none;
    padding: 8px 12px;
    margin: 0 4px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
}

.pagination button.active {
    background-color: #765d1e;
    font-weight: bold;
}

.pagination button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 彈出框 */
.detail-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* 彈出框內部 */
.popup-content {
    background: white;
    color: black;
    padding: 25px;
    border-radius: 12px;
    max-width: 700px; /* 加大彈出框 */
    width: 80%;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    text-align: left;
}

/* 金色時間 */
.popup-date {
    font-size: 20px;
    font-weight: bold;
    color: #d4af37;
    text-align: left;
    margin-bottom: 10px;
}

/* 標題 */
.popup-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    text-align: left;
}

/* 內容 */
#popup-content {
    font-size: 18px;
    color: #444;
    line-height: 1.6;
    text-align: justify;
    max-height: 400px;
    overflow-y: auto;
}

.close-btn {
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
    color: #d4af37;
}

@media (max-width: 800px) {
    .timeline-item {
        width: 90%;
        padding-left: 0px;
        flex-direction: column;
        align-items: flex-start; 
        position: relative;
    }

    .timeline-date {
        width: auto;
        text-align: center;
        font-size: 14px;
        position: absolute;
        left: 28px;
        top: 5px;
        background-color: white;
        padding: 5px 10px;
        margin: 3px 0px;
        border-radius: 5px;
        border: 1px solid #d4af37;
    }

    .timeline-title {
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: calc(100% - 30px); 
        padding-top: 25px;
        font-size: 18px;
        font-weight: bold;
    }

    .timeline {
        padding-left: 20px;
    }

    .popup-content {
        width: 80vh;
        height: 60vh;
        overflow-y: auto;
    }
}