/* 施工事例詳細ページ - スライダー */

.gallerysgl-slider {
  padding-top: 80px;
  padding-bottom: 100px;
}

/* タイトル・タグセクション */
.gallerysgl__head-new {
  text-align: center;
  margin-bottom: 50px;
  margin-top: 70px;
}

.gallerysgl-title {
  font-size: 3.2rem;
  font-weight: 400;
  margin-bottom: 20px;
  line-height: 1.4;
}

.gallerysgl-tags {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gallerysgl-tags .tag {
  display: inline-block;
  padding: 5px 15px;
  background: #f4f4f4;
  border-radius: 4px;
  font-size: 1.4rem;
  color: #333;
}

/* スライダーセクション */
.gallerysgl__slider-section {
  margin-bottom: 60px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.gallerysgl-slider-main {
  width: 100%;
  position: relative;
}

.gallerysgl-slider-main .slide-item {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9f9f9;
  width: 100%;
  aspect-ratio: 4 / 3; /* 4:3アスペクト比 */
  outline: none;
}

/* 単一画像 */
.slide-image-single {
  width: 100%;
  aspect-ratio: 4 / 3; /* 4:3アスペクト比 */
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-image-single img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 縦画像は高さいっぱいでcontain表示 */
}

/* 2枚横並び */
.slide-image-double {
  display: flex;
  gap: 10px;
  width: 100%;
  aspect-ratio: 4 / 3; /* 4:3アスペクト比 */
}

.slide-image-half {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.slide-image-half img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 縦に2枚重ねる */
.slide-image-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slide-image-stack-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.slide-image-stack-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 動画 */
.slide-video {
  width: 100%;
  aspect-ratio: 4 / 3; /* 4:3アスペクト比 */
  position: relative;
}

.slide-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ナビゲーションボタン */
.gallerysgl-slider-main .slick-prev,
.gallerysgl-slider-main .slick-next {
  width: 44px !important;
  height: 44px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  border-radius: 50% !important;
  z-index: 10 !important;
  transition: all 0.3s ease !important;
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.gallerysgl-slider-main .slick-prev {
  left: 15px !important;
}

.gallerysgl-slider-main .slick-next {
  right: 15px !important;
}

.gallerysgl-slider-main .slick-prev:hover,
.gallerysgl-slider-main .slick-next:hover {
  background: rgba(255, 255, 255, 1) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* 疑似要素の矢印をリセット */
.gallerysgl-slider-main .slick-prev:before,
.gallerysgl-slider-main .slick-next:before {
  content: "" !important;
  display: none !important;
}

/* CSS矢印を作成 */
.gallerysgl-slider-main .slick-prev:after,
.gallerysgl-slider-main .slick-next:after {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 10px !important;
  height: 10px !important;
  border-top: 2px solid #333 !important;
  border-right: 2px solid #333 !important;
  transform: translate(-50%, -50%) rotate(-135deg) !important;
}

.gallerysgl-slider-main .slick-next:after {
  transform: translate(-50%, -50%) rotate(45deg) !important;
}

/* サムネイルスライダー */
.gallerysgl-slider-thumbs {
  margin-top: 20px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.gallerysgl-slider-thumbs .thumb-item {
  aspect-ratio: 4 / 3; /* 4:3アスペクト比 */
  cursor: pointer;
  opacity: 1;
  transition: all 0.3s ease;
  border: 3px solid transparent;
  outline: none;
  margin: 0 5px;
}

.gallerysgl-slider-thumbs .thumb-item:hover {
  opacity: 0.9;
}

.gallerysgl-slider-thumbs .slick-slide {
  margin: 0;
}

.gallerysgl-slider-thumbs .slick-list {
  margin: 0 -5px;
}

.thumb-image {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 複数画像のサムネイル */
.thumb-image-multi {
  display: flex;
  gap: 2px;
}

.thumb-image-multi img {
  flex: 1;
  width: auto;
  height: 100%;
  object-fit: cover;
}

/* 動画サムネイル */
.thumb-video {
  position: relative;
}

.thumb-video .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  padding-left: 3px;
}

/* 本文エリア */
.gallerysgl__text-section {
  margin-top: 60px;
}

.gallerysgl-text-content {
  max-width: 960px;
  margin: 0 auto;
}

.text-block {
  line-height: 2;
  font-size: 1.6rem;
  margin-bottom: 30px;
}

.text-block:last-child {
  margin-bottom: 0;
}

/* レスポンシブ */
@media screen and (max-width: 768px) {
  .gallerysgl-slider {
    padding-top: 60px;
    padding-bottom: 80px;
  }

  .gallerysgl-title {
    font-size: 2.4rem;
    margin-bottom: 15px;
  }

  .gallerysgl-tags .tag {
    font-size: 1.2rem;
    padding: 4px 12px;
  }

  .gallerysgl__head-new {
    margin-bottom: 35px;
  }

  .gallerysgl__slider-section {
    margin-bottom: 40px;
  }

  .gallerysgl-slider-main .slide-item {
    aspect-ratio: 4 / 3; /* レスポンシブ対応 */
  }

  .slide-image-single {
    aspect-ratio: 4 / 3; /* レスポンシブ対応 */
  }

  .slide-image-single img {
    object-fit: contain; /* 縦画像は高さいっぱいでcontain表示 */
  }

  .slide-image-double {
    flex-direction: column;
    aspect-ratio: 4 / 3; /* レスポンシブ対応 */
    gap: 8px;
  }

  .slide-image-stack {
    gap: 8px;
  }

  .slide-video {
    aspect-ratio: 4 / 3; /* レスポンシブ対応 */
  }

  .gallerysgl-slider-main .slick-prev,
  .gallerysgl-slider-main .slick-next {
    width: 32px !important;
    height: 32px !important;
  }

  .gallerysgl-slider-main .slick-prev:after,
  .gallerysgl-slider-main .slick-next:after {
    width: 8px !important;
    height: 8px !important;
    border-width: 2px !important;
  }

  .gallerysgl__text-section {
    margin-top: 40px;
  }

  .text-block {
    font-size: 1.5rem;
    margin-bottom: 25px;
  }

  /* サムネイルスライダー - スマホ */
  .gallerysgl-slider-thumbs {
    margin-top: 15px;
  }

  .gallerysgl-slider-thumbs .thumb-item {
    aspect-ratio: 4 / 3; /* レスポンシブ対応 */
  }

  .thumb-video .play-icon {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
}
