/* 當你想為某一個區塊或方塊，增加背景，請在該區塊/方塊上增加class名稱
例如：

在HTML裡：
<div class="abc">我要增加背景</div> 

在css裡：
.abc{
    background-image: url(../images/body_bg.webp);  <------圖檔位置
    background-position: center; <-----圖片在區塊/方塊裡的定位
    background-size: cover;  <-----圖片在區塊/方塊裡的大小
}

 */

/* 補充 
    學習資料
    https://ithelp.ithome.com.tw/articles/10223887
    https://ithelp.ithome.com.tw/articles/10224214
*/

/* === 全站背景 === */
body {
  background-color: #ffffff;
  background-position: center;
  background-size: 2400px;
}

/* === 主區塊背景 === */
main {
  margin: 80px 0 50px;
}

@media (max-width: 767px) {
  main {
    margin: 80px 0 20px;
  }
}

section {
  margin: 20px 0;
}

.iconIntext {
  width: 4%;
  max-width: 4%;
  height: auto;
}

.demoimg {
  -ms-flex: 0 0 98%;
  flex: 0 0 98%;
  max-width: 98%;
  text-align: center;
}

.demoimg figcaption {
  color: #909090;
  font-style: italic;
  margin-top: 8px;
}

@media (min-width: 768px) {
  .demoimg {
    -ms-flex: 0 0 49%;
    flex: 0 0 49%;
    max-width: 49%;
    text-align: center;
  }
}

.btn {
  display: flex;
  -ms-flex: 0 0 66%;
  flex: 0 0 66%;
  max-width: 66%;
  background: #eb5500;
  border: 2px #eb5500 solid;
  padding: 10px 15px;
  border-radius: 8px;
  justify-content: center;
  text-align: center;
  font-size: 1.35rem;
  line-height: 1.2;
}

@media (max-width: 767px) {
  .btn {
    display: flex;
    -ms-flex: 0 0 95%;
    flex: 0 0 95%;
    max-width: 95%;
    background: #eb5500;
    border: 2px #eb5500 solid;
  }
}

.btn a {
  color: #ffffff;
}

.btn:hover {
  background: #ffffff;
  border: 2px #eb5500 solid;
}

.btn:hover a {
  color: #eb5500;
}

/* === 頁尾區 === */
footer {
  position: relative;
  z-index: 999;
}

.zoomable-img {
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.zoomable-img:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* --------------------------------------
   2. Lightbox 遮罩層與放大圖片設定
--------------------------------------- */
.lightbox-overlay {
  position: fixed;
  z-index: 9999; /* 確保它蓋在網站最上層 (包含導覽列) */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85); /* 帶有質感的半透明黑底 */

  /* Flexbox 讓圖片完美置中 */
  display: flex;
  justify-content: center;
  align-items: center;

  /* 預設隱藏，等待 JS 觸發 */
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;

  /* 滑鼠在整個黑色遮罩上變成「縮小鏡」，暗示點擊任一處皆可關閉 */
  cursor: zoom-out;
}

/* 當 JS 加上 .show 類別時，顯示遮罩 */
.lightbox-overlay.show {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 90%; /* 限制圖片最大寬度，保留呼吸空間 */
  max-height: 90vh; /* 限制圖片高度，避免超出螢幕 */
  object-fit: contain; /* 確保圖片不變形 */
  border-radius: 8px; /* 柔和的導角 */
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);

  /* 點擊圖片本體也能關閉 */
  cursor: zoom-out;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: #ffffff;
  font-size: 40px;
  font-weight: 300;
  user-select: none;
}
