/* --------------------- */
/* Google Fonts 字體引入
/* --------------------- */
@font-face {
    font-family: 'JF JINXUAN'; /* 定義字體名稱 */
    src: url('fonts/JF-JINXUAN-BOOK.woff2') format('woff2'); /* 優先載入 */
    font-display: swap; /* 確保文字在字體載入前可見 */
}
@font-face {
    font-family: 'LINESeedTW'; /* 定義字體名稱 */
    src: url('fonts/LINESeedTW_Rg.woff2') format('woff2'); /* 優先載入 */
    font-display: swap; /* 確保文字在字體載入前可見 */
}
/* (繁中用) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100;300;400;500;700;900&display=swap');
/* font-family: 'Noto Sans TC', sans-serif; */
/* @import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@200;300;400;500;600;700;900&display=swap'); */
/* font-family: 'Noto Serif TC', serif; */
/* (英文用) */
/* @import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&display=swap'); */
/* font-family: 'Roboto Condensed', serif; */
/* (數字用) */
/* @import url('https://fonts.googleapis.com/css2?family=Geologica:wght@100..900&display=swap'); */
/* font-family: 'Geologica', sans-serif; */
/* (英文 手寫體) */
/* @import url('https://fonts.googleapis.com/css2?family=Vujahday+Script&display=swap'); */
/* font-family: 'Vujahday Script', cursive; */

/* 全域變數 */
:root {
    /* 應用 backdrop-filter: var(--glass_blur); */
    --glass_blur: saturate(250%) blur(10px);
    /* 應用 filter: var(--drop_shadow); */
    --drop_shadow: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.3));
    /* 應用 box: var(--box_shadow); */
    --box_shadow: 4px 4px 10px rgba(0, 0, 0, 0.1);
    /* 文字陰影 */
    --text_shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
    --ff_cn: 'JF JINXUAN', serif;
    --ff_cn_2: 'LINESeedTW', 'Noto Sans TC', sans-serif;
    --ff_en: 'Roboto Condensed', serif;
    --ff_en_w: 'Vujahday Script', cursive;
    --ff_dec: 'Geologica', sans-serif;
    --color_font: #3e3a39;
    --color_disabled: #b0b0b0;
    --color_ci: #005833;
    --color_ci_2: #788d76;
    --color_ci_3: #e8ebe6;
    --h_min: min(65vmin, 600px);
    --max_w: 1200px;
    --max_w_sm: 980px;
    --fs_base: 16px;
    --ls: 0.1em;
    --header_height: 66px;
}

/* 直式螢幕 */
@media (orientation: portrait) {
}

/* 橫式螢幕 */
@media (orientation: landscape) {
}

/* SM - 行動裝置 */
@media (max-width: 767.98px) {
    :root {
        --fs_base: 14px;
        --h_rwd: 2 / 3;
    }
}

/* MD - 平板 */
@media (min-width: 768px) and (max-width: 991.98px) {
    :root {
        --fs_base: 15px;
        --h_rwd: 4 / 3;
    }
}

/* LG - 筆電 */
@media (min-width: 992px) and (max-width: 1199.98px) {
    :root {
        --fs_base: 16px;
        --h_rwd: 3 / 2;
    }
}

/* XL - 桌機 */
@media (min-width: 1200px) {
    :root {
        --fs_base: 16px;
        --h_rwd: 16 / 9;
    }
}

/****** 基礎設置 ******/
html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    font-family: var(--ff_cn);
    font-size: var(--fs_base);
    font-weight: 300;
    letter-spacing: var(--ls);
    background-color: transparent;
    color: var(--color_font);
    scroll-behavior: smooth;
}
body:before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background-image: url(images/bg.jpg); */
    background-repeat: no-repeat;
    background-position: top center;
    background-size: cover;
    z-index: -1;
    opacity: 0.8;
}

*:focus {
    outline: none !important;
    -webkit-box-shadow: unset !important;
    box-shadow: unset !important;
}

input::-webkit-input-placeholder,
.form-control::-webkit-input-placeholder {
    color: var(--color_disabled) !important;
    font-weight: normal !important;
}

