/* 主要樣式檔案 - SEO 優化版本 */

/* 全域變數 */
:root {
    --primary-color: #2C3E50;
    --secondary-color: #34495E;
    --accent-color: #E67E22;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --shadow-soft: 0 4px 20px rgba(44, 62, 80, 0.08);
    --shadow-medium: 0 8px 30px rgba(44, 62, 80, 0.12);
    --gradient-primary: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    --gradient-accent: linear-gradient(135deg, #E67E22 0%, #D35400 100%);
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --gray-light-color: #f8f9fa;
    --gray-dark-color: #343a40;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

/* Core Web Vitals 優化 */
/* 防止 CLS (Cumulative Layout Shift) */
img, video, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 為圖片容器設定固定尺寸 */
.product-image-container,
.case-image-container,
.blog-image-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.product-image,
.case-image,
.blog-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* 載入動畫優化 */
.loading-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-animation.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 關鍵渲染路徑優化 */
.hero-section,
.page-header {
    contain: layout style paint;
}

/* 字體優化 */
@font-face {
    font-family: 'Playfair Display';
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    font-display: swap;
}

/* 主要服務卡片樣式 */
.service-card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-image {
    width: 100%;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.3s ease;
}

.service-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.service-card:hover .service-image::before {
    left: 100%;
}

.service-card:hover .service-image {
    transform: scale(1.05);
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-content {
    text-align: center;
}

.service-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    line-height: 1.4;
}

.service-description {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* 服務流程樣式 */
.process-timeline {
    position: relative;
}

.process-step {
    text-align: center;
    position: relative;
    padding: 2rem 1rem;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.process-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.process-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.process-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem auto 1.5rem;
    color: white;
    font-size: 1.8rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.process-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.process-step:hover .process-icon::before {
    left: 100%;
}

.process-icon i {
    position: relative;
    z-index: 2;
}

.process-step:hover .process-icon {
    transform: scale(1.1);
}

.process-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.process-description {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* 桌面版連接線效果 */
@media (min-width: 992px) {
    .process-timeline::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
        transform: translateY(-50%);
        z-index: 1;
    }
    
    .process-step {
        z-index: 2;
    }
}

/* 手機版優化 */
@media (max-width: 768px) {
    .service-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .service-image {
        height: 150px;
        margin-bottom: 1rem;
    }
    
    .service-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .service-description {
        font-size: 0.9rem;
    }
    
    .process-step {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .process-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        top: -12px;
    }
    
    .process-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin: 1rem auto 1rem;
    }
    
    .process-title {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }
    
    .process-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .service-card {
        padding: 1.25rem;
    }
    
    .service-image {
        height: 120px;
    }
    
    .service-title {
        font-size: 1rem;
    }
    
    .service-description {
        font-size: 0.85rem;
    }
    
    .process-step {
        padding: 1.25rem 0.75rem;
    }
    
    .process-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .process-title {
        font-size: 1.1rem;
    }
    
    .process-description {
        font-size: 0.85rem;
    }
}

/* 覆蓋Bootstrap的primary顏色 */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
}

/* Blog分類按鈕active狀態 */
#blogFilters .btn-outline-primary.active {
    background-color: rgb(33, 37, 41) !important;
    border-color: rgb(33, 37, 41) !important;
    color: white !important;
}

#blogFilters .btn-outline-primary.active:hover {
    background-color: rgb(52, 58, 64) !important;
    border-color: rgb(52, 58, 64) !important;
    color: white !important;
}

/* 實際案例分類按鈕active狀態 */
#caseFilters .btn-outline-primary.active {
    background-color: rgb(33, 37, 41) !important;
    border-color: rgb(33, 37, 41) !important;
    color: white !important;
}

#caseFilters .btn-outline-primary.active:hover {
    background-color: rgb(52, 58, 64) !important;
    border-color: rgb(52, 58, 64) !important;
    color: white !important;
}

/* 產品分類按鈕active狀態 */
#categoryFilters .btn-outline-primary.active {
    background-color: rgb(33, 37, 41) !important;
    border-color: rgb(33, 37, 41) !important;
    color: white !important;
}

