/* 全体ラッパー */
.top__service-swiper {
  position: relative;
  overflow: visible;
}

/* Swiper本体（画像側） */
.top__service-swiper .swiper {
  width: 60%;
  position: relative;
  z-index: 1;
}

/* 画像 */
.top__service-swiper .swiper-slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 46px;
  object-fit: cover;
  aspect-ratio: 840 / 516;
  border-radius: 46px;
  transition: transform 0.4s ease;
  filter: brightness(0.5);
  display: block;
}

/* 画像上のテキスト */
.swiper__onText {
  position: absolute;
  left: 20px;
  bottom: 20px;
  color: #fff;
  font-weight: bold;
  font-size: 20px;
  z-index: 2;
  bottom: 40px;
  left: 40px;
  z-index: 2;
  color: var(--wh);
  font-size: var(--40);
  font-weight: 700;
  line-height: 1.3;
}

/* テキストエリア（Swiperの外） */
.top__service--swiperTexts {
  width: 40%;
  position: relative;
  z-index: 2;
  transform: translateX(-120px);
}

/* 各テキストブロック */
.top__service--text2 {
  display: none;
}

.top__service--text2.is-active {
  display: block;
      color: #fff;
}
.top__service-swiper .swiper-slide{
  width: 80%;   /* 中央スライドの横幅 */
  position: relative;
  z-index: 100;
  overflow: hidden;
  border-radius: 46px;
}
.top__service-swiper .swiper-slide:hover img {
    transform: scale(1.2);
}
.top__service-swiper .swiper-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 46px;
    z-index: 1;
    pointer-events: none;
}
.top__service-swiper .swiper-slide:hover::after {
    opacity: 1;
}


/* SP */
    @media screen and (max-width: 1024px) {
    .top__service-swiper {
    flex-direction: column;
    gap: 20px;
    }

    .top__service-swiper .swiper {
    width: 100%;
    }

    .top__service--swiperTexts {
    width: 100%;
    transform: translateX(0); /* SPでは飛び出さない */
    }
    .top__service-swiper .swiper-slide {
    width: 80%;
    border-radius: 15px;
    }
    .top__service-swiper .swiper-slide img {
    aspect-ratio: 310 / 206;
    border-radius: 15px;
    }
    .swiper__onText {
    left: 17px;
    bottom: 17px;
    font-size: 15px;
    white-space: nowrap;
    }
    .top__service-swiper .swiper-slide::after {
    border-radius: 15px;
    }
    }

/* swiper側 */
.top__service-swiper .swiper {
  width: 60%;
}

/* テキスト側 */
.top__service--swiperTexts {
  width: 40%;
  transform: translateX(0);
  position: relative;
  z-index: 2;
}

.top-service__progress {
  width: 100%;
  height: 6px;
  background: var(--wh);
  border-radius: 3px;
  overflow: hidden;
  border: solid 2px var(--font-en);
}

.top-service__progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--blue);
  transition: width 0.3s ease;
}

@media (max-width: 1024px) {
  .top__service-swiper .swiper,
  .top__service--swiperTexts {
    width: 100%;
    transform: translateX(0);
  }
}


/* デフォルト（PC）は非表示 */
.top-service__progress {
  display: none;
}

/* SPだけ表示 */
@media screen and (max-width: 1024px) {
  .top-service__progress {
    width: 30%;
    display: block;
    height: 6px;
    background: var(--wh);
    border-radius: 6px;
    overflow: hidden;
    border: solid 2px var(--blue);
    z-index: 100;
    position: absolute;
    min-width: 150px;
  }
}

/* 矢印を「80pxの隙間」に置く */
.swiper-arrow-wrap {
  z-index: 100;
  position: absolute;
  top: 50%;
  left: 46%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  width: 48%;
}

.swiper-button-prev,
.swiper-button-next {
  pointer-events: auto;
}


.top__service-swiper {
  display: flex;
  align-items: center;
  margin-top: 110px;
  padding-bottom: 40px;
}
    @media(max-width:1024px){
      .top__service-swiper {
        flex-direction: column;
        margin-top: 80px;
        padding-bottom: 90px;
      }
    }

/* ===== 左：テキスト ===== */
.top__service--swiperTexts {
  width: 37%;
  order: 1;
}

/* ===== 左矢印 ===== */
.swiper-button-prev {
  position: static; /* absoluteを殺す */
  order: 2;
}

/* ===== 右：Swiper ===== */
.top__service-swiper .swiper {
  width: calc(60% - 100px);
  order: 3;
  margin-right: 50px;
}

/* ===== 右矢印 ===== */
.swiper-button-next {
  position: static;
  order: 4;
}

/* ===== プログレスバー ===== */
.top-service__progress {
  order: 5;
}

    @media(max-width:1024px){
      /* ===== 右：Swiper ===== */
      .top__service-swiper .swiper {
        width: 90%;
        order: 1;
        margin: 0;
      }

      /* ===== 左：テキスト ===== */
      .top__service--swiperTexts {
        margin-left: 10%;
        width: 80%;
        order: 2;
        margin-bottom: 30px;
      }
      .top__service--swiperParts {
        order: 3;
        width: 80%;
        margin-left: 10%;
      }
      .swiper-arrow-wrap {
        bottom: 50px;
        z-index: 100;
        position: absolute;
        top: auto;
        right: 100%;
        width: 110px;
        margin-left: 60px;
      }
      svg.swiper-navigation-icon {
        display: none;
      }
    }  

.swiper-button-prev img,
.swiper-button-next img {
    width: clamp(45px, 3.125vw, 60px);
}
    @media(max-width:768px){
      .swiper-button-prev img, .swiper-button-next img {
        width: 38px;
    }
    }

