/* =========================================================
   網站設計服務頁（/service/web）專用樣式
   以 sw- 為前綴，避免與 service.css 其他服務頁的樣式互相干擾
   ========================================================= */

/* 設計變數：集中管理色彩，所有文字配色皆已確認符合 AA 對比度 4.5:1 */
.sw-page {
    --sw-navy: #0b2a4a; /* 深藍：標題與行動呼籲背景，沉穩專業 */
    --sw-navy-2: #0f4c5c; /* 深藍綠：行動呼籲漸層第二色，呼應插圖的青綠色調 */
    --sw-teal: #0f766e; /* 青綠主色：與白色對比約 5.5:1，可用於小字 */
    --sw-teal-soft: #e6f4f2; /* 淺青綠：圖示底色與標籤背景 */
    --sw-blue: #1170b7; /* 品牌主色，沿用網站既有藍色，用於連結與焦點框 */
    --sw-text: #1f2937; /* 內文主色 */
    --sw-muted: #4b5563; /* 次要文字，與白色對比約 7.5:1 */
    --sw-line: #e3e8ef; /* 分隔線與卡片框線 */
    --sw-bg-alt: #f4f8f9; /* 交錯區塊背景，帶一點青綠色調與插圖協調 */
    --sw-radius: 16px; /* 卡片與圖片統一圓角 */
    --sw-shadow: 0 12px 32px rgba(11, 42, 74, 0.1); /* 統一陰影，營造浮起層次 */

    display: block; /* main 在舊瀏覽器預設為 inline，明確指定避免版面錯亂 */
    overflow-x: clip; /* 裁切 AOS 左右滑入動畫的初始位移，避免手機出現水平捲軸；不用 hidden 是因為會讓本頁導覽的 sticky 失效 */
    color: var(--sw-text);
    font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif; /* 中文優先使用 layouts 已載入的 Noto Sans TC */
    line-height: 1.8; /* 中文長段落閱讀較舒適的行高 */
    letter-spacing: 0.03em;
}

/* 跳到主要內容後 main 會取得焦點，但 main 本身不需要顯示焦點框 */
.sw-page:focus {
    outline: none;
}

/* 錨點跳轉時預留固定選單的高度，避免標題被選單遮住 */
.sw-page [id],
#contact {
    scroll-margin-top: 100px;
}

/* 使用者點擊本頁錨點時平滑捲動；偏好減少動態者維持瞬間跳轉 */
@media (prefers-reduced-motion: no-preference) {
    html:has(.sw-page) {
        scroll-behavior: smooth;
    }
}

/* ---------- 共用：按鈕 ---------- */

.sw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px; /* 觸控目標至少 44px，方便手指點擊 */
    padding: 10px 26px;
    border: 2px solid transparent;
    border-radius: 999px; /* 膠囊形按鈕，與網站浮動按鈕風格一致 */
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.sw-btn:hover {
    transform: translateY(-2px); /* 輕微上浮，提示可點擊 */
}

.sw-btn img {
    width: 20px;
    height: 20px;
}

/* 主要按鈕：深藍底白字，在淺色首屏中最醒目 */
.sw-btn-primary {
    background-color: var(--sw-navy);
    color: #fff;
    box-shadow: 0 8px 20px rgba(11, 42, 74, 0.25);
}

.sw-btn-primary:hover,
.sw-btn-primary:focus {
    background-color: var(--sw-teal);
    color: #fff;
}

/* 淺色背景上的次要按鈕：青綠框 */
.sw-btn-outline {
    border-color: var(--sw-teal);
    background-color: #fff;
    color: var(--sw-teal);
}

.sw-btn-outline:hover,
.sw-btn-outline:focus {
    background-color: var(--sw-teal);
    color: #fff;
}

/* 深色背景上的次要按鈕：白框白字 */
.sw-btn-outline-light {
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
}

.sw-btn-outline-light:hover,
.sw-btn-outline-light:focus {
    background-color: #fff;
    color: var(--sw-navy);
}

/* LINE 按鈕：使用 LINE 官方綠色加深版，白字對比約 4.6:1 */
.sw-btn-line {
    background-color: #06833a;
    color: #fff;
}

.sw-btn-line:hover,
.sw-btn-line:focus {
    background-color: #056b30;
    color: #fff;
}

/* 鍵盤焦點：加粗外框並與元素保留距離，淺色背景使用品牌藍 */
.sw-btn:focus-visible,
.sw-toc a:focus-visible,
.sw-service-index a:focus-visible,
.sw-works a:focus-visible,
.sw-related-list a:focus-visible,
.sw-faq-item summary:focus-visible {
    outline: 3px solid var(--sw-blue);
    outline-offset: 3px;
}