#categoryFilters .btn-outline-primary.active:hover {
    background-color: rgb(52, 58, 64) !important;
    border-color: rgb(52, 58, 64) !important;
    color: white !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* 全域樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
    overflow-x: hidden;
}

main {
    position: relative;
    z-index: 1;
}

/* 導航欄樣式 */
.navbar {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #E9ECEF;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    z-index: 1050; /* Ensure navbar is always on top */
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
    font-size: 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
}

.navbar-brand::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.navbar-brand:hover::after {
    width: 100%;
}

/* 導航欄 Logo 樣式 */
.navbar-logo {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.navbar.scrolled .navbar-logo {
    height: 35px;
}

@media (max-width: 768px) {
    .navbar-logo {
        height: 35px;
        max-width: 150px;
    }
    
    .navbar.scrolled .navbar-logo {
        height: 30px;
    }
}

@media (max-width: 480px) {
    .navbar-logo {
        height: 30px;
        max-width: 120px;
    }
    
    .navbar.scrolled .navbar-logo {
        height: 25px;
    }
}

.navbar-nav .nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.navbar-nav .nav-link.active::before {
    width: 100%;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
    transform: translateY(-1px);
}

/* 頁面標頭 */
.page-header {
    padding-top: 120px;
    padding-bottom: 60px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    position: relative;
    overflow: hidden;
    color: var(--bg-white);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="curtain" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M0 0 L20 0 L20 20 L0 20 Z" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23curtain)"/></svg>');
    opacity: 0.3;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.page-header .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.page-header::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 2rem auto 0;
    border-radius: 2px;
}

/* Hero Section 樣式 */
.hero-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

/* 輪播容器樣式 */
.hero-section .carousel {
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.8) 0%, rgba(52, 73, 94, 0.8) 100%);
}

.hero-section .carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
    z-index: 1;
}

.hero-section .carousel-item.active {
    opacity: 1;
    z-index: 3;
}

.hero-section .carousel-item-next,
.hero-section .carousel-item-prev {
    opacity: 0;
    z-index: 2;
}

/* 覆蓋Bootstrap的滑動效果，確保下一張圖片始終可見 */
.hero-section .carousel-item-next:not(.carousel-item-start),
.hero-section .carousel-item.active.carousel-item-end {
    transform: translateX(100%);
    opacity: 0;
    z-index: 2;
}

.hero-section .carousel-item-prev:not(.carousel-item-end),
.hero-section .carousel-item.active.carousel-item-start {
    transform: translateX(-100%);
    opacity: 0;
    z-index: 2;
}

/* 確保所有輪播項目都顯示，避免空白 */
.hero-section .carousel-item:not(.active):not(.carousel-item-next):not(.carousel-item-prev) {
    display: flex;
    opacity: 0;
    z-index: 1;
}

/* 關鍵修改：確保滑動過程中下一張圖片始終可見 */
.hero-section .carousel-item.carousel-item-next,
.hero-section .carousel-item.carousel-item-prev {
    display: flex !important;
    opacity: 1 !important;
    z-index: 2;
}

/* 滑動過程中的特殊處理 */
.hero-section .carousel-item.carousel-item-next:not(.carousel-item-start),
.hero-section .carousel-item.active.carousel-item-end {
    transform: translateX(100%);
    opacity: 1;
    z-index: 2;
}

.hero-section .carousel-item.carousel-item-prev:not(.carousel-item-end),
.hero-section .carousel-item.active.carousel-item-start {
    transform: translateX(-100%);
    opacity: 1;
    z-index: 2;
}

/* 背景圖片樣式 */
.hero-section .carousel-item .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
    transition: transform 0.6s ease-in-out;
}

/* 遮罩層 - 只在有背景圖片時顯示 */
.hero-section .carousel-item .curtain-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(44, 62, 80, 0.7) 0%,
        rgba(52, 73, 94, 0.6) 50%,
        rgba(44, 62, 80, 0.8) 100%
    );
    z-index: 2;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

