/* ========== 全域設定 ========== */
html, body {
  overflow-y: scroll; /* 保留垂直捲軸空間，避免內容位移 */
  height: 100%;
}


/* ========== Sticky Header（固定頁首） ========== */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 修正 Sticky Header 內容寬度溢出 */
.sticky-header .row > .col,
.sticky-header .row > .col-auto {
  min-width: 0;
}


/* ========== 網站標題（#site-title） ========== */
#site-title {
  color: rgb(2, 2, 70);
  white-space: normal;
  overflow-wrap: break-word;
  font-size: 0.9rem;
}
@media (min-width: 1200px) {
  #site-title {
    font-size:clamp(1rem, 2vw, 1.75rem);
  }
}


/* ========== Hero Banner 區塊 ========== */
.bg-cover {
  background-image: url("/images/main.webp"); /* 預設最大尺寸 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 600px;
  position: relative;
  color: #f8f9fa;
  min-width: 300px;
}

/* 小螢幕 (<=600px) */
@media (max-width: 600px) {
  .bg-cover {
    background-image: url("/images/main-545x300.webp");
  }
}

/* 中螢幕 (601px ~ 1200px) */
@media (max-width: 1200px) and (min-width: 601px) {
  .bg-cover {
    background-image: url("/images/main-679x453.webp");
  }
}
 //針對不同螢幕大小做適配

.overlay-content {
  background-color: rgba(0, 0, 0, 0.4);
  padding: 2rem;
  border-radius: 10px;
  max-width: 90%;
}

/* Hero Banner 響應式處理 */
@media (max-width: 576px) {
  .bg-cover { height: 300px; }
  .overlay-content h1 { font-size: 1.8rem; }
  .overlay-content p { font-size: 1rem; }
}


/* ========== 卡片樣式（Card） ========== */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}


/* 卡片圖片設定與 hover 放大效果 */
.card-img-top {
  object-fit: cover;
  width: 100%;
  height: 200px;
  border-radius: 0.5rem 0.5rem 0 0;
  transition: transform 0.4s ease;
}

.card:hover .card-img-top {
  transform: scale(1.08);
}


/* ========== 水平滾動卡片容器 ========== */
.horizontal-scroll-container {
  display: flex;
    overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;

}

.card-wrapper {
  scroll-snap-align: start;
}


/* ========== 圖片 Hover 放大動畫（可獨立用於其他圖片） ========== */
.img-hover-zoom {
  overflow: hidden;
   transition: transform 0.4s ease;
  will-change: transform;
}

.img-hover-zoom img {
  transition: transform 0.4s ease;
}

.img-hover-zoom:hover img {
  transform: scale(1.1);
}


/* ========== 漂浮聯絡按鈕（右下角） ========== */
#floating-contact {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.contact-btn {
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  text-decoration: none;
  color: #333;
  transition: background-color 0.3s;
  text-align: center;
  min-width: 100px;
}

.contact-btn:hover {
  background-color: #f0f0f0;
}

/* 聯絡按鈕樣式 - Facebook */
.contact-btn.fb {
  color: #1877f2;
  border-color: #1877f2;
}

/* 聯絡按鈕樣式 - Zalo */
.contact-btn.zalo {
  color: #0084ff;
  border-color: #0084ff;
}

[data-key].lang-ready {
  opacity: 1;
}
[data-key] {
  opacity: 0;
  transition: opacity 0.2s ease;
}









