/* ============================================
   FarBar AI System - 響應式設計 CSS
   基於 1920px 基準設計，支援多種解析度縮放
   此頁為 farbarAi-responsive.html 的子頁面
   ============================================ */

/* ============================================
   CSS 變數系統 - 1920px 基準設計
   ============================================ */
:root {
    /* 色彩系統 */
    --primary-gradient: linear-gradient(90deg, #1fc8ab, #5e8dfe);
    --primary-teal: #1fc8ab;
    --primary-blue: #5e8dfe;
    --bg-dark: #06161a;
    --bg-darker: #061519;
    --text-white: #fff;
    --text-gray: #c7c7c7;
    --text-muted: #63657e;
    --text-placeholder: #818182;
    --btn-purple: #503ae7;
    --btn-purple-hover: #6b52f5;
    --border-light: #dce4ec;

    /* 縮放比例 (1920px = 0.9) - 全域縮放 */
    --scale: 0.9;

    /* 間距系統 - 基於 1920px，用 max() 確保最小間距 */
    --spacing-xs: max(4px, calc(8px * var(--scale)));
    --spacing-sm: max(8px, calc(12px * var(--scale)));
    --spacing-md: max(12px, calc(16px * var(--scale)));
    --spacing-lg: max(16px, calc(24px * var(--scale)));
    --spacing-xl: max(20px, calc(32px * var(--scale)));
    --spacing-2xl: max(24px, calc(48px * var(--scale)));
    --spacing-3xl: max(32px, calc(64px * var(--scale)));
    --spacing-4xl: max(40px, calc(80px * var(--scale)));

    /* 字體大小 - 基於 1920px，用 max() 與 round() 確保最小可讀字級並對齊像素 */
    --font-xs: max(12px, round(nearest, calc(14px * var(--scale)), 2px));
    --font-sm: max(12px, round(nearest, calc(16px * var(--scale)), 2px));
    --font-md: max(14px, round(nearest, calc(18px * var(--scale)), 2px));
    --font-lg: max(14px, round(nearest, calc(20px * var(--scale)), 2px));
    --font-xl: max(16px, round(nearest, calc(24px * var(--scale)), 2px));
    --font-2xl: max(18px, round(nearest, calc(26px * var(--scale)), 2px));
    --font-3xl: max(20px, round(nearest, calc(28px * var(--scale)), 2px));
    --font-4xl: max(24px, round(nearest, calc(40px * var(--scale)), 2px));
    --font-5xl: max(28px, round(nearest, calc(48px * var(--scale)), 2px));

    /* 容器與尺寸 */
    --container-max: calc(1200px * var(--scale));
    --container-padding: calc(20px * var(--scale));
    --features-max-width: calc(1360px * var(--scale));
    --feature-image-width: calc(580px * var(--scale));
    --feature-image-height: calc(400px * var(--scale));
    --feature-gap: calc(44px * var(--scale));
    --feature-content-gap: calc(48px * var(--scale));

    /* 圓角 */
    --radius-sm: calc(5px * var(--scale));
    --radius-md: calc(25px * var(--scale));
    --radius-lg: calc(32px * var(--scale));

    /* 導航列 */
    --nav-height: calc(80px * var(--scale));
    --nav-padding: calc(36px * var(--scale));
    --logo-height: calc(36px * var(--scale));

    /* 過渡動畫 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* ============================================
   1440px 斷點 (75% of 1920)
   ============================================ */
@media (max-width: 1440px) {
    :root {
        --scale: 0.75;
        --container-padding: 24px;
        --nav-padding: 28px;
    }
}

/* ============================================
   1366px 斷點 (71% of 1920)
   ============================================ */
@media (max-width: 1366px) {
    :root {
        --scale: 0.71;
        --container-padding: 22px;
        --nav-padding: 24px;
    }
}

/* ============================================
   1200px 斷點 (62.5% of 1920)
   ============================================ */
@media (max-width: 1200px) {
    :root {
        --scale: 0.625;
        --container-padding: 20px;
        --nav-padding: 20px;
    }
}

/* ============================================
   1080px 斷點 (56% of 1920)
   ============================================ */
@media (max-width: 1080px) {
    :root {
        --scale: 0.56;
        --container-padding: 20px;
        --nav-padding: 20px;
        --feature-gap: calc(60px * var(--scale));
    }
}

/* ============================================
   375px 斷點 (手機版)
   ============================================ */
@media (max-width: 375px) {
    :root {
        --scale: 0.5;
        --container-padding: 16px;
        --nav-padding: 16px;
    }
}

/* ============================================
   CSS Reset & 基礎樣式
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    line-height: 1.6;
    color: var(--text-white);
    background-color: var(--bg-dark);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

input,
textarea {
    font-family: inherit;
    border: none;
    outline: none;
}

/* ============================================
   Hero 區域 - 1920px 基準
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: calc(600px * var(--scale));
    max-height: calc(750px * var(--scale));
    overflow: hidden;
    display: flex;
    align-items: flex-start;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: -2;
}

.hero-overlay-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(237px * var(--scale));
    background: linear-gradient(180deg, var(--bg-darker) 32.21%, rgba(9, 61, 75, 0.25) 73.56%, rgba(7, 41, 50, 0));
    z-index: -1;
}

.hero-overlay-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(237px * var(--scale));
    background: linear-gradient(0deg, var(--bg-darker) 32.21%, rgba(0, 14, 17, 0.5) 62.98%, rgba(7, 41, 50, 0));
    z-index: -1;
}

.hero-content {
    width: 100%;
    /* 使用 134px gap 以與 farbarAiServices 的 Hero 寬度一致 (580*2 + 134) */
    max-width: calc((var(--feature-image-width) * 2) + calc(134px * var(--scale)));
    margin: 0 auto;
    padding: 0;
    padding-top: calc(274px * var(--scale));
    display: flex;
    flex-direction: column;
    gap: calc(20px * var(--scale));
}

.hero-title {
    font-size: var(--font-5xl);
    font-weight: 700;
    line-height: 1.4;
}

.hero-description {
    /* 調整為 28px 以與 farbarAiServices 一致 */
    font-size: var(--font-3xl);
    font-weight: 400;
    line-height: 1.6;
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: calc(120px * var(--scale));
}

.hero-brand-name {
    font-size: var(--font-2xl);
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-subtitle {
    font-size: var(--font-2xl);
    font-weight: 700;
    line-height: 1.4;
}

/* ============================================
   主要內容區 - 1920px 基準
   ============================================ */
.main-content {
    position: relative;
    background-color: var(--bg-dark);
}

/* CMS 滿寬白色背景的容器 */
.cms-white-wrapper {
    position: relative;
    background-color: #ffffff;
    width: 100%;
    z-index: 2;
}

/* CMS 區塊的白色背景（讓 CMS 標題區塊呈現白底） */
.cms-header-section,
.cms-features-section {
    position: relative;
    background-color: #ffffff;
    z-index: 1;
}

/* 使用偽元素創建滿寬白色背景 */
.cms-header-section::before,
.cms-features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background-color: #ffffff;
    z-index: -1;
    pointer-events: none;
}

/* CMS 區塊內的文字顏色調整（深色背景） */
/* Device Tabs UI */
.device-tabs {
    display: flex;
    justify-content: center;
    margin: 0 auto 30px auto;
    border-bottom: 2px solid var(--border-light);
    width: 320px; /* 設定固定總寬度，確保兩邊絕對等寬 */
}

.device-tab {
    flex: 1; /* 讓兩個標籤等寬 */
    text-align: center; /* 文字置中 */
    padding: 12px 0;
    font-size: var(--font-2xl);
    font-weight: 600;
    color: var(--text-placeholder);
    cursor: pointer;
    position: relative;
    transition: color var(--transition-normal);
}

.device-tab:hover {
    color: var(--primary-teal);
}

.device-tab.active {
    color: #1a1a2e; /* 和標題 cms-main-title 的顏色一致 */
}

.device-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
    transform-origin: center;
    border-radius: 4px;
}

