/* ============================
   gallery.css
   ============================ */

/* --- 共通設定 --- */
.work-container {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

/* --- ギャラリー全体 --- */
.gallery {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-bottom: 2rem;
}

/* --- スライド領域 --- */
.gallery-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.gallery-slides {
  display: flex;
  transition: transform 0.6s ease;
  will-change: transform;
  list-style: none;
  padding: 0;
  margin: 0;
}

.gallery-slide {
  min-width: 100%;
  position: relative;
}

.gallery-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* --- ホバー時の拡大＆オーバーレイ --- */
.slide-link {
  position: relative;
  display: block;
  overflow: hidden;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: background 0.3s ease, opacity 0.3s ease;
}

.overlay-zoom-text {
  color: #000;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.slide-link:hover img {
  transform: scale(1.05);
}

.slide-link:hover .slide-overlay {
  background: rgba(255, 255, 255, 0.6);
  opacity: 1;
}

.slide-link:hover .overlay-zoom-text {
  opacity: 1;
}

/* --- 矢印ボタン --- */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.6);
  border: none;
  font-size: 2.5rem;
  color: #000;
  cursor: pointer;
  padding: 0.2em 0.4em;
  border-radius: 8px;
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 10;
}

.gallery-arrow:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.gallery-arrow--prev {
  left: 8px;
}

.gallery-arrow--next {
  right: 8px;
}



/* --- ナビリンク群 --- */
.work-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 1.5rem 0;
  text-align: center;
}

.nav-link {
  color: #000;
  text-decoration: none;
  position: relative;
  font-size: 1rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.nav-link:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.5);
}

/* --- 説明文 --- */
.work-description {
  text-align: left;
}

.work-title {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.work-text {
  line-height: 1.6;
  font-size: 1rem;
  color: #333;
}

/* --- ドット（任意） --- */
.gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.gallery-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: background 0.3s ease;
}

.gallery-dots button.active {
  background: rgba(0, 0, 0, 0.8);
}

/* --- レスポンシブ調整 --- */
@media (max-width: 600px) {
  .gallery-arrow {
    font-size: 2rem;
    padding: 0.1em 0.3em;
  }
  .work-title {
    font-size: 1.2rem;
  }
  .work-text {
    font-size: 0.95rem;
  }
}
