@charset "UTF-8";

/*--------------------------------------------------------
  ビフォーアフター カルーセル（ショートコード beforeafter_carousel）
  2件ずつ表示、カードレイアウトは beforeafter_archive と同じ
  左右矢印で送る
--------------------------------------------------------*/

.beforeafter-carousel {
  position: relative;
  width: 100%;
  max-width: var(--main-max-regular, 1280px);
  margin-left: auto;
  margin-right: auto;
  margin-top: 40px;
  padding: 0 24px 24px;
}

/* カルーセル上・中央に左右矢印 */
.beforeafter-carousel__nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.beforeafter-carousel__arrow {
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  color: var(--color-base, #fff);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: background 0.2s, opacity 0.2s;
}

.beforeafter-carousel__arrow:hover {
  background: var(--color-gray01);
  opacity: 0.95;
}

.beforeafter-carousel__arrow:focus-visible {
  outline: 2px solid var(--color-primary, #604d00);
  outline-offset: 2px;
}

.beforeafter-carousel__arrow-img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.beforeafter-carousel__arrow-img--next {
  transform: scaleX(-1);
}

/* 見えている範囲（2件ずつ表示） */
.beforeafter-carousel__viewport {
  overflow: hidden;
  width: 100%;
}

.beforeafter-carousel__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
  transition: transform 0.35s ease-out;
  will-change: transform;
}

/* 1スライド = アーカイブと同じカード1件（2列のうち1つ） */
.beforeafter-carousel__slide {
  flex: 0 0 calc((100% - 24px) / 2);
  min-width: 0;
}

/* カルーセル内のアーカイブカード：高さを揃える */
.beforeafter-carousel__slide .beforeafter-archive-card {
  height: 100%;
}

.beforeafter-carousel__slide .beforeafter-archive-card__inner {
  height: 100%;
}

/* スマホ: 1件表示、パディング調整 */
@media (max-width: 639px) {
  .beforeafter-carousel {
    padding-left: 0;
    padding-right: 0;
  }

  .beforeafter-carousel__nav {
    margin-bottom: 16px;
  }

  .beforeafter-carousel__arrow {
    width: 40px;
    height: 40px;
  }

  .beforeafter-carousel__arrow-img {
    width: 20px;
    height: 20px;
  }

  .beforeafter-carousel__track {
    gap: 12px;
  }

  .beforeafter-carousel__slide {
    flex: 0 0 100%;
  }
}