.device-tab.active::after {
    transform: scaleX(1);
}

.cms-main-title {
    text-align: center;
    width: fit-content;
    margin: 0 auto calc(48px * var(--scale)) auto;
    background: var(--primary-gradient, linear-gradient(90deg, #1fc8ab, #5e8dfe)) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

/* feature-content 的樣式 - 對齊基準設計 */
.cms-features-section .feature-label {
    /* 主標題：36px 純黑色 */
    color: #000000;
    -webkit-text-fill-color: #000000;
    border: none;
}

.cms-features-section .feature-title {
    /* 副標題：24px 藍綠色 */
    color: #00718a;
    -webkit-text-fill-color: #00718a;
    background: none;
}

.cms-features-section .feature-description {
    /* 內文：20px 純黑色 */
    color: #000000;
}

/* CMS 標題區塊 */
.cms-header-section {
    text-align: center;
    /* 上方維持 80px (4xl)，左右沿用 container-padding，下方改為 0 */
    padding: var(--spacing-4xl) var(--container-padding) 0;
    /* 調整寬度以與 Services 一致 (1360px) */
    max-width: calc(1360px * var(--scale));
    margin: 0 auto;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: calc(6px * var(--scale)) calc(20px * var(--scale));
    border-radius: 999px;
    background: transparent;
    border: 1px solid var(--primary-teal);
    position: relative;
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    width: auto;
    height: auto;
    white-space: nowrap;
}

.badge-text {
    font-size: var(--font-xs);
    font-weight: 700;
    font-family: 'Noto Sans TC', sans-serif;
    letter-spacing: .08em;
    background: var(--primary-gradient, linear-gradient(90deg, #1fc8ab, #5e8dfe));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
}

.badge-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--primary-teal), var(--primary-blue));
    filter: blur(84px);
    z-index: 0;
}

.cms-main-title {
    font-size: var(--font-4xl);
    font-weight: 700;
    background: linear-gradient(90deg, #0b6e7a, #1d3fb5);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--spacing-2xl);
}

/* ============================================
   CMS 白底內容區 - 1920px
   ============================================ */
.cms-features-section {
    /* 上方間距 40px，左右沿用 container-padding，下方維持 48px (2xl) */
    padding: calc(40px * var(--scale)) var(--container-padding) var(--spacing-2xl);
    max-width: var(--features-max-width);
    margin: 0 auto;
}

.feature-row {
    display: grid;
    grid-template-columns: var(--feature-image-width) var(--feature-image-width);
    gap: var(--feature-gap);
    justify-content: start;
    align-items: center;
    /* 將 margin-bottom 從 80px (4xl) 改為 40px，縮短與下方卡片的距離 */
    margin: 0 auto calc(40px * var(--scale)) auto;
    /* 漸層的背景區塊 - 基準設計顏色 */
    position: relative;
    /* 非對稱間距：上 36 右 80 下 36 左 36 */
    padding: calc(36px * var(--scale)) calc(80px * var(--scale)) calc(36px * var(--scale)) calc(36px * var(--scale));
    border-radius: calc(13px * var(--scale));
    /* 水平漸層：深色 -> 白色 */
    background: linear-gradient(90deg,
            rgba(0, 149, 185, 0.9) 0%,
            rgba(255, 255, 255, 0.9) 60%);
    box-shadow:
        rgba(99, 101, 126, 0.3) 0px 7px 9px -5px,
        rgba(99, 101, 126, 0.3) 0px 18px 22px -4px,
        rgba(255, 255, 255, 0.05) 0px 0px 0px 7px;
    width: max-content;
}

.feature-row.reverse {
    direction: rtl;
    /* 反向非對稱間距：上 36 右 36 下 36 左 80 */
    padding: calc(36px * var(--scale)) calc(36px * var(--scale)) calc(36px * var(--scale)) calc(80px * var(--scale));
    /* 反向漸層：白色 -> 深色 */
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.9) 40%,
            rgba(0, 149, 185, 0.9) 100%);
}

.feature-row.reverse>* {
    direction: ltr;
}

.feature-image {
    position: relative;
    width: var(--feature-image-width);
    height: var(--feature-image-height);
    flex-shrink: 0;
    border-radius: 0;
    overflow: hidden;
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-content {
    display: flex;
    flex-direction: column;
    width: var(--feature-image-width);
    gap: calc(12px * var(--scale));
    /* 基準設計間距 12px */
}

/* 主標題（含標籤）：調整為較小尺寸 24px 純黑色 */
.feature-label {
    font-size: var(--font-xl);
    /* 24px */
    font-weight: 500;
    color: #000000;
    /* 移除區塊的 padding，改用外層樣式 */
    padding: 0;
    border: none;
    border-radius: 0;
    display: block;
    width: auto;
}

/* 副標題實際是大標題：調整為 36px 並對齊主標 */
.feature-title {
    font-size: var(--font-3xl);
    /* 36px */
    font-weight: 500;
    line-height: 1.2;
    /* 120% */
    color: #00718a;
    margin: 0;
    /* 移除漸層背景 */
    background: none;
    background-clip: unset;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #00718a;
}

/* 內文描述：原始設計 20px 純黑色 */
.feature-description {
    font-size: var(--font-lg);
    /* 20px */
    font-weight: 400;
    line-height: 1.6;
    /* 160% */
    color: #000000;
    margin: 0;
}

/* ============================================
   智慧 EyEBooM 看板區塊 - 1920px 基準
   ============================================ */
.eyeboom-section {
    position: relative;
    overflow: hidden;
    padding: 0 var(--container-padding) 0;
    max-width: var(--features-max-width);
    margin: 0 auto;
    text-align: center;
}

.section-title-gradient {
    font-size: var(--font-4xl);
    font-weight: 500;
    color: #fff;
    margin-bottom: var(--spacing-md);
}

.section-description {
    font-size: var(--font-xl);
    font-weight: 400;
    line-height: 1.8;
    color: var(--text-gray);
    max-width: calc(1100px * var(--scale));
    margin: 0 auto var(--spacing-2xl);
}

.section-subtitle {
    font-size: var(--font-xl);
    font-weight: 400;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: var(--spacing-2xl);
}

/* EyEBooM 服務卡片 */
.eyeboom-cards {
    display: grid;
    grid-template-columns: repeat(3, calc(331px * var(--scale)));
    gap: calc(145px * var(--scale));
    justify-content: center;
}

.eyeboom-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: calc(28px * var(--scale));
}

.card-icon {
    width: calc(72px * var(--scale));
    height: calc(72px * var(--scale));
    border-radius: calc(13px * var(--scale));
    background-color: rgba(31, 200, 171, 0.05);
    border: 2px solid var(--primary-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}



.card-icon svg {
    width: calc(40px * var(--scale));
    height: calc(40px * var(--scale));
    stroke: var(--primary-teal);
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: var(--font-xl);
    font-weight: 500;
    color: var(--text-white);
    line-height: 1.2;
}

/* ============================================
   AI 生成影片技術區塊 - 1920px 基準
   ============================================ */
.ai-generation-section {
    padding: var(--spacing-4xl) var(--container-padding);
    max-width: var(--features-max-width);
    margin: 0 auto;
    text-align: center;
}

.ai-feature-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--feature-gap);
    align-items: center;
    margin-top: var(--spacing-3xl);
    text-align: left;
    position: relative;
}

