/**
 * 檔案名稱：custom-style.css
 * 系統模組：全站共用現代化樣式表 (Bootstrap 5.3 擴充)
 * 修改說明：2026 首頁與全站 UI 重構 (包含 Header、Content、Footer 完整樣式)
 */

/* ==============================================================================
   1. 全局變數與基礎設定 (Global Variables & Resets)
============================================================================== */
:root {
    --primary-navy: #0f172a;
    --primary-slate: #1e293b;
    --tech-blue: #0284c7;
    --tech-blue-hover: #0369a1;
    --tech-blue-light: rgba(2, 132, 199, 0.08);
    --accent-cyan: #06b6d4;
    --border-light: #e2e8f0;
    --border-hover: #cbd5e1;
    --bg-light: #f8fafc;
    --text-main: #334155;
    --text-heading: #0f172a;
    --text-muted: #64748b;
    --radius-card: 12px;
    --radius-pill: 9999px;
    --shadow-subtle: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 16px 28px -6px rgba(15, 23, 42, 0.12), 0 8px 12px -4px rgba(15, 23, 42, 0.08);
    --shadow-dropdown: 0 20px 40px -10px rgba(15, 23, 42, 0.18), 0 1px 3px rgba(0, 0, 0, 0.05);
    --transition-smooth: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    color: var(--text-main);
    background-color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

/* ==============================================================================
   2. 導覽列與選單 (Header & Navigation)
============================================================================== */
#header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1050;
    box-shadow: 0 2px 14px -3px rgba(15, 23, 42, 0.07);
}