/* テキスト切り替え */
.top__service--text2 {
  display: none;
  margin-left: calc(15% + 38px);
}
.top__service--text2.is-active {
  display: block;
  margin-left: calc(15% + 38px);
}
    @media(max-width:1024px){
      .top__service--text2.is-active {
        margin-left: 0;
    }
    }


/* ==========
  about-page
  ========== */
/* 全体 */
.history .swiper {
  width: 100%;
  background: none;
  border-radius: 0;
  border-style: none;
  border-color: transparent;
  border-top-width: 0;
  border-right-width: 0;
  border-bottom-width: 0;
  border-left-width: 0;
  position: relative;
  padding-bottom: 80px;
}
    @media(max-width:768px){
      .history .swiper {
        padding-bottom: 0;
      }
    }

.history .swiper-wrapper {
    margin: 95px 60px 30px 0;
}
    @media(max-width:768px){
      .history .swiper-wrapper {
        margin: 60px 0 0;
    }
    }

.history .swiper-slide {
  border-top: solid 1px;
  position: relative;
  border-radius: 0;
  overflow: unset;
}
.history .swiper-slide::before {
  position: absolute;
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 10px;
  background-color: var(--blue);
  top: -10px;
  left: 0;
}
.u__history--box {
  border-radius: var(--radius-40);
  max-width: 1820px;
  margin: 0 auto;
  padding: 90px 100px;
  box-shadow: 4px 4px 8px rgba(118,168,208,0.33);
}
    @media(max-width:768px){
      .u__history--box {
        padding: 55px 5% 60px;
      }
    }

.history__swiper .swiper-slide {
  text-align: left;
}

.history__year {
    font-size: clamp(24px, 2.083vw, 40px);
    font-weight: 700;
    line-height: 1.25;
    font-family: var(--font-en);
    margin: 27px auto 8px 10px;
}
    @media(max-width:768px){
      .history__year {
        font-size: 24px;
      }
    }


.history__text {
  font-size: clamp(15px, 1.041vw, 20px);
  line-height: 1.4;
  font-weight: 500;
  margin: 0 10px;
}
    @media(max-width:768px){
      .history__text {
        font-size: 14px;
      }
    }


/* ナビ＋進捗 */
.history__nav,
.step__nav {
  display: flex;
  align-items: center;
  gap: 14%;
  max-width: 530px;
  width: 32%;/* 0212追加*/
}
    @media(max-width:768px){
      .history__nav {
        flex-direction: row-reverse;
        width: 100%;
        margin: 30px auto 0;
      }
    }
    @media(max-width:820px){
      .step__nav {
        flex-direction: row-reverse;
        width: 100%;
        margin: 0 auto;
      }
      .step__nav {
        margin-top: 20px;
      }
    }


.history__nav-btn,
.step__nav-btn {
  width: 36%;
  display: flex;
  justify-content: space-between;
  max-width: 200px;
}
      @media(max-width:768px){
        .history__nav-btn, .step__nav-btn {
        max-width: 110px;
        }
      }
      @media(max-width:820px){
        .step__nav-btn {
        width: 110px;
        }
      }


/* 矢印 */
/* hoverで画像切り替え
====================== */
.history__prev,
.history__next,
.step__prev,
.step__next {
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  width: clamp(45px, 3.125vw, 60px);
  height: clamp(45px, 3.125vw, 60px);
}
    @media(max-width:768px){
    .history__prev,
    .history__next {
      width: 38px;
      height: 38px;
      }
    }
    @media(max-width:820px){
      .step__prev, .step__next {
        width: 38px;
        height: 38px;
      }
    }



.history__prev img,
.history__next img,
.step__prev img,
.step__next img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

/* 初期状態 */
.history__prev .hover,
.history__next .hover,
.step__prev .hover,
.step__next .hover {
  opacity: 0;
}

/* ホバー時 */
.history__prev:hover .normal,
.history__next:hover .normal,
.step__prev:hover .normal,
.step__next:hover .normal {
  opacity: 0;
}

.history__prev:hover .hover,
.history__next:hover .hover,
.step__prev:hover .hover,
.step__next:hover .hover {
  opacity: 1;
}

/* 進捗バー */
.history__progress {
  flex: 1;
  height: 9px;
  background: #ddd;
  border-radius: 5px;
  overflow: hidden;
  max-width: 250px;/*0212追加*/
}

.history__progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: #0068b7;
  transition: width 0.3s ease;
}


    @media(max-width:768px){
    /* 進捗バー */
    .history__progress {
      flex: 1;
      height: 9px;
      background: #ddd;
      border-radius: 5px;
      overflow: hidden;
    }

    .history__progress-bar {
      display: block;
      height: 100%;
      width: 0%;
      background: #0068b7;
      transition: width 0.3s ease;
    }
    }

    @media(max-width:820px){
      /* 進捗バー */
      .step__progress {
        flex: 1;
        height: 9px;
        background: #ddd;
        border-radius: 5px;
        overflow: hidden;
      }

      .step__progress-bar {
        display: block;
        height: 100%;
        width: 0%;
        background: #0068b7;
        transition: width 0.3s ease;
      }
    }



/* step 
===========*/
.step__swiper .swiper-wrapper {
  display: flex;
  align-items: end;
}
.step__swiper .swiper-wrapper .swiper-slide img {
  width: 100%;
  object-fit: contain;
  vertical-align: bottom;
}
@media (min-width: 821px) {
  .step__next,
  .step__prev,
  .step__progress-bar {
    display: none;
  }

  .step__swiper .swiper-wrapper {
    display: flex;
    transform: none !important;
  }

  .step__swiper .swiper-slide {
    flex: 0 0 20%;
    width: 20% !important;
  }
}