input:-ms-input-placeholder,
.form-control:-ms-input-placeholder {
    color: var(--color_disabled) !important;
    font-weight: normal !important;
}

input::placeholder,
.form-control::placeholder {
    color: var(--color_disabled) !important;
    font-weight: normal !important;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    background-image: url('data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 8 8%27%3e%3cpath fill=%27%23198754%27 d=%27M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z%27/%3e%3c/svg%3e') !important;
}

input:disabled + label {
    text-decoration: line-through;
}

a,
a:hover,
a:visited,
a:link,
a:active {
    text-decoration: none;
    color: inherit;
    overflow-wrap: break-word; /* 允許在內部進行換行，防止跑版 */
    word-wrap: break-word; /* 為舊版瀏覽器提供向下相容 */
    /* 確保允許文字被選取 */
    user-select: text;
    -webkit-user-select: text; /* 適用於 Chrome, Safari */
    -moz-user-select: text; /* 適用於 Firefox */
    -ms-user-select: text; /* 適用於 IE/Edge */
}

h1,
h2,
h3,
h4,
h5,
h6,
a,
button {
    line-height: 1.5;
    letter-spacing: var(--ls);
}

button {
    background-color: transparent;
    border: none;
}

p {
    line-height: 1.85;
}

u {
    text-decoration: none; /* 移除內建底線 */
    border-bottom: var(--ls) var(--color_sky) solid;
}

section {
    position: relative;
    width: 100%;
}

small {
    letter-spacing: calc(var(--ls) / 2);
}

/* --------------------- */
/* 常用 樣式
/* --------------------- */
.view_warp {
    margin: 0 5.5vw;
}

.max_w {
    max-width: var(--max_w);
    margin-left: auto;
    margin-right: auto;
}

.max_w_sm {
    max-width: var(--max_w_sm);
    margin-left: auto;
    margin-right: auto;
}

