/* 服務項目與特色優勢 頁面專用樣式
   命名前綴：sa-（services-advantages）
   依賴：about-history.css 提供 .ah-inner-header 與 _Breadcrumb 樣式
*/

:root {
    --sa-red: #E0121A;
    --sa-red-dark: #B30E14;
    --sa-red-soft: #FEE2E4;
    --sa-ink: #0E0F11;
    --sa-ink-2: #1A1B1F;
    --sa-paper: #F1F1F4;
    --sa-paper-2: #FAFAFB;
    --sa-muted: #6B7280;
    --sa-muted-2: #9CA3AF;
    --sa-border: #E5E7EB;
    --sa-yellow: #FACC15;
    --sa-orange: #F97316;
    --sa-shadow-card: 0 1px 2px rgba(15,17,21,.04), 0 8px 24px rgba(15,17,21,.06);
    --sa-shadow-card-hover: 0 6px 12px rgba(15,17,21,.06), 0 24px 48px rgba(15,17,21,.10);
    --sa-radius: 14px;
    --sa-radius-lg: 22px;
}

/* ============ SHARED CONTAINER ============ */
.sa-container {
    width: min(1280px, calc(100% - 80px));
    margin-inline: auto;
}

/* ============ COMMON ELEMENTS (EYEBROW / BOLT ICON) ============ */
.sa-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--sa-red);
    letter-spacing: .04em;
    font-family: 'Noto Sans TC', sans-serif;
    margin-bottom: 22px;
}

.sa-bolt {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: var(--sa-yellow);
    clip-path: polygon(40% 0, 100% 0, 60% 45%, 100% 45%, 0 100%, 40% 55%, 0 55%);
    flex: none;
}

/* ============ HERO ============ */
.sa-hero {
    position: relative;
    background:
        radial-gradient(ellipse 800px 600px at 8% 50%, #F4EFEC 0%, transparent 60%),
        linear-gradient(180deg, #F7F5F2 0%, #FBFAF8 100%);
    overflow: hidden;
    padding: 84px 0 96px;
}

.sa-tower-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .35;
    z-index: 1;
    width: 100%;
    height: 100%;
}

.sa-hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.sa-hero h1 {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 800;
    font-size: clamp(40px, 5.4vw, 72px);
    line-height: 1.08;
    letter-spacing: -.01em;
    margin: 0 0 28px;
    color: var(--sa-ink);
}

.sa-hero h1 .sa-accent {
    color: var(--sa-red);
}

.sa-hero p {
    font-size: 17px;
    line-height: 1.85;
    color: #3F4350;
    max-width: 540px;
    margin: 0 0 18px;
    font-family: 'Noto Sans TC', sans-serif;
}

.sa-hero p strong {
    color: var(--sa-ink);
    font-weight: 700;
}

.sa-hero-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-top: 36px;
}

.sa-btn-primary {
    background: var(--sa-red);
    color: #fff !important;
    padding: 16px 26px;
    font-weight: 700;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Noto Sans TC', sans-serif;
    text-decoration: none;
    transition: background .15s, transform .15s;
}

.sa-btn-primary:hover {
    background: var(--sa-red-dark);
    color: #fff !important;
    transform: translateY(-1px);
}

.sa-btn-ghost {
    padding: 16px 22px;
    font-weight: 700;
    color: var(--sa-ink) !important;
    border-radius: 12px;
    font-family: 'Noto Sans TC', sans-serif;
    text-decoration: none;
    transition: background .15s;
}

.sa-btn-ghost:hover {
    background: rgba(0,0,0,.04);
    color: var(--sa-ink) !important;
}

.sa-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 56px;
    max-width: 540px;
}

.sa-hero-stat {
    padding-right: 24px;
    border-right: 1px solid var(--sa-border);
}

.sa-hero-stat:last-child {
    border-right: 0;
    padding-left: 24px;
    padding-right: 0;
}

.sa-hero-stat:not(:first-child):not(:last-child) {
    padding-left: 24px;
}

.sa-hero-stat .n {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1;
    font-family: 'Manrope', sans-serif;
    color: var(--sa-ink);
}

.sa-hero-stat .l {
    margin-top: 8px;
    font-size: 13.5px;
    color: var(--sa-muted);
    font-family: 'Noto Sans TC', sans-serif;
}

.sa-hero-art {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sa-hero-photo {
    width: 100%;
}

.sa-hero-photo img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ============ SECTION (light / dark variants) ============ */
.sa-section {
    padding: 110px 0;
    position: relative;
}

.sa-section.paper {
    background: var(--sa-paper);
}

.sa-section.dark {
    background: var(--sa-ink);
    color: #fff;
}

.sa-section-head {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 60px;
    align-items: end;
    margin-bottom: 64px;
}

.sa-section-head h2 {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 800;
    font-size: clamp(30px, 3.6vw, 48px);
    line-height: 1.15;
    letter-spacing: -.01em;
    margin: 14px 0 0;
    color: var(--sa-ink);
}

.sa-section.dark .sa-section-head h2 {
    color: #fff;
}

.sa-section-head p {
    font-size: 16px;
    line-height: 1.75;
    color: var(--sa-muted);
    font-family: 'Noto Sans TC', sans-serif;
    margin: 0;
}

.sa-section-head p strong {
    color: var(--sa-ink);
    font-weight: 700;
}

.sa-section.dark .sa-section-head p {
    color: #B3B6BD;
}

/* ============ SERVICES GRID (10 大專業領域) ============ */
.sa-services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.sa-service-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--sa-border);
    border-radius: var(--sa-radius);
    padding: 26px 22px 22px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .2s;
    box-shadow: 0 1px 2px rgba(15,17,21,.03);
}