.ai-feature-block.reverse {
    direction: rtl;
}

.ai-feature-block.reverse>* {
    direction: ltr;
}

.ai-feature-content {
    /* 放寬最大寬度限制，讓文字能自然延伸，避免在 1366px 提早換行 */
    max-width: 100%;
    display: flex;
    flex-direction: column;
    /* 基準 gap 24px */
    gap: calc(24px * var(--scale));
}

.ai-feature-title {
    /* 與 section-title-gradient 一致 (40px) */
    font-size: var(--font-4xl);
    font-weight: 500;
    /* 移除 margin，改用 gap 控制 */
    margin-bottom: 0;
}

.ai-feature-description {
    /* 基準設計 24px */
    font-size: var(--font-xl);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-gray);
}

.ai-feature-media {
    position: relative;
    /* 確保浮在上層，Prompt Box 顯示正常 */
    z-index: 1;
}

/* 圖片轉影片區塊的 Overlay Prompt Box */
.ai-feature-block .prompt-overlay {
    position: absolute;
    /* 恢復為大螢幕的最佳預設高度 */
    bottom: calc(45px * var(--scale));
    /* 原本相對於 media (-150px)，現在相對於 block：Block Center + Half Gap - 150 = 50% + 22 - 150 = 50% - 128 */
    left: calc(50% - (128px * var(--scale)));
    top: auto;
    z-index: 10;
    margin: 0;
}

.ai-feature-media img {
    width: 100%;
    border-radius: 0;
    display: block;
}

.ai-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    border-radius: calc(10px * var(--scale));
}