.position_center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.img_cover {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.img_cover img,
.img_cover video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.img_contain {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.img_contain img,
.img_contain video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.bg_cover {
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    position: relative;
}
.bg_contain {
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    position: relative;
}

.h_rwd {
    width: 100%;
    aspect-ratio: var(--h_rwd);
}

.h_4x3 {
    width: 100%;
    aspect-ratio: 4 / 3;
}

.h_16x9 {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.h_1x1 {
    width: 100%;
    aspect-ratio: 1 / 1;
}

.bg_ci {
    background-color: var(--color_ci) !important;
    color: #ffffff !important;
}

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

/* 毛玻璃效果 */
.bg_glass {
    position: relative;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: saturate(100%) blur(2px);
    border: none !important;
    overflow: hidden;
}

/* 偽元素：負責製作「漸層邊框」 */
.bg_glass.border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    /* === 漸層邊框 === */
    background: linear-gradient(to right, transparent, #ffffff);
    /* === 遮罩挖空中間 === */
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none; /* 不阻擋滑鼠點擊 */
}

/* 輪廓陰影（穿透） */
.filter_shadow {
    filter: var(--drop_shadow);
}

/* 區塊陰影（不穿透） */
.box_shadow {
    box-shadow: var(--box_shadow);
}

/* 傾斜 */
.skew_right {
    transform: skewX(-10deg);
}

/* --------------------- */
/* Youtube 影片 嵌入
/* --------------------- */
.youtube_box {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: calc(9 / 16 * 100%);
    border-radius: 4vmin;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.youtube_box iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

/* --------------------- */
/* 客製 圖標
/* --------------------- */
.after_arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.after_arrow::after {
    content: '';
    display: inline-block;
    background-image: url(images/icon_arrow_right_bk.svg);
    background-size: cover;
    background-position: center;
    width: 0.9em;
    height: 0.9em;
    margin: 0.1em 0 0 0.5em;
    /* 避免被 flex壓縮	 */
    flex-shrink: 0;
}
.after_arrow.color_wh::after {
    background-image: url(images/icon_arrow_right_wh.svg);
}

.best::after {
    content: url(images/icon_check_circle_gn.svg);
    width: 1.5em;
    display: inline-block;
    line-height: 0.9;
    margin: 0 3px;
    transform: translateY(20%);
}

/* --------------------- */
/* 表格 相關
/* --------------------- */
/* 搭配 checkScrollBar() 偵測 */
.scroll_bar {
    border-right: var(--color_ci) 2px dashed;
    position: relative;
    padding-top: 20px;
}

.scroll_bar::before {
    content: '向右滑動檢視更多 ▷';
    position: absolute;
    top: 0;
    right: 3px;
    background-color: var(--color_ci);
    color: #ffffff;
    font-size: 13px;
    line-height: 1;
    z-index: 100;
    border: var(--color_ci) 1px solid;
    padding: 5px 0px 5px 5px;
}

.scroll_bar tr > *:first-child {
    position: sticky;
    left: 0;
    background-color: var(--color_bg);
}

/* --------------------- */
/* 文字 相關
/* --------------------- */
.ff_cn {
    font-family: var(--ff_cn);
}

.ff_cn_2 {
    font-family: var(--ff_cn_2);
}

.ff_en {
    font-family: var(--ff_en);
    letter-spacing: 0.1em;
}

.ff_en_w {
    font-family: var(--ff_en_w);
    /* letter-spacing: 0.1em; */
}

.ff_dec {
    font-family: var(--ff_dec);
}
/* 截斷文字 */
.text_cut {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 1;
    -webkit-line-clamp: 1;
}

.text_ci {
    color: var(--color_ci) !important;
}

.text_start {
    text-indent: 2.3em;
}

.text_shadow {
    text-shadow: var(--text_shadow);
}

.text_circle_box {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    padding: 5%; /* 內距使用相對單位，隨螢幕縮放 */
    box-sizing: border-box;
    aspect-ratio: 1 / 1; /* 保持正圓 */
    word-wrap: break-word;
}

.text_vertical {
    writing-mode: vertical-rl;
    text-orientation: upright;
}

.text_rotate {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.mix_blebd {
    mix-blend-mode: difference;
    filter: invert(1);
}

/* --------------------- */
/* 瀑布流 排版
/* --------------------- */
.masonry_grid {
    column-gap: 1.5rem; /* 欄位 間距 */
}
.masonry_grid > * {
    display: inline-block;
    width: 100%;
    break-inside: avoid; /* 內容不可分割 */
    margin-bottom: 1.5rem; /* 欄位 上下間距 */
}
/* SM */
@media (max-width: 767px) {
    .masonry_grid {
        column-count: 1; /* 欄位數 */
    }
}
/* MD */
@media (min-width: 768px) {
    .masonry_grid {
        column-count: 2; /* 欄位數 */
    }
}
/* LG */
@media (min-width: 992px) {
    .masonry_grid {
        column-count: 3; /* 欄位數 */
    }
}
/* XL */
@media (min-width: 1200px) {
    .masonry_grid {
        column-count: 3; /* 欄位數 */
    }
}

/* --------------------- */
/* 動畫 設定
/* --------------------- */
@keyframes clipLeft {
    0% {
        clip-path: inset(0 0 0 100%);
    }
    100% {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes fadeTop {
    0% {
        transform: translateY(60px);
    }
    100% {
        transform: translateY(0);
    }
}

[data-scroll-class] {
    opacity: 0; /* 初始狀態，看不見 */
}

.ani_clipLeft {
    animation: clipLeft 1s;
    opacity: 1; /* 解除 初始狀態 */
}

.ani_fadeTop {
    animation: fadeTop 0.6s;
    opacity: 1; /* 解除 初始狀態 */
}

/* 滑鼠磁力吸附效果 */
.effect_mousemove_magnet {
    opacity: 1;
}
.effect_mousemove_magnet > * {
    will-change: transform; /* 預先告知瀏覽器將要發生的變化 */
    z-index: 1;
    cursor: pointer;
}
.effect_mousemove_magnet > *:hover {
    z-index: 100 !important;
}

.effect_messy_layout {
    opacity: 1;
}
.effect_messy_layout > *:not(.messy_off):hover {
    transform: translate(0) !important;
    z-index: 100 !important;
    cursor: pointer;
}
