/* 全局样式 */
:root {
    --primary-color: #1e3a8a; /* 深藍色 - 專業、技術 */
    --secondary-color: #64748b; /* 灰藍色 - 穩重 */
    --success-color: #059669; /* 深綠色 - 安全、成功 */
    --ai-accent-color: #3b82f6; /* 亮藍色 - AI科技感 */
    --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #3730a3 50%, #1e40af 100%); /* 深藍漸變 */
    --gradient-secondary: linear-gradient(135deg, #64748b 0%, #475569 50%, #334155 100%); /* 灰藍漸變 */
    --gradient-ai: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%); /* AI藍色漸變 */
    --shadow-soft: 0 10px 30px rgba(30, 58, 138, 0.1);
    --shadow-medium: 0 15px 35px rgba(30, 58, 138, 0.15);
    --shadow-strong: 0 20px 40px rgba(30, 58, 138, 0.2);
}

/* 無障礙功能樣式 */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.visually-hidden-focusable:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: inherit !important;
    margin: inherit !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

body {
    font-family: 'Microsoft JhengHei', Arial, sans-serif;
    padding-top: 76px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%); /* 專業灰白漸變 */
    min-height: 100vh;
}

/* 導航欄專業樣式 */
.navbar.bg-dark {
    background: var(--gradient-primary) !important; /* 使用深藍漸變 */
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* Logo樣式 */
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-ai);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: logo-shine 3s infinite;
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1px;
}

@keyframes logo-shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

/* Hero区域样式 */
.hero-section {
    min-height: 70vh; /* 調整為視窗高度的70% */
    max-height: 600px; /* 設定最大高度 */
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 80px 0; /* 增加上下內邊距 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Hero區域帶有 Banner 背景 */
.hero-banner-top {
    background-image: url('/img/banner.jpg');
    background-position: center top;
    background-size: cover;
}

.hero-banner-bottom {
    background-image: url('/img/banner.jpg');
    background-position: center bottom;
    background-size: cover;
}

/* 如果沒有 banner 背景，使用漸變背景 */
.hero-section:not(.hero-banner-top):not(.hero-banner-bottom) {
    background: var(--gradient-primary);
}

/* 只有在沒有 banner 背景時才顯示漸變覆蓋層 */
.hero-section:not(.hero-banner-top):not(.hero-banner-bottom)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
    animation: hero-bg 20s ease infinite;
}

/* 有 banner 背景時，添加半透明遮罩以確保文字可讀性 */
.hero-banner-top::before,
.hero-banner-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4)); /* 漸變遮罩，上方較淡 */
    z-index: 1;
}

@keyframes hero-bg {
    0%, 100% { transform: translateX(0) translateY(0); }
    33% { transform: translateX(30px) translateY(-30px); }
    66% { transform: translateX(-20px) translateY(20px); }
}

