﻿:root {
    --bg: #f3f3f3;
    --card: #fff;
    --text: #222;
    --primary: #6b62ff;
    --pill: #f4f4f5;
    --shadow: 0 10px 30px rgba(0,0,0,.08);
    --radius-xl: 36px;
    --header-h: 90px; /* header 高度 */
}

* {
    box-sizing: border-box
}

/* 全站的連結：無底線 */
a {
    text-decoration: none;
}

    /* 滑鼠移上去也不出現底線 */
    a:hover {
        text-decoration: none;
    }

html, body {
    margin: 0;
    background: #ffffff !important;
    color: var(--text);
    /*font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial*/
    font-family: "Noto Sans", "Noto Sans TC", Roboto, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif !important;
}

a {
    color: inherit;
    text-decoration: none
}

/* ================= Header ================= */
/* 初始：不固定、透明、白字，跟內容一起捲走 */
.site-header {
    position: absolute; /* 關鍵：初始不固定 */
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: transparent;
    border: 0;
    box-shadow: none;
    z-index: 50;
    transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
/* 內層導覽列（保留你的白色底線） */
.nav {
    width: 100%;
    margin: 0 auto;
    height: var(--header-h);
    padding: 0 5%;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #ffffff; /* 初始透明狀態用白線 */
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700
}

.logo-badge {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffcc00;
    font-size: 12px;
    font-weight: 700;
}

.nav-center {
    margin: 0 auto;
    display: flex;
    gap: 28px;
    font-weight: 600;
    color: #fff;
    font-size: 1.3em;
    font-family: Noto Sans TC;
    align-items: flex-end;
    list-style: none;
}

    .nav-center li a .menu:hover {
        color: #0F63B6;
    }

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.lang {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #fff;
    position: relative;
    cursor: pointer;
}

    .lang .lang-setting {
        position: absolute;
        top: 58px;
        width: 206px;
        left: -5rem;
        text-align: center;
        display: none;
    }

    .lang.active .lang-setting {
        display: block;
    }

    .lang .lang-setting ul {
        list-style: none;
        margin: 0;
        padding: 0;
        box-shadow: 0px 3px 6px #00000029;
        border: 1px solid #00000029;
        background-color: #FFF;
    }

        .lang .lang-setting ul li {
            font-size: 20px;
            color: #222222;
            border-bottom: 1px solid #00000029;
        }

        .lang .lang-setting ul div {
            padding: 15px 0;
        }

.caret {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

/* 超過門檻：變「固定在頂端 + 白底黑字 + 淡陰影 + 灰底線」 */
.site-header.stuck {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,.06);
    transform: translateZ(0); /* 讓動畫更順 */
}

    .site-header.stuck .nav {
        border-bottom: 1px solid #e5e7eb
    }

    .site-header.stuck .nav-center,
    .site-header.stuck .nav-center a,
    .site-header.stuck .icon-btn,
    .site-header.stuck .lang {
        color: #111;
    }

    .site-header.stuck .icon_tool .icon_menu {
        background-color: #111 !important;
    }

body:has(.site-header .icon_tool .icon_menu.active) {
    overflow: hidden;
    touch-action: none; /* 行動裝置更穩 */
    overscroll-behavior: contain; /* 避免彈性滾動 */
}

.site-header.stuck .nav-center .menu:hover {
    color: #0F63B6;
}

/* 防跳動的占位元素（切成 fixed 時才給高度） */
#header-spacer {
    height: 0
}

/* ================= Footer 漸層帶 ================= */
.footer-ribbon {
    position: relative;
    background: linear-gradient(180deg,#9392d1 0%,#747bc2 100%);
    color: #fff;
    overflow: hidden;
    /*height: 300px;*/
    padding-bottom: 3rem;
}

.footer-inner {
    width: 90%;
    margin: 0 auto;
    padding: 0 var(--side-pad);
    /*min-height: 200px;*/
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-top {
    padding-top: 6rem;
}

.footer-brand {
    display: flex;
    align-items: end
}

.brand-logo {
    height: 56px;
    width: auto;
    display: block
}

.brand-line {
    margin: 0;
    opacity: .95
}

.brand-copy {
    margin: 0;
    opacity: .85;
    font-size: 16px
}

.brand-sep {
    width: 90%;
    height: 1px;
    border: 0;
    margin: 30px auto;
    background: rgba(255,255,255,.45)
}

.footer-links {
    display: flex;
    align-items: flex-start;
}

.footer-link {
    width: 112px;
    text-align: center;
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

    .footer-link img {
        height: 50px;
        width: auto;
        object-fit: contain;
        display: block;
        filter: drop-shadow(0 2px 6px rgba(0,0,0,.15));
    }

    .footer-link span {
        font-weight: 600;
        font-size: 16px;
    }


.footer-head {
    width: 100%;
    height: 90px;
    /*position: absolute;*/
    z-index: 2;
    background: #FFF;
    border-bottom-left-radius: 80px;
}

/* ================= 回頂按鈕 ================= */
.back-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: #9896D4;
    color: #fff;
    box-shadow: 0 8px 22px rgba(0,0,0,.18);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
    z-index: 80;
}

    .back-top.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0)
    }

    .back-top:hover {
        filter: brightness(1.05)
    }

    .back-top:active {
        transform: translateY(1px)
    }

