@import url('table-fix.css?12');

/* Search Form Styles */
.search-form {
    display: flex;
    align-items: center;
    margin: 0;
}

.search-form input[type="text"] {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    width: 180px;
    transition: all 0.3s ease;
    font-family: "Segoe UI", sans-serif;
}

.search-form input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
    width: 220px;
}

.search-form button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    margin-left: -35px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-form button:hover {
    color: #3498db;
}

.search-form button span {
    font-size: 16px;
}

body {
    font-family: "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #f8f9fa;
}

/* 讓 body 在選單開啟時禁止滾動 */
body.no-scroll {
    overflow: hidden;
}

.header-container {
    position: relative;
}

/* Base styles for header and navigation (desktop first) */
.site-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: flex-start;
    /* 改為 flex-start 讓選單靠左 */
    align-items: center;
    padding: 0 40px;
    /* 左右留白 */
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.logo {
    z-index: 1001;
    margin-right: 30px;
    /* 增加 Logo 和選單的間距 */
}

.logo img {
    height: 40px;
    transition: all 0.3s ease;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    gap: 20px;
    /* 調整主選單項目之間的間距 */
}

.desktop-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    /* 確保主菜單項垂直對齊 */
}

.desktop-nav li {
    position: relative;
    /* 這是下拉選單的關鍵 */
}

.desktop-nav li a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    position: relative; /* 確保 ::after 可以相對定位 */
    padding: 5px 15px; /* 調整每個選單項的左右內邊距 */
    font-size: 16px;
    display: flex; /* 使用 flexbox */
    justify-content: space-between; /* 文字和箭頭左右對齊 */
    align-items: center; /* 垂直置中 */
    transition: color 0.3s ease;
    padding-right: 30px; /* 為箭頭預留空間 */
}

.desktop-nav li a:hover {
    color: #007acc;
}

/* 主菜單項底線動畫 */
.desktop-nav > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    height: 2px;
    width: 100%;
    background: #007acc;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.desktop-nav > ul > li > a:hover::after {
    transform: scaleX(1);
}


/* Dropdown specific styles */
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 15px);
    /* 下拉選單與主選單的距離 */
    left: 0;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    z-index: 1000;
    padding: 10px 0;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    box-sizing: border-box;
}

.dropdown-menu li {
    position: relative;
    border-bottom: 1px solid #f0f0f0;
    /* 下拉選單項分隔線 */
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    padding: 10px 20px;
    /* 調整下拉選單項的左右內邊距 */
    font-size: 15px;
    color: #333;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s;
    display: block;
    /* 確保連結佔滿整個下拉選單項 */
    position: relative;
    /* 為 hover 效果準備 */
}

.dropdown-menu a:hover {
    background-color: #e6f4fb;
    /* 淡藍色背景 */
    color: #007acc;
    /* 文字變藍 */
}

/* 下拉選單的箭頭 (主菜單) - 位於文字右側 */
.desktop-nav li.has-dropdown > a::before { /* 使用 ::before 比較好，因為 ::after 被底線用了 */
    content: "\f078"; /* FontAwesome caret-down */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px;
    vertical-align: middle;
    transition: transform 0.3s ease;
    position: absolute; /* 絕對定位 */
    right: 15px; /* 距離右邊緣15px */
    top: 50%; /* 垂直置中 */
    transform: translateY(-50%); /* 垂直置中 */
}

.desktop-nav li.has-dropdown:hover > a::before {
    transform: translateY(-50%) rotate(180deg); /* 懸停時旋轉並保持垂直置中 */
}


/* 顯示下拉選單 */
.desktop-nav li:hover>.dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 二級下拉選單 */
.dropdown-submenu {
    display: none;
    position: absolute;
    left: 100%;
    /* 靠右顯示 */
    top: -10px;
    /* 稍微往上對齊父級 */
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    z-index: 1001;
    padding: 10px 0;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    box-sizing: border-box;
}

/* 二級下拉選單的箭頭 */
.dropdown-menu li.has-submenu>a::after {
    content: "\f0da";
    /* FontAwesome caret-right */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: 5px;
    font-size: 12px;
    vertical-align: middle;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}


/* 針對 dropdown 子選單項目（例如轉台 > 小分類） */
.dropdown-menu li.has-submenu > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 30px; /* 預留箭頭空間 */
    position: relative;
}

/* 調整右側箭頭 icon 的位置 */
.dropdown-menu li.has-submenu > a::after {
    content: "\f0da"; /* FontAwesome caret-right */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px;
    margin-left: auto;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}