.ai-text-animation {
    background: linear-gradient(120deg, #ffffff, #f0f8ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 8s ease infinite;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-section h1,
.hero-section p {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2; /* 確保文字在遮罩層之上 */
}

.hero-section .container {
    position: relative;
    z-index: 2; /* 確保內容在遮罩層之上 */
}

.hero-section .btn {
    box-shadow: var(--shadow-medium);
    border: none;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.hero-section .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

/* AI助手图标样式 */
.ai-assistant-icon {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    min-width: 48px; /* 移動端最小觸控目標 */
    min-height: 48px; /* 移動端最小觸控目標 */
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    z-index: 1051; /* 確保高於聊天容器和導航欄 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-assistant-icon:hover {
    transform: scale(1.1);
}

/* AI圖標樣式 */
.ai-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-brain {
    width: 30px;
    height: 30px;
    background: var(--gradient-ai);
    border-radius: 50%;
    position: relative;
    animation: ai-pulse 2s infinite;
}

.ai-brain::before {
    content: '🧠';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    filter: grayscale(1) brightness(0) invert(1);
}

.ai-pulse {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 2px solid var(--ai-accent-color);
    border-radius: 50%;
    animation: ai-pulse-ring 2s infinite;
    opacity: 0;
}

@keyframes ai-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes ai-pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* 聊天容器样式 */
.chat-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 1050; /* 確保高於Bootstrap導航欄的z-index */
}

.chat-header {
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 關閉按鈕樣式 */
#close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    z-index: 1052; /* 確保在最高層 */
    position: relative;
}

#close-chat:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#close-chat:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8fafc; /* 淺灰背景提高可讀性 */
}

/* 聊天消息樣式 */
.chat-message {
    margin-bottom: 15px;
    position: relative;
}

.message-content {
    position: relative;
    max-width: 80%;
    word-wrap: break-word;
    color: #1e293b; /* 深色文字確保可讀性 */
}

/* 確保消息按鈕不重疊 */
.message-content::after {
    content: '';
    clear: both;
    display: table;
}

/* 消息操作按鈕容器 */
.message-actions {
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chat-message:hover .message-actions {
    opacity: 1;
}

/* 消息操作按鈕 */
.message-action-btn {
    width: 30px;
    height: 30px;
    min-width: 44px; /* 移動端最小觸控目標 */
    min-height: 44px; /* 移動端最小觸控目標 */
    border: none;
    border-radius: 50%;
    background: #f8f9fa;
    color: #6c757d;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.message-action-btn:hover {
    background: #007bff;
    color: white;
    transform: scale(1.1);
}

/* 複製按鈕 */
.copy-btn {
    background: #e9ecef;
}

.copy-btn:hover {
    background: #28a745;
}

/* 語言切換按鈕 */
.language-btn {
    background: #ffc107;
    color: #212529;
}

.language-btn:hover {
    background: #fd7e14;
    color: white;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    outline: none;
    color: #1e293b; /* 深色文字 */
    background-color: #ffffff;
    font-size: 16px; /* 防止iOS自動縮放 */
    min-height: 44px; /* 移動端最小觸控目標 */
}

.chat-input input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

.chat-input input::placeholder {
    color: #64748b; /* 更深的灰色 */
}

.chat-input button {
    padding: 8px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    min-width: 60px; /* 移動端最小寬度 */
    min-height: 44px; /* 移動端最小觸控目標 */
    font-size: 16px; /* 防止iOS自動縮放 */
}


/* AI動畫容器增強 */
.ai-animation-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-animation-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: var(--gradient-ai);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ai-float 6s ease-in-out infinite;
    opacity: 0.8;
}

.ai-animation-container::after {
    content: '🤖';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    animation: ai-bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

@keyframes ai-float {
    0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    50% { transform: translate(-50%, -50%) scale(1.1) rotate(180deg); }
}

@keyframes ai-bounce {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-20px); }
}

/* 特性卡片样式 */
.feature-card {
    padding: 30px;
    text-align: center;
    background: rgba(255, 255, 255, 0.98); /* 提高背景不透明度 */
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    color: #1e293b; /* 深色文字確保可讀性 */
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-strong);
}

.feature-card i {
    font-size: 3rem;
    background: var(--gradient-ai);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    display: block;
    animation: icon-pulse 3s ease-in-out infinite;
}

.feature-card h3 {
    color: #1e293b; /* 深色標題 */
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.feature-card p {
    color: #475569; /* 深灰色文字 */
    line-height: 1.6;
    font-size: 1rem;
}

@keyframes icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 關於我們頁面樣式 */
.company-info-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 123, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: rgba(0, 123, 255, 0.1);
    transform: translateX(5px);
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.info-item div {
    flex: 1;
}

.info-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.info-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.info-item a:hover {
    text-decoration: underline;
}

/* 企業理念卡片 */
.philosophy-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    height: 100%;
}

.philosophy-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

.philosophy-card i {
    font-size: 3rem;
    background: var(--gradient-ai);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    display: block;
}

.philosophy-card h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

/* 技能卡片 */
.skill-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    height: 100%;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.skill-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}

.skill-card h5 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.skill-card p {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.skill-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.skill-progress {
    background: var(--gradient-ai);
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
    animation: skill-fill 2s ease-out;
}

@keyframes skill-fill {
    from { width: 0%; }
}

.skill-card small {
    color: #666;
    font-weight: 500;
}

/* 服務項目頁面樣式 */
.service-card {
    background: rgba(255, 255, 255, 0.98); /* 提高背景不透明度 */
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    color: #1e293b; /* 深色文字確保可讀性 */
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

.service-card h3 {
    color: #1e293b; /* 深色標題 */
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.service-card p {
    color: #475569; /* 深灰色文字 */
    line-height: 1.6;
    font-size: 1rem;
    flex-grow: 1;
}

.service-icon {
    text-align: center;
    margin-bottom: 20px;
}

.service-icon i {
    font-size: 4rem;
    background: var(--gradient-ai);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.service-content h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.service-desc {
    color: #666;
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.service-features li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 123, 255, 0.1);
    position: relative;
    padding-left: 25px;
}

.service-features li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.service-features li:last-child {
    border-bottom: none;
}

/* 產業卡片樣式 */
.industry-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    height: 100%;
}

.industry-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

.industry-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: block;
}

.industry-card h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.industry-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.industry-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 123, 255, 0.1);
}