/* 深色的行動呼籲區改用亮黃色焦點框，藍色在深色底上看不清楚 */
.sw-cta .sw-btn:focus-visible {
    outline-color: #ffbf47;
}

/* ---------- 共用：區塊、標題與圖示 ---------- */

.sw-section {
    padding: 88px 0;
}

/* 交錯背景：讓長頁面的段落邊界更清楚 */
.sw-section-alt {
    background-color: var(--sw-bg-alt);
}

.sw-section-head {
    max-width: 760px;
    margin: 0 auto 56px;
    text-align: center;
}

/* 英文小標：增加視覺層次，左側短線引導視線到標題 */
.sw-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    color: var(--sw-teal);
    font-family: Montserrat, sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sw-eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    background-color: currentColor;
}

.sw-title {
    margin: 0 0 16px;
    color: var(--sw-navy);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.45;
}

.sw-desc {
    margin: 0;
    color: var(--sw-muted);
    font-size: 1.0625rem;
}

/* 圓角方形圖示底：價值、流程、相關服務共用 */
.sw-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background-color: var(--sw-teal-soft);
    color: var(--sw-teal);
    font-size: 1.375rem;
}

/* ---------- 首屏 ---------- */

.sw-hero {
    position: relative;
    padding: 72px 0 88px;
    overflow: hidden; /* 裁切背景裝飾圓形，避免產生水平捲軸 */
    background: linear-gradient(160deg, #f0f8f7 0%, #ffffff 55%, #eef4fb 100%);
}

/* 背景裝飾圓形：以模糊色塊增加層次，不使用圖片以節省流量 */
.sw-hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    pointer-events: none; /* 不攔截滑鼠事件 */
}

.sw-hero-blob-1 {
    top: -120px;
    right: -80px;
    width: 420px;
    height: 420px;
    background-color: #bfe6e1;
}

.sw-hero-blob-2 {
    bottom: -160px;
    left: -120px;
    width: 380px;
    height: 380px;
    background-color: #d4e5f7;
}

/* 內容需疊在裝飾圓形之上 */
.sw-hero .container {
    position: relative;
}

.sw-hero-title {
    margin: 0 0 20px;
    color: var(--sw-navy);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.3;
}

/* 副標：漸層文字強調訴求，不支援 background-clip 的瀏覽器會退回青綠色文字 */
.sw-hero-subtitle {
    display: block;
    margin-top: 8px;
    color: var(--sw-teal);
    font-size: 1.75rem;
    font-weight: 700;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
    .sw-hero-subtitle {
        background: linear-gradient(90deg, var(--sw-teal) 0%, var(--sw-blue) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

.sw-hero-lead {
    max-width: 560px;
    margin: 0 0 32px;
    color: var(--sw-muted);
    font-size: 1.0625rem;
}

.sw-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 40px;
}

/* 核心數據：三欄等寬，以左側線條分隔 */
.sw-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 520px;
    margin: 0;
}

.sw-hero-stats div {
    display: flex;
    flex-direction: column-reverse; /* HTML 中說明（dt）在前符合語意，畫面上數值在上較醒目 */
    padding-left: 16px;
    border-left: 3px solid var(--sw-teal-soft);
}

.sw-hero-stats dt {
    color: var(--sw-muted);
    font-size: 0.875rem;
    font-weight: 400;
}

.sw-hero-stats dd {
    margin: 0;
    color: var(--sw-navy);
    font-family: Montserrat, sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.sw-hero-visual {
    position: relative;
    text-align: center;
}

/* 主視覺下方的柔和光暈，讓透明背景的裝置圖有落地感 */
.sw-hero-visual::before {
    content: "";
    position: absolute;
    right: 8%;
    bottom: 4%;
    left: 8%;
    height: 18%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(15, 118, 110, 0.18) 0%, rgba(15, 118, 110, 0) 70%);
}

.sw-hero-visual img {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: auto;
}

/* 主視覺緩慢上下浮動，增加首屏生動感；偏好減少動態者不播放 */
@media (prefers-reduced-motion: no-preference) {
    .sw-hero-visual img {
        animation: sw-float 6s ease-in-out infinite;
    }
}

@keyframes sw-float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ---------- 本頁導覽 ---------- */

/* 捲動時固定在選單下方，長頁面隨時可跳轉段落 */
.sw-toc {
    position: sticky;
    top: 70px;
    z-index: 10;
    border-top: 1px solid var(--sw-line);
    border-bottom: 1px solid var(--sw-line);
    background-color: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px); /* 半透明底搭配模糊，捲過內容時文字仍清楚 */
}

