@font-face {
  font-family: NotoSansTC-Black;
  src: url("../fonts/NotoSansTC-Black.otf");
}

@font-face {
  font-family: NotoSansTC-Regular;
  src: url("../fonts/NotoSansTC-Regular.otf");
}

@font-face {
  font-family: NotoSansTC-Bold;
  src: url("../fonts/NotoSansTC-Bold.otf");
}

@font-face {
  font-family: NotoSansTC-Thin;
  src: url("../fonts/NotoSansTC-Thin.otf");
}

@font-face {
  font-family: NotoSansTC-Light;
  src: url("../fonts/NotoSansTC-Light.otf");
}

@font-face {
  font-family: NotoSansTC-Medium;
  src: url("../fonts/NotoSansTC-Medium.otf");
}

@font-face {
  font-family: ZenAntiqueSoft-Regular;
  src: url("../fonts/ZenAntiqueSoft-Regular.ttf");
}

@font-face {
  font-family: palatinolinotype-bold;
  src: url("../fonts/palatinolinotype_bold.ttf");
}

@font-face {
  font-family: GenRyuMin2TC-R;
  src: url("../fonts/GenRyuMin2TC-R.otf");
}

:root {
    --background-main-color: #FFFFFF;
    --dark-text-main-color: #0E0E0F; /* 大標90 */
    --dark-text-second-color: #3E3A39; /* 英 70 */
    --dark-text-third-color: #595757; /* 小標 (分類、粗體) 80 */
    --dark-text-fourth-color: #898989; /* 內文60 */
    --light-text-main-color: #737373;
    --max-width: 1920px;
}
body {
    padding: 0;
    margin: 0;
    background-color: var(--background-main-color);
}
a {
    text-decoration: none;
    color: unset;
}
button {
    border: none;
    background-color: transparent;
    cursor: pointer;
    padding: 0;
    font: inherit;   /* 繼承字體 */
    color: inherit;  /* 繼承文字顏色 */
}
/* 內容可以滾動，但滾動條隱藏 */
/* 整個滾動條 */
::-webkit-scrollbar {
  width: 0px; /* 垂直滾動條寬度 */
  height: 30px; /* 水平滾動條高度 */
}

/* 背景軌道 */
::-webkit-scrollbar-track {
  background: transparent;
}

/* 滾動條軌道 */
::-webkit-scrollbar-track {
  background: transparent;
}
/* 滾動條滑塊 */
::-webkit-scrollbar-thumb {
  /* background: #C6C7C7; */
  border-top: solid 1px #C6C7C7;
  border-radius: 4px;
  padding: 10px;
}
/* 滾動條滑塊 hover 時 */
/* ::-webkit-scrollbar-thumb:hover {
  background: #C6C7C7;
} */

main img:not(img.normal, img.landscape, img.portrait) {
    width: 100%;
    max-width: 100%;
    object-fit: cover;
}
main img.img-radius {
    border-radius: 10px;
}
main img.img-aspect-ratio {
    aspect-ratio: 1/1;
}
#main-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
#main-container main {
    flex: 1;
    padding: 2.5% 5%;
}

/* 觸控支援樣式 */
.carousel.touch-enabled {
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.carousel.touch-enabled .carousel-slides {
  transition: transform 0.3s ease;
}

.carousel.touch-enabled.dragging .carousel-slides {
  transition: none;
}

/* ---------- header ---------- */
.close-btn {
  display: none; /* 移動版不顯示關閉按鈕 */
}
.header {
  position: relative;
}
.header-container {
  /* max-width: var(--max-width);
  margin: 0 auto; */
  padding: 45px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 65px;
}
/* 選單開關按鈕&選單旁文字的容器 */
.menu-btn-container {
  display: flex;
}
/* 選單選單旁文字 */
.menu-title {
  font-size: 12px;
  font-family: ZenAntiqueSoft-Regular;
  color: var(--dark-text-third-color);
  margin-right: 5px;
  align-self: center;
  z-index: 10;
}
/* 選單開關按鈕 (同時用於桌面版和移動版) */
.menu-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1001; /* 確保按鈕始終在選單上層 */
}
.logo {
  z-index: 1001; /* 確保按鈕始終在選單上層 */
}
.logo img {
  height: 49.5px;
  display: block;
  opacity: 0.8;
}
.menu-toggle img {
  width: 30px;
  display: block;
  transition: transform 0.3s ease;
  opacity: 0.8;
}
.menu-toggle:hover img {
  transform: scale(1.1);
}
/* 側邊選單基本樣式 */
.menu-panel {
  background-color: var(--background-main-color);
  overflow-y: auto;
  z-index: 1000;
  transition: all 0.3s ease;
}
/* 選單內容容器 */
.menu-container {
  padding: 55px;
}
/* 底部圖標區域 */
.bottom-icons {
  margin: 0 50px;
  padding: 15px 0 20px;
  border-top: 1px solid var(--dark-text-second-color);
  display: flex;
  justify-content: end;
  gap: 10px;
}
.icon-item-bottom img {
  width: 32px;
  margin-bottom: 8px;
}
/* 底部文字 */
.bottom-text {
  width: 100%;
  text-align: center;
  font-size: 12px;
  font-family: palatinolinotype-bold;
  color: var(--dark-text-second-color);
}
/* 選單列表 */
.menu-list {
  list-style-type: none;
  padding: 50px 0;
}
.menu-link {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: 400;
  font-family: ZenAntiqueSoft-Regular;
  color: var(--dark-text-main-color);
  text-decoration: none;
  padding: 12px 15px;
  justify-content: flex-end; /* 電腦版文字靠右 */
}
/* 覆蓋層 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}
.overlay.active {
  display: block;
}


@media (min-width: 992px) {
  .overlay {
    /* 桌面版時覆蓋層寬度調整，不覆蓋選單 */
    width: calc(100% - 300px);
  }
  /* 桌面版選單 - 右側滑出 */
  .menu-panel {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    padding-top: 50px;
  }
  .menu-panel.active {
    right: 0;
  }
}
@media (max-width: 992px) {
  #main-container main {
    padding: 4.5% 7%;
  }
  .header-container {
    padding: 2.5% 7%;
  }
  /* 選單選單旁文字 */
  .menu-title {
    display: none;
  }
  /* 移動版選單 - 頂部展開 */
  .menu-panel {
    position: absolute;
    top: 0px;
    left: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
  }
  .menu-panel.active {
    max-height: 700px; /* 增加高度以適應底部文字 */
    padding: 90px 0 20px;
  }
  .menu-container {
    padding: 0 20px;
  }
  .logo img {
    height: 27.5px;
  }
  .menu-toggle img {
    width: 34px;
  }
  .bottom-icons {
    justify-content: center;
    margin: 25px 130px 0;
    padding: 30px 0;
  }
  .icon-item-bottom img {
    width: 27px;
  }
  /* 底部文字 */
  .bottom-text {
    font-size: 9px;
  }
  .menu-list {
    padding: 0 20px;
  }
  .menu-link {
    font-size: 14px;
    justify-content: center; /* 移動版文字置中 */
  }
}