/* ====================================
   css/gallery.css  (2025‑04‑20 Coverflow 改訂版)
   ==================================== */

/* ========== 共通レイアウト ========== */
#gallery {
  background: #fff;
  text-align: center;
  padding: 100px 0;
}
.gallery-category-container {
  margin-bottom: 80px;
}
.gallery-category {
  font: 500 22px/1 'Noto Sans JP', sans-serif;
  margin-bottom: 25px;
  color: #5e5e5e;
  letter-spacing: .05em;
}

/* ----- スライダー枠 ----- */
.gallery-slider {
  position: relative;
  width: 100%;
  height: 500px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 8px; 
  box-shadow: 0 5px 15px rgba(0,0,0,.1); 
  overflow: hidden;
}
.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
  z-index: 0;
}
.gallery-slide.active {
  opacity: 1;
  z-index: 1;
}

.gallery-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}
.gallery-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: pointer;
}

/* ----- 矢印 ----- */
/* （省略） */

/* ----- ドット ----- */
.slider-nav {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  gap: 8px;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ddd;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.slider-dot.active {
  background-color: #FF7A00; /* オレンジ色 */
}

/* ========== Coverflow 追加 ========== */
.gallery-slider.coverflow {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  perspective: 800px;
  overflow: visible;
  height: 520px;
  padding-inline: 0;
}

/* カード自体：高さを親に追従、裏のグレーを透明化 */
.gallery-slider.coverflow .gallery-slide {
  position: relative !important;
  left: 0 !important;
  top: 0 !important;
  width: 360px;
  height: 100%;      /* ← 親 .gallery-slider の高さに自動合わせ */
  max-height: 100%;  /* ← はみ出し防止 */
  transition: transform .4s ease, filter .4s ease;
  will-change: transform;
  opacity: 1;
}
.gallery-slider.coverflow .gallery-slide.hidden {
  display: none;
}

/* フォーカス時のアウトライン削除 */
.gallery-slider:focus {
  outline: none !important;
}
.gallery-slider.coverflow .gallery-image {
  background: transparent;  /* 裏の薄グレーを消去 */
}

/* ========== レスポンシブ ========== */
@media (max-width: 1024px) {
  .gallery-slider.coverflow {
    height: 450px;
  }
  .gallery-slider.coverflow .gallery-slide {
    height: 100%;
    max-height: 100%;
  }
}

@media (max-width: 768px) {
  .gallery-slider { height: 350px; }
  /* モバイル時は通常スライダーに */
  .gallery-slider.coverflow {
    display: block;
    perspective: none;
    overflow: hidden;
    height: 350px;
    padding-inline: 0;
  }
  .gallery-slider.coverflow .gallery-slide {
    position: absolute !important;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: none !important;
    filter: none !important;
    transition: opacity .5s ease;
  }
  .gallery-slider.coverflow .gallery-slide.active {
    opacity: 1;
    z-index: 1;
  }
  .gallery-slider.coverflow .gallery-slide.hidden {
    display: block;
    opacity: 0;
  }
  
  /* ドットのレスポンシブ対応 */
  .slider-nav {
    margin-top: 10px;
    gap: 6px;
  }
  
  .slider-dot {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 480px) {
  .gallery-slider { height: 280px; }
  .gallery-slider.coverflow { height: 280px; }
  .slider-arrow { width: 35px; height: 35px; }
  .slider-arrow i { font-size: 16px; }
  .gallery-category { font-size: 18px; margin-bottom: 15px; }
  #gallery { padding: 60px 0; }
  
  /* ドットのさらなる縮小 */
  .slider-nav {
    margin-top: 8px;
    gap: 5px;
  }
  
  .slider-dot {
    width: 8px;
    height: 8px;
  }
}