@charset "UTF-8";

/* =========================================
   1. 全域變數 & 基礎設定 (Global & Reset)
   ========================================= */
:root {
    /* 配色方案：暗黑破壞神/天堂風格 */
    --bg-dark: #121212;
    /* 網頁最底層背景 */
    --bg-panel: rgba(30, 30, 30, 0.85);
    /* 內容區塊半透明黑 */
    --primary-gold: #fbb750;
    /* 主要金色 (標題、Hover) */
    --accent-red: #d7423c;
    /* 強調紅 (按鈕、重要標籤) */
    --text-main: #e0e0e0;
    /* 主要文字 */
    --text-muted: #aaaaaa;
    /* 次要文字 */
    --border-color: rgba(255, 255, 255, 0.1);
    /* 微弱邊框 */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /*  background: var(--bg-dark) url('../img/bg_main.jpg') no-repeat center top fixed;*/
    background: var(--bg-dark);
    background-size: cover;
    font-family: "Microsoft JhengHei", "Heiti TC", sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-gold);
}

ul {
    list-style: none;
}

/* =========================================
   2. 上方導航列 (Navigation) - 電腦版
   ========================================= */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 160px;
    /* 配合圖片按鈕高度 */
    background: rgba(0, 0, 0, 0.85);
    border-bottom: 1px solid var(--accent-red);
    z-index: 9999;

    /* 核心排版：Flexbox 置中 */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* --- LOGO 設定 (電腦版：絕對定位釘在左邊) --- */
.nav-logo {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;

    position: absolute;
    left: 40px;
    /* 距離左邊 40px */
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.nav-logo img {
    display: block;
    height: 120px;
    /* Logo 高度 */
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.8));
}

.nav-logo:hover {
    transform: translateY(-50%) scale(1.05);
    filter: drop-shadow(0 0 10px rgba(251, 183, 80, 0.6));
}

/* --- 選單按鈕群容器 --- */
.nav-links {
    display: flex;
    gap: 15px;
    /* 按鈕間距 */
    align-items: center;
}

/* --- 圖片按鈕樣式 --- */
.nav-btn {
    display: block;
    width: 150px;
    height: 150px;
    text-indent: -9999px;
    overflow: hidden;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s ease;
}

.nav-btn:hover {
    transform: scale(1.05);
}

/* 設定各個按鈕的背景圖 */
.btn-home {
    background-image: url('../Kit/img/home_info/c001_1.webp');
}

.btn-home:hover {
    background-image: url('../Kit/img/home_info/c001_2.webp');
}

.btn-intro {
    background-image: url('../Kit/img/home_info/c002_1.webp');
}

.btn-intro:hover {
    background-image: url('../Kit/img/home_info/c002_2.webp');
}

.btn-rule {
    background-image: url('../Kit/img/home_info/c005_1.webp');
}

.btn-rule:hover {
    background-image: url('../Kit/img/home_info/c005_2.webp');
}

.btn-download {
    background-image: url('../Kit/img/home_info/c003_1.webp');
}

.btn-download:hover {
    background-image: url('../Kit/img/home_info/c003_2.webp');
}

.btn-query {
    background-image: url('../Kit/img/home_info/c004_1.webp');
}

.btn-query:hover {
    background-image: url('../Kit/img/home_info/c004_2.webp');
}


/* =========================================
   3. 下拉式選單 (Mega Menu) - 電腦版
   ========================================= */
/* 下拉容器 */
.nav-item-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

/* 選單本體 (預設隱藏) */
.dropdown-menu-grid {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 600px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--accent-red);
    border-radius: 8px;
    padding: 20px;

    /* 動畫設定 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    z-index: 1000;

    /* 內部排版 */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* 滑鼠移入時顯示 */
.nav-item-dropdown:hover .dropdown-menu-grid {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 選單項目樣式 */
.dropdown-menu-grid .info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
}

.dropdown-menu-grid .icon-wrap {
    margin-bottom: 5px;
}

.dropdown-menu-grid .icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.dropdown-menu-grid h4 {
    color: #ccc;
    font-size: 12px;
    margin: 0;
    font-weight: normal;
    transition: color 0.3s;
}

.dropdown-menu-grid .info-item:hover .icon-wrap img {
    transform: scale(1.2);
}

.dropdown-menu-grid .info-item:hover h4 {
    color: var(--primary-gold);
}


/* =========================================
   4. 網站主容器 (Layout)
   ========================================= */
.site-container {
    max-width: 1200px;
    margin: 165px auto 40px;
    padding: 0 20px;
    min-height: calc(100vh - 200px);
}


/* =========================================
   5. 頁尾 (Footer)
   ========================================= */
footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.8);
    margin-top: auto;
}


/* =========================================
   6. 圖片預載 (Preload)
   ========================================= */
