/* Simple Diapo 基本設定 */
.simple-diapo-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  height: 100vh;
  margin: 0;
  padding: 0;
  /* 確保容器能正確顯示 */
  display: block;
  box-sizing: border-box;
  /* 預設間距設定 */
  --sidebar-spacing: 30px;
}

/* 強制 Gallery 顯示為一欄 */
.simple-diapo {
  display: block;
  width: 100%;
}

.simple-diapo figure {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* 修復父容器寬度限制 - 已合併到上方規則 */

.simple-diapo-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.5s ease-in-out;
  opacity: 0;
  z-index: 0;
  visibility: hidden;
}

.simple-diapo-slide:first-child {
  opacity: 1;
  z-index: 1;
  visibility: visible;
}

.simple-diapo-slide img {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  display: block;
}

/* 左右箭頭 */
.simple-diapo-prev,
.simple-diapo-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.0);
  color:rgba(242, 240, 240, 0.4); 
  border: none;
  padding: 0.5em 0.8em;
  cursor: pointer;
  z-index: 10;
  font-size: 1.8rem;
  line-height: 1;
  border-radius: 50%;
  transition: background 0.3s;
}

.simple-diapo-prev:hover,
.simple-diapo-next:hover {
  background: rgba(0,0,0,0.2);
}

.simple-diapo-prev {
  left: 20px;
}

.simple-diapo-next {
  right: 20px;
}

/* dots 導航 */
.simple-diapo-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.simple-diapo-dot {
  width: 12px;
  height: 12px;
  background: rgba(255,255,255,0.7);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s;
}

.simple-diapo-dot.active,
.simple-diapo-dot:hover,
.simple-diapo-dot:focus {
  background: rgba(255,255,255,1);
}

/* slide 模式時，slide 移動效果 */
.simple-diapo-container.slide .simple-diapo-slide {
  transition: transform 0.5s ease;
}

/* fade 模式時，透明度變化 */
.simple-diapo-container.fade .simple-diapo-slide {
  transition: opacity 0.5s ease;
}

/* RWD 支援 */
@media (max-width: 1024px) {
  .simple-diapo-container {
    height: 80vh;
    min-height: 80vh;
  }
  
  .simple-diapo-slide img {
    height: 80vh;
  }
}

@media (max-width: 768px) {
  .simple-diapo-container {
    height: 70vh;
    min-height: 70vh;
  }
  
  .simple-diapo-slide img {
    height: 70vh;
  }
  
  .simple-diapo-prev {
    left: 10px;
    font-size: 1.5rem;
  }
  
  .simple-diapo-next {
    right: 10px;
    font-size: 1.5rem;
  }
  
  .simple-diapo-dots {
    bottom: 20px;
  }
  
  /* 手機版時輪播佔滿全螢幕 */
  .simple-diapo-container.fallback-absolute {
    left: 0 !important;
    right: 0 !important;
  }
}

/* 確保輪播正常顯示 */
.simple-diapo {
  display: block;
}

/* 備用方案：當relative不工作時使用absolute */
.simple-diapo-container.fallback-absolute {
  position: absolute !important;
  top: 0;
  left: 330px; /* 預設左側菜單寬度300px + 30px間距 */
  right: 0;
  bottom: 0;
  z-index: 1;
  width: calc(100vw - 330px); /* 自動計算寬度：視窗寬度 - 左側佔用空間 */
}