/* Image to Video Custom Layout (Desktop Absolute Positioning) */
.image-to-video-block {
    display: block;
    position: relative;
    height: calc(400px * var(--scale));
    margin-top: var(--spacing-3xl);
    /* Ensure it has the same width constraints as other blocks if needed, 
       but here we rely on internal absolute positioning relative to this container 
       which presumably matches features-max-width due to parent */
}

/* Position the Title Container */
.image-to-video-block .ai-feature-content {
    position: absolute;
    /* Adjusted from 72px to 50px to move up per user request */
    top: calc(50px * var(--scale));
    /* Calculated 1124px matches original relative position */
    /* Changed to right: 0 for better alignment stability across scales per user request */
    right: 0;
    left: auto;
    width: auto;
    z-index: 10;
    text-align: right;
    max-width: none;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

/* Ensure Media Container fills the block for absolute children positioning */
.image-to-video-block .image-to-video-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Image to Video Custom Layout (Side-by-side with overlap) - Media Details */
.image-to-video-media {
    position: relative;
    overflow: visible;
    height: 100%;
    /* Match parent height */
}

.image-to-video-media .ai-video {
    width: calc(580px * var(--scale));
    height: auto;
    position: absolute;
    top: 0;
    /* Aligned to create the correct layout relative to column */
    left: calc(500px * var(--scale));
    transform: none;
    /* Override default centering */
    border-radius: calc(10px * var(--scale));
}

.image-to-video-media .source-image {
    width: calc(440px * var(--scale));
    height: auto;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 0;
    z-index: 1;
}

/* Image to Video Prompt Box - Now direct child of block */
.image-to-video-block .prompt-box {
    position: absolute;
    top: calc(140px * var(--scale));
    right: 0;
    left: auto;
    margin: 0;
    z-index: 2;
    /* Reverse gradient: Solid on Right, Transparent on Left to show underlying video */
    background: linear-gradient(270deg, #0e1f2e 50%, rgba(14, 31, 46, 0.5));
}

/* Prompt Box 樣式 */
.prompt-box {
    position: relative;
    width: calc(318px * var(--scale));
    min-height: calc(132px * var(--scale));
    height: auto;
    background: linear-gradient(90deg, #0e1f2e 50%, rgba(14, 31, 46, 0.5));
    border: 2px solid #5791c0;
    border-radius: 5px;
    padding: calc(24px * var(--scale)) calc(16px * var(--scale)) calc(64px * var(--scale));
    margin-top: var(--spacing-xl);
    box-sizing: border-box;
}

.prompt-badge {
    position: absolute;
    bottom: calc(16px * var(--scale));
    right: calc(16px * var(--scale));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: calc(2px * var(--scale)) calc(12px * var(--scale));
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(31, 200, 171, .18), rgba(94, 141, 254, .18));
    border: 1px solid rgba(31, 200, 171, .5);
    overflow: hidden;
}

.prompt-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--primary-teal), var(--primary-blue));
    filter: blur(84px);
    z-index: 0;
}

.prompt-badge span {
    font-size: var(--font-xs);
    font-weight: 700;
    font-family: Arial, sans-serif;
    letter-spacing: .08em;
    color: #cdeee7;
    position: relative;
    z-index: 1;
}

.prompt-text {
    font-size: var(--font-sm);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-gray);
    /* 限制行數以防溢出 */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.prompt-example {
    max-width: calc(600px * var(--scale));
    /* 讓 prompt-example 在 prompt-box 中置中 */
    display: flex;
    justify-content: center;
    margin: var(--spacing-3xl) auto 0;
}

/* ============================================
   多螢幕同步播放區塊 - 1920px 基準
   ============================================ */
.multi-screen-section {
    /* Modified top padding to match original layout vertical gap (approx 120px total) */
    padding: var(--spacing-4xl) var(--container-padding) var(--spacing-4xl);
    max-width: var(--features-max-width);
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
    /* 科技感座標網格線點綴 */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    background-position: center top;
}

/* 深色背景點綴：左右兩側加入非常柔和的主題色光暈 */
.multi-screen-section::before,
.multi-screen-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
}

.multi-screen-section::before {
    top: 5%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: rgba(31, 200, 171, 0.35); /* 提高亮度的綠色光暈 */
}

.multi-screen-section::after {
    bottom: -5%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: rgba(94, 141, 254, 0.35); /* 提高亮度的藍色光暈 */
}

.screen-demo-grid-wrapper {
    max-width: var(--features-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    margin-top: calc(80px * var(--scale));
}

.screen-demo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
    margin: 0 0 var(--spacing-3xl) 0;
}

.demo-video {
    width: 100%;
    border-radius: calc(20px * var(--scale));
}

/* 設備比較區塊 */
.device-comparison {
    /* Removed margin-top to zero gap between space-management (image 8) and comparison-header (image 9) per original design */
    margin-top: 0;
}

.comparison-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xl);
    /* Tight gap between images and description per original design (approx 4px) */
    margin-bottom: calc(4px * var(--scale));
    /* Ensure wrapping on very small screens if needed, but intended for side-by-side */
    flex-wrap: nowrap;
}


.comparison-farbar-logo {
    /* Right side image/logo - Matched to original design size */
    width: calc(561px * var(--scale));
    height: auto;
}

.comparison-left-img {
    /* Left side image (traditional matrix switch box) */
    width: calc(561px * var(--scale));
    height: auto;
}

.comparison-vs {
    /* Original design font-size: 64px */
    font-size: round(nearest, calc(64px * var(--scale)), 2px);
    font-weight: 700;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    flex-shrink: 0;
    /* Prevent VS from shrinking */
}

.comparison-description {
    font-size: var(--font-xl);
    font-weight: 400;
    line-height: 1.8;
    color: var(--text-gray);
    max-width: calc(1110px * var(--scale));
    margin: 0 auto calc(120px * var(--scale));
}