.sw-toc ul {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 0;
    padding: 10px 0;
    overflow-x: auto; /* 手機上項目過多時改為水平滑動，不換成多行佔用版面 */
    list-style: none;
    scrollbar-width: none; /* 隱藏捲軸保持版面乾淨，仍可滑動 */
}

.sw-toc ul::-webkit-scrollbar {
    display: none;
}

.sw-toc a {
    display: block;
    padding: 8px 16px;
    border-radius: 999px;
    color: var(--sw-muted);
    font-size: 0.9375rem;
    white-space: nowrap; /* 避免項目文字被擠成兩行 */
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.sw-toc a:hover,
.sw-toc a:focus {
    background-color: var(--sw-teal-soft);
    color: var(--sw-teal);
}

/* ---------- 品牌價值 ---------- */

.sw-value-visual {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 1 / 0.9; /* 預留高度，避免圖片延遲載入時版面跳動 */
}

.sw-value-visual img {
    position: absolute;
    width: 66%;
    height: auto;
}

/* 兩台筆電上下交錯，前後疊放呈現深度 */
.sw-value-laptop-1 {
    top: 0;
    left: 0;
}

.sw-value-laptop-2 {
    right: 0;
    bottom: 0;
}

.sw-value-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
}

.sw-value-list li {
    display: flex;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--sw-line);
    border-radius: var(--sw-radius);
    background-color: #fff;
    transition: box-shadow 0.2s, transform 0.2s;
}

.sw-value-list li:hover {
    box-shadow: var(--sw-shadow);
    transform: translateY(-3px);
}

.sw-value-list h3 {
    margin: 0 0 4px;
    color: var(--sw-navy);
    font-size: 1.125rem;
    font-weight: 700;
}

.sw-value-list p {
    margin: 0;
    color: var(--sw-muted);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* ---------- 服務內容 ---------- */

/* 服務總覽：九項服務以標籤呈現，點選後跳到對應段落 */
.sw-service-index {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 960px;
    margin: 0 auto 72px;
    padding: 0;
    list-style: none;
}

.sw-service-index a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border: 1px solid var(--sw-line);
    border-radius: 999px;
    background-color: #fff;
    color: var(--sw-navy);
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.sw-service-index a:hover,
.sw-service-index a:focus {
    border-color: var(--sw-teal);
    color: var(--sw-teal);
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.15);
}

.sw-service-index .sw-service-no {
    color: var(--sw-teal);
    font-size: 0.8125rem;
}

/* 每項服務：圖文兩欄，偶數項以 sw-service-reverse 左右對調 */
.sw-service {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 56px;
    align-items: center;
}

.sw-service + .sw-service {
    margin-top: 80px;
}

.sw-service-reverse {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.sw-service-reverse .sw-service-media {
    order: 2;
}

.sw-service-media {
    position: relative;
}

/* 圖片後方的錯位色塊，增加層次且不需額外圖檔 */
.sw-service-media::before {
    content: "";
    position: absolute;
    top: 18px;
    right: -18px;
    bottom: -18px;
    left: 18px;
    border-radius: var(--sw-radius);
    background-color: var(--sw-teal-soft);
}

.sw-service-reverse .sw-service-media::before {
    right: 18px;
    left: -18px;
}

.sw-service-media img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--sw-radius);
    box-shadow: var(--sw-shadow);
}

