@charset "utf-8";

/*---------------carouselの設定-------------------------------*/

/* カルーセルセクション全体のスタイル */

.carousel_section {
  width: 100%;
  margin-block: 100px;
  /* 必要に応じてmin-heightを調整 */
}

.section_inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.section_title {
  position: relative;
  font-size: min(2.78vw, 40px);
  font-weight: bold;
  color: var(--text-color);
  text-align: left;
  margin-bottom: min(1.39vw, 20px);
  padding-left: 15px;
}
.section_title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background-color: var(--black--);
}

/*---------------carouselの詳細設定--------------------*/

.custom-carousel {
  position: relative;
  margin: 0 auto;
  margin-top: 50px;
  width: 100%;
  overflow: hidden;
}
.carousel-slides {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8; /* 横16:縦8などお好みで */
  /* 画像の高さを維持したい場合はmin-heightやheightも指定可 */
}
.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s;
  z-index: 1;
}
.carousel-slide.active {
  opacity: 1;
  z-index: 2;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 0;
}
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border: none;
  font-size: 2em;
  padding: 0.2em 0.6em;
  cursor: pointer;
  z-index: 3;
}
@media (max-width: 500px) {
  .carousel-prev,
  .carousel-next {
    font-size: 1.2em;
    padding: 0.3em 0.4em;
  }
}
.carousel-prev {
  left: 10px;
}
.carousel-next {
  right: 10px;
}
.carousel-pagination {
  position: absolute;
  left: 50%;
  bottom: 15px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.carousel-dot {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.5;
  cursor: pointer;
  border: 1px solid #888;
  transition: opacity 0.3s;
}
.carousel-dot.active {
  opacity: 1;
  background: #333;
}

@media screen and (max-width: 1300px) {
  .section_inner {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
  }
}

@media screen and (max-width: 960px) {
  .section_inner {
    width: 100%;
    margin: 0 auto;
    padding-inline: 30px;
  }
}

@media screen and (max-width: 768px) {
  .carousel_section {
    margin-block: 50px;
    /* 必要に応じてmin-heightを調整 */
  }
  .section_inner {
    width: 100%;
    margin: 0 auto;
    padding-inline: 10px;
  }
  .custom-carousel {
    margin-top: 20px;
  }
  .carousel-dot {
    width: 15px;
    height: 15px;
  }
}

/*---------------カルーセル２の設定-----------------------*/
/* PC時のみ3枚表示（中央だけ目立つ） */

.carousel_section_secondary {
  width: 100%;
  margin-block: 100px;
  /* 必要に応じてmin-heightを調整 */
}

.section_inner_secondary {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.section_title_secondary {
  position: relative;
  font-size: min(2.78vw, 40px);
  font-weight: bold;
  color: var(--text-color);
  text-align: left;
  margin-bottom: min(1.39vw, 20px);
  padding-left: 15px;
}
.section_title_secondary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background-color: var(--black--);
}

/* 基本レイアウト */
.custom-carousel_secondary {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px; /* 親の幅を広げる */
  margin: 0 auto;
  padding: 0 0.5em;
  overflow: visible;
}

/* スライド領域 */
.carousel-slides_secondary {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* スライド基本 */
.carousel-slide_secondary {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  aspect-ratio: 16 / 8;
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  z-index: 1;
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1),
    opacity 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  pointer-events: none;
}
.carousel-slide_secondary.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  z-index: 3;
  width: 800px;
  aspect-ratio: 5 / 3;
  pointer-events: auto;
}
.carousel-slide_secondary img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  z-index: 0;
}
/* active, prev, next以外は非表示 */
.carousel-slide_secondary:not(.active):not(.prev):not(.next) {
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}
.carousel-slide_secondary.prev {
  transform: translate(-180%, -50%) scale(0.85); /*通常は-150%*/
  opacity: 0.7;
  z-index: 2;
  pointer-events: auto;
  width: 300px;
  aspect-ratio: 5 / 3;
}
.carousel-slide_secondary.next {
  transform: translate(80%, -50%) scale(0.85); /*通常は50%*/
  opacity: 0.7;
  z-index: 2;
  pointer-events: auto;
  width: 300px;
  aspect-ratio: 5 / 3;
}

