/* ========== 服務歷程 styles ========== */

body { background: #fff; }

/* ========== Hero Banner ========== */
.hero-banner {
    margin-top: clamp(64px, 6.25vw, 120px);
    position: relative;
    overflow: hidden;
    background: #004a89;
    padding: 0 8%;
    display: flex;
    align-items: center;
    height: 200px;
}
.hero-banner-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
}
.hero-banner-deco {
    position: absolute;
    right: 0; top: 0;
    width: 50%; height: 100%;
    object-fit: contain;
    object-position: right center;
    z-index: 1;
    opacity: 0.12;
}
.hero-banner-content { position: relative; z-index: 2; }
.hero-banner-title {
    font-size: clamp(32px, 3vw, 56px);
    font-weight: 700;
    color: #fff;
    letter-spacing: 6px;
    margin: 0;
}

/* ========== History Section ========== */
.history-section {
    padding: clamp(48px, 5vw, 96px) 0;
    background: #fff;
}
.history-section .container {
    padding: 0 8%;
}

.history-desc {
    text-align: center;
    font-size: clamp(20px, 1.55vw, 26px);
    line-height: 1.9;
    color: #1c2a3a;
    margin: 0 auto clamp(40px, 4vw, 64px);
    max-width: 1100px;
}

/* Main grid: map left + industries right */
.history-grid {
    display: grid;
    grid-template-columns: 1fr clamp(220px, 22vw, 320px);
    gap: clamp(24px, 3vw, 56px);
    max-width: 1280px;
    margin: 0 auto;
    align-items: start;
}

.history-map-wrap {
    width: 100%;
    position: relative;
}
.history-map-img {
    width: 100%;
    height: auto;
    display: block;
}
.dist-name {
    position: absolute;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: clamp(11px, 1.1vw, 16px);
    font-weight: 500;
    letter-spacing: 1px;
    pointer-events: none;
    white-space: nowrap;
}
.dist-tag {
    position: absolute;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 2px solid #c23030;
    color: #c23030;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: clamp(12px, 1.05vw, 16px);
    font-weight: 500;
    line-height: 1.1;
    white-space: nowrap;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}
.dist-tag b {
    font-weight: 700;
    font-size: clamp(16px, 1.5vw, 22px);
    line-height: 1;
}
.dist-tag--orange {
    border-color: #ed8000;
    color: #ed8000;
}

/* Industry cards */
.history-industries {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 1.2vw, 22px);
}
.industry-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(10px, 1vw, 16px);
    padding: clamp(14px, 1.2vw, 22px) clamp(20px, 1.6vw, 28px);
    border: 1px solid #004a89;
    border-radius: 15px;
    background: #fff;
}
.industry-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.industry-icon {
    width: clamp(52px, 4.2vw, 66px);
    height: clamp(52px, 4.2vw, 66px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.industry-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.industry-name {
    font-size: clamp(13px, 1vw, 15px);
    color: #004a89;
    font-weight: 500;
    letter-spacing: 1px;
    white-space: nowrap;
}
.industry-num {
    font-size: clamp(34px, 3.2vw, 50px);
    color: #004a89;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 1px;
}

/* Footer area: legend + total positioned at lower-left of map */
.history-footer {
    position: absolute;
    left: 0;
    top: 55%;
    width: 45%;
}
.history-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(14px, 1vw, 16px);
    color: #1c2a3a;
}
.legend-dot {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: inline-block;
}
.legend-dot--red { background: #b8222d; }
.legend-dot--orange { background: #f5a01a; }
.legend-note {
    font-size: clamp(13px, 0.9vw, 14px);
    color: #6c7a8a;
    margin: 4px 0 0;
}

.history-total {
    text-align: left;
    margin-top: clamp(20px, 2vw, 32px);
}
.total-label {
    font-size: clamp(20px, 1.6vw, 28px);
    font-weight: 700;
    color: #1c2a3a;
    margin: 0 0 8px;
    letter-spacing: 2px;
}
.total-num {
    font-size: clamp(28px, 2.4vw, 38px);
    color: #1c2a3a;
    font-weight: 500;
    margin: 0;
    line-height: 1;
    letter-spacing: 1px;
}
.total-num strong {
    font-size: clamp(56px, 5vw, 88px);
    font-weight: 800;
    color: #004a89;
    line-height: 1;
    margin-right: 8px;
    vertical-align: baseline;
}

/* ========== Tablet (≤1024) ========== */
@media (max-width: 1024px) {
    .hero-banner {
        justify-content: center;
        text-align: center;
    }
    .history-section .container {
        padding: 0 6%;
    }
    .history-desc br { display: none; }
    /* Map full width, industries below as 3+2 grid */
    .history-grid {
        grid-template-columns: 1fr;
        gap: clamp(20px, 3vw, 36px);
    }
    .history-map-wrap {
        max-width: 720px;
        margin: 0 auto;
    }
    .history-footer {
        width: 50%;
        top: 52%;
    }
    .history-industries {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .industry-card {
        padding: 16px 22px;
        border-radius: 15px;
    }
    .industry-icon {
        width: 52px;
        height: 52px;
    }
    .industry-name { font-size: 14px; }
    .industry-num { font-size: 40px; }
}

/* ========== Mobile (<768) ========== */
@media (max-width: 767px) {
    .history-section .container {
        padding: 0 5%;
    }
    .history-desc {
        font-size: 15px;
    }
    .history-industries {
        grid-template-columns: repeat(2, 1fr);
    }
    .history-footer {
        width: 55%;
        top: 50%;
    }
    .legend-item { font-size: 12px; }
    .legend-note { font-size: 11px; }
    .industry-card {
        padding: 10px 14px;
    }
    .industry-name { font-size: 13px; }
    .industry-num { font-size: 32px; }
    .total-label { font-size: 20px; }
    .total-num { font-size: 24px; }
    .total-num strong { font-size: 52px; }
}