/* 當有背景圖片時顯示遮罩 */
.hero-section .carousel-item .hero-background[style*="background-image"] + .curtain-overlay {
    opacity: 1;
}

/* 內容容器 */
.hero-section .carousel-item .container {
    position: relative;
    z-index: 10;
    width: 100%;
}

/* 英雄內容樣式 */
.hero-section .carousel-item .hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.hero-section .carousel-item .hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: fadeInUp 1s ease-out;
    position: relative;
    z-index: 1;
}

.hero-section .carousel-item .hero-content .lead {
    font-size: 1.4rem;
    opacity: 0.95;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
    color: white;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    animation: fadeInUp 1s ease-out 0.2s both;
    position: relative;
    z-index: 1;
}

.hero-section .carousel-item .hero-buttons {
    animation: fadeInUp 1s ease-out 0.4s both;
    position: relative;
    z-index: 1;
}

.hero-section .carousel-item .hero-buttons .btn {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.hero-section .carousel-item .hero-buttons .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.hero-section .carousel-item .hero-buttons .btn:hover::before {
    left: 100%;
}

.hero-section .carousel-item .hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* 輪播指示器樣式 */
.hero-section .carousel-indicators {
    bottom: 40px;
    z-index: 15;
}

.hero-section .carousel-indicators button {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    margin: 0 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.hero-section .carousel-indicators button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.hero-section .carousel-indicators button.active {
    background-color: transparent;
    border-color: var(--accent-color);
    transform: scale(1.3);
}

.hero-section .carousel-indicators button.active::before {
    width: 8px;
    height: 8px;
}

.hero-section .carousel-indicators button:hover {
    background-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

/* 輪播控制按鈕樣式 */
.hero-section .carousel-control-prev,
.hero-section .carousel-control-next {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 30px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 15;
    backdrop-filter: blur(10px);
}

.hero-section .carousel-control-prev:hover,
.hero-section .carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-section .carousel-control-prev-icon,
.hero-section .carousel-control-next-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

/* 滾動指示器樣式 */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    text-align: center;
    animation: bounce 2s infinite;
}

.scroll-indicator .mouse {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    margin: 0 auto 10px;
    position: relative;
}

.scroll-indicator .wheel {
    width: 4px;
    height: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

.scroll-indicator .arrow {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid rgba(255, 255, 255, 0.8);
    margin: 0 auto;
    animation: arrow 2s infinite;
}

/* 動畫效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

@keyframes arrow {
    0% {
        opacity: 0;
        transform: translateY(-5px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(5px);
    }
}

/* 輪播過渡效果 */
.hero-section .carousel-item {
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
    position: relative;
}

.hero-section .carousel-item.active,
.hero-section .carousel-item-next,
.hero-section .carousel-item-prev {
    display: flex;
}

.hero-section .carousel-item-next:not(.carousel-item-start),
.hero-section .carousel-item.active.carousel-item-end {
    transform: translateX(100%);
    opacity: 0;
}

.hero-section .carousel-item-prev:not(.carousel-item-end),
.hero-section .carousel-item.active.carousel-item-start {
    transform: translateX(-100%);
    opacity: 0;
}

/* 確保非活動項目完全隱藏 */
.hero-section .carousel-item:not(.active):not(.carousel-item-next):not(.carousel-item-prev) {
    display: none;
    opacity: 0;
}

/* 修正動畫效果，避免重疊 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 輪播切換時的動畫重置 */
.hero-section .carousel-item.active .hero-content h1,
.hero-section .carousel-item.active .hero-content .lead,
.hero-section .carousel-item.active .hero-content .hero-buttons {
    animation: none;
    opacity: 1;
    transform: translateY(0);
}

.hero-section .carousel-item.active .hero-content h1 {
    animation: fadeInUp 0.8s ease-out;
}

.hero-section .carousel-item.active .hero-content .lead {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-section .carousel-item.active .hero-content .hero-buttons {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
    }
    
    .hero-section .carousel {
        height: 80vh;
    }
    
    .hero-section .carousel-item {
        height: 80vh;
    }
    
    .hero-section .carousel-item .hero-content h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-section .carousel-item .hero-content .lead {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .hero-section .carousel-item .hero-buttons .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .hero-section .carousel-control-prev,
    .hero-section .carousel-control-next {
        width: 50px;
        height: 50px;
        margin: 0 15px;
    }
    
    .hero-section .carousel-indicators {
        bottom: 20px;
    }
    
    .hero-section .carousel-indicators button {
        width: 12px;
        height: 12px;
        margin: 0 4px;
    }
    
    .scroll-indicator {
        bottom: 15px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 70vh;
    }
    
    .hero-section .carousel {
        height: 70vh;
    }
    
    .hero-section .carousel-item {
        height: 70vh;
    }
    
    .hero-section .carousel-item .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-section .carousel-item .hero-content .lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-section .carousel-item .hero-buttons .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .hero-section .carousel-control-prev,
    .hero-section .carousel-control-next {
        width: 40px;
        height: 40px;
        margin: 0 10px;
    }
    
    .hero-section .carousel-control-prev-icon,
    .hero-section .carousel-control-next-icon {
        width: 18px;
        height: 18px;
    }
    
    .scroll-indicator {
        bottom: 10px;
    }
    
    .scroll-indicator .mouse {
        width: 25px;
        height: 40px;
    }
}

/* 特色服務區塊 - 簡潔設計 */
.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #E9ECEF;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-color);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
    color: white;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* 產品分類卡片 - 簡潔設計 */
.category-card {
    background: var(--bg-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #E9ECEF;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-color);
}

.category-image {
    background: var(--primary-color);
    position: relative;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.05);
}

.category-image i {
    color: white;
    font-size: 3rem;
    opacity: 0.8;
}

.category-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.category-content h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.category-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
}

.category-content .btn {
    align-self: flex-start;
    margin-top: auto;
}

/* 產品分類 Swiper 輪播樣式 */
.category-swiper-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 80px;
    box-sizing: border-box;
}

.category-swiper {
    padding: 30px 0;
    overflow: hidden;
    width: 100%;
}

.category-swiper .swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.category-swiper .swiper-slide > div {
    width: 100%;
    height: 100%;
}

/* 非活動滑塊的縮放效果 */
.category-swiper .swiper-slide:not(.swiper-slide-active) {
    transform: scale(0.95);
    opacity: 0.8;
}

.category-swiper .swiper-slide-active {
    transform: scale(1);
    opacity: 1;
}

.category-swiper-button-next,
.category-swiper-button-prev {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: -25px;
    position: absolute;
    top: 50%;
    z-index: 10;
}

.category-swiper-button-next {
    right: 10px;
}

.category-swiper-button-prev {
    left: 10px;
}

.category-swiper-button-next:hover,
.category-swiper-button-prev:hover {
    background: var(--accent-color);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.category-swiper-button-next::after,
.category-swiper-button-prev::after {
    font-size: 18px;
    font-weight: bold;
}

.category-swiper-pagination {
    position: relative;
    margin-top: 30px;
    text-align: center;
}

.category-swiper-pagination .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #DEE2E6;
    opacity: 1;
    transition: all 0.3s ease;
    margin: 0 4px;
}

.category-swiper-pagination .swiper-pagination-bullet-active {
    background: var(--primary-color);
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 載入動畫 */
.category-swiper .swiper-slide .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 響應式設計 */
@media (max-width: 1400px) {
    .category-swiper-container {
        max-width: 1100px;
        padding: 0 75px;
    }
}

@media (max-width: 1200px) {
    .category-swiper-container {
        max-width: 1000px;
        padding: 0 70px;
    }
}

@media (max-width: 992px) {
    .category-swiper-container {
        max-width: 800px;
        padding: 0 60px;
    }
}

@media (max-width: 768px) {
    .category-swiper-container {
        max-width: 600px;
        padding: 0 50px;
    }
    
    .category-swiper {
        padding: 20px 0;
    }
    
    .category-swiper-button-next,
    .category-swiper-button-prev {
        width: 40px;
        height: 40px;
        margin-top: -20px;
    }
    
    .category-swiper-button-next::after,
    .category-swiper-button-prev::after {
        font-size: 16px;
    }
    
    .category-swiper-pagination {
        margin-top: 20px;
    }
    
    .category-swiper-pagination .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
    }
    
    .category-image {
        height: 150px;
    }
    
    .category-content {
        padding: 1.5rem;
    }
    
    .category-content h4 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .category-content p {
        margin-bottom: 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .category-swiper-container {
        max-width: 100%;
        padding: 0 40px;
    }
    
    .category-swiper-button-next,
    .category-swiper-button-prev {
        width: 35px;
        height: 35px;
        margin-top: -17.5px;
    }
    
    .category-swiper-button-next::after,
    .category-swiper-button-prev::after {
        font-size: 14px;
    }
    
    .category-image {
        height: 120px;
    }
    
    .category-content {
        padding: 1rem;
    }
    
    .category-content h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .category-content p {
        margin-bottom: 0.75rem;
        font-size: 0.85rem;
    }
    
    .category-content .btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

/* 關於我們區塊 */
.about-content h2 {
    color: var(--primary-color);
}

.stat-item {
    padding: 1rem;
    background: rgba(230, 126, 34, 0.05);
    border-radius: 10px;
    border-left: 3px solid var(--accent-color);
}

.image-placeholder {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    background: #F8F9FA;
    border-radius: 15px;
}

/* 客戶見證區塊 */
.testimonial-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #E9ECEF;
}

.testimonial-card:hover {
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-color);
    border-width: 1px;
    border-style: solid;
}

.testimonial-content {
    position: relative;
}

.stars {
    color: var(--accent-color);
}

.testimonial-author {
    border-top: 1px solid #E9ECEF;
    padding-top: 1rem;
    margin-top: 1rem;
}

/* 客戶見證作者資訊 */
.author-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #E9ECEF;
}

.testimonial-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.default-avatar {
    font-size: 2rem;
    color: #6c757d;
}

.author-details {
    flex: 1;
    min-width: 0;
}

.author-details h6 {
    margin-bottom: 0.25rem;
    color: var(--primary-color);
    font-size: 1rem;
}

.author-details p {
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.company-name {
    color: var(--accent-color);
    font-weight: 500;
    font-size: 0.85rem;
}

/* 客戶見證 Swiper 輪播容器 */
.testimonial-swiper-container {
    position: relative;
    padding: 0 60px;
    margin: 0 auto;
    max-width: 1400px;
    padding-top: 12px;
    overflow: visible;
}

.testimonial-swiper {
    overflow: hidden !important;
    position: relative;
    width: 100%;
}

.testimonial-swiper .swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
    transition: all 0.6s ease;
    overflow: visible !important;
    /* 初始狀態：隱藏並縮小 */
    opacity: 0;
    transform: scale(0.8) translateX(100px);
}

.testimonial-swiper .swiper-slide > div {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.testimonial-swiper .swiper-slide:not(.swiper-slide-active) {
    opacity: 0.3;
    transform: scale(0.85);
}

.testimonial-swiper .swiper-slide-active {
    opacity: 1;
    transform: scale(1) translateX(0);
}

/* 確保滑動過程中的滑塊保持隱藏 */
.testimonial-swiper .swiper-slide.swiper-slide-next,
.testimonial-swiper .swiper-slide.swiper-slide-prev {
    opacity: 0.3;
    transform: scale(0.85);
}

/* 客戶見證 Swiper 導航按鈕 */
.testimonial-swiper-button-next,
.testimonial-swiper-button-prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    color: white;
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
}

.testimonial-swiper-button-next {
    right: -10px;
}

.testimonial-swiper-button-prev {
    left: -10px;
}

.testimonial-swiper-button-next:hover,
.testimonial-swiper-button-prev:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
    z-index: 15;
}

.testimonial-swiper-button-next::after,
.testimonial-swiper-button-prev::after {
    font-size: 16px;
    font-weight: bold;
}

/* 客戶見證 Swiper 分頁指示器 */
.testimonial-swiper-pagination {
    position: relative;
    margin-top: 30px;
    text-align: center;
}

.testimonial-swiper-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #DEE2E6;
    opacity: 1;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.testimonial-swiper-pagination .swiper-pagination-bullet-active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.testimonial-swiper .swiper-slide .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 客戶見證 Swiper 響應式設計 */
@media (max-width: 1400px) {
    .testimonial-swiper-container {
        padding: 0 50px;
        max-width: 1200px;
        overflow: visible;
    }
}

@media (max-width: 1200px) {
    .testimonial-swiper-container {
        padding: 0 45px;
        max-width: 1000px;
        overflow: visible;
    }
}

@media (max-width: 992px) {
    .testimonial-swiper-container {
        padding: 0 40px;
        max-width: 800px;
        overflow: visible;
    }
}

@media (max-width: 768px) {
    .testimonial-swiper-container {
        padding: 0 35px;
        max-width: 600px;
        overflow: visible;
    }
    
    .testimonial-swiper {
        margin: 0 -10px;
        overflow: hidden !important;
    }
    
    .testimonial-swiper-button-next,
    .testimonial-swiper-button-prev {
        width: 35px;
        height: 35px;
        margin: 0 8px;
    }
    
    .testimonial-swiper-button-next {
        right: -8px;
    }
    
    .testimonial-swiper-button-prev {
        left: -8px;
    }
    
    .testimonial-swiper-button-next::after,
    .testimonial-swiper-button-prev::after {
        font-size: 14px;
    }
    
    .testimonial-swiper-pagination {
        margin-top: 20px;
    }
    
    .testimonial-swiper-pagination .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .testimonial-content {
        font-size: 0.9rem;
    }
    
    .author-avatar {
        width: 40px;
        height: 40px;
    }
    
    .default-avatar {
        font-size: 1.5rem;
    }
    
    .author-details h6 {
        font-size: 0.9rem;
    }
    
    .author-details p {
        font-size: 0.8rem;
    }
    
    .company-name {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .testimonial-swiper-container {
        padding: 0 30px;
        max-width: 100%;
        overflow: visible;
    }
    
    .testimonial-swiper {
        overflow: hidden !important;
    }
    
    .testimonial-swiper-button-next,
    .testimonial-swiper-button-prev {
        width: 30px;
        height: 30px;
        margin: 0 5px;
    }
    
    .testimonial-swiper-button-next {
        right: -5px;
    }
    
    .testimonial-swiper-button-prev {
        left: -5px;
    }
    
    .testimonial-swiper-button-next::after,
    .testimonial-swiper-button-prev::after {
        font-size: 12px;
    }
    
    .testimonial-card {
        padding: 1rem;
    }
    
    .testimonial-content {
        font-size: 0.85rem;
    }
    
    .author-info {
        gap: 10px;
    }
    
    .author-avatar {
        width: 35px;
        height: 35px;
    }
    
    .default-avatar {
        font-size: 1.25rem;
    }
    
    .author-details h6 {
        font-size: 0.85rem;
    }
    
    .author-details p {
        font-size: 0.75rem;
    }
    
    .company-name {
        font-size: 0.75rem;
    }
    
    .testimonial-content .btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* 聯絡資訊區塊 */
.contact-item {
    padding: 1.5rem;
    background: var(--bg-white);
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    border: 1px solid #E9ECEF;
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-color);
}

.contact-item i {
    color: var(--accent-color);
}

/* 產品分類按鈕 - 簡潔設計 */
#categoryFilters {
    margin: 2rem 0;
}

