/* slideshow.css */
/* -------------------------------------------
   基本設定
------------------------------------------- */
.slideshow {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
  user-select: none;
}

/* ビューポート（画像が見える領域） */
.slideshow__viewport {
  overflow: hidden;
  width: 100%;
}

/* トラック（画像を横並びに） */
.slideshow__track {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 各スライド */
.slideshow__slide {
  flex: 0 0 auto;
  padding: 5px;
  box-sizing: border-box;
}

/* スライド内リンク */
.slideshow__link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

/* 画像 */
.slideshow__img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
  aspect-ratio: 2 / 3; /* 縦横比を維持 */
}

/* ホバー時：拡大＋白オーバーレイ */
.slideshow__link:hover .slideshow__img {
  transform: scale(1.05);
}
.slideshow__overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background 0.3s ease;
}
.slideshow__link:hover .slideshow__overlay {
  background: rgba(255, 255, 255, 0.3);
}

/* 矢印ボタン */
.slideshow__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}
.slideshow__nav--prev { left: 10px; }
.slideshow__nav--next { right: 10px; }

.slideshow__nav-icon {
  font-size: 24px;
  color: #333;
  pointer-events: none;
}

.slideshow__nav:hover {
  transform: translateY(-50%) scale(1.1);
  background: rgba(255, 255, 255, 0.9);
}

/* ページャー（任意） */
.slideshow__pager {
  text-align: center;
  margin-top: 10px;
}

/* レスポンシブ：画面幅によって見える枚数を調整 */
@media (max-width: 600px) {
  .slideshow__slide {
    flex-basis: calc(100% / 3); /* 最小幅時：3枚 */
  }
}
@media (min-width: 601px) and (max-width: 900px) {
  .slideshow__slide {
    flex-basis: calc(100% / 4); /* 中間：4枚 */
  }
}
@media (min-width: 901px) {
  .slideshow__slide {
    flex-basis: calc(100% / 5); /* 最大幅時：5枚 */
  }
}