.comparison-title {
    /* Matched to original 40px */
    font-size: var(--font-4xl);
    font-weight: 500;
    margin-bottom: var(--spacing-xl);
}

.comparison-cards {
    display: grid;
    grid-template-columns: repeat(3, calc(424px * var(--scale)));
    gap: var(--spacing-xl);
    justify-content: center;
}

.comparison-card {
    width: calc(424px * var(--scale));
    height: calc(344px * var(--scale));
    background-size: cover;
    background-position: top;
    /* Original design has no border-radius */
    border-radius: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    /* Original: padding: 28px 128px; */
    padding: calc(28px * var(--scale)) calc(20px * var(--scale));
    position: relative;
    overflow: hidden;
}

/* Original design implies no gradient overlay overlay in CSS snippet */
.comparison-card::before {
    display: none;
}

.card-label {
    /* Matched to estimated original label size */
    font-size: var(--font-xl);
    font-weight: 500;
    color: var(--text-white);
    position: relative;
    z-index: 1;
}

/* 空間管理圖片 */
/* 空間管理圖片 */
.space-management {
    display: block;
    margin-top: var(--spacing-xl);
    text-align: center;
}

.space-management img {
    width: 100%;
    border-radius: calc(20px * var(--scale));
}

/* ============================================
   模糊光暈效果（在深色區塊顯示）
   注意：暫時隱藏以避免溢出到白色區塊
   ============================================ */
.blur-effect {
    display: none;
    /* 調整圖片以配合 CMS 區塊 */
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    pointer-events: none;
    z-index: 0;
}

.blur-1 {
    width: calc(150px * var(--scale));
    height: calc(150px * var(--scale));
    background-color: rgba(159, 54, 242, 0.5);
    top: 15%;
    left: 30%;
}

.blur-2 {
    width: calc(180px * var(--scale));
    height: calc(180px * var(--scale));
    background-color: rgba(54, 107, 242, 0.5);
    top: 40%;
    right: 20%;
    left: auto;
}

.blur-3 {
    width: calc(150px * var(--scale));
    height: calc(150px * var(--scale));
    background-color: rgba(159, 54, 242, 0.5);
    top: 70%;
    left: 50%;
}

/* ============================================
   聯絡我們區塊
   ============================================ */
.contact-section {
    margin-top: 0;
    padding-bottom: var(--spacing-4xl);
    width: 100%;
    /* Ensure it behaves as a block to respect margin */
    display: block;
}

/* ============================================
   響應式設計 - 1440px
   ============================================ */
@media (max-width: 1440px) {

    .eyeboom-cards {
        grid-template-columns: repeat(3, max-content);
        gap: calc(36px * var(--scale));
    }

    .eyeboom-cards .card-title {
        white-space: nowrap;
    }

    .comparison-cards {
        grid-template-columns: repeat(3, calc(411px * var(--scale)));
    }

    .comparison-card {
        width: calc(411px * var(--scale));
        height: calc(333px * var(--scale));
        background-position: center;
        background-size: contain;
        background-repeat: no-repeat;
    }
}

/* ============================================
   響應式設計 - 1366px
   ============================================ */
@media (max-width: 1366px) {
    /* 使用 1440px 的設定並等比縮放 */
}

/* ============================================
   響應式設計 - 1200px
   ============================================ */
@media (max-width: 1200px) {

    /* Removed screen-demo-grid single column override to maintain 2-col layout */

    .space-management {
        grid-template-columns: 1fr;
    }

    /* 針對 1200px 斷點文字較多時專屬向下微調，避免影響 1366px 以上的排版 */
    .ai-feature-block .prompt-overlay {
        bottom: calc(25px * var(--scale));
    }

    /* 解決 1200px 斷點影片太靠右的問題：影片往左移一點點 */
    .image-to-video-media .ai-video {
        left: calc((500px * var(--scale)) - 20px);
    }
}

/* ============================================
   響應式設計 - 1080px
   ============================================ */
@media (max-width: 1080px) {

    /* 針對 1080px 斷點將框框稍微向左微調，抓取完美平衡點 */
    .ai-feature-block .prompt-overlay {
        left: calc(50% - (70px * var(--scale)));
    }

    .feature-row {
        grid-template-columns: var(--feature-image-width) var(--feature-image-width);
        gap: calc(60px * var(--scale));
    }

    /* 解決 1080px 斷點文字與影片貼在一起的問題：只讓影片往左移，底圖不動 */
    .image-to-video-media .ai-video {
        left: calc((500px * var(--scale)) - 20px);
    }

    /* 放寬最大寬度，讓簡介文字有足夠空間排成兩行 */
    .section-description, .comparison-description {
        max-width: 750px;
    }
}

/* ============================================
   響應式設計 - 960px (Scale Adjustment Only)
   ============================================ */
