/* ==================== 技術演進頁面樣式 ==================== */

/* Hero區域 */
.story-hero {
    margin-top: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.story-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.5;
}

.story-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.story-hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.story-hero-content h1 .highlight {
    color: #60a5fa;
}

.story-hero-content p {
    font-size: 18px;
    opacity: 0.95;
}

/* 內容區域 */
.story-content {
    padding: 80px 0;
    background: white;
}

/* 章節 */
.story-chapter {
    margin-bottom: 80px;
    animation: fadeInUp 0.6s ease-out;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.chapter-header {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    align-items: flex-start;
}

/* 偶數章節：章節標籤跟著內容靠右對齊 */
.story-chapter:nth-of-type(even) .chapter-header {
    justify-content: flex-end;
}

.chapter-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
    background: rgba(37, 99, 235, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

/* 章節小標籤：顯示在章節標題上方，強調「第X章」概念 */
.chapter-label {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
    background: rgba(37, 99, 235, 0.06);
    border-radius: 999px;
}

.chapter-year {
    font-size: 32px;
    font-weight: 700;
    color: var(--secondary-color);
}

.chapter-content {
    display: flex;
    gap: 60px;
    align-items: center;
}

.chapter-image,
.chapter-text {
    flex: 1;
}

/* 偶數章節：左右交錯（圖片在右、文字在左） */
.story-chapter:nth-of-type(even) .chapter-content {
    flex-direction: row-reverse;
}

.chapter-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.chapter-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

/* 第四章圖片：改成等比例縮小顯示完整畫面 */
.story-chapter:nth-of-type(4) .chapter-image img {
    height: auto;
    object-fit: contain;
}

.year-badge {
    position: absolute;
    top: 12px;
    left: 16px;
    padding: 4px 12px;
    background: var(--secondary-color);
    color: #ffffff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 特例: 第四章的年份膠囊移到圖片右上角,避免遮住內文字 */
.story-chapter:nth-of-type(4) .year-badge {
    left: auto;
    right: 16px;
}

.chapter-text h2 {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
    color: var(--text);
}

.chapter-text p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 14px;
    line-height: 1.9;
}

.chapter-text p.highlight {
    color: var(--secondary-color);
    font-weight: 600;
    padding: 15px;
    background: rgba(37, 99, 235, 0.05);
    border-left: 4px solid var(--secondary-color);
    border-radius: 4px;
}

.highlight-list {
    list-style: none;
    margin: 20px 0;
}

.highlight-list li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-light);
    font-size: 16px;
}

.highlight-list li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 700;
}

.highlight-list strong {
    color: var(--text);
}

/* 結論區域 */
.story-conclusion {
    background: #f9fafb;
    padding: 60px;
    border-radius: 12px;
    margin-top: 80px;
}

.story-conclusion h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.story-conclusion > p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 30px;
}

.timeline-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.summary-item {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.summary-year {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.summary-item p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

.conclusion-highlight {
    font-size: 18px;
    color: var(--secondary-color);
    font-weight: 600;
    padding: 20px;
    background: rgba(37, 99, 235, 0.05);
    border-left: 4px solid var(--secondary-color);
    border-radius: 4px;
}

/* CTA區域 */
.story-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 80px 0;
    text-align: center;
}

.story-cta h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .story-hero-content h1 {
        font-size: 32px;
    }

    .story-hero-content p {
        font-size: 16px;
    }

    .chapter-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .chapter-image img {
        height: 300px;
    }

    .chapter-text h2 {
        font-size: 24px;
    }

    .timeline-summary {
        grid-template-columns: 1fr;
    }

    .story-conclusion {
        padding: 40px;
    }

    .story-cta h2 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .story-hero {
        padding: 60px 0;
    }

    .story-hero-content h1 {
        font-size: 24px;
    }

    .chapter-header {
        flex-direction: column;
        gap: 10px;
    }

    .chapter-year {
        font-size: 24px;
    }

    .story-content {
        padding: 40px 0;
    }

    .story-chapter {
        margin-bottom: 40px;
    }

    .chapter-text h2 {
        font-size: 20px;
    }

    .story-conclusion {
        padding: 20px;
    }
}