body::after {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    z-index: -1;
    content: url('../Kit/img/home_info/c001_2.webp') url('../Kit/img/home_info/c002_2.webp') url('../Kit/img/home_info/c005_2.webp') url('../Kit/img/home_info/c004_2.webp') url('../Kit/img/home_info/c003_2.webp');
}


/* =========================================
   7. 手機版 RWD (max-width: 1024px)
   ========================================= */
@media (max-width: 1024px) {

    /* --- 導航列改為垂直排列 --- */
    .main-nav {
        height: auto;
        padding: 10px 0;
        flex-direction: column;
        position: fixed;
    }

    /* --- Logo 歸位 --- */
    .nav-logo {
        position: static;
        transform: none;
        margin-bottom: 5px;
    }

    .nav-logo:hover {
        transform: scale(1.05);
    }

    .nav-logo img {
        height: 50px;
        /* 手機版 Logo 縮小 */
    }

    /* --- 選單群組 --- */
    .nav-links {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    /* --- 按鈕樣式還原為文字 --- */
    .nav-btn {
        width: auto;
        height: auto;
        text-indent: 0;
        /* 顯示文字 */
        background-image: none !important;
        /* 移除圖片 */
        overflow: visible;

        color: #ccc;
        font-size: 15px;
        font-weight: bold;
        padding: 8px 12px;
        border-radius: 4px;
        border: 1px solid transparent;
    }

    .nav-btn:hover {
        transform: none;
        color: var(--primary-gold);
        background: rgba(255, 255, 255, 0.1);
        border-color: var(--primary-gold);
    }

    /* --- 下拉選單處理 (關鍵修正) --- */
    .nav-item-dropdown {
        display: contents;
        /* 取消容器特性 */
    }

    /* 預設隱藏選單 (防止一直擋住) */
    .dropdown-menu-grid {
        display: none;
        position: static;
        transform: none !important;
        width: 100%;
        left: 0;
        opacity: 1;
        visibility: visible;
        background: rgba(0, 0, 0, 0.95);
        /* ★ 修正點：背景改深色，才不會跟底下內容打架 */
        border: none;
        padding: 10px;
        box-shadow: none;

        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 10px;
        order: 10;
        border-top: 1px solid #444;
        /* 加條線區隔 */
    }

    /* 只有當加上 .show class 時才顯示 */
    .dropdown-menu-grid.show {
        display: grid;
        /* ★ 修正點：JS 切換這個 class */
        animation: fadeInMobile 0.3s;
    }

    @keyframes fadeInMobile {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    .dropdown-menu-grid .info-item {
        flex-direction: row;
        /* 圖左文右 */
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid #444;
        border-radius: 4px;
        padding: 8px 15px;
        justify-content: center;
        gap: 10px;
    }

    .dropdown-menu-grid .icon-wrap {
        margin-bottom: 0;
    }

    .dropdown-menu-grid h4 {
        font-size: 14px;
        color: #fff;
        font-weight: bold;
    }

    /* --- 調整內容區上邊距 --- */
    .site-container {
        margin-top: 150px;
    }
}

/* ★ 修改這裡：章節標題強化 */
.section-title {
    font-size: 1.8rem;
    color: var(--primary-gold, #fbb750);
    margin-top: 40px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(251, 183, 80, 0.3);
    font-weight: bold;
    display: flex;
    align-items: center;
}

/* 圖示特別處理 */
.section-title i {
    margin-right: 15px;
    color: var(--accent-red, #d7423c);
    font-size: 1.6rem;
}

/* 手機版微調 */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.5rem;
        margin-top: 30px;
    }
}

.content-box h1 {
    color: var(--primary-gold, #fbb750);
    border-bottom: 2px solid var(--accent-red, #d7423c);
    padding-bottom: 10px;
    margin-bottom: 20px;
}




/* 小顆 icon 按鈕（分享） */
.btn-share-mini {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);

    cursor: pointer;
    user-select: none;
    transition: transform 0.12s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.btn-share-mini i {
    font-size: 14px;
    line-height: 1;
}

.btn-share-mini:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
}

.btn-share-mini:active {
    transform: translateY(1px) scale(0.98);
}

.btn-share-mini[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-share-mini.is-copied {
    background: rgba(80, 200, 120, 0.18);
    border-color: rgba(80, 200, 120, 0.35);
    color: rgba(190, 255, 210, 0.95);
}

.page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    /* 讓 header-line 可以換到下一行 */
}

.page-header h1 {
    margin: 0;
    flex: 1;
    /* 標題吃掉剩餘空間，按鈕就會被推到最右 */
}

.page-header .btn-share-mini {
    margin-left: auto;
    /* 保險：強制靠右 */
}

.page-header .header-line {
    flex: 0 0 100%;
    /* 換行並占滿整行 */
    height: 1px;
    background: #e33;
    /* 你原本的紅線顏色 */
    margin-top: 8px;
}