@media (max-width: 960px) {
    :root {
        --scale: 0.52;
        --nav-height: 70px;
    }

    .section-subtitle {
        max-width: 600px;
        margin: 0 auto var(--spacing-xl);
    }

    /* 恢復 960px 的影片原始位置，因為縮放變小已經不會重疊 */
    .image-to-video-media .ai-video {
        left: calc(500px * var(--scale));
    }

    /* 隱藏斷點下的換行，讓句子呈現同一句且沒有空格/空行 */
    .ai-feature-description br {
        display: none;
    }

    .section-description {
        max-width: 600px;
        margin: 0 auto var(--spacing-2xl);
    }

    .hero {
        align-items: center;
        height: auto;
        min-height: 600px;
    }

    .hero-bg {
        object-position: left center;
    }

    .hero-content {
        max-width: 700px;
        padding-left: 0;
        text-align: center;
        padding-top: var(--nav-height);
    }

    .hero-description {
        margin: 0 auto;
    }

    .hero-brand {
        justify-content: center;
    }

    /* 服務區塊卡片改為單欄堆疊 */
    .feature-row {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
        /* 左右改用對稱 padding 以確保置中 */
        padding: calc(48px * var(--scale)) calc(36px * var(--scale));
    }

    .feature-row.reverse {
        direction: ltr;
        padding: calc(48px * var(--scale)) calc(36px * var(--scale));
    }

    .feature-image {
        order: -1;
        display: flex;
        justify-content: center;
        width: 100%;
        height: auto;
    }

    .feature-image img {
        width: 100%;
        max-width: 500px;
        height: auto;
    }

    .feature-content {
        align-items: center;
        width: 100%;
        gap: var(--spacing-sm);
    }

    .feature-description {
        margin: 0 auto;
        text-align: center;
        max-width: 600px;
    }

    /* AI Feature Block 垂直堆疊 */
    .ai-feature-block {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }

    .ai-feature-block.reverse {
        direction: ltr;
    }

    .ai-feature-media {
        display: flex;
        justify-content: center;
        width: 100%;
        height: auto;
    }

    .ai-feature-media img {
        width: 100%;
        height: auto;
        max-width: 500px;
    }

    .ai-feature-content {
        align-items: center;
        width: 100%;
        max-width: 100%;
        text-align: center;
    }

    .section-badge {
        padding: 6px 16px !important;
    }

    .ai-feature-block .prompt-overlay {
        position: relative;
        grid-column: 1 / -1;
        width: 100%;
        max-width: 500px;
        left: auto;
        bottom: auto;
        /* 微調負邊距：-2xl 會重疊，-lg 稍近，0 太遠，所以抓中間值 -md 來達到視覺完美的間距 */
        margin: calc(-1 * var(--spacing-md)) auto 0;
    }

    .ai-feature-block .prompt-box {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: var(--spacing-md);
        padding: calc(20px * var(--scale)) calc(24px * var(--scale));
        min-height: auto;
        text-align: left;
    }

    .ai-feature-block .prompt-badge {
        position: static;
        flex-shrink: 0;
    }

    /* Allow block to grow for stacked content */
    .image-to-video-block {
        height: auto;
        margin-bottom: 0;
    }

    /* Make media container relative so it takes space in flow */
    .image-to-video-block .image-to-video-media {
        position: relative;
        width: 100%;
        max-width: 500px;
        height: auto;
        aspect-ratio: 1080 / 400;
        margin: 0 auto;
        top: auto;
        left: auto;
    }

    .image-to-video-media .source-image {
        width: 40.74%;
        height: auto;
    }

    .image-to-video-media .ai-video {
        width: 53.7%;
        height: auto;
        left: 46.3%;
    }

    /* Position title at the top center */
    .image-to-video-block .ai-feature-content {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        text-align: center;
        width: 100%;
        margin-top: 0;
        /* Increase gap to match section subtitle spacing */
        margin-bottom: var(--spacing-3xl);
    }

    /* Position prompt box below media */
    .image-to-video-block .prompt-box {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        width: 100%;
        max-width: 500px;
        grid-column: 1 / -1;
        margin: var(--spacing-sm) auto 0;
        background: linear-gradient(270deg, #0e1f2e 50%, rgba(14, 31, 46, 0.5));
    }
}

/* ============================================
   響應式設計 - 768px (Mobile Layout Shift & 平板／手機過渡)
   ============================================ */
@media (max-width: 768px) {
    :root {
        --scale: 0.48;
        --nav-height: 64px;
    }

    /* .comparison-header and children overrides removed to maintain desktop layout */

    .comparison-cards {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .comparison-card {
        width: 100%;
        height: auto;
        aspect-ratio: 411 / 333;
    }

    .screen-demo-grid {
        grid-template-columns: 1fr;
    }

    /* Hero 手機版 */
    /* Hero 手機版 */
    .hero {
        min-height: 400px;
        max-height: 600px;
        height: auto;
        align-items: center;
    }

    .hero-bg {
        object-position: left center;
    }

    .hero-content {
        max-width: 90%;
        margin: 0 auto;
        padding: 100px 20px 40px;
        text-align: center;
    }

    .hero-title {
    }

    .hero-description {
    }

    .hero-brand {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--spacing-sm);
        margin-top: 40px;
    }

    .hero-brand-icon {
        width: 100px;
    }

    /* 簡介區塊 手機版 */
    .cms-header-section {
        padding: var(--spacing-3xl) var(--container-padding) 0;
        max-width: 100%;
    }

    /* 服務區塊 手機版 */
    .feature-row, .ai-feature-block {
        max-width: 100%;
        padding: var(--spacing-xl);
        border-radius: var(--radius-md);
    }


    .feature-image img {
        max-width: 100%;
    }

    /* .eyeboom-cards overrides removed */

    .card-icon {
        width: calc(100px * var(--scale));
        height: calc(100px * var(--scale));
    }

    .card-icon img {
        width: calc(65px * var(--scale));
        height: calc(65px * var(--scale));
    }

    .card-label {
        font-size: var(--font-4xl);
    }
}

/* ============================================
   響應式設計 - 653px（自訂斷點，Comparison Header Scaling）
   ============================================ */
@media (max-width: 653px) {

    .comparison-left-img,
    .comparison-farbar-logo {
        /* 限制最大寬度並允許等比縮放，以維持版面比例 */
        width: auto;
        flex: 1;
        /* 限制最大寬度以維持形狀，並允許縮放 */
        max-width: calc(50% - 20px);
        /* 扣掉 20px，替中間的 VS 留出間隔 */
    }

    .comparison-header {
        gap: 8px;
    }

    .comparison-vs {
        /* VS 字級稍微縮小以配合區塊 */
        font-size: round(nearest, calc(50px * var(--scale)), 2px);
    }
}

/* ============================================
   響應式設計 - 600px（手機版）
   ============================================ */
@media (max-width: 600px) {
    :root {
        --scale: 0.55;
        --nav-height: 56px;
    }

    .hero {
        min-height: 380px;
    }

    .hero-content {
        padding-top: 80px;
    }

    .hero-title {
    }

    .hero-description {
    }


    /* 服務區塊 手機版 */
    .feature-row, .ai-feature-block {
        padding: var(--spacing-lg) var(--spacing-md);
        border-radius: var(--radius-sm);
    }

    .section-description {
        text-align: center;
    }

    .comparison-description {
        text-align: center;
    }

    /* .eyeboom-cards overrides removed */

    /* .eyeboom-cards overrides removed, card icons now scale proportionally between 600px and 480px */

    /* Image to Video Media Scaling (copied from 480px) */
    .image-to-video-block .image-to-video-media {
        width: 100%;
        height: auto;
        aspect-ratio: 1080 / 400;
        margin: 0 auto;
    }

    .image-to-video-media .source-image {
        width: 40.74%;
        /* 440/1080 */
        height: auto;
    }

    .image-to-video-media .ai-video {
        width: 53.7%;
        /* 580/1080 */
        height: auto;
        left: 46.3%;
        /* 500/1080 */
    }
}

/* ============================================
   響應式設計 - 600px（垂直堆疊 EyEBooM 卡片）
   ============================================ */
@media (max-width: 600px) {
    .eyeboom-cards {
        grid-template-columns: max-content;
        justify-content: center;
        margin: 0 auto;
        gap: var(--spacing-xl);
    }

    .eyeboom-card {
        justify-content: flex-start;
        padding-left: 0;
    }

    .card-icon {
        width: 72px;
        height: 72px;
    }

    .card-icon img {
        width: 64px;
        height: 64px;
    }

    .card-title {
    }
}

/* ============================================
   響應式設計 - 480px（小尺寸手機）
   ============================================ */
@media (max-width: 480px) {


    /* AI Feature Block */
    .ai-feature-title {
    }

    .ai-feature-description {
        order: 3;
    }

    /* Reorder Layout: Title -> Image -> Description */
    .ai-feature-block {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .ai-feature-content {
        display: contents;
        /* Unwrap content to reorder children */
    }

    .ai-feature-title {
        order: 1;
        margin-bottom: 0;
    }

    .ai-feature-media {
        order: 2;
        width: 100%;
        margin: var(--spacing-sm) 0;
    }

    .ai-feature-media img {
        width: 100%;
        height: auto;
    }

    /* Prompt Box */
    .ai-feature-block .prompt-box {
        padding: var(--spacing-md);
        order: 4;
        position: relative;
        /* Ensure it flows in flex container */
        top: auto;
        left: auto;
        right: auto;
        transform: none;
        margin-top: var(--spacing-md);
        
        /* 垂直堆疊：左右並排改為上下排列 */
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .ai-feature-block .prompt-badge {
        position: static;
        align-self: flex-end; /* 靠右對齊，若要靠左可改為 flex-start */
    }

    /* Adjust spacing for Image-to-Video block to match others */
    .image-to-video-block .ai-feature-content {
        margin-bottom: 0;
    }

    .image-to-video-block .prompt-box {
        margin-top: var(--spacing-md);
    }

    .prompt-text {
        width: 100%;
        -webkit-line-clamp: unset;
        line-clamp: unset;
    }

    /* Adjust spacing for AI Generation Section to match EyEBooM/CMS spacing */
    .ai-generation-section {
        padding-top: var(--spacing-3xl);
        padding-bottom: var(--spacing-3xl);
        /* Ensure consistent bottom spacing */
    }

    .image-to-video-block {
        margin-bottom: 0;
        /* Remove extra margin from last block */
    }



    /* Image to Video Media Scaling */
    /* Image to Video Media Scaling */
    .image-to-video-block .image-to-video-media {
        width: 100%;
        height: auto;
        aspect-ratio: 1080 / 400;
        margin: 0 auto;
    }

    .image-to-video-media .source-image {
        width: 40.74%;
        /* 440/1080 */
        height: auto;
    }

    .image-to-video-media .ai-video {
        width: 53.7%;
        /* 580/1080 */
        height: auto;
        left: 46.3%;
        /* 500/1080 */
    }

    /* 比較區圖片 */
    .comparison-header {
        flex-direction: column;
        gap: 0;
    }

    .comparison-left-img,
    .comparison-farbar-logo {
        width: 100%;
        max-width: 300px;
        flex: none;
        margin: 0 auto;
    }

    .comparison-vs {
        margin: 1px 0;
    }

    .comparison-cards {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
        gap: var(--spacing-md);
    }

    .comparison-card {
        width: 100%;
        height: auto;
        aspect-ratio: 411 / 333;
    }

    .comparison-title {
    }

    .card-label {
    }

    .comparison-description {
    }

    /* Feature Row */
    /* Feature Row */
    .feature-label {
        /* Main Title */
    }

    .feature-title {
        /* Subtitle */
    }

    .feature-title {
        /* Subtitle */
    }

    .feature-description {
    }
}




/* ============================================
   動畫定義
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================
   響應式設計 - 375px（小尺寸手機）
   ============================================ */
@media (max-width: 375px) {
    .hero-title {
    }

    .hero-description {
    }
}

/* 滾動時顯示的動畫 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   輔助類別
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 高對比度模式 */
@media (prefers-contrast: high) {
    .section-badge {
        border-width: 2px;
    }

    .feature-label {
        border-width: 2px;
    }
}

/* 減少動態偏好 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   軟體功能區
   ============================================ */
.sw-region {
    max-width: calc(1360px * var(--scale));
    margin: 0 auto;
    padding: 0 var(--container-padding) calc(40px * var(--scale));
}
.sw-highlights {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: calc(40px * var(--scale));
    list-style: none;
    padding: 0;
    margin: 0 0 calc(64px * var(--scale));
}
.sw-highlights li {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: calc(28px * var(--scale));
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}
.sw-highlights .card-icon {
    width: calc(72px * var(--scale));
    height: calc(72px * var(--scale));
    border-radius: calc(13px * var(--scale));
    background-color: rgba(31, 200, 171, 0.05);
    border: 2px solid var(--primary-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sw-highlights .card-icon svg {
    width: calc(40px * var(--scale));
    height: calc(40px * var(--scale));
    stroke: var(--primary-teal);
}
.sw-highlights .card-title {
    font-size: var(--font-xl);
    font-weight: 700;
    color: #1f2440;
    line-height: 1.2;
}
.sw-category { margin-bottom: calc(48px * var(--scale)); }
.sw-category-title {
    font-size: var(--font-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}
.sw-card {
    display: flex;
    flex-direction: column;
    gap: calc(12px * var(--scale));
    padding: calc(24px * var(--scale));
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.sw-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}
.sw-card h4 { font-size: var(--font-2xl); font-weight: 700; color: #1f2440; margin: 0; }
.sw-card p { font-size: var(--font-lg); line-height: 1.6; color: var(--text-muted); margin: 0; }
.sw-card a { margin-top: auto; font-size: var(--font-lg); color: var(--primary-teal); text-decoration: none; font-weight: 600; }
.sw-card a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.sw-icon { width: calc(40px * var(--scale)); height: calc(40px * var(--scale)); stroke: var(--primary-teal); }
.sw-card-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: calc(8px * var(--scale)); display: block; }
@media (max-width: 1024px) { .sw-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .sw-grid { grid-template-columns: 1fr; } }

/* ============================================
   客戶案例區塊
   ============================================ */
.clients-section {
    padding: var(--spacing-4xl) var(--container-padding) calc(160px * var(--scale));
    background-color: #fff;
    color: #000;
}

.section-title {
    font-size: var(--font-4xl);
    font-weight: 500;
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    font-size: var(--font-xl);
    line-height: 1.6;
    color: var(--text-muted);
    text-align: center;
    max-width: calc(700px * var(--scale));
    margin: 0 auto var(--spacing-4xl);
}

/* 案例網格 - 對齊 farbarAi.html 設計稿 */
.case-grid {
    display: grid;
    /* 基準設計: 3 欄，每欄 410px */
    /* 基準設計: 3 欄，每欄 410px */
    grid-template-columns: repeat(3, calc(410px * var(--scale)));
    gap: calc(32px * var(--scale));
    /* 置中對齊，對應原始設計的 left: 313px */
    max-width: calc((410px * 3 + 32px * 2) * var(--scale));
    margin: 0 auto;
    justify-content: center;
}

.case-item {
    width: calc(410px * var(--scale));
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

/* API 渲染出來的卡片是 <a>（連到案例詳情頁），靜態備援則仍是不可點的 <div>——
   所以連結的預設底線／藍字與 pointer 游標只掛在 <a> 上，不會讓備援卡看起來可點。 */
a.case-item {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* 鍵盤 Tab 到卡片時要看得出焦點在哪；滑鼠點擊不會顯示（:focus-visible 的差別）。 */
a.case-item:focus-visible {
    outline: 3px solid var(--primary-teal);
    outline-offset: 3px;
}

.case-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.case-item img {
    width: 100%;
    aspect-ratio: 800 / 450;
    object-fit: cover; /* 讓不同比例照片填滿圖片區 */
    background-color: #f5f5f5;
    transition: transform var(--transition-normal);
}

.case-item:hover img {
    /* 如果要圖片放大特效可保留，但卡片整體風格常不動圖 */
    transform: scale(1.03);
}

/* 
 * 改為白底卡片下半部的文字區 
 */
.case-caption {
    padding: calc(24px * var(--scale)) calc(20px * var(--scale));
    display: flex;
    flex-direction: column;
    gap: calc(8px * var(--scale));
}

.case-client {
    font-size: var(--font-lg);
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.4;
    margin: 0;
}

.case-device {
    font-size: var(--font-sm);
    font-weight: 400;
    color: #666666;
    line-height: 1.4;
    margin: 0;
}

.case-meta {
    font-size: 13px;
    color: #999999;
    margin-top: calc(8px * var(--scale));
    line-height: 1.2;
}

/* 滑動指示點 - 桌面版預設隱藏 */
.case-slider-dots {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 0;
}

.case-slider-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ccc;
    transition: all 0.3s ease;
    cursor: pointer;
}

.case-slider-dots .dot.active {
    width: 24px;
    border-radius: 4px;
    background-color: var(--primary-teal);
}


/* ============================================
   補充：成功案例 (.case-grid) RWD 響應式設定
   確保與首頁 (farbarAi.css) 一致
   ============================================ */

@media (max-width: 960px) {
    .case-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .case-item {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .case-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 0 20px;
        max-width: 100%;
    }
    .case-item {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .case-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 20px;
        margin: 0;
        width: 100%;
        max-width: 100%;
        overflow-x: visible;
    }
    .case-item {
        width: 100%;
        margin: 0;
    }
    .case-slider-dots {
        display: none !important;
    }
}