/* 服務序號：大字體淺色數字，作為視覺錨點 */
.sw-service-body .sw-service-no {
    margin: 0 0 4px;
    color: #b7d9d5;
    font-family: Montserrat, sans-serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.sw-service-body h3 {
    margin: 0 0 6px;
    color: var(--sw-navy);
    font-size: 1.75rem;
    font-weight: 700;
}

.sw-service-subtitle {
    margin: 0 0 16px;
    color: var(--sw-teal);
    font-size: 1.125rem;
    font-weight: 700;
}

.sw-service-body p {
    color: var(--sw-muted);
}

/* 重點清單：以勾選圖示呈現，讓長段落有可快速掃讀的摘要 */
.sw-check {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.sw-check li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background-color: #fff;
    color: var(--sw-navy);
    font-size: 0.9375rem;
    box-shadow: 0 2px 8px rgba(11, 42, 74, 0.06);
}

.sw-check li::before {
    content: "\f00c";
    color: var(--sw-teal);
    font-family: "Font Awesome 5 Free";
    font-size: 0.8125rem;
    font-weight: 900;
}

/* ---------- 製作流程 ---------- */

.sw-process {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: sw-step; /* 以 CSS 計數器產生步驟編號，增減步驟時不需手動調整 */
}

.sw-process li {
    position: relative;
    padding: 28px 16px 24px;
    border: 1px solid var(--sw-line);
    border-radius: var(--sw-radius);
    background-color: #fff;
    text-align: center;
    counter-increment: sw-step;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.sw-process li:hover {
    border-color: #b7d9d5;
    box-shadow: var(--sw-shadow);
}

/* 步驟序號：卡片左上角的小圓標 */
.sw-process li::before {
    content: counter(sw-step, decimal-leading-zero);
    position: absolute;
    top: -14px;
    left: 50%;
    padding: 2px 12px;
    border-radius: 999px;
    background-color: var(--sw-navy);
    color: #fff;
    font-family: Montserrat, sans-serif;
    font-size: 0.8125rem;
    font-weight: 700;
    transform: translateX(-50%);
}

.sw-process .sw-icon {
    margin-bottom: 14px;
}

.sw-process h3 {
    margin: 0 0 8px;
    color: var(--sw-navy);
    font-size: 1.125rem;
    font-weight: 700;
}

.sw-process p {
    margin: 0;
    color: var(--sw-muted);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* ---------- 精選案例 ---------- */

.sw-works {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sw-works a {
    display: block;
    height: 100%;
    border-radius: var(--sw-radius);
    color: inherit;
    text-decoration: none;
}

.sw-works figure {
    height: 100%;
    margin: 0;
    overflow: hidden; /* 圖片放大時裁切於卡片內 */
    border-radius: var(--sw-radius);
    background-color: #fff;
    box-shadow: 0 4px 16px rgba(11, 42, 74, 0.08);
    transition: box-shadow 0.25s, transform 0.25s;
}

.sw-works a:hover figure,
.sw-works a:focus figure {
    box-shadow: var(--sw-shadow);
    transform: translateY(-4px);
}

.sw-works-img {
    overflow: hidden;
}

.sw-works img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 460 / 310; /* 與後台上傳的封面尺寸一致，避免載入時版面跳動 */
    object-fit: cover;
    transition: transform 0.4s ease;
}

.sw-works a:hover img {
    transform: scale(1.06);
}

.sw-works figcaption {
    padding: 14px 18px 18px;
}

.sw-works-en {
    display: block;
    overflow: hidden;
    color: var(--sw-teal);
    font-family: Montserrat, sans-serif;
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis; /* 英文名稱過長時以省略號收尾，維持卡片高度一致 */
}

.sw-works-name {
    display: block;
    color: var(--sw-navy);
    font-size: 1.0625rem;
    font-weight: 700;
}

/* ---------- 常見問題 ---------- */

.sw-faq {
    max-width: 860px;
    margin: 0 auto;
}

.sw-faq-item {
    margin-bottom: 14px;
    border: 1px solid var(--sw-line);
    border-radius: var(--sw-radius);
    background-color: #fff;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.sw-faq-item[open] {
    border-color: #b7d9d5;
    box-shadow: var(--sw-shadow);
}

.sw-faq-item summary {
    position: relative;
    padding: 20px 60px 20px 24px;
    border-radius: var(--sw-radius);
    cursor: pointer;
    list-style: none; /* 移除預設三角形，改用自訂圖示 */
}

/* Safari 需另外移除預設三角形 */
.sw-faq-item summary::-webkit-details-marker {
    display: none;
}

/* 自訂展開圖示：圓形底加號，展開時旋轉成叉號，視覺呈現開合狀態 */
.sw-faq-item summary::after {
    content: "\f067";
    position: absolute;
    top: 50%;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--sw-teal-soft);
    color: var(--sw-teal);
    font-family: "Font Awesome 5 Free";
    font-size: 0.8125rem;
    font-weight: 900;
    transform: translateY(-50%);
    transition: transform 0.2s, background-color 0.2s, color 0.2s;
}

.sw-faq-item[open] summary::after {
    background-color: var(--sw-teal);
    color: #fff;
    transform: translateY(-50%) rotate(45deg);
}

.sw-faq-item summary h3 {
    display: inline; /* 標題在 summary 內維持行內，避免多出額外行距 */
    margin: 0;
    color: var(--sw-navy);
    font-size: 1.125rem;
    font-weight: 700;
}

.sw-faq-item p {
    margin: 0;
    padding: 0 24px 22px;
    color: var(--sw-muted);
}

/* ---------- 相關服務 ---------- */

.sw-related-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sw-related-list a {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px;
    border: 1px solid var(--sw-line);
    border-radius: var(--sw-radius);
    background-color: #fff;
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.sw-related-list a:hover,
.sw-related-list a:focus {
    border-color: #b7d9d5;
    box-shadow: var(--sw-shadow);
    transform: translateY(-3px);
}

.sw-related-list .sw-icon {
    margin-bottom: 16px;
}

/* 標題後方的箭頭：提示整張卡片可點擊 */
.sw-related-title {
    margin-bottom: 6px;
    color: var(--sw-navy);
    font-size: 1.125rem;
    font-weight: 700;
}

.sw-related-title::after {
    content: "\f061";
    margin-left: 8px;
    color: var(--sw-teal);
    font-family: "Font Awesome 5 Free";
    font-size: 0.875rem;
    font-weight: 900;
    transition: margin-left 0.2s;
}

.sw-related-list a:hover .sw-related-title::after {
    margin-left: 12px;
}

.sw-related-text {
    color: var(--sw-muted);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* ---------- 行動呼籲 ---------- */

.sw-cta {
    position: relative;
    padding: 80px 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sw-navy) 0%, var(--sw-navy-2) 100%);
    color: #fff;
    text-align: center;
}

/* 背景大圓形裝飾，增加深色區塊的層次 */
.sw-cta::before {
    content: "";
    position: absolute;
    top: -180px;
    right: -120px;
    width: 420px;
    height: 420px;
    border: 60px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.sw-cta .container {
    position: relative;
}

.sw-cta h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}

.sw-cta p {
    margin: 0 0 32px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.0625rem;
}

.sw-cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

/* ---------- 響應式：大型平板與小筆電 ---------- */

@media (max-width: 1199.98px) {
    /* 六欄過擠，改為三欄兩列 */
    .sw-process {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 36px; /* 預留步驟序號凸出卡片上緣的空間 */
    }

    .sw-hero-title {
        font-size: 2.5rem;
    }
}

/* ---------- 響應式：平板 ---------- */

@media (max-width: 991.98px) {
    .sw-section {
        padding: 64px 0;
    }

    .sw-hero {
        padding: 48px 0 64px;
        text-align: center;
    }

    .sw-hero .sw-eyebrow::before {
        display: none; /* 置中排版時左側短線會讓標題看起來偏移 */
    }

    .sw-hero-lead,
    .sw-hero-stats {
        margin-right: auto;
        margin-left: auto;
    }

    .sw-hero-actions {
        justify-content: center;
    }

    .sw-hero-stats div {
        padding-left: 0;
        border-left: 0;
    }

    /* 平板以下選單高度改變，導覽列不再固定，避免與展開的選單重疊 */
    .sw-toc {
        position: static;
    }

    /* 服務內容改為上圖下文單欄排列 */
    .sw-service,
    .sw-service-reverse {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .sw-service-reverse .sw-service-media {
        order: 0;
    }

    .sw-service-media {
        max-width: 560px;
        margin: 0 auto;
    }

    .sw-service + .sw-service {
        margin-top: 64px;
    }

    .sw-works,
    .sw-related-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sw-value-visual {
        max-width: 400px;
    }
}

/* ---------- 響應式：手機 ---------- */

@media (max-width: 575.98px) {
    .sw-section {
        padding: 52px 0;
    }

    .sw-title,
    .sw-cta h2 {
        font-size: 1.5rem;
    }

    .sw-hero-title {
        font-size: 2rem;
    }

    .sw-hero-subtitle {
        font-size: 1.25rem;
    }

    .sw-hero-stats dd {
        font-size: 1.375rem;
    }

    /* 手機按鈕滿版，觸控更容易 */
    .sw-hero-actions .sw-btn,
    .sw-cta-actions .sw-btn {
        width: 100%;
    }

    .sw-value-list,
    .sw-process,
    .sw-related-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .sw-service-index {
        margin-bottom: 52px;
    }

    .sw-service-body h3 {
        font-size: 1.5rem;
    }

    .sw-service-body .sw-service-no {
        font-size: 2.25rem;
    }

    /* 手機兩欄案例卡片較窄，縮小內距與字級 */
    .sw-works {
        gap: 14px;
    }

    .sw-works figcaption {
        padding: 10px 12px 14px;
    }

    .sw-works-name {
        font-size: 0.9375rem;
    }

    /* 錯位色塊在窄螢幕會超出畫面，縮小位移 */
    .sw-service-media::before {
        top: 10px;
        right: -10px;
        bottom: -10px;
        left: 10px;
    }

    .sw-service-reverse .sw-service-media::before {
        right: -10px;
        left: 10px;
    }
}
