/* --------------------- */
/* Google Fonts 字體引入
/* --------------------- */
/* (繁中用) */
@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=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; */

/* --------------------- */
/* RWD 自適應
/* --------------------- */
/* 直式螢幕 */
@media (orientation: portrait) {
    :root {
        --gap: min(25vh, 150px);
    }
}

/* 橫式螢幕 */
@media (orientation: landscape) {
    :root {
        --gap: min(25vw, 200px);
    }
}

/* SM */
@media (max-width: 767px) {
    :root {
        --fs_base: 14px;
    }
}

/* MD */
@media (min-width: 768px) {
    :root {
        --fs_base: 15px;
    }
}

/* LG */
@media (min-width: 992px) {
    :root {
        --fs_base: 16px;
    }
}

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

/* --------------------- */
/* 全域 變數
/* --------------------- */
:root {
    --reset100vh: 100vh;
    --100vh: calc(var(--reset100vh, 1vh) * 100);
    --header_height: 70px;
    /* 應用 backdrop-filter: var(--glass_blur); */
    --glass_blur: saturate(250%) blur(10px);
    /* 外陰影 */
    --outer_shadow: 2px 3px 4px rgba(0, 0, 0, 0.1);
    /* 文字陰影 */
    --text_shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
    /* 應用 filter: var(--drop-shadow); */
    --drop-shadow: drop-shadow(var(--outer_shadow));
    --ff_cn: 'Noto Sans TC', sans-serif;
    --ff_en: 'Roboto Condensed', serif;
    --ff_en_w: 'Vujahday Script', cursive;
    --ff_dec: 'Geologica', sans-serif;
    --height_min: min(700px, 100vmin);
    --max_w: 1200px;
    --color_font: #363336;
    --color_disabled: #c5c5c5;
    --color_primary_bg: #c3d5ea;
    --color_success_bg: #d4edda;
    --color_bg: rgba(242, 242, 242, 0.8);
    --color_ci: #13403d;
    --color_green: #00a484;
    --color_shopee: #ee4d2d;
    --color_line: #00b900;
    --color_gray: #ececec;
    --color_light: #f2f2f2;
    --color_sky: #6cc5e9;
    --color_blue: #1e4f91;
    --color_gradient_bule: linear-gradient(270deg, #6cc5e9, #1e4f91);
    --color_gradient_sunset: linear-gradient(270deg, #ff9a9a 0%, #ffb45c 100%);
    --ls: 0.1em;
}

/* --------------------- */
/* 標籤 設定
/* --------------------- */
html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    font-family: var(--ff_cn);
    font-size: var(--fs_base);
    letter-spacing: var(--ls);
    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_271525493.jpg);
    background-repeat: no-repeat;
    background-position: top center;
    background-size: cover;
    z-index: -1;
} */

*: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;
}

a,
a:hover,
a:visited,
a:link,
a:active {
    text-decoration: none;
    color: inherit;
    overflow-wrap: break-word; /* 允許在內部進行換行，防止跑版 */
    word-wrap: break-word; /* 為舊版瀏覽器提供向下相容 */
}

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

p {
    line-height: 1.85;
}

u {
    text-decoration: none; /* 移除內建底線 */
    border-bottom: var(--ls) var(--color_sky) solid;
}
u-wavy {
    text-decoration: none; /* 移除內建底線 */
    border-bottom: none;
    background-image: url('images/bg_wavy.svg');
    background-repeat: repeat-x;
    background-position: 0 100%; /* 貼齊文字底部 */
    background-size: 0.5em; /* 調整波浪大小，幅度更大 */
    padding: 0 0.1em 0.35em; /* 預留底部空間，避免波浪壓到文字 */
}

small {
    font-size: 0.9em;
    letter-spacing: 1px;
}

ol,
ul {
    padding-left: 1.5rem;
}

label.mark_req::before {
    content: '必填';
    font-style: normal;
    font-weight: regular;
    font-size: 0.9em;
    padding: 2px 0.75rem;
    letter-spacing: 1px;
    border-radius: 1000px;
    margin-right: 0.5rem;
    background: var(--color_gradient_sunset);
    color: #ffffff;
}
label.mark_reqno::before {
    content: '選填';
    font-style: normal;
    font-weight: regular;
    font-size: 0.9em;
    padding: 2px 0.75rem;
    letter-spacing: 1px;
    border-radius: 1000px;
    margin-right: 0.5rem;
    background: var(--color_disabled);
    color: #ffffff;
}

/* --------------------- */
/* 常用 樣式
/* --------------------- */
.max_w {
    max-width: var(--max_w);
    margin-left: auto;
    margin-right: auto;
}

.min_w {
    min-width: min(600px, 100vw) !important;
    margin-left: auto;
    margin-right: auto;
}

.min_w_lg {
    min-width: min(900px, 150vw) !important;
    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 {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

.img_width {
    width: min(80vw, 450px) !important;
}

.icon_width {
    width: min(33.3vw, 180px) !important;
}

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

.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_glass {
    backdrop-filter: var(--glass_blur);
}

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

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

/* 區塊陰影（不穿透） */
.box_shadow {
    box-shadow: var(--outer_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_en {
    font-family: var(--ff_en);
    letter-spacing: var(--ls);
}

.ff_en_w {
    font-family: var(--ff_en_w);
    letter-spacing: var(--ls);
}

.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_indent {
    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;
}

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

/* --------------------- */
/* 按鈕 樣式
/* --------------------- */
.btn-shimmer {
    background-color: var(--color_sky);
    color: #ffffff !important;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1.5rem 0.6rem;
    border-radius: 100rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: inline-block;
    font-style: italic;
}
.btn-shimmer:hover {
    transform: translateY(-2px) scale(1.01);
}
.btn-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 25%;
    height: 100%;
    /* 創建從透明到半透明白色再到透明的漸變光帶 */
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 100%);
    /* 旋轉光帶以增加動態感 */
    transform: skewX(-20deg);
    /* 開始動畫 */
    animation: shimmer 1.5s infinite linear;
}
.btn-shimmer big {
    font-weight: bold;
}
@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 125%;
    }
}

/* --------------------- */
/* 文字 跑馬燈 marquee
/* --------------------- */
@keyframes runLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}
@keyframes runTop {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%);
    }
}
.text_marquee {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    -webkit-animation: runLeft 60s infinite linear 0.5s both;
    animation: runLeft 60s infinite linear 0.5s both;
    width: 100%;
    list-style: none;
    font-size: 8vmin;
    line-height: 1;
    font-weight: 500;
    letter-spacing: var(--ls);
    color: var(--color_light);
}
.text_marquee span {
    white-space: nowrap;
    margin: 0 0.5em 0 0;
}
.text_marquee b {
    writing-mode: horizontal-tb;
    line-height: 1;
}
.text_marquee em {
    letter-spacing: 0;
}
.text_marquee.writing_vertical {
    -webkit-animation: runTop 60s infinite linear;
    animation: runTop 60s infinite linear;
    width: auto;
    height: 100%;
    writing-mode: vertical-lr;
}
.text_marquee.writing_vertical span {
    margin: 0 0 0.5em 0;
}

/* --------------------- */
/* 瀑布流 排版
/* --------------------- */
.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);
    }
}

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

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

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

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

/* --------------------- */
/* 隨機排列效果 關聯 effectMessyLayout();
/* --------------------- */
.effect_messy_layout {
    opacity: 1;
}
.effect_messy_layout > *:not(.messy_off):hover {
    transform: translate(0) !important;
    z-index: 100 !important;
    cursor: pointer;
}