/* 搜尋滑出條 */
.header-search { background-color: #0f172a; padding: 0.85rem 0; border-bottom: 1px solid #1e293b; display: none; transition: var(--transition-smooth); }
.header-search.show { display: block !important; animation: slideDown 0.3s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
.header-search .search-form { display: flex; align-items: center; gap: 0.75rem; }
.header-search .form-control.search { background-color: #1e293b; border: 1px solid #334155; color: #ffffff; border-radius: 8px; padding: 0.6rem 1.1rem; font-size: 0.95rem; }
.header-search .form-control.search:focus { border-color: var(--tech-blue); box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.3); background-color: #0f172a; }
.header-search .btn-link { color: #94a3b8; font-size: 1.1rem; padding: 0.4rem 0.6rem; text-decoration: none; }
.header-search .btn-link:hover { color: #ffffff; }

#header .header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 0.55rem; padding-bottom: 0.55rem; position: relative; }
#header .header-brand { margin: 0 !important; display: flex; align-items: center; flex-shrink: 0; }
#header .header-brand img { max-height: 48px; width: auto; object-fit: contain; display: block; }
.brand-text-fallback { font-size: 1.45rem; font-weight: 800; color: #0f172a; display: none; align-items: center; gap: 0.5rem; letter-spacing: -0.02em; }
.brand-text-fallback span { color: var(--tech-blue); font-weight: 600; font-size: 0.85rem; background: rgba(2, 132, 199, 0.1); padding: 0.2rem 0.5rem; border-radius: 4px; }

/* 頂部社群與工具列 */
#header .menu-top { display: flex !important; flex-direction: row; align-items: center; justify-content: flex-end; gap: 1.15rem; font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 0.2rem; padding: 0; list-style: none; position: static !important; }
#header .menu-top li { margin-right: 0 !important; }
#header .menu-top a { color: #64748b; display: inline-flex; align-items: center; transition: var(--transition-smooth); }
#header .menu-top a:hover { color: var(--tech-blue); transform: scale(1.08); }
.search-trigger-btn { background: none; border: none; color: #64748b; cursor: pointer; padding: 0.2rem 0.4rem; display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8125rem; transition: var(--transition-smooth); }
.search-trigger-btn:hover { color: var(--tech-blue); }

/* 語言切換選單彈出框 */
#header .dropdown-menu-sm { min-width: 200px; font-size: 0.825rem; border-radius: 8px; border: 1px solid var(--border-light); box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12); padding: 0.5rem; }
#header .dropdown-menu-sm .dropdown-item { padding: 0.5rem 0.75rem; border-radius: 6px; display: flex; align-items: center; gap: 0.6rem; }

/* 電腦版選單 */
@media (min-width: 992px) {
    #header .navbar { padding: 0; margin-left: auto; }
    #header .navbar-main.collapse { display: flex !important; flex-direction: column; align-items: flex-end; justify-content: center; }
    #header .header_menu_ul { display: flex !important; flex-direction: row; align-items: center; gap: 0.25rem; margin: 0 !important; padding: 0; list-style: none; }
    #header .header_menu_ul > .nav-item > .nav-link { font-size: 0.9375rem; font-weight: 600; color: #1e293b; padding: 0.5rem 0.9rem; border-radius: 6px; transition: var(--transition-smooth); display: flex; align-items: center; gap: 0.35rem; }
    #header .header_menu_ul > .nav-item > .nav-link:hover { color: var(--tech-blue); background-color: var(--tech-blue-light); }
    #header .nav-item.dropdown { position: relative; }
    #header .nav-item.dropdown:hover > .dropdown-menu { display: block; opacity: 1; visibility: visible; transform: translateY(0); }
    #header .dropdown-menu { display: block; opacity: 0; visibility: hidden; transform: translateY(8px); transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1); border: 1px solid var(--border-light); border-radius: 10px; box-shadow: var(--shadow-dropdown); padding: 0.6rem; margin-top: 0.25rem; background: #ffffff; }
    #header .dropdown-item { font-size: 0.875rem; font-weight: 500; color: #334155; padding: 0.55rem 0.85rem; border-radius: 6px; transition: var(--transition-smooth); }
    #header .dropdown-item:hover { background-color: #f1f5f9; color: var(--tech-blue); transform: translateX(4px); }
    
    /* Mega Menu */
    #header .dropdown-mega-menu { position: static; }
    #header .dropdown-mega-menu .dropdown-menu { left: auto; right: 0; width: 680px; max-width: 92vw; padding: 1.5rem; }
    #header .dropdown-mega-menu .dropdown-header { font-size: 0.95rem; font-weight: 700; color: #0f172a; border-bottom: 2px solid #e2e8f0; padding-bottom: 0.45rem; margin-bottom: 0.75rem; display: flex; align-items: center; justify-content: space-between; }
    
    /* 選單輪播 */
    .dropdown-widget { position: relative; width: 100%; }
    .products-carousel { position: relative; overflow: hidden; width: 100%; min-height: 250px; background: #ffffff; }
    .products-carousel > a { display: none; text-decoration: none; color: inherit; text-align: center; width: 100%; }
    .products-carousel > a.active-slide { display: block !important; animation: carouselFadeIn 0.3s ease-in-out; }
    @keyframes carouselFadeIn { from { opacity: 0.3; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }
    .products-carousel a .align-items-center { padding-left: 0 !important; display: flex !important; justify-content: center !important; align-items: center !important; height: 190px !important; margin-bottom: 0.5rem; }
    .products-carousel a img { max-height: 180px !important; max-width: 85% !important; width: auto !important; object-fit: contain; display: block; margin: 0 auto; transition: transform 0.25s ease; }
    .products-carousel a:hover img { transform: scale(1.04); }
    .products-carousel a font { display: block !important; text-align: center !important; font-size: 1rem !important; font-weight: 500 !important; color: #212529 !important; margin-top: 0.6rem; }
    .menu-carousel-btn { position: absolute; top: 95px; transform: translateY(-50%); width: 32px; height: 38px; background-color: #8c8c8c; color: #ffffff; border: none; border-radius: 4px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 20; opacity: 0.88; transition: all 0.2s ease; }
    .menu-carousel-btn:hover { background-color: #555555; opacity: 1; transform: translateY(-50%) scale(1.05); }
    .menu-carousel-btn.btn-prev { left: 6px; }
    .menu-carousel-btn.btn-next { right: 6px; }
    .dropdown-header .badge { font-size: 0.7rem; padding: 0.28rem 0.55rem; letter-spacing: 0.05em; vertical-align: middle; }
}

/* 手機版選單 */
@media (max-width: 991.98px) {
    #header .header-inner { display: flex !important; align-items: center; justify-content: space-between; flex-wrap: wrap; }
    #header .header-block { display: flex !important; align-items: center; margin-left: auto !important; }
    #header .header-btn { font-size: 1.35rem; color: #0f172a; padding: 0.45rem 0.75rem; border-radius: 8px; border: 1px solid var(--border-light); background: #f8fafc; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
    #header .navbar { width: 100% !important; flex-basis: 100%; order: 10; padding: 0 !important; margin: 0 !important; }
    #header .navbar-main.collapse { display: none !important; width: 100%; background: #ffffff; border-top: 1px solid var(--border-light); padding: 1rem 0; margin-top: 0.5rem; }
    #header .navbar-main.show-mobile-nav { display: flex !important; flex-direction: column; align-items: stretch; }
    #header .menu-top { justify-content: flex-start; padding: 0 1rem 0.75rem; border-bottom: 1px solid var(--border-light); gap: 0.85rem; }
    #header .header_menu_ul { flex-direction: column; align-items: stretch; padding: 0.5rem 1rem; gap: 0.25rem; }
    #header .header_menu_ul > .nav-item > .nav-link { padding: 0.65rem 0.85rem; font-size: 1rem; }
    #header .dropdown-menu { position: static !important; transform: none !important; box-shadow: none; border: none; background: #f8fafc; padding-left: 1rem; }
}

/* ==============================================================================
   3. 首頁內容區塊 (Hero, Portal, Solutions, News, Services)
============================================================================== */

/* ======== Hero Banner ======== */
.hero-banner-container { position: relative; background: #000; }
.carousel-item { height: 560px; min-height: 460px; background-color: var(--primary-navy); position: relative; width: 100%; display: none; }
.carousel-item.active { display: block; }
@media (max-width: 768px) { .carousel-item { height: 420px; min-height: 380px; } }

.banner-media-wrap { position: absolute; inset: 0; width: 100%; height: 100%; }
.banner-media-wrap img { width: 100%; height: 100%; object-fit: cover; opacity: 0.88; display: block; }
.banner-overlay-scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,23,42,0.85) 0%, rgba(15,23,42,0.45) 50%, rgba(15,23,42,0.2) 100%); }

.hero-caption { position: absolute; inset: 0; display: flex; align-items: center; z-index: 10; }
.hero-title-box { max-width: 680px; }
.hero-badge { background: rgba(255,255,255,0.15); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.25); color: #fff; font-size: 0.8rem; font-weight: 600; padding: 0.35rem 0.85rem; border-radius: var(--radius-pill); display: inline-block; margin-bottom: 1rem; }
.hero-title { font-size: 2.75rem; font-weight: 700; line-height: 1.25; color: #fff; margin-bottom: 1.25rem; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
@media (max-width: 768px) { .hero-title { font-size: 1.85rem; } }

.btn-tech-primary { background-color: var(--tech-blue); color: #fff; font-weight: 600; padding: 0.75rem 1.75rem; border-radius: 8px; border: none; display: inline-flex; align-items: center; gap: 0.5rem; box-shadow: 0 4px 14px rgba(2,132,199,0.35); }
.btn-tech-primary:hover { background-color: var(--tech-blue-hover); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(2,132,199,0.45); }

.img-desktop { display: block; }
.img-mobile { display: none; }
@media (max-width: 768px) { .img-desktop { display: none !important; } .img-mobile { display: block !important; } }

/* ======== Portal Dock (快捷入口) ======== */
.portal-dock { margin-top: -3.5rem; position: relative; z-index: 20; }
@media (max-width: 768px) { .portal-dock { margin-top: 1rem; } }
.dock-card { background: #fff; border-radius: var(--radius-card); border: 1px solid var(--border-light); padding: 1.5rem; box-shadow: 0 10px 25px -5px rgba(15,23,42,0.08); display: flex; align-items: center; gap: 1.25rem; height: 100%; transition: var(--transition-smooth); }
.dock-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: rgba(2,132,199,0.35); }
.dock-icon-box { width: 52px; height: 52px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; color: #fff; background: linear-gradient(135deg, var(--tech-blue) 0%, var(--primary-slate) 100%); }
.dock-card.highlight .dock-icon-box { background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%); }
.dock-title { font-size: 1.05rem; font-weight: 700; color: var(--text-heading); margin-bottom: 0.2rem; }
.dock-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0; }

/* ======== Solutions Grid ======== */
#solutions { background-color: var(--primary-navy); color: #fff; }
.section-header { margin-bottom: 3.5rem; position: relative; }
.section-tag { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: #38bdf8; background: rgba(56,189,248,0.12); border: 1px solid rgba(56,189,248,0.28); padding: 0.35rem 0.9rem; border-radius: var(--radius-pill); margin-bottom: 0.75rem; }
.section-title { font-size: 2.125rem; font-weight: 700; color: #ffffff; text-shadow: 0 2px 10px rgba(0,0,0,0.35); }
.section-subtitle { font-size: 1rem; color: #cbd5e1; max-width: 600px; margin: 0.5rem auto 0; }

.solution-card { background: #fff; border-radius: var(--radius-card); border: 1px solid var(--border-light); overflow: hidden; display: flex; flex-direction: column; height: 100%; transition: var(--transition-smooth); }
.solution-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: rgba(2,132,199,0.3); }
.solution-img-wrap { background-color: #f1f5f9; height: 220px; display: flex; align-items: center; justify-content: center; padding: 1.5rem; overflow: hidden; }
.solution-img-wrap img { max-height: 100%; max-width: 100%; object-fit: contain; transition: transform 0.4s ease; }
.solution-card:hover .solution-img-wrap img { transform: scale(1.05); }
.solution-body { padding: 1.35rem 1.5rem 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.solution-tag-label { font-size: 0.75rem; font-weight: 600; color: var(--tech-blue); background: rgba(2,132,199,0.08); padding: 0.2rem 0.6rem; border-radius: 4px; width: fit-content; margin-bottom: 0.6rem; }
.solution-title { font-size: 1.125rem; font-weight: 700; color: var(--text-heading); margin-bottom: 0.75rem; line-height: 1.4; }
.solution-arrow { margin-top: auto; display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.875rem; font-weight: 600; color: var(--tech-blue); }

/* ======== News Section ======== */
.news-section { background-color: var(--bg-light); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.news-section .section-title { color: var(--text-heading); text-shadow: none;}
.news-section .section-subtitle { color: var(--text-muted); }
.news-section .section-tag { color: var(--tech-blue); background: rgba(2,132,199,0.08); border-color: rgba(2,132,199,0.2); }
.recruit-spotlight-card { background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-slate) 100%); border-radius: var(--radius-card); padding: 2.25rem 2rem; color: #fff; height: 100%; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 12px 24px -6px rgba(15,23,42,0.2); position: relative; overflow: hidden;}
.recruit-spotlight-card::after { content: ''; position: absolute; right: -20px; bottom: -30px; width: 160px; height: 160px; background: rgba(2, 132, 199, 0.15); border-radius: 50%; pointer-events: none; }
.news-item-row { background: #fff; border: 1px solid var(--border-light); border-radius: 10px; padding: 1rem 1.35rem; margin-bottom: 0.85rem; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; transition: var(--transition-smooth); }
.news-item-row:hover { border-color: var(--tech-blue); transform: translateX(4px); box-shadow: var(--shadow-subtle); }
.news-meta-left { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.news-date-badge { font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); background: #f1f5f9; padding: 0.3rem 0.65rem; border-radius: 6px; white-space: nowrap; }
.news-title-text { font-size: 0.975rem; font-weight: 500; color: var(--text-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-arrow-icon { color: #94a3b8; font-size: 0.875rem; }

/* ======== Service Section ======== */
#services { background-color: var(--primary-navy); border-top: 1px solid #1e293b; }
.service-tile { background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-card); padding: 2rem 1.5rem; text-align: center; height: 100%; display: flex; flex-direction: column; align-items: center; transition: var(--transition-smooth); }
.service-tile:hover { border-color: var(--tech-blue); box-shadow: var(--shadow-hover); transform: translateY(-5px); }
.service-tile-icon { width: 64px; height: 64px; border-radius: 16px; background: rgba(2,132,199,0.08); color: var(--tech-blue); font-size: 1.75rem; display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; transition: var(--transition-smooth); }
.service-tile:hover .service-tile-icon { background: var(--tech-blue); color: #fff; transform: scale(1.08); }
.service-tile-title { font-size: 1.15rem; font-weight: 700; color: var(--text-heading); margin-bottom: 0.5rem; }
.service-tile-desc { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.service-tile-btn { margin-top: auto; font-size: 0.875rem; font-weight: 600; color: var(--tech-blue); display: inline-flex; align-items: center; gap: 0.4rem; }

/* ==============================================================================
   4. 頁尾與懸浮按鈕 (Footer & Floating Action Buttons)
============================================================================== */
#footer a[href="#top"], .scroll-to-top, .back-to-top { position: fixed !important; right: 25px !important; bottom: 25px !important; top: auto !important; left: auto !important; z-index: 9999 !important; width: 46px !important; height: 46px !important; border-radius: 12px !important; background-color: var(--primary-navy) !important; color: #ffffff !important; border: 1px solid rgba(255, 255, 255, 0.16) !important; box-shadow: 0 8px 20px -3px rgba(15, 23, 42, 0.35) !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; font-size: 1.1rem !important; opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; transform: translateY(16px) !important; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important; }
.scroll-to-top.btn-visible { opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; transform: translateY(0) !important; }
.scroll-to-top:hover { background-color: var(--tech-blue) !important; box-shadow: 0 10px 25px -2px rgba(2, 132, 199, 0.45) !important; transform: translateY(-3px) scale(1.05) !important; }
@media (max-width: 768px) { .scroll-to-top { right: 18px !important; bottom: 18px !important; width: 42px !important; height: 42px !important; border-radius: 10px !important; } }

/* 頁尾連結特效 */
#footer .container:first-of-type [class*="col-"]:not(.footer-copyright):not(.footer-links) a { white-space: normal !important; display: inline-block !important; color: #1e293b !important; padding: 3px 10px 3px 8px !important; margin: 1px 0 1px -8px !important; border-radius: 6px !important; border-left: 3px solid transparent !important; transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important; }
#footer .container:first-of-type [class*="col-"]:not(.footer-copyright):not(.footer-links) a:hover { color: #ffffff !important; background-color: rgba(255, 255, 255, 0.22) !important; border-left: 3px solid #ffffff !important; transform: translateX(6px) !important; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12) !important; font-weight: 600 !important; }

/* 頁尾次層 (Subfooter) 版權列排版 */
.footer-bottom a, .footer-links a { white-space: nowrap !important; display: inline-block !important; background: transparent !important; border: none !important; margin: 0 0 0 1.25rem !important; font-weight: 400 !important; }
@media (min-width: 768px) {
    #footer .footer-bottom .row { display: flex !important; flex-direction: row !important; justify-content: space-between !important; align-items: center !important; }
    .footer-copyright { flex: 0 0 auto !important; white-space: nowrap !important; text-align: left !important; }
    .footer-links { flex: 0 0 auto !important; margin-left: auto !important; text-align: right !important; white-space: nowrap !important; }
}
@media (max-width: 991.98px) {
    #footer .container:first-of-type .row > [class*="col-"]:not(:first-child) { display: none !important; }
    #footer .row > [class*="col-"]:first-child:not(.footer-copyright) { width: 100% !important; text-align: center !important; margin: 0 auto !important; }
    #header .navbar-main.collapse { display: none !important; }
    #header .navbar-main.show-mobile-nav { display: flex !important; flex-direction: column !important; }
    
    /* 這行是用来隱藏上方四欄快速選單的，請確保它沒有誤傷整個 footer */
    #footer .container:first-of-type .row > [class*="col-"]:not(:first-child) {
        display: none !important;
    }
}
@media (max-width: 767.98px) {
    #footer .footer-bottom .row { flex-direction: column !important; gap: 0.65rem !important; text-align: center !important; }
    .footer-copyright, .footer-links { width: 100% !important; white-space: normal !important; text-align: center !important; margin: 0 auto !important; }
    .footer-links a { margin: 0 0.5rem !important; }
}

/* ==============================================================================
   頁尾版權與次層連結顯示與排版強制修正 (Footer Copyright & Sub-links)
============================================================================== */

/* 確保版權列容器在所有尺寸下都正常顯示且不被隱藏 */
#footer .bg-inverse-dark,
#footer .footer-bottom,
.footer-copyright,
.footer-links {
    display: block !important;
    visibility: visible !important;
}

/* 電腦版 (768px以上)：左右兩端對齊、單行不換行 */
@media (min-width: 768px) {
    #footer .bg-inverse-dark .row,
    #footer .footer-bottom .row {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    .footer-copyright {
        flex: 0 0 auto !important;
        width: auto !important;
        text-align: left !important;
        white-space: nowrap !important;
    }
    .footer-links {
        flex: 0 0 auto !important;
        width: auto !important;
        margin-left: auto !important;
        text-align: right !important;
        white-space: nowrap !important;
    }
    .footer-links li, .footer-links a {
        display: inline-block !important;
        margin-left: 1.25rem !important;
        color: #000000 !important;
    }
}

/* 手機與平板版 (768px以下)：上下置中排列、自動折行、字體清晰 */
@media (max-width: 767.98px) {
    #footer .bg-inverse-dark .row,
    #footer .footer-bottom .row {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 0.75rem !important;
    }
    .footer-copyright,
    .footer-copyright p {
        width: 100% !important;
        text-align: center !important;
        white-space: normal !important;
        color: #000000 !important;
        display: block !important;
    }
    .footer-links {
        width: 100% !important;
        text-align: center !important;
        margin-left: 0 !important;
        white-space: normal !important;
        display: block !important;
    }
    .footer-links li, .footer-links a {
        display: inline-block !important;
        margin: 0 0.5rem !important;
        color: #000000 !important;
    }
}

/* ==============================================================================
   手機版頁尾終極精簡：強制隱藏頁尾上方的 Logo 與四大分類清單
============================================================================== */
@media (max-width: 991.98px) {
    /* 1. 直接精準隱藏頁尾上方包含 Logo 和四欄選單的整個主 row 區塊 */
    #footer > .container {
        display: none !important;
    }

    /* 2. 確保最下方的版權宣告與政策連結區塊在手機上完整顯示並置中 */
    #footer .bottom-copyright-area {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        text-align: center !important;
        padding: 1.5rem 0 !important;
    }

    #footer .bottom-copyright-area .row {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.75rem !important;
        margin: 0 !important;
    }

    #footer .bottom-copyright-area .col-md-4.footer-copyright,
    #footer .bottom-copyright-area .col-md-8.footer-links {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        text-align: center !important;
        white-space: normal !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #footer .bottom-copyright-area .footer-links a {
        display: inline-block !important;
        margin: 0 0.5rem !important;
        font-size: 0.875rem !important;
        color: inherit !important;
    }
}
/* ==============================================================================
   頁尾專屬樣式設定 (嚴格對齊首頁原版設計：藍底搭配深色清晰字體)
============================================================================== */
#footer {
    background-color: #39a1ff;
    color: #1e293b; /* 使用與首頁一致的專業深色字體 */
}

/* 頁尾各欄位標題 (解決方案、產品資訊等) */
#footer h4 {
    color: #0f172a !important; /* 深黑標題，確保高對比清晰 */
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

/* 頁尾所有一般清單連結 */
#footer a {
    color: #1e293b !important; /* 標準深色連結，完美對齊首頁 */
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* 頁尾連結滑鼠懸浮互動 */
#footer a:hover {
    color: #0f172a !important;
    text-decoration: underline;
}

/* 最下方版權宣告與次層政策連結文字 */
#footer .footer-copyright,
#footer .footer-links a {
    color: #1e293b !important;
}

#footer .footer-links a:hover {
    color: #0f172a !important;
    text-decoration: underline;
}