.search-div {
    display: none;
    background-color: #EFEFEF;
    padding: 11px 60px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #D6D6D6;
    border-radius: 60px;
    padding: 8px 12px;
    width: 100%;
    margin: 0 auto; /* 置中 */
}

    .search-box input {
        flex: 1;
        border: none;
        outline: none;
        font-size: 16px;
        padding: 8px;
    }

    .search-box .icon-search {
        margin-right: 8px;
        font-size: 18px;
        color: #666;
    }

    .search-box .clear-btn {
        background: none;
        border: none;
        font-size: 18px;
        cursor: pointer;
        color: #999;
        transition: color 0.2s;
        text-decoration-line: none;
    }

        .search-box .clear-btn:hover {
            color: #333;
        }

.mask {
    display: none;
    width: 100%;
    height: 100%;
    z-index: 9;
    background: #000000;
    opacity: 0.58;
    position: fixed;
}

.mobile-mask {
    display: none;
    width: 100%;
    height: 100%;
    z-index: 40;
    background-color: #FFFFFF;
    position: fixed;
}

    .mobile-mask ul li {
        color: #222222;
        font-size: 24px;
        font-weight: bold;
    }

        .mobile-mask ul li .menu {
            border-bottom: 1px solid #CBCBCB;
            padding: 11px 0;
        }

        .mobile-mask ul li .mobile-lang {
            float: left;
            margin-right: 31px;
            margin-top: 23.5px;
        }

.positionUnset {
    position: unset;
}


/* ================= RWD ================= */
@media (max-width:1440px) {
    .search-box {
        padding: 6px 12px;
    }
}

@media (max-width:1024px) {
    .footer-head {
        position: unset;
    }

    .footer-top {
        padding-top: 0;
    }

    .footer-links {
        padding-top: 40px;
    }

    .footer-inner {
        flex-direction: column-reverse;
        justify-content: space-around;
        margin: 15px auto;
    }

    .footer-ribbon {
        height: 100%;
    }

    .footer-brand {
        display: inline-block;
        padding-top: 38px;
        width: 100%;
    }

    .brand-line {
        padding-top: 25px;
    }

    .brand-sep {
        margin: 15px auto;
    }

    .brand-copy {
        width: 100%;
    }

    .footer-inner-mobile {
        flex-direction: column;
        justify-content: flex-start;
        min-height: 0;
    }

        .footer-inner-mobile div {
            margin: 15px 0 48px 0;
            width: 100%;
        }

    .footer-link {
        width: 120px;
    }

    .footer-links {
        width: 100%;
        justify-content: space-evenly;
    }
}

@media (max-width:960px) {
    .brand-logo {
        height: 48px
    }
}

@media (max-width:768px) {
    #siteLogo {
        width: 73px;
    }

    .nav-center, .lang {
        display: none;
    }

    .icon_tool {
        display: flex;
        flex-direction: row;
    }

        .icon_tool .icon_menu {
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: #FFF;
            -webkit-mask-image: url(/assets/images/mobile-bar.svg);
            -webkit-mask-repeat: no-repeat;
            -webkit-mask-position: center;
            mask-image: url(/assets/images/mobile-bar.svg);
            mask-repeat: no-repeat;
            mask-position: center;
            background-size: cover;
        }

            .icon_tool .icon_menu.active {
                -webkit-mask-image: url(/assets/images/mobile-close.svg);
                mask-image: url(/assets/images/mobile-close.svg);
            }

        .icon_tool div {
            width: 32px;
            height: 32px;
            background-repeat: no-repeat;
            background-size: 22px 22px;
            background-position: center;
        }

    .nav {
        justify-content: space-between;
    }

    .search-div {
        padding: 11px 15px;
    }

    .mobile_menu ul {
        list-style: none;
        padding-left: 0;
        font-size: 32px;
        color: #fff;
        margin: 20px;
        margin-top: 20px;
    }

        .mobile_menu ul li {
            line-height: 2;
        }

    .mobile_menu .c-menu-main__item {
        margin-bottom: 24px;
        position: relative;
    }
}

@media (max-width:560px) {
    .footer-link {
        width: 120px
    }

        .footer-link img {
            height: 60px
        }
}

@media (max-width:375px) {
    .footer-link {
        width: 95px;
    }
}


.breadcrumb {
    width: 90%;
    margin: 5px auto;
}