.sa-service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0;
    background: repeating-linear-gradient(135deg, rgba(224,18,26,.10) 0 8px, transparent 8px 18px);
    transition: width .25s ease;
    z-index: 0;
}

.sa-service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sa-shadow-card-hover);
    border-color: transparent;
}

.sa-service-card:hover::before {
    width: 6px;
}

.sa-service-card:hover .sa-svc-arrow {
    transform: translateX(4px);
    background: var(--sa-red);
    color: #fff;
}

.sa-svc-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}

.sa-svc-bolt {
    width: 18px;
    height: 18px;
    background: var(--sa-yellow);
    clip-path: polygon(40% 0, 100% 0, 60% 45%, 100% 45%, 0 100%, 40% 55%, 0 55%);
    flex: none;
}

.sa-svc-num {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 14px;
    color: var(--sa-red);
    letter-spacing: .08em;
}

.sa-svc-name {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -.005em;
    color: var(--sa-ink);
    margin: 0 0 10px;
    position: relative;
    z-index: 1;
}

.sa-svc-desc {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--sa-muted);
    margin: 0;
    position: relative;
    z-index: 1;
}

.sa-svc-arrow {
    margin-top: auto;
    align-self: flex-start;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sa-paper);
    color: var(--sa-red);
    display: grid;
    place-items: center;
    margin-top: 22px;
    transition: transform .25s ease, background .2s, color .2s;
    position: relative;
    z-index: 1;
}

/* ============ ADVANTAGES — DARK SECTION ============ */
.sa-adv-dark-head {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 400px;
    margin-bottom: 56px;
    overflow: visible;
}

.sa-adv-dark-head > div:first-child {
    width: 46%;
    flex: none;
    position: relative;
    z-index: 2;
}

.sa-adv-dark-head .sa-eyebrow {
    color: #FCA5AA;
}

.sa-adv-dark-head h2 {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 800;
    font-size: clamp(30px, 3.6vw, 50px);
    line-height: 1.15;
    letter-spacing: -.01em;
    margin: 14px 0 22px;
    color: #fff;
}

.sa-adv-dark-head h2 em {
    color: var(--sa-red);
    font-style: normal;
}

.sa-adv-dark-head p {
    color: #B3B6BD;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    max-width: 540px;
    margin: 0;
}

.sa-adv-dark-head p strong {
    color: #fff;
    font-weight: 700;
}

.sa-head-art {
    position: absolute;
    left: 42%;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    -webkit-mask-image:
        linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, #000 6%, #000 94%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, #000 6%, #000 94%, transparent 100%);
    mask-composite: intersect;
}

.sa-head-art img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 440px;
    object-fit: contain;
    object-position: center center;
}

.sa-dark-adv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.sa-dark-adv-card {
    background: var(--sa-ink-2);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--sa-radius);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform .25s ease, border-color .2s, background .2s;
    position: relative;
    overflow: hidden;
    min-height: 220px;
}

.sa-dark-adv-card:hover {
    transform: translateY(-4px);
    border-color: var(--sa-red);
    background: #1F2025;
}

.sa-dark-adv-card:hover .sa-big-num {
    color: rgba(255,255,255,.18);
}

.sa-dark-adv-card h3 {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 800;
    font-size: 18px;
    line-height: 1.4;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.sa-dark-adv-card h3 em {
    color: var(--sa-red);
    font-style: normal;
}

.sa-bolt-sm {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: var(--sa-yellow);
    clip-path: polygon(40% 0, 100% 0, 60% 45%, 100% 45%, 0 100%, 40% 55%, 0 55%);
    flex: none;
}

.sa-dark-adv-card p {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: #B3B6BD;
    margin: 0;
    position: relative;
    z-index: 1;
}

.sa-dark-adv-card p strong {
    color: #fff;
    font-weight: 700;
}

.sa-big-num {
    position: absolute;
    right: 20px;
    bottom: 8px;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 88px;
    line-height: 1;
    letter-spacing: -.04em;
    color: rgba(255,255,255,.12);
    transition: color .25s ease;
    user-select: none;
    pointer-events: none;
}

/* ============ SCROLL REVEAL ============ */
.sa-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s ease, transform .5s ease;
}

.sa-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ============ RESPONSIVE BREAKPOINTS ============ */
@media (max-width: 1180px) {
    .sa-services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sa-dark-adv-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sa-adv-dark-head {
        min-height: auto;
        flex-direction: column;
        align-items: flex-start;
    }

    .sa-adv-dark-head > div:first-child {
        width: 100%;
    }

    .sa-head-art {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        transform: none;
        max-width: 520px;
        margin: 32px auto 0;
        width: 100%;
    }
}

@media (max-width: 980px) {
    .sa-hero-grid,
    .sa-section-head {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .sa-section {
        padding: 72px 0;
    }
}

@media (max-width: 860px) {
    .sa-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .sa-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sa-service-card {
        min-height: 180px;
        padding: 20px 18px;
    }

    .sa-svc-name {
        font-size: 19px;
    }

    .sa-dark-adv-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .sa-services-grid {
        grid-template-columns: 1fr;
    }
}