.stat-item {
    background: var(--gradient-ai);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    font-size: 0.9rem;
}

/* 優勢卡片樣式 */
.advantage-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    height: 100%;
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.advantage-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}

.advantage-card h5 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.advantage-card p {
    color: #666;
    line-height: 1.6;
}

/* 案例卡片樣式 */
.case-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    height: 100%;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.case-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 123, 255, 0.1);
}

.case-header i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 15px;
}

.case-header h5 {
    color: var(--primary-color);
    margin: 0;
    font-weight: 600;
}

.case-content p {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6;
}

.case-metrics {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 123, 255, 0.1);
}

.metric {
    background: var(--gradient-ai);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
}

/* 客戶見證區塊樣式 */
.testimonials-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.testimonials-section h2 {
    color: #1e293b;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.testimonial-card {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 120px;
    color: rgba(59, 130, 246, 0.1);
    font-family: Georgia, serif;
    line-height: 1;
    z-index: 0;
}

.testimonial-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.testimonial-content {
    position: relative;
    z-index: 1;
    flex-grow: 1;
    margin-bottom: 25px;
}

.testimonial-content p {
    color: #334155;
    font-size: 1.1rem;
    line-height: 1.8;
    font-style: italic;
    margin: 0;
    position: relative;
    padding-left: 20px;
}

.testimonial-content p::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-ai);
    border-radius: 2px;
}

.testimonial-author {
    position: relative;
    z-index: 1;
    padding-top: 20px;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.testimonial-author h5 {
    color: #1e293b;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.testimonial-author span {
    color: #64748b;
    font-size: 0.95rem;
}

/* 為什麼選擇我們區塊樣式 */
.why-choose-section {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    position: relative;
    overflow: hidden;
}

.why-choose-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.why-choose-section h2 {
    color: #1e293b;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.choose-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.choose-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.choose-card:hover::before {
    opacity: 1;
}

.choose-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.choose-card i {
    font-size: 3.5rem;
    background: var(--gradient-ai);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 25px;
    display: block;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.choose-card:hover i {
    transform: scale(1.2) rotate(5deg);
}

.choose-card h4 {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.choose-card p {
    color: #64748b;
    line-height: 1.7;
    font-size: 1rem;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* 聯絡我們頁面樣式 */
.contact-info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(0, 123, 255, 0.05);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(0, 123, 255, 0.1);
    transform: translateX(5px);
}

.contact-item i {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-right: 20px;
    margin-top: 5px;
    width: 30px;
    text-align: center;
}

.contact-item h5 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1.1rem;
}

.contact-item p {
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--ai-accent-color);
    text-decoration: underline;
}

.contact-form-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.contact-form h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-weight: 600;
}

.form-control {
    border: 2px solid rgba(0, 123, 255, 0.1);
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background: white;
}

.form-control::placeholder {
    color: #64748b; /* 更深的灰色提高可讀性 */
}

.form-control {
    color: #1e293b; /* 深色文字 */
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    min-height: 44px; /* 移動端最小觸控目標 */
}

.form-control:focus {
    color: #1e293b;
    background-color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

.btn-primary {
    background: var(--gradient-primary); /* 使用深藍漸變 */
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    min-height: 44px; /* 移動端最小觸控目標 */
    min-width: 44px; /* 移動端最小觸控目標 */
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #2563eb 100%); /* 懸停時更亮的藍色 */
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.btn-primary:disabled {
    opacity: 0.7;
    transform: none;
    cursor: not-allowed;
}

/* 技術支援卡片 */
.support-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    height: 100%;
}

.support-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

.support-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: block;
}

.support-card h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.support-card p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* AI諮詢服務樣式 */
.ai-features {
    margin-top: 40px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

.feature-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: block;
}

.feature-item h5 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.feature-item p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* 聯絡資訊網格樣式 */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.contact-info-grid .contact-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.contact-info-grid .contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

/* 聯絡連結樣式 */
.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(30, 58, 138, 0.1); /* 深藍色背景 */
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-height: 44px; /* 確保觸控目標足夠大 */
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.contact-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    text-decoration: none;
}

.contact-link:active {
    transform: translateY(0);
    box-shadow: var(--shadow-soft);
}

