/* ===============================
   基本構造
================================= */
.research-title {
  margin-top: 250px;
}

.image-gallery {
  width: 100%;
  max-width: 90%;
  margin: 100px auto 40px;
  font-family: sans-serif;
}

/* === 画像セット表示領域 === */
.image-set-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
  scroll-margin-top: 140px;
}

/* 各画像セット */
.image-set {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  position: relative;
  width: 100%;
}

.image-set.active {
  display: block;
  opacity: 1;
}

/* ===============================
   レイアウト指定（高さ可変）
================================= */

/* コンテンツ全体が自然に高さを持つ */
.image-set img,
.image-set video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 左寄せ */
.image-set .align-left {
  margin-left: 0;
  margin-right: auto;
}

/* 右寄せ */
.image-set .align-right {
  margin-left: auto;
  margin-right: 0;
  display: block;
}

/* 中央寄せ */
.image-set .align-center {
  margin: 0 auto;
  display: block;
}

/* 2枚横並び */
.image-set .double {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 5px;
  /* margin: 0 auto; */
}
.image-set .double img,
.image-set .double video {
  /* width: 48%; */
  height: auto;
}

/* 段差（上下ずらし）レイアウト例 */
.image-set .stagger {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}
.image-set .stagger img:first-child {
  margin-top: 60px;
}
.image-set .stagger img:last-child {
  margin-top: 0;
}

/* ===============================
   サムネイルエリア
================================= */
.thumbnail-bar {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 80px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px 0;
  height: 200px;
}

.thumb {
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.3s ease;
}
.thumb.active {
  /* border-color: #E8B647; */
  transform: scale(1.1);
}
.thumb img {
  width: 100px;
  height: auto;
  display: block;
}

/* ===============================
   メディアクエリ
================================= */
@media (max-width: 768px) {
  .research-title {
      margin-top: 150px;
  }

  .image-gallery {
    max-width: 100%;
  }
  /* .image-set .double {
    flex-direction: column;
  } */
  .image-set .double img,
  .image-set .double video {
    width: 100%;
  }
  .thumb img {
    width: 80px;
  }
}

@media (max-width: 480px) {
  .thumbnail-bar {
    gap: 10px;
  }
  .thumb img {
    width: 60px;
  }
}