/* ボタン */
.carousel-prev_secondary,
.carousel-next_secondary {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border: none;
  font-size: 2em;
  padding: 0.2em 0.6em;
  cursor: pointer;
  z-index: 3;
}
.carousel-prev_secondary {
  left: 10px;
}
.carousel-next_secondary {
  right: 10px;
}

/* ページネーション */
.carousel-pagination_secondary {
  position: absolute;
  left: 50%;
  bottom: 15px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.carousel-dot_secondary {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.5;
  cursor: pointer;
  border: 1px solid #888;
  transition: opacity 0.3s;
}
.carousel-dot_secondary.active {
  opacity: 1;
  background: #333;
}

/* レスポンシブ max-width */
@media screen and (max-width: 1300px) {
  .section_inner_secondary {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
  }
  .carousel-slide_secondary.active {
    width: 600px;
  }
  .carousel-slide_secondary.prev {
    transform: translate(-190%, -50%) scale(0.85); /*通常は-150%*/
    width: 200px;
    aspect-ratio: 5 / 3;
  }
  .carousel-slide_secondary.next {
    transform: translate(90%, -50%) scale(0.85); /*通常は50%*/
    width: 200px;
    aspect-ratio: 5 / 3;
  }
}
/* iPadサイズ（600px～899px）で2枚表示 */
@media (min-width: 600px) and (max-width: 1022px) {
  .carousel-slides_secondary {
    position: relative;
    aspect-ratio: 16 / 8;
  }
  .carousel-slide_secondary {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 320px;
    aspect-ratio: 16 / 11;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    transition: transform 0.7s cubic-bezier(0.77, 0, 0.175, 1),
      opacity 0.7s cubic-bezier(0.77, 0, 0.175, 1);
  }
  .carousel-slide_secondary.active {
    width: 320px;
    transform: translate(-100%, -50%) scale(1);
    opacity: 1;
    z-index: 3;
    pointer-events: auto;
  }
  .carousel-slide_secondary.next {
    width: 320px;
    transform: translate(0%, -50%) scale(1);
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
  }
  .carousel-slide_secondary.prev,
  .carousel-slide_secondary:not(.active):not(.next) {
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    display: none;
  }
  .carousel-slide_secondary img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  }
}

@media screen and (max-width: 768px) {
  .carousel_section_secondary {
    margin-block: 50px;
    /* 必要に応じてmin-heightを調整 */
  }
  .section_inner_secondary {
    width: 100%;
    margin: 0 auto;
    padding-inline: 10px;
  }
  .custom-carousel_secondary {
    margin-top: 20px;
  }
  .carousel-dot_secondary {
    width: 15px;
    height: 15px;
  }
}

/* スマホは1枚だけ表示 */
@media (max-width: 600px) {
  .carousel-slide_secondary {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 16 / 8;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    display: none;
    transition: opacity 0.6s;
  }
  .carousel-slide_secondary.active {
    transform: none;
    opacity: 1;
    z-index: 2;
    width: 100%;
    aspect-ratio: 16 / 8;
    pointer-events: auto;
    display: block;
  }
  .carousel-slide_secondary.prev,
  .carousel-slide_secondary.next,
  .carousel-slide_secondary:not(.active) {
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    display: none;
  }
  .carousel-prev_secondary,
  .carousel-next_secondary {
    top: 50%;
    transform: translateY(-50%);
  }
}
@media (max-width: 500px) {
  .carousel-prev_secondary,
  .carousel-next_secondary {
    font-size: 1.2em;
    padding: 0.3em 0.4em;
  }
}
