/* ==========================================================================
   採用ページ：スタッフの声カルーセル（ver2 改修）
   PC 3枚 / タブレット 2枚 / SP 1枚＋次のカードを少し見せる
   ========================================================================== */

.staff_carousel {
  --staff-carousel-per-view: 3;
  --staff-carousel-gap: 30px;
  --staff-carousel-btn-size: 70px;
  position: relative;
}

/* スクロール領域（横スクロール＋スナップ） */
.staff_block__list--carousel {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
  gap: var(--staff-carousel-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.staff_block__list--carousel::-webkit-scrollbar {
  display: none;
}

.staff_block__list--carousel > .staff_block__item {
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - var(--staff-carousel-gap) * (var(--staff-carousel-per-view) - 1)) / var(--staff-carousel-per-view));
  max-width: none;
  scroll-snap-align: start;
}

/* カードの高さを揃える：一番長いカードに合わせてテキスト部分を伸ばし、名前・下線の位置を揃える */
.staff_block__list--carousel > .staff_block__item > a {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.staff_block__list--carousel .staff_block__item_content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.staff_block__list--carousel .staff_block__info {
  margin-top: auto;
}

/* 前後ボタン */
.staff_carousel__btn {
  position: absolute;
  top: var(--staff-carousel-btn-top, 35%);
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--staff-carousel-btn-size);
  height: var(--staff-carousel-btn-size);
  padding: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.3s, color 0.3s;
}

.staff_carousel__btn[hidden] {
  display: none;
}

.staff_carousel__btn--prev {
  left: calc((var(--staff-carousel-btn-size) + 30px) * -1);
}

.staff_carousel__btn--next {
  right: calc((var(--staff-carousel-btn-size) + 30px) * -1);
}

.staff_carousel__btn:focus-visible {
  outline: 2px solid #17793a;
  outline-offset: 3px;
}

@media (hover: hover) {
  .staff_carousel__btn:hover {
    background: #fff;
    color: #414141;
  }
}

.staff_carousel__btn_icon {
  width: 34%;
  height: 34%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ドット */
.staff_carousel__dots {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: 34px;
}

.staff_carousel__dots[hidden] {
  display: none;
}

/* タップしやすいようボタンは大きめにし、見た目の丸は ::before で描く */
.staff_carousel__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.staff_carousel__dot::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d9d9d9;
  transition: background-color 0.3s;
}

.staff_carousel__dot.is-active::before {
  background: #17793a;
}

.staff_carousel__dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* 画面が狭くボタンを外側に置けない幅：左右に余白を取りボタンを内側へ */
@media (max-width: 1400px) {
  .staff_carousel {
    --staff-carousel-btn-size: 56px;
    padding: 0 calc(var(--staff-carousel-btn-size) + 20px);
  }

  .staff_carousel__btn--prev {
    left: 0;
  }

  .staff_carousel__btn--next {
    right: 0;
  }
}

@media (max-width: 1000px) {
  .staff_carousel {
    --staff-carousel-per-view: 2;
    --staff-carousel-gap: 20px;
    --staff-carousel-btn-size: 48px;
    padding: 0 calc(var(--staff-carousel-btn-size) + 14px);
  }
}

@media screen and (width < 769px) {
  .staff_carousel {
    --staff-carousel-gap: 4vw;
    padding: 0;
  }

  /* 画面端まで広げ、次のカードを少し見せてスワイプできることを示す */
  .staff_block__list--carousel {
    flex-direction: row;
    align-items: stretch;
    margin: 0 -8vw;
    padding: 0 8vw;
    scroll-padding: 0 8vw;
  }

  .staff_block__list--carousel > .staff_block__item {
    flex: 0 0 76vw;
  }

  .staff_carousel__btn {
    display: none;
  }

  .staff_carousel__dots {
    margin-top: calc(22 / 375 * 100vw);
  }

  .staff_carousel__dot::before {
    width: calc(10 / 375 * 100vw);
    height: calc(10 / 375 * 100vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .staff_carousel__btn,
  .staff_carousel__dot::before {
    transition: none;
  }
}
