/* --------------------- */
/* 字體引入
/* --------------------- */
/* (Google Fonts) */
/* @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100;300;400;700&display=swap'); */
/* font-family: 'Noto Sans TC', sans-serif; */
/* (檔案) */
@font-face {
    font-family: 'Athena';
    src: url('fonts/Athena-Book.woff2') format('woff2');
    font-display: swap;
}

/* 全域變數 */
:root {
    /* 應用 backdrop-filter: var(--glass_blur); */
    --glass_blur: saturate(250%) blur(10px);
    /* 應用 box-shadow: var(--box_shadow); */
    --box_shadow: 3px 3px 4px rgba(0, 0, 0, 0.2);
    /* 應用 filter: var(--drop_shadow); */
    --drop_shadow: drop-shadow(var(--box_shadow));
    /* 文字陰影 */
    --text_shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
    --ff_cn: 'Noto Sans TC', sans-serif;
    --ff_en: 'Athena', serif;
    --color_font: #333333;
    --color_disabled: #b0b0b0;
    --color_dark: #272727;
    --color_light: #e6e5e4;
    --color_gray: #717071;
    --color_ci: #ffa200;
    --color_ci_2: #106e46;
    --color_ci_3: #b1cfcb;
    --h_min: min(65vmin, 600px);
    --max_w: 1200px;
    --max_w_sm: 980px;
    --ls: 0.1em;
    /* --fs_base: 16px; */
    /* --header_height: 100px; */
}

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

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

/* SM - 行動裝置 */
@media (max-width: 767.98px) {
    :root {
        --fs_base: 14px;
        --h_rwd: 4 / 3;
        --header_height: 0px;
    }
    .text_justify.justify_md_reset {
        text-align: start;
        text-align-last: auto;
    }
}

/* MD - 平板 */
@media (min-width: 768px) and (max-width: 991.98px) {
    :root {
        --fs_base: 15px;
        --h_rwd: 4 / 3;
        --header_height: 100px;
    }
    .text_justify.justify_md_reset {
        text-align: start;
        text-align-last: auto;
    }
}

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

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

/****** 基礎設置 ******/
html,
body {
    width: 100%;
    min-height: 100lvh; /* 不可用 height: 100%，會鎖住 body 高度，sticky header 捲過一屏就失效 */
    margin: 0;
    font-family: var(--ff_cn);
    font-size: var(--fs_base);
    font-weight: 300;
    letter-spacing: var(--ls);
    /* background-color: #000000; */
    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;
} */

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !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;
    background-repeat: no-repeat !important;
    background-position: right 0.75em center !important;
    background-size: 1em !important;
}

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

a {
    text-decoration: none;
    color: inherit;
    overflow-wrap: break-word;
    user-select: text;
    -webkit-user-select: text;
}

:is(button, [onclick]) {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

:is(a, button, [onclick]) {
    transition:
        filter 0.25s ease,
        transform 0.25s ease;
}

:is(a, button, [onclick]):hover {
    filter: brightness(1.2);
    transform: translateY(8%);
    color: inherit;
}

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;
    font-weight: normal;
}

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

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

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

hr {
    opacity: 1;
    border: 0;
    margin: 0;
}

/* --------------------- */
/* 常用 樣式
/* --------------------- */
.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;
}

.btn_ci {
    background-color: var(--color_ci) !important;
    color: #ffffff !important;
    font-family: var(--ff_en);
    font-size: 1.25rem;
    letter-spacing: 1px;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
}

/* 毛玻璃效果 */
.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%;
    aspect-ratio: 16 / 9;
    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_ci);
}

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

.ff_en {
    font-family: var(--ff_en);
    letter-spacing: 1px;
}

/* 截斷文字 */
.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_2) !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;
}

.text_justify {
    text-align: justify;
    text-align-last: justify;
}
.text_justify_reset {
    text-align: start;
    text-align-last: auto;
}

/* 偵測背景顏色 反差 */
.mix_blend {
    mix-blend-mode: difference;
    filter: invert(1);
}
