/* 大圖廣告 */
.PcImg {
  display: none;
}
.MobileImg {
  display: block;
}

/* 橫向模式 (通常是平板或橫置手機) 顯示圖片 */
@media screen and (min-width: 768px) {
  .PcImg {
    display: block;
  }
  .MobileImg {
    display: none;
  }
}
/* 彈出視窗相關樣式 */
/* 確保這些內容在絕對最頂層 */
.pop-up-container,
.pop-up-overlay,
.pop-up-close {
  z-index: 100001 !important;
}

.section-pop-up {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 100000 !important;
  /* 絕對高於所有內容 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

.section-pop-up.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.popup-active {
  overflow: hidden !important;
  height: 100%;
  position: fixed;
  width: 100%;
}

.pop-up-close {
  transition: transform 0.3s ease;
}

/* 彈出視窗輪播樣式 */
.pop-up-slider .slick-list,
.pop-up-slider .slick-track {
  height: 100%;
}

.pop-up-slider .slick-slide {
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.pop-up-slider .slick-current {
  opacity: 1;
}

.pop-up-slider .slick-prev,
.pop-up-slider .slick-next {
  width: 56px;
  height: 56px;
  z-index: 10;
  background-color: transparent !important;
}

.pop-up-slider .slick-prev {
  position: absolute;
  background-image: url(../img/all/slick-arrow-left.svg);
  background-size: 50px;
  background-repeat: no-repeat;
  background-position: center;
  left: 5px !important;
  filter: brightness(0) invert(1);
}

.pop-up-slider .slick-next {
  background-image: url(../img/all/slick-arrow-right.svg);
  background-size: 50px;
  background-repeat: no-repeat;
  background-position: center;
  right: 5px !important;
  filter: brightness(0) invert(1);
}

.pop-up-slider .slick-arrow {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pop-up-slider:hover .slick-arrow {
  opacity: 1;
}

/* 1. 基本樣式設置 */
.pop-scrollbar {
  padding-right: 6px !important;
  /* 防止文本被滾動條遮擋 */
  overflow-y: auto !important;
  /* 只有在需要時顯示滾動條 */
}

/* 2. Chrome、Safari、Edge 滾動條樣式 */
.pop-scrollbar::-webkit-scrollbar {
  width: 2px !important;
  /* 滾動條寬度 */
  background: transparent !important;
  /* 透明背景 */
}

.pop-scrollbar::-webkit-scrollbar-track {
  background: #e6e6e6 !important;
  /* 滾動範圍框的背景色 */
  border-radius: 2px !important;
  /* 邊角圓滑 */
}

.pop-scrollbar::-webkit-scrollbar-thumb {
  background: #888888 !important;
  /* 滾動條本體顏色 */
  border-radius: 2px !important;
  /* 滾動條圓角 */
}

/* 3. 強制隱藏上下按鈕 */
.pop-scrollbar::-webkit-scrollbar-button {
  display: none !important;
  /* 隱藏上下滾動按鈕 */
}

/* 4. 移除滾動條的角落 */
.pop-scrollbar::-webkit-scrollbar-corner {
  background: transparent !important;
}

/* 5. 滾動條滑過時的顏色變化 */
.pop-scrollbar::-webkit-scrollbar-thumb:hover,
.pop-scrollbar::-webkit-scrollbar-thumb:active {
  background: #555555 !important;
  /* 滑過時顏色變化 */
}

/*
*section-ad
*/
.section-ad {
  width: 100vw;
  overflow: hidden;
  position: relative;
}

.caption {
  height: 100%;
  top: 10%;
  padding-right: 10%;
  padding-left: 10%;
  color: #fff;
  z-index: 10 !important;
  pointer-events: auto;
  /* 確保按鈕可點擊 */
  position: relative;
  width: 100%;
}

.caption,
.slidebtnarea {
  position: relative;
  z-index: 10;
}

.slide-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  top: 0;
  left: 0;
  z-index: -1;
}

.item {
  position: relative;
  /*  overflow: hidden;
  height: 100%; */
}

/* 針對不包含 clip-img 類別的 .item 元素 */
.item:not(.clip-img) {
  overflow: visible;
  height: auto;
}

/* .item.clip-img::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
 */
.btn-more {
  position: relative;
  z-index: 50 !important;
  pointer-events: auto;
}

/* 確保按鈕內的所有元素都可點擊 */
.btn-more * {
  position: relative;
  z-index: 50;
  pointer-events: auto;
}

/* 確保a標籤也擁有正確的z-index */
a .btn-more {
  position: relative;
  z-index: 50 !important;
  pointer-events: auto;
}

.caption a {
  position: relative;
  z-index: 50 !important;
  pointer-events: auto;
}

/* 添加Slick輪播左右箭頭樣式 */
.main-slider .slick-prev,
.main-slider .slick-next {
  width: 46px;
  height: 46px;
  z-index: 10;
  background-color: transparent !important;
}

.main-slider .slick-prev {
  position: absolute;
  background-image: url(../img/all/slick-arrow-left.svg);
  background-size: 40px;
  background-repeat: no-repeat;
  background-position: center;
  left: 5px !important;
  filter: brightness(0) invert(1);
}

.main-slider .slick-next {
  background-image: url(../img/all/slick-arrow-right.svg);
  background-size: 40px;
  background-repeat: no-repeat;
  background-position: center;
  right: 15px !important;
  filter: brightness(0) invert(1);
}

@media screen and (min-width: 768px) {
  .main-slider .slick-prev,
  .main-slider .slick-next {
    width: 56px;
    height: 56px;
  }

  .main-slider .slick-prev,
  .main-slider .slick-next {
    background-size: 50px;
  }
  .main-slider .slick-prev {
    left: 20px !important;
  }

  .main-slider .slick-next {
    right: 20px !important;
  }
}

@media screen and (min-width: 1280px) {
  .main-slider .slick-prev {
    left: 50px !important;
  }

  .main-slider .slick-next {
    right: 50px !important;
  }
}

/* 主輪播的左右箭頭按鈕樣式 - 只在hover時顯示 */
.main-slider .slick-arrow {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.main-slider:hover .slick-arrow {
  opacity: 1;
}

/* 全地形系列 - 活動輪播 */
.section-2 {
  overflow: hidden;
}

.activities-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  touch-action: pan-x;
  -ms-touch-action: pan-x;
}

/* Slick 初始化後的樣式 */
.activities-wrapper.slick-initialized {
  display: block;
}

.activity-slide {
  position: relative;
  overflow: hidden;
  width: 140px;
  /* 移動版默認寬度 */
  height: 164px;
  /* 移動版默認高度 */
  background-position: center;
  background-size: cover;
  margin-right: 6px;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* 只在桌面版啟用hover效果，避免觸控拖移衝突 */
@media (hover: hover) and (pointer: fine) {
  .activity-slide:hover {
    transform: scale(1.05);
  }
}

@media screen and (min-width: 768px) {
  .activity-slide {
    width: 380px;
    /* 桌面版寬度 */
    height: 454px;
    /* 桌面版高度 */
  }
}

.activities-wrapper {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
  touch-action: pan-x;
  -ms-touch-action: pan-x;
}

/* 確保slick的間距也是24px */
.activities-wrapper .slick-slide {
  margin-right: 12px;
}

/* 確保slick軌道支援觸控拖移 */
.activities-wrapper .slick-track {
  touch-action: pan-x;
  -ms-touch-action: pan-x;
}

.activities-wrapper .slick-list {
  touch-action: pan-x;
  -ms-touch-action: pan-x;
}

/* 手機版 centerMode 優化 */
@media screen and (max-width: 480px) {
  .activities-wrapper .slick-slide {
    margin-right: 6px;
    margin-left: 6px;
  }
  
  .activities-slider .slick-list {
    padding-right: 0 !important;
  }
}

/* 顯示第四張的部分內容 */
.activities-slider .slick-list {
  overflow: visible;
  padding-right: 60px !important;
  /* 讓第四張可見 */
}

/* 輪播箭頭樣式 */
.activities-nav {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.activities-prev,
.activities-next {
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 10;
  pointer-events: auto;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: opacity 0.3s ease;
  opacity: 0.7;
}

@media screen and (min-width: 768px) {
  .activities-prev,
  .activities-next {
    width: 50px;
    height: 50px;
  }
}

.activities-prev {
  left: 0;
  background-image: url("../img/all/slick-arrow-left.svg");
}

.activities-next {
  right: 32px;
  background-image: url("../img/all/slick-arrow-right.svg");
}

/*

*section-4
*/

/* 導航點樣式 */
.product-slider__dots {
  display: flex;
  justify-content: center;
}

.product-slider__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #191919;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.product-slider__dot.active {
  background-color: #191919;
}

/* 導航按鈕樣式 */
.btn-arrow-left,
.btn-arrow-right {
  border: 1px solid rgba(238, 238, 238, 1);
}

/* 產品輪播 Slick 樣式設定 */
.product-slider .slick-list {
  overflow: hidden;
  padding-right: 120px !important;
}

.product-slider .slick-slide {
  padding: 0 10px;
  transition: all 0.3s ease;
}

.product-slider .slick-track {
  display: flex;
}

.product-slider .slick-dots {
  display: flex !important;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
  position: relative;
  bottom: 0;
}

.product-slider .slick-dots li {
  width: 8px;
  height: 8px;
  border: 0;
  margin: 0;
  color: #191919 !important;
}

.product-slider .slick-dots li button {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  background-color: #d9d9d9;
  transition: all 0.3s ease;
  color: #191919 !important;
  font-size: 0;
  line-height: 0;
}

.product-slider .slick-dots li button:before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #d9d9d9;
  opacity: 1;
  position: absolute;
  top: 0;
  left: 0;
}

.product-slider .slick-dots li.slick-active button:before {
  background-color: #191919 !important;
  opacity: 1;
}

.product-slider .slick-slide:not(.slick-active) {
  opacity: 0.7;
}

/*
*section-about__5
*/
.section-5-bg {
  position: relative;
  transition: all 0.3s ease;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.section-5-bg a {
  display: block;
  position: relative;
  z-index: 2;
}

.section-5-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: inherit;
  background-position: center;
  background-size: cover;
  transition: transform 0.5s ease;
  z-index: -1;
}

.section-5-bg:hover::before {
  transform: scale(1.1);
}

/*
*section-8
*/
.section-8 .overflow-hidden {
  position: relative;
  overflow: hidden;
}

.section-8 .overflow-hidden img {
  transition: transform 0.5s ease;
}

.section-8 .overflow-hidden:hover img {
  transform: scale(1.1);
}

/*
*section-7
*/
.blog-arrow-right div:before {
  background-image: url(../img/all/btn-white.svg);
}

/* Blog 輪播相關樣式 */
.blog-slider {
  position: relative;
  margin-bottom: 50px;
}

.blog-slider .slick-track {
  display: flex;
  margin-left: 0;
  margin-right: 0;
}

.blog-slider .slick-slide {
  height: auto;
  display: flex;
}

.blog-slider .slick-slide > div {
  height: 100%;
  width: 100%;
}

.blog-slider .slick-slide .blog-item {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-slider .slick-slide .blog-item > div:first-child {
  flex: 1 0 auto;
}

.blog-slider__dots > .slick-dots {
  bottom: 100px !important;
}

@media (min-width: 1024px) {
  .blog-item {
    flex: 1 1 0;
    max-width: 546px;
  }

  .blog-item:nth-child(2n + 2) {
    flex: 1 1 0;
  }
}

@media (min-width: 1024px) {
  .blog-wrapper {
    display: flex;
    width: 100%;
    max-width: 100%;
  }

  .blog-item {
    flex: 1;
    width: 33.333%;
    box-sizing: border-box;
    max-width: unset;
  }

  .blog-item:nth-child(n + 1) {
    padding-left: 29px;
    padding-right: 29px;
  }

  .blog-item:nth-child(3n + 1) {
    padding-left: 0;
  }

  .blog-item:nth-child(3n + 2) {
    border-right: 1px solid #efefef;
    border-left: 1px solid #efefef;
    padding: 0 29px;
  }

  .blog-item:nth-child(3n) {
    padding-right: 0;
  }

  .blog-item > a {
    width: 100%;
    display: block;
  }
}

.blog-item:nth-child(3n + 2)::before,
.blog-item:nth-child(3n + 2)::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  background: #efefef;
}

.blog-item::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 0;
  height: 0px;
  width: 0%;
  background: #efefef;
}
