/* =========================================================
   PHP 專案開發服務頁（/service/php）專用樣式
   以 sp- 為前綴，避免與 service.css 其他服務頁的樣式互相干擾
   ========================================================= */

/* 設計變數：集中管理色彩，所有文字配色皆已確認符合 AA 對比度 4.5:1 */
.sp-page {
    --sp-ink: #262a45; /* 深紫藍：標題與深色區塊背景 */
    --sp-purple: #4f5b93; /* PHP 官方網站使用的深紫：與白色對比約 6.5:1，可用於小字與按鈕 */
    --sp-purple-brand: #777bb4; /* PHP 標誌原色：與白色對比不足 4.5:1，只用於裝飾，不用於文字 */
    --sp-purple-soft: #f1f2f9; /* 淺紫：圖示底色與標籤背景 */
    --sp-light: #c4c8f0; /* 深色區塊上的淺紫文字：與深紫藍背景對比約 8.6:1 */
    --sp-blue: #1170b7; /* 品牌主色，沿用網站既有藍色，用於焦點框 */
    --sp-text: #1f2937; /* 內文主色 */
    --sp-muted: #4b5563; /* 次要文字，與白色對比約 7.5:1 */
    --sp-line: #e5e7eb; /* 分隔線與卡片框線 */
    --sp-bg-alt: #f7f7fb; /* 交錯區塊背景，帶一點紫色調與主色協調 */
    --sp-radius: 16px; /* 卡片與圖片統一圓角 */
    --sp-shadow: 0 12px 32px rgba(38, 42, 69, 0.1); /* 統一陰影，營造浮起層次 */

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

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

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

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

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

.sp-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;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* 首屏小標以 PHP 圖示開頭，不需左側短線 */
.sp-hero .sp-eyebrow::before {
    display: none;
}

.sp-hero .sp-eyebrow i {
    font-size: 1.5rem;
}

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

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

/* 圓角方形圖示底：多個區塊共用 */
.sp-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background-color: var(--sp-purple-soft);
    color: var(--sp-purple);
    font-size: 1.375rem;
}

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

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

/* 背景大橢圓：取自 PHP 標誌的橢圓外形，以描邊呈現，不搶內容焦點 */
.sp-hero-ring {
    position: absolute;
    top: -120px;
    right: -180px;
    width: 720px;
    height: 400px;
    border: 56px solid rgba(119, 123, 180, 0.1);
    border-radius: 50%;
    pointer-events: none; /* 不攔截滑鼠事件 */
}

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

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

.sp-hero-subtitle {
    display: block;
    margin-top: 8px;
    color: var(--sp-purple);
    font-size: 1.5rem;
    font-weight: 700;
}

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

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

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

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

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

.sp-hero-stats dd {
    margin: 0;
    color: var(--sp-ink);
    font-family: Montserrat, "Noto Sans TC", sans-serif;
    font-size: 1.625rem;
    font-weight: 700;
    line-height: 1.3;
}

/* ---------- 首屏：程式碼示意圖 ---------- */

.sp-visual {
    max-width: 600px;
    margin: 0 auto;
}

/* 圖片四周含透明留白（供陰影與標籤使用），放大並往左偏移留白的比例，視窗本體才會貼齊欄寬；提高權重才能蓋過頁面層級的 img 規則 */
.sp-visual .sp-visual-img {
    display: block;
    width: 113.33%;
    max-width: none;
    height: auto;
    margin: -6.67% 0 -8% -6.67%;
}

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

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

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

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

/* 以首尾 auto 外距置中：空間足夠時置中，項目溢出時外距歸零，不像 justify-content: center 會把第一項裁到捲動範圍外 */
.sp-toc li:first-child {
    margin-left: auto;
}

.sp-toc li:last-child {
    margin-right: auto;
}

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

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

/* ---------- 關於 PHP ---------- */

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

.sp-about li {
    display: flex;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius);
    background-color: #fff;
}

.sp-about h3 {
    margin: 0 0 4px;
    color: var(--sp-ink);
    font-size: 1.125rem;
    font-weight: 700;
}

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

/* ---------- 外包優勢 ---------- */

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

.sp-advantages li {
    position: relative;
    padding: 32px 28px;
    overflow: hidden; /* 裁切右上角的大序號 */
    border-radius: var(--sp-radius);
    background-color: #fff;
    box-shadow: 0 4px 16px rgba(38, 42, 69, 0.06);
    transition: box-shadow 0.25s, transform 0.25s;
}

.sp-advantages li:hover {
    box-shadow: var(--sp-shadow);
    transform: translateY(-4px);
}

/* 右上角大序號：淺色裝飾數字，作為卡片的視覺錨點 */
.sp-advantage-no {
    position: absolute;
    top: 12px;
    right: 20px;
    color: #eceef8;
    font-family: Montserrat, sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
}

.sp-advantages .sp-icon {
    position: relative; /* 疊在大序號上方 */
    margin-bottom: 18px;
}

.sp-advantages h3 {
    position: relative;
    margin: 0 0 10px;
    color: var(--sp-ink);
    font-size: 1.25rem;
    font-weight: 700;
}

.sp-advantages p {
    margin: 0;
    color: var(--sp-muted);
    font-size: 0.9375rem;
    line-height: 1.75;
}