/* 電話連結特殊樣式 */
.contact-link[href^="tel:"] {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.contact-link[href^="tel:"]:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

/* 郵件連結特殊樣式 */
.contact-link[href^="mailto:"] {
    background: linear-gradient(135deg, #fd7e14, #ffc107);
    color: white;
    font-size: 1rem;
    font-weight: 600;
}

.contact-link[href^="mailto:"]:hover {
    background: linear-gradient(135deg, #e8650e, #e0a800);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(253, 126, 20, 0.3);
}

/* 地圖連結特殊樣式 */
.contact-link[href*="maps.google.com"] {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
    color: white;
    font-size: 1rem;
    font-weight: 600;
}

.contact-link[href*="maps.google.com"]:hover {
    background: linear-gradient(135deg, #c82333, #d63384);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

/* 手機端優化 */
@media (max-width: 768px) {
    .contact-link {
        min-height: 48px; /* 手機上更大的觸控目標 */
        font-size: 1.1rem;
        padding: 12px 16px;
        width: 100%;
        margin: 5px 0;
    }
    
    .contact-link[href^="tel:"] {
        font-size: 1.3rem;
        font-weight: 800;
        letter-spacing: 1px;
    }
    
    .contact-link[href^="mailto:"] {
        font-size: 1.1rem;
    }
    
    .info-item {
        text-align: center;
    }
    
    .info-item div {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .info-item strong {
        font-size: 1.1rem;
    }
    
    /* 手機觸控反饋 */
    .contact-link:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    /* 確保連結在手機上易於點擊 */
    .contact-link {
        -webkit-tap-highlight-color: rgba(0, 123, 255, 0.3);
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
}

/* 动画效果 */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 頁尾樣式增強 */
.footer {
    background: var(--gradient-primary) !important;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.footer .container {
    position: relative;
    z-index: 1;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .top-banner-section,
    .bottom-banner-section {
        height: 40vh;
        min-height: 300px;
        max-height: 500px;
        background-attachment: scroll; /* 手機上不使用 fixed，避免性能問題 */
    }
    
    .chat-container {
        width: 100%;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    .ai-assistant-icon {
        bottom: 88px;
        right: 20px;
        width: 64px; /* 移動端更大的觸控目標 */
        height: 64px;
        min-width: 64px;
        min-height: 64px;
    }
    
    .hero-section {
        min-height: 60vh; /* 手機端調整為60% */
        max-height: 500px; /* 手機端最大高度 */
        padding: 60px 0; /* 手機端內邊距 */
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .ai-animation-container {
        height: 300px;
    }
    
    .ai-animation-container::after {
        font-size: 60px;
    }
    
    /* 移動端按鈕和觸控目標優化 */
    .message-action-btn {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
    
    .chat-input {
        padding: 12px;
        gap: 12px;
    }
    
    .chat-input input {
        padding: 12px 16px;
        font-size: 16px; /* 防止iOS自動縮放 */
    }
    
    .chat-input button {
        padding: 12px 24px;
        font-size: 16px;
        min-width: 80px;
    }
    
    /* 確保所有按鈕都有足夠的觸控目標 */
    button, .btn, a.btn {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
        font-size: 16px; /* 防止iOS自動縮放 */
    }
    
    /* 導航連結優化 */
    .nav-link {
        min-height: 44px;
        padding: 12px 16px;
        display: flex;
        align-items: center;
    }
    
    /* 選項按鈕移動端優化 */
    .option-btn {
        min-height: 60px !important;
        padding: 16px !important;
        font-size: 16px !important;
    }
    
    /* 確保文字大小在移動端足夠大 */
    body {
        font-size: 16px; /* 防止iOS自動縮放 */
    }
    
    /* 表單輸入框優化 */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px !important; /* 防止iOS自動縮放 */
        min-height: 44px;
        padding: 12px 16px;
    }
}

/* 選項按鈕樣式 */
.options-container {
    margin-top: 15px;
    padding: 15px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.options-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.option-btn {
    background: white !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    text-align: left !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    position: relative;
    overflow: hidden;
}

.option-btn:hover {
    border-color: var(--ai-accent-color) !important;
    background: rgba(59, 130, 246, 0.05) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15) !important;
}

.option-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2) !important;
}

.option-title {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
    margin-bottom: 6px;
    line-height: 1.3;
}

.option-description {
    font-size: 12px;
    color: var(--secondary-color);
    line-height: 1.4;
    margin: 0;
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.option-btn:hover::before {
    left: 100%;
}

/* 選項按鈕動畫 */
@keyframes optionPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.option-btn:focus {
    animation: optionPulse 0.3s ease;
}

/* 響應式選項網格 */
@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .option-btn {
        padding: 16px !important;
        min-height: 60px !important;
        font-size: 16px !important;
    }
    
    .option-title {
        font-size: 16px;
    }
    
    .option-description {
        font-size: 14px;
    }
}