#categoryFilters .btn {
    background: var(--bg-white);
    border: 2px solid #E9ECEF;
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 25px;
    margin: 5px;
    transition: all 0.3s ease;
}

#categoryFilters .btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

/* 產品卡片 - 簡潔設計 */
.product-card {
    background: var(--bg-white);
    border: 1px solid #E9ECEF;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    position: relative;
    margin-bottom: 2rem;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-color);
}

.product-image {
    height: 250px;
    object-fit: cover;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-card .card-body {
    padding: 1.5rem;
    background: var(--bg-white);
}

.product-card .card-title {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.product-card .card-text {
    color: var(--text-light);
    line-height: 1.6;
}

.product-specs {
    background: rgba(108, 117, 125, 0.05);
    padding: 1rem;
    border-radius: 10px;
    border-left: 3px solid #6C757D;
}

.product-specs strong {
    color: var(--primary-color);
}

/* 價格樣式 */
.product-card .text-primary {
    color: var(--primary-color) !important;
    font-size: 1.4rem;
    font-weight: 700;
}

/* 詢價按鈕 */
.product-card .btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
    border-radius: 25px;
    padding: 8px 20px;
    transition: all 0.3s ease;
}

.product-card .btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
}

/* 標籤樣式 */
.badge {
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.badge.bg-danger {
    background: #E74C3C !important;
}

.badge.bg-warning {
    background: var(--accent-color) !important;
    color: white;
}

/* 模態框樣式 */
.modal-content {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 2rem;
}

/* 表單樣式 */
.form-control {
    border: 2px solid #E9ECEF;
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(230, 126, 34, 0.15);
    background: var(--bg-white);
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* 按鈕樣式 */
.btn-secondary {
    background: var(--primary-color);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 500;
    color: white;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.3);
}

.btn-warning {
    background: var(--accent-color);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 500;
    color: white;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    background: #D35400;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.3);
}

/* 頁尾樣式 */
footer {
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footerPattern" x="0" y="0" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23footerPattern)"/></svg>');
    opacity: 0.1;
}

footer .container {
    position: relative;
    z-index: 2;
}

footer h5, footer h6 {
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--accent-color);
    transform: translateX(3px);
}

