/* ============================================
   Campaign Carousel Styles（Swiper 不使用）
   ============================================ */

/* --- Section Wrapper --- */
.campaign-h2ttl {
  margin-bottom: 40px;
}

.campaign-section {
  width: 100%;
  max-width: 1400px;
  margin: auto;
  padding-block: 48px;
  padding-inline: 120px;
  box-sizing: border-box;
  position: relative;
}

/* --- Outer: 矢印ボタンの基準・左右マージン打ち消し --- */
.carousel-outer {
  position: relative;
  padding-inline: 20px;
  margin-inline: -60px;
}

/* --- Viewport: はみ出したクローンスライドをマスク --- */
.carousel-viewport {
  overflow: hidden;
  /* カードの box-shadow がクリップされないよう上下に余白を確保 */
  padding-block: 40px;
  margin-block: -40px;
}

/* --- Track: スライドを横一列に並べる --- */
.carousel-track {
  display: flex;
  /* gap・width は JS で設定 */
  will-change: transform;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.carousel-track:active {
  cursor: grabbing;
}

/* --- 個別アイテム --- */
.carousel-item {
  /* width は JS で設定 */
  flex-shrink: 0;
}

/* 空白スライド（実スライドが表示枚数未満のとき残枠を埋める） */
.carousel-item--blank {
  flex-shrink: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ============================================
   Campaign Card
   ============================================ */
.campaign-card {
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 10px 10px rgba(0, 108, 74, 0.1);
  background: #00af79;
  transition: box-shadow 0.3s ease;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.campaign-card > a {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  text-decoration: none;
  color: inherit;
}

/* 外部リンクアイコン（::after で実装） */
.campaign-card__title-icon {
  display: none;
}

.campaign-card > a[target="_blank"] .campaign-card__title::after {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  aspect-ratio: 1;
  margin-left: 8px;
  vertical-align: middle;
  flex-shrink: 0;
  -webkit-mask: url(/jabank/wp-content/themes/ja-bank/assets/img/common/icon/icon_blank.svg)
    no-repeat center center;
  mask: url(/jabank/wp-content/themes/ja-bank/assets/img/common/icon/icon_blank.svg)
    no-repeat center center;
  -webkit-mask-size: contain;
  mask-size: contain;
  background: #fff;
  position: relative;
  top: -1px;
}

.campaign-card:hover {
  box-shadow: 0 10px 20px rgba(0, 108, 74, 0.4);
}

.campaign-card__image {
  width: 100%;
  height: auto;
  aspect-ratio: 750 / 500;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* --- Card Body --- */
.campaign-card__body {
  background-color: #00af79;
  color: #fff;
  padding: 15px 25px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  box-sizing: border-box;
}

.campaign-card__title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;
  color: #fff;
  display: inline;
  text-align: justify;
}

.campaign-card > a:hover .campaign-card__body .campaign-card__title > span {
  background-size: 100% 1px;
  background-position: 0 100%;
}
.campaign-card__body .campaign-card__title > span {
  background: linear-gradient(currentcolor, currentcolor) no-repeat 100% 100%/0
    1px;
  transition: background-size 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Description --- */
.campaign-card__desc {
  font-size: 16px;
  line-height: 1.65;
  opacity: 0.92;
}

/* ============================================
   Arrow Buttons
   ============================================ */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #00af79;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.22s ease, box-shadow 0.22s ease;
  box-shadow: 0 2px 8px rgba(0, 108, 74, 0.08);
  padding: 0;
  outline: none;
}

.carousel-arrow:hover {
  background: #51d6ae;
  border-color: #51d6ae;
}

.carousel-arrow:hover svg {
  stroke: #fff;
}

.carousel-arrow svg {
  width: 18px;
  height: 18px;
  stroke: #00af79;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.carousel-arrow--prev { left: 0; }
.carousel-arrow--next { right: 0; }

/* ============================================
   Dot Indicators
   ============================================ */
.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c8ece1;
  border: none;
  cursor: pointer;
  padding: 0;
  opacity: 1;
  transition: background 0.3s ease, transform 0.3s ease;
  outline: none;
}

.carousel-dot.is-active {
  background: #00af79;
  transform: scale(1.15);
}

/* ============================================
   Responsive: Tablet (560px〜768px)
   ============================================ */
@media (max-width: 768px) {
  .campaign-section {
    padding-inline: 50px;
    padding-block: 50px;
  }

  .carousel-outer {
    padding-inline: 40px;
  }

  .carousel-arrow--prev { left: 20px; }
  .carousel-arrow--next { right: 20px; }
}

/* ============================================
   Responsive: Mobile (〜559px)
   ============================================ */
@media (max-width: 559px) {
  .campaign-section {
    padding-inline: 40px;
    padding-block: 28px;
  }

  .carousel-outer {
    padding-inline: 30px;
    margin-inline: -30px;
  }

  .carousel-arrow--prev { left: 10px; }
  .carousel-arrow--next { right: 10px; }
}