/* ---------- 服務項目 ---------- */

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

.sp-services li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--sp-line);
    border-radius: 12px;
    background-color: #fff;
    color: var(--sp-ink);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sp-services li:hover {
    border-color: #c9cce6;
    box-shadow: 0 6px 18px rgba(38, 42, 69, 0.08);
}

.sp-services .sp-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 1.125rem;
}

.sp-service-note {
    margin: 36px 0 0;
    color: var(--sp-muted);
    text-align: center;
}

.sp-service-note a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    color: var(--sp-purple);
    font-weight: 700;
    text-decoration: none;
}

.sp-service-note a:hover {
    text-decoration: underline;
}

/* ---------- 版本升級 ---------- */

.sp-upgrade {
    position: relative;
    padding: 88px 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sp-ink) 0%, #353a63 100%);
    color: #fff;
}

.sp-upgrade .sp-eyebrow {
    color: var(--sp-light);
}

.sp-upgrade h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.45;
}

.sp-upgrade p {
    color: rgba(255, 255, 255, 0.88);
}

/* 舊版風險清單：以警示圖示提醒 */
.sp-risks {
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.sp-risks li {
    position: relative;
    padding: 6px 0 6px 30px;
    color: #fff;
}

.sp-risks li::before {
    content: "\f071";
    position: absolute;
    top: 7px;
    left: 0;
    color: #fbbf24; /* 琥珀色警示：與深色背景對比足夠，且直覺表達風險 */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

/* 插圖下方墊一層淺色圓形，讓透明背景的插圖在深色區塊上清楚可見 */
.sp-upgrade-img {
    display: block;
    width: 100%;
    max-width: 420px;
    height: auto;
    margin: 0 auto;
    padding: 24px;
    border-radius: 50%;
    background-color: #fff;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

/* 升級步驟：四欄橫向排列，以計數器產生序號 */
.sp-upgrade-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 56px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: sp-upgrade;
}

.sp-upgrade-steps li {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--sp-radius);
    background-color: rgba(255, 255, 255, 0.06);
    counter-increment: sp-upgrade;
}

.sp-upgrade-steps li::before {
    content: "STEP " counter(sp-upgrade);
    display: block;
    margin-bottom: 8px;
    color: var(--sp-light);
    font-family: Montserrat, sans-serif;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.sp-upgrade-steps h3 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 1.125rem;
    font-weight: 700;
}

.sp-upgrade-steps p {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* ---------- 技術能力 ---------- */

.sp-stack {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.sp-frameworks,
.sp-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 框架：較大的實心標籤 */
.sp-frameworks li {
    padding: 10px 28px;
    border-radius: 999px;
    background-color: var(--sp-purple);
    color: #fff;
    font-family: Montserrat, sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
}

/* 技術領域：較小的框線標籤 */
.sp-tags {
    margin: 24px 0 36px;
}

.sp-tags li {
    padding: 6px 16px;
    border: 1px solid #d4d6ee;
    border-radius: 999px;
    background-color: #fff;
    color: var(--sp-ink);
    font-size: 0.9375rem;
}

/* ---------- 外包流程 ---------- */

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

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

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

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

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

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

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

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

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

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

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

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

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

/* 自訂展開圖示：圓形底加號，展開時旋轉成叉號，視覺呈現開合狀態 */
.sp-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(--sp-purple-soft);
    color: var(--sp-purple);
    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;
}

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

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

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

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

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

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

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

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

.sp-related-title {
    margin-bottom: 6px;
    color: var(--sp-ink);
    font-size: 1.125rem;
    font-weight: 700;
}

/* 標題後方的箭頭：提示整張卡片可點擊 */
.sp-related-title::after {
    content: "\f061";
    margin-left: 8px;
    color: var(--sp-purple);
    font-family: "Font Awesome 5 Free";
    font-size: 0.875rem;
    font-weight: 900;
    transition: margin-left 0.2s;
}

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

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

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

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

/* 背景大橢圓裝飾，呼應首屏的 PHP 標誌外形 */
.sp-cta::before {
    content: "";
    position: absolute;
    top: -160px;
    right: -160px;
    width: 520px;
    height: 300px;
    border: 50px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

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

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

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

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

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

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

    .sp-services {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

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

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

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

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

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

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

    /* 關於 PHP 的標題區改為置中，與其他區塊標題一致 */
    #sp-about .col-lg-5 {
        text-align: center;
    }

    .sp-advantages,
    .sp-related,
    .sp-upgrade-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sp-upgrade-img {
        max-width: 320px;
    }
}

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

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

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

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

    .sp-hero-subtitle {
        font-size: 1.125rem;
    }

    .sp-hero-stats dd {
        font-size: 1.125rem;
    }

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

    .sp-about,
    .sp-advantages,
    .sp-process,
    .sp-related,
    .sp-upgrade-steps {
        grid-template-columns: minmax(0, 1fr);
    }

    .sp-services {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    /* 兩欄服務方塊較窄，改為圖示在上、文字在下 */
    .sp-services li {
        flex-direction: column;
        gap: 10px;
        padding: 16px 12px;
        font-size: 0.9375rem;
        text-align: center;
    }

    .sp-service-note a {
        display: flex;
        justify-content: center;
        margin: 8px 0 0;
    }
}