/* 移除所有動畫相關樣式 */
.fade-in-up,
.slide-in-left,
.slide-in-right,
.scroll-animate {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* 簡化特殊效果 */
.curtain-effect {
    position: relative;
    overflow: hidden;
}

.curtain-effect::after {
    display: none;
}

.stat-card {
    border-radius: 1rem;
    box-shadow: 0 2px 16px 0 rgba(30, 34, 40, 0.08);
    border: none;
    background: #fff;
    transition: box-shadow 0.2s;
}
.stat-card:hover {
    box-shadow: 0 4px 24px 0 rgba(30, 34, 40, 0.15);
}
.stat-card .card-body {
    padding: 2rem 1rem;
}

/* 圖片錯誤處理 */
img {
    transition: opacity 0.3s ease;
}

img[src*="data:image/svg+xml"] {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

/* 產品圖片容器 */
.product-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* 案例圖片 */
.case-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.case-card:hover .case-image {
    transform: scale(1.05);
}

/* 案例卡片樣式 */
.case-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.case-image-container {
    position: relative;
    overflow: hidden;
}

.case-content {
    padding: 1.5rem;
}

.case-content h5 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.case-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.case-meta {
    margin-top: auto;
}

.case-meta small {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.case-card .btn-primary {
    margin-top: 1rem;
    width: 100%;
    border-radius: 8px;
    font-weight: 500;
}

/* 部落格圖片容器 */
.blog-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background-color: #f8f9fa;
}

.blog-image {
    width: 102%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    margin-left: -1%;
    display: block;
}

.blog-card {
    border-radius: 12px;
    overflow: hidden;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.blog-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.blog-card:hover .blog-image {
    transform: scale(1.05);
}

/* 推薦人頭像 */
.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* 預設圖片樣式 */
.default-image {
    object-fit: cover;
    background-color: #f0f0f0;
}

/* --- Blog Detail Page Styles --- */
.article-header {
    background: var(--gradient-primary);
    color: white;
}

.article-header::before {
    display: none;
}

.article-header .container {
    position: relative;
    z-index: 2;
    padding-top:30px;
}

.article-title {
    font-size: 2.5rem; /* Increased font size for impact */
    font-weight: 700;
    margin-bottom: 0.8rem;
    line-height: 1.2;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.article-excerpt {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px; /* Limit width for readability */
}

.article-meta {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    margin-bottom: 1rem;
    display: inline-flex; /* Use flexbox for alignment */
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 1.5rem; /* Space out items */
    color: rgba(255, 255, 255, 0.9);
}

.article-meta .me-3 { /* Remove bootstrap margin if we use gap */
    margin-right: 0 !important;
}

.article-meta a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.article-meta a:hover {
    text-decoration: underline;
}

.article-featured-image {
    width: 100%;
    height: auto; /* Let image scale naturally */
    max-height: 300px; /* Increased from 250px */
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.article-content h2, 
.article-content h3, 
.article-content h4 {
    color: var(--primary-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-content h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-content ul, 
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    background: var(--bg-light);
    border-radius: 8px;
}

.article-actions {
    background: var(--bg-light);
    padding: 2rem 0;
    margin-top: 3rem;
    border-radius: 12px;
}

.article-actions .btn {
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.article-actions .btn:hover {
    transform: translateY(-2px);
}

.sidebar-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    border: none;
    margin-bottom: 2rem;
    overflow: hidden;
}

.sidebar-card .card-header {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.sidebar-card .card-body {
    padding: 1.5rem;
}

.category-list .list-group-item {
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.category-list .list-group-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.category-list .list-group-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.article-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 25px;
}

.article-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-header .breadcrumb-item a:hover {
    color: white;
}

.article-header .breadcrumb-item.active {
    color: white;
    font-weight: 500;
}

.article-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

.blog-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin: 0.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.blog-tag:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: white;
}

@media (max-width: 991.98px) {
    .article-title {
        font-size: 2rem;
    }
    .article-featured-image {
        height: 220px;
    }
}

/* --- Case Detail Page Styles --- */
.case-detail-header {
    background: var(--gradient-primary);
    color: white;
}

.case-detail-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 25px;
}

.case-detail-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.case-detail-header .breadcrumb-item a:hover {
    color: white;
}

.case-detail-header .breadcrumb-item.active {
    color: white;
    font-weight: 500;
}

.case-detail-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

.case-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    margin-right: 8px;
    opacity: 0.8;
}

.case-detail-meta {
    gap: 1.5rem;
}

.case-detail-meta span {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.case-detail-meta i {
    margin-right: 8px;
    opacity: 0.8;
}

.case-detail-featured-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.case-detail-image {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}

/* 首頁banner按鈕特定hover效果 */
.hero-section .carousel-item .hero-buttons .btn-warning:hover {
    color: white !important;
}

.hero-section .carousel-item .hero-buttons .btn-outline-light:hover {
    color: var(--accent-color) !important;
    text-shadow: none !important;
}

/* 固定連結按鈕 */
.fixed-link-button {
    position: fixed;
    right: 32px;
    bottom: 104px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 4px 16px rgba(44,62,80,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.fixed-link-button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(44,62,80,0.25);
}

.fixed-link-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Footer 連結 hover 效果 */
.hover-white:hover {
    color: #fff !important;
    transition: color 0.3s ease;
}

/* 回到頂部按鈕 */
.back-to-top {
    position: fixed;
    right: 32px;
    bottom: 32px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 4px 16px rgba(44,62,80,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s, background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}
.back-to-top:hover {
    background: #E67E22;
    box-shadow: 0 8px 24px rgba(230,126,34,0.18);
    transform: translateY(-4px) scale(1.08);
}
.back-to-top:hover .arrow-up-icon svg circle {
    fill: #E67E22;
    stroke: #fff;
}
.back-to-top:hover .arrow-up-icon svg path {
    stroke: #fff;
}
.arrow-up-icon svg {
    display: block;
}
@media (max-width: 768px) {
    .fixed-link-button {
        right: 16px;
        bottom: 70px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 45px;
        height: 45px;
    }
    .arrow-up-icon svg {
        width: 22px;
        height: 22px;
    }
}
@media (max-width: 480px) {
    .fixed-link-button {
        right: 8px;
        bottom: 78px;
        width: 60px;
        height: 60px;
    }
    
    .back-to-top {
        right: 8px;
        bottom: 8px;
        width: 60px;
        height: 60px;
    }
    .arrow-up-icon svg {
        width: 18px;
        height: 18px;
    }
} 