.dropdown-menu li:hover>.dropdown-submenu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}


/* Mobile menu toggle (hidden by default on desktop) */
.mobile-menu-toggle {
    display: none;
    /* Hide on desktop */
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
    margin-left: 10px;
}

/* Mobile Navigation (hidden by default on desktop, controlled by JS on mobile) */
.main-nav {
    display: none;
    /* Hidden on desktop by default */
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -300px; /* Off-screen */
    width: 280px; /* 調整行動選單的寬度，從 300px 縮小 */
    height: 100vh;
    max-height: 100%;
    background: white;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    margin: 0;
    opacity: 0;
    transform: translateX(20px);
    will-change: transform, opacity;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
}

.mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.menu-close-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-close-btn:hover {
    color: #007acc;
    transform: rotate(90deg);
}

.main-nav.active {
    right: 0;
    opacity: 1;
    transform: translateX(0);
    display: flex;
    /* Show when active */
}

.main-nav-content {
    padding: 10px 0;
    /* 調整手機選單整體內邊距 */
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-nav li {
    position: relative;
}

.main-nav li a {
    padding: 10px 15px;
    /* 調整手機選單項的左右內邊距 */
    text-align: left;
    width: 100%;
    color: #333;
    transition: all 0.2s ease;
    position: relative;
    background: transparent;
    border-bottom: 1px solid #f5f5f5;
    margin: 0;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav li a.with-dropdown::after {
    content: '\f0d7';
    /* FontAwesome caret-down icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.main-nav li a.with-dropdown.active::after {
    transform: rotate(180deg);
}

.main-nav li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: #007acc;
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.main-nav li a:hover {
    background: rgba(0, 122, 204, 0.05);
    padding-left: 20px;
}

.main-nav li a:hover::before {
    transform: scaleY(1);
}

/* Mobile dropdowns */
.main-nav .dropdown-menu {
    position: static;
    display: none;
    width: 100%;
    box-shadow: none;
    background-color: #f8f8f8;
    padding: 0;
    border-radius: 0;
    border-top: 1px solid #eee;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
}

.main-nav .dropdown-menu li a {
    padding-left: 30px;
    /* 二級選單內邊距 */
    font-size: 14px;
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
}

.main-nav .dropdown-menu li a.with-dropdown::after {
    content: '\f0da';
    /* FontAwesome caret-right icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.main-nav .dropdown-menu .dropdown-submenu {
    position: static;
    width: 100%;
    box-shadow: none;
    background-color: #efefef;
    padding: 0;
    border-radius: 0;
    border-top: 1px solid #ddd;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
}

.main-nav .dropdown-menu .dropdown-submenu li a {
    padding-left: 45px;
    /* 三級選單內邊距 */
    font-size: 13px;
    background: #efefef;
}


/* 移除搜尋列上方的間距 */
.mobile-search {
    margin-top: 0;
    padding: 10px 15px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.mobile-search form {
    margin: 0;
}

.mobile-search input[type="text"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Search bars on desktop */
.header-right {
    display: flex;
    /* Always display on desktop */
    align-items: center;
    gap: 15px;
    margin-left: auto;
    /* 讓右側功能靠右 */
}

.search-bar {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.search-bar input {
    padding: 5px 10px;
    border: none;
    font-size: 14px;
    outline: none;
}

.search-bar button {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 5px;
    color: #333;
    font-size: 16px;
}

.user-icon a {
    text-decoration: none;
    color: #333;
    font-size: 20px;
}

/* Overlay for mobile menu */
.menu-overlay {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
    pointer-events: none;
}

.menu-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: block;
    /* Show when active */
}

/* Mobile specific styles */
@media (max-width: 1024px) {
    .site-header {
        height: 70px;
        position: fixed;
        /* Keep header fixed on scroll */
        padding: 0 20px;
    }

    .header-container {
        padding: 0;
        justify-content: space-between;
        /* 在手機版恢復 space-between */
    }

    .logo {
        padding-left: 20px;
        margin-right: 0;
        /* 移除 Logo 和選單間距 */
    }

    .logo img {
        height: 36px;
    }

    /* Hide desktop navigation on mobile */
    .desktop-nav {
        display: none;
    }

    /* Show mobile menu toggle on mobile */
    .mobile-menu-toggle {
        display: block;
        /* Show the hamburger icon */
        position: absolute;
        /* 讓它相對於 header-container 定位 */
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
        z-index: 1001;
        padding: 8px 12px;
        background: white;
        border-radius: 4px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    /* Ensure the mobile menu is correctly positioned off-screen initially on mobile */
    .main-nav {
        right: -280px; /* 配合調整後的 width */
        opacity: 0;
        transform: translateX(20px);
        display: flex;
        /* Keep it as flex for transition */
        width: 280px; /* 再次確認寬度 */
    }

    /* Hide desktop search and user icon on mobile */
    .header-right {
        display: none;
    }

    /* Mobile search bar within the mobile menu */
    .mobile-search {
        width: 100%;
        margin: 0 0 15px 0;
        padding: 0;
        box-sizing: border-box;
        position: relative;
        z-index: 1;
    }

    .mobile-search form {
        display: flex;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
    }

    .mobile-search input[type="text"] {
        flex: 1;
        padding: 12px 15px;
        border: 1px solid #ddd;
        border-right: none;
        border-radius: 4px 0 0 4px;
        font-size: 14px;
        outline: none;
        max-width: calc(100% - 50px - 15px); /* 調整最大寬度，為箭頭和按鈕留出空間 */
        box-sizing: border-box;
        height: 48px;
    }

    .mobile-search button {
        background: #007acc;
        color: white;
        border: none;
        padding: 0;
        border-radius: 0 4px 4px 0;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 50px;
        height: 48px;
    }
}


/* Banner Slider */
.swiper {
    width: 100%;
    height: 500px;
    position: relative;
    overflow: hidden;
    margin-top: 0px;
    /* 桌面版 header 高度 */
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .swiper {
        height: auto;
        min-height: 0;
        /* 移除最小高度 */
        margin-top: 70px;
        /* 行動版 header 高度，使其不被蓋住 */
        box-sizing: border-box;
        padding-bottom: 0;
        /* 確保沒有額外內邊距 */
    }

    .swiper-wrapper {
        height: auto !important;
        /* 讓 wrapper 根據內容自動調整高度 */
    }

    .swiper-slide {
        height: auto !important;
        /* 讓 slide 根據內容自動調整高度 */
    }

    .swiper-slide img {
        width: 100%;
        height: auto;
        display: block;
    }
}

.slider {
    position: relative;
    overflow: hidden;
}

.slides {
    display: flex;
    width: 300%;
    animation: slide 15s infinite;
}

.slides img {
    width: 100vw;
    height: auto;
}

@keyframes slide {
    0% {
        transform: translateX(0%);
    }

    33% {
        transform: translateX(-100%);
    }

    66% {
        transform: translateX(-200%);
    }

    100% {
        transform: translateX(-0%);
    }
}

section {
    padding: 2rem 1rem;
    max-width: 960px;
    margin: 2rem auto 1rem auto;
    /* Added margin-top */
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: #002b4d;
    color: white;
}

.floating-tools {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.floating-tools a {
    background: white;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    color: #0077b6;
    font-size: 20px;
    text-decoration: none;
    transition: transform 0.2s;
}

.floating-tools a:hover {
    transform: scale(1.1);
    background-color: #f1f1f1;
}


/* 橫幅圖片樣式 */
.top-banner img {
    width: 100%;
    height: auto;
    display: block;
}


/* 卡片整體格線 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

/* 單一卡片 */
.product-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    padding: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    height: 100%;
}

.product-card.in-view {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease-out;
}

/* 產品圖片容器 */
.product-img-container {
    position: relative;
    width: 100%;
    height: 200px; /* 固定高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #f8f9fa; /* 添加背景色 */
}

/* 產品圖片 */
.product-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* 保持圖片比例 */
    transition: transform 0.5s ease;
}

/* 卡片內容 */
.product-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center; /* 內容置中 */
    text-align: center; /* 文字置中 */
}

/* 產品標題 */
.product-card h3 {
    margin: 1rem 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    width: 100%; /* 確保標題寬度100% */
}

/* 查看按鈕 */
.product-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.5rem;
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid #dee2e6;
}

.product-button:hover {
    background-color: #e9ecef;
    color: #0056b3;
}

/* 卡片懸停效果 */
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.underline-animate {
    background: #007acc;
}

.product-card img {
    width: 100%;
    max-height: 160px;
    object-fit: contain;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* 卡片文字樣式 */
.product-card h3 {
    color: #003366;
    font-size: 20px;
    margin: 0 0 0.5rem;
}

.product-card p {
    color: #444;
    font-size: 14px;
    line-height: 1.6;
    flex-grow: 1;
}

/* CTA 按鈕 */
.product-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    background-color: #007acc;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease;
}

.product-button:hover {
    background-color: #005fa3;
}


.section-title {
    background: linear-gradient(to right, #f2f5fa, #e9eef5);
    padding: 3rem 1rem 2rem 1rem;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.section-title .subtitle {
    font-size: 16px;
    color: #007acc;
    letter-spacing: 2px;
    font-weight: 500;
    margin: 0;
    text-transform: uppercase;
}

.section-title .main-title {
    font-size: 32px;
    color: #003366;
    margin: 0.3rem 0;
    font-weight: bold;
}

.section-title .underline {
    width: 60px;
    height: 4px;
    background-color: #007acc;
    margin: 1rem auto 0 auto;
    border-radius: 2px;
}

.fancy-title {
    position: relative;
    background: linear-gradient(to right, #f4f7fa, #e4ecf9);
    padding: 4rem 1rem 3rem 1rem;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 3rem;
    overflow: hidden;
}

/* 英文副標 */
.fancy-title .subtitle {
    font-size: 16px;
    color: #00aaff;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
}

/* 中文主標 */
.fancy-title .main-title {
    font-size: 36px;
    font-weight: 700;
    color: #003366;
    margin: 0.5rem 0;
    position: relative;
    z-index: 2;
}

/* 底線動畫 */
.underline-animate {
    width: 80px;
    height: 4px;
    background: #00aaff;
    margin: 0.5rem auto 0;
    border-radius: 2px;
    animation: slideIn 1.2s ease-out;
}

@keyframes slideIn {
    0% {
        width: 0;
        opacity: 0;
    }

    100% {
        width: 80px;
        opacity: 1;
    }
}

/* SVG 背景圖案：科技感圓點 */
.bg-pattern {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20px 20px, #d8e4f3 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.2;
    z-index: 0;
}

@import url('table-fix.css');

/* Feature Section */
.feature-section {
    background: linear-gradient(to right, #f8fafd, #eef3f9);
    padding: 4rem 1.5rem;
    text-align: center;
    border-radius: 12px;
    margin-top: 3rem;
}

/* 簡介段落 */
.feature-description {
    max-width: 800px;
    margin: 1.5rem auto;
    font-size: 15px;
    line-height: 1.8;
    color: #333;
}

/* CTA 按鈕 */
.feature-button-wrap {
    margin: 1.5rem 0 2.5rem;
}

.feature-button {
    padding: 0.6rem 1.5rem;
    background-color: white;
    color: #007acc;
    border: 2px solid #007acc;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
}

.feature-button:hover {
    background-color: #007acc;
    color: white;
}

/* 四大特色格線 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* 單一卡片 */
.feature-card {
    background-color: white;
    padding: 2rem 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 102, 204, 0.1);
}

.feature-card i {
    font-size: 36px;
    color: #007acc;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #003366;
    font-size: 18px;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}


.application-section {
    background: linear-gradient(to right, #1b1f24, #2a2f36);
    color: white;
    padding: 4rem 1.5rem;
    text-align: center;
    border-radius: 0;
    position: relative;
}

.application-section .section-title.dark .subtitle {
    color: #00aaff;
}

.application-section .section-title.dark .main-title {
    color: white;
    /* Changed from black to white for dark background */
}

.underline-animate.light {
    background: #00aaff;
}

.application-description {
    max-width: 760px;
    margin: 1.5rem auto 2.5rem;
    font-size: 15px;
    line-height: 1.8;
    color: #e0e0e0;
}

/* 應用領域圖片網格 */
.application-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 0 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.application-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.application-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.swiper-slide img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.application-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.application-card:hover img {
    transform: scale(1.05);
}

@media (max-width: 1200px) {
    .application-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
        padding: 0 1.5rem;
    }
    
    .application-card img {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .application-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .application-card img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .application-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .application-card img {
        height: 200px;
    }
}

.overlay-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.application-card:hover .overlay-text {
    opacity: 1;
}

.case-section {
    background-color: #ffffff;
    padding: 4rem 1.5rem;
    max-width: 1200px;
    margin: auto;
}

/* 標題靠左 */
.section-title.left {
    text-align: left;
    margin-bottom: 2rem;
}

.underline-animate.left-line {
    margin-left: 0;
    background-color: #007acc;
}

.case-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.case-card {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

/* Image */
.case-card img {
    width: 40%;
    min-width: 280px;
    object-fit: cover;
    border-radius: 8px;
    max-height: 100%;
}

/* Text */
.case-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1.5rem;
    /* Added gap between case items */
}

.case-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.case-item.in-view {
    opacity: 1;
    transform: translateY(0);
}


.case-item h3 {
    font-size: 16px;
    font-weight: bold;
    color: #003366;
    margin-bottom: 0.3rem;
}

.case-item p {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

.read-more {
    font-size: 14px;
    color: #007acc;
    font-weight: bold;
    text-decoration: none;
    margin-top: 0.3rem;
    display: inline-block;
}

.read-more:hover {
    text-decoration: underline;
}

.view-all a {
    display: inline-block;
    margin-top: 1.2rem;
    border: 1.5px solid #007acc;
    color: #007acc;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-all a:hover {
    background-color: #007acc;
    color: white;
}

.news-section {
    background-color: #f5f8fc;
    padding: 4rem 1.5rem;
    max-width: 1000px;
    margin: auto;
    border-radius: 12px;
}

/* 圖片置頂 */
.news-image-top img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

/* 活動條列 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    margin-top: 1rem;
}

.news-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.news-item.in-view {
    opacity: 1;
    transform: translateY(0);
}

.news-date {
    width: 80px;
    text-align: center;
    color: #007acc;
    font-weight: bold;
}

.news-date .year {
    font-size: 20px;
}

.news-date .day {
    font-size: 14px;
    color: #666;
}

.news-content h3 {
    font-size: 16px;
    color: #003366;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.news-content p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.news-content a {
    text-decoration: none;
}

.news-content a:hover h3 {
    text-decoration: underline;
    color: #007acc;
}

/* 查看全部按鈕 */
.view-all a {
    display: inline-block;
    margin-top: 1rem;
    border: 1.5px solid #007acc;
    color: #007acc;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-all a:hover {
    background-color: #007acc;
    color: white;
}

.site-footer {
    background-color: #1c1c1c;
    color: #e0e0e0;
    padding: 3rem 1.5rem 1rem;
    font-size: 14px;
    line-height: 1.8;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 4fr 2fr;
    /* 調整寬度比例，左中右 */
    gap: 3rem;
    /* Increased gap in footer grid */
    max-width: 1400px;
    /* 原本1200 改寬 */
    margin: auto;
    align-items: start;
    border-bottom: 1px solid #444;
    padding-bottom: 2rem;
}

.site-footer .footer-col {
    text-align: left;
}

/* 左側 */
.footer-logo {
    display: block;
    margin: 0 0 1rem 0;
}

.footer-col.contact {
    text-align: left;
    max-width: 360px;
}

.footer-col.contact p {
    margin: 0.3rem 0;
    word-break: break-word;
    /* 避免 email 被強制擠爆 */
}

/* 中間導覽 */
.footer-col.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    /* Adjusted gap for navigation groups */
    justify-content: space-between;
}

.nav-group h4 {
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.5rem;
}

.nav-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-group li {
    margin-bottom: 0.4rem;
}

.nav-group a {
    color: #ccc;
    text-decoration: none;
}

.nav-group a:hover {
    color: #fff;
}

/* 右側掃碼區 */
.footer-col.qrcode {
    text-align: center;
}

.qrcode-img {
    width: 120px;
    margin-bottom: 0.5rem;
}

.footer-col.qrcode p {
    margin-top: 0;
}

/* 底部版權 */
.footer-bottom {
    text-align: center;
    color: #999;
    font-size: 12px;
    margin-top: 2rem;
    line-height: 1.6;
}

/* 移動選單按鈕動畫 */
.mobile-menu-toggle:hover {
    transform: scale(1.1) translateY(-50%);
    opacity: 0.8;
}

/* 新增手機版隱藏樣式 */
@media (max-width: 768px) {
    .mobile-hide {
        display: none !important;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        padding: 0 1rem;
        gap: 2rem;
        /* Adjusted gap for mobile footer */
    }

    .footer-col.contact {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0;
        box-sizing: border-box;
        text-align: left;
    }

    .footer-col.contact p {
        font-size: 14px;
        line-height: 1.6;
        word-break: break-word;
    }

    .footer-logo {
        margin-bottom: 1rem;
        max-width: 160px;
    }

    /* 重置行動版選單的間距控制，讓 border-bottom 生效 */
    .main-nav-content {
        gap: 0;
        /* 移除 gap */
    }

    .main-nav ul {
        display: flex;
        flex-direction: column;
        gap: 0;
        /* 移除 ul 上的 gap */
    }

    .main-nav li {
        margin-bottom: 0;
        /* 移除 li 上的額外 margin */
    }

    .main-nav li a {
        border-bottom: 1px solid #f5f5f5;
        /* 確保每個項目有分隔線 */
        padding: 12px 15px;
        /* 統一行動版選單項的內邊距 */
    }
}
