/* ===== Reasons ===== */
.c-reasons {
  background: var(--color-bg-white);
  padding: 120px 0;
  overflow: hidden;
}

.c-reasons .l-container {
  overflow: visible;
}

.c-reasons .c-section-heading {
  margin-bottom: 80px;
}

.c-reasons .c-section-heading__ja {
  font-size: var(--font-size-5xl);
  color: var(--color-text);
}

.c-reasons__list {
  display: flex;
  flex-direction: column;
  gap: 143px;
  overflow: visible;
}

.c-reasons__item {
  display: flex;
  align-items: center;
  gap: 80px;
  position: relative;
  overflow: visible;
}

.c-reasons__item > .c-reasons__item-content {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  z-index: 1;
  transform: translateY(62px);
}

/* デフォルト: imgの表示幅が画面幅の51%（最大737.78px）になるよう、
   ビューポート端まで拡張する分（--img-edge-offset）を差し引いてコンテナ幅を決定する */
.c-reasons__item > .c-reasons__item-image {
  flex: 0 0 auto;
  width: calc(var(--img-target-w) - var(--img-edge-offset));
  height: calc(var(--img-target-w) * 415 / 737.78);
  position: relative;
  z-index: 1;
  overflow: visible;
}

/* リバース: 同様に、imgの表示幅が画面幅の51%（最大737.78px）になるよう調整 */
.c-reasons__item--reverse > .c-reasons__item-image {
  flex: 0 0 auto;
  width: calc(var(--img-target-w) - var(--img-edge-offset));
  height: calc(var(--img-target-w) * 415 / 737.78);
  overflow: visible;
}

/* 背景装飾 共通 */
.c-reasons__item-bg {
  position: absolute;
  top: 62px;
  bottom: -63px;
  background: var(--color-bg-section);
  z-index: 0;
}

/* デフォルト（01, 03）: コンテナ左内端〜右ビューポート端（直角側を右端に）*/
.c-reasons__item > .c-reasons__item-bg {
  left: -80px;
  right: calc(-1 * var(--edge-gap));
  border-radius: 500px 0 0 500px;
}

/* リバース（02）: 左ビューポート端〜コンテナ右内端（直角側を左端に）*/
.c-reasons__item--reverse > .c-reasons__item-bg {
  left: calc(-1 * var(--edge-gap));
  right: -80px;
  border-radius: 0 500px 500px 0;
}

/* DOM順が image → content のため、row のままで image が左に配置される */

.c-reasons__item-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.c-reasons__item-number {
  font-family: var(--font-family-en);
  font-size: var(--font-size-6xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent-alt);
  line-height: var(--line-height-none);
  margin: 0;
}

.c-reasons__item-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
  color: var(--color-text-dark);
  line-height: var(--line-height-normal);
  margin: 0;
}

.c-reasons__item-title-nowrap {
  white-space: nowrap;
}

.c-reasons__item-title-br--1178 {
  display: none;
}

@media (max-width: 1178px) {
  .c-reasons__item-title-br--1178 {
    display: inline;
  }
}

.c-reasons__item-description {
  font-size: var(--font-size-base);
  color: var(--color-text);
  line-height: var(--line-height-relaxed);
  margin: 0;
}

.c-reasons__item-image {
  --img-target-w: min(51vw, 737.78px);
  --img-edge-offset: var(--edge-gap);
  aspect-ratio: 737.78 / 415;
  max-height: 415px;
  overflow: visible;
  border-radius: 0;
  position: relative;
}

/* デフォルト: imgを左角丸・右端まで拡張 */
.c-reasons__item-image img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  max-width: none;
  width: calc(100% + var(--edge-gap));
  object-fit: cover;
  object-position: left center;
  border-radius: 50px 0 0 50px;
}

/* リバース: imgを右角丸・左端まで拡張 */
.c-reasons__item--reverse .c-reasons__item-image img {
  left: auto;
  right: 0;
  object-position: right center;
  border-radius: 0 50px 50px 0;
}

.c-reasons__footer {
  display: flex;
  justify-content: center;
  margin-top: 143px;
  position: relative;
  z-index: 1;
}

/* =========================================
   背景装飾: 角丸調整 (1340px)
   ========================================= */
@media (max-width: 1340px) {
  .c-reasons__item > .c-reasons__item-bg {
    left: max(-80px, calc(-1 * var(--edge-gap) + 16px));
    border-radius: 50px 0 0 50px;
  }

  .c-reasons__item--reverse > .c-reasons__item-bg {
    left: calc(-1 * var(--edge-gap));
    right: max(-80px, calc(-1 * var(--edge-gap) + 16px));
    border-radius: 0 50px 50px 0;
  }
}


/* =========================================
   レイアウト調整
   ========================================= */
@media (max-width: 1024px) {
  .c-reasons__item > .c-reasons__item-content {
    transform: translateY(0);
  }
}

/* =========================================
   選ばれる理由: 横並びレイアウトを860pxまで維持し、
   それ未満で縦積みに切り替える（タブレットでの過大表示を回避）
   ========================================= */
@media (max-width: 860px) {
  .c-reasons__item {
    flex-direction: column;
    gap: 32px;
  }

  .c-reasons__item-title-br--1178 {
    display: none;
  }

  .c-reasons__item > .c-reasons__item-content {
    transform: translateY(0);
  }

  /* 縦積み時、flex: 1 1 0 のままだと flex-basis:0 が高さに作用しコンテナが潰れるため上書き */
  .c-reasons__item > .c-reasons__item-image,
  .c-reasons__item--reverse > .c-reasons__item-image {
    flex: none;
    width: 100%;
    height: auto;
  }

  /* --reverse は DOM順が image→content のため、縦積み時はテキストを先に表示する */
  .c-reasons__item--reverse > .c-reasons__item-content {
    order: -1;
  }

  .c-reasons__item-bg {
    top: 24px;
    bottom: 0;
  }

  /* PC専用のフルブリード計算式は狭い画面で破綻し見えなくなるため、画面端基準に置き換え */
  .c-reasons__item > .c-reasons__item-bg {
    left: max(-80px, calc(-1 * var(--edge-gap) + 120px));
    right: calc(-1 * var(--container-padding));
  }

  .c-reasons__item--reverse > .c-reasons__item-bg {
    left: calc(-1 * var(--container-padding));
    right: max(-80px, calc(-1 * var(--edge-gap) + 120px));
  }

  /* 画像の角丸が無い側（PCで画面端に到達している側）を、SPでも画面端まで到達させる */
  .c-reasons__item > .c-reasons__item-image img {
    width: calc(100% + var(--container-padding));
  }

  .c-reasons__item--reverse > .c-reasons__item-image img {
    left: auto;
    right: 0;
    width: calc(100% + var(--container-padding));
  }

}

/* =========================================
   背景装飾: 角丸位置調整 (460px)
   ========================================= */
@media (max-width: 460px) {
  .c-reasons__item > .c-reasons__item-bg {
    left: max(-80px, calc(-1 * var(--edge-gap) + 64px));
  }

  .c-reasons__item--reverse > .c-reasons__item-bg {
    left: calc(-1 * var(--container-padding));
    right: max(-80px, calc(-1 * var(--edge-gap) + 64px));
  }
}

/* =========================================
   背景装飾: 縦位置調整 (861px〜1024px)
   ========================================= */
@media (min-width: 861px) and (max-width: 1024px) {
  .c-reasons__item-bg {
    top: 24px;
    bottom: -24px;
  }
}

/* =========================================
   テキストサイズ (1024px)
   ========================================= */
@media (max-width: 1024px) {
  .c-reasons .c-section-heading__ja {
    font-size: 25.6px;
  }

  .c-reasons__item-number {
    font-size: 25.6px;
  }

  .c-reasons__item-title {
    font-size: 25.6px;
  }

  .c-reasons {
    padding: 40px 0;
  }

  .c-reasons .c-section-heading {
    margin-bottom: 48px;
  }

  .c-reasons__list {
    gap: 40px;
  }

  .c-reasons__footer {
    margin-top: 48px;
  }
}

/* =========================================
   SP (767px)
   ========================================= */
@media (max-width: 767px) {
  .c-reasons .c-section-heading.c-section-heading--center {
    gap: 16px;
    margin-bottom: 16px;
  }

  .c-reasons__item-title {
    font-size: 21.33px;
  }

  .c-reasons__item-content {
    gap: 16px;
  }
}

/* ===== FAQ ===== */
.c-faq {
  padding: 80px 0;
}

.c-faq__card {
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  border-radius: 0;
  padding: 80px 0;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.c-faq__card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(-1 * var(--edge-gap) + 80px);
  right: calc(-1 * var(--edge-gap) - 70px);
  background: var(--color-bg-light);
  border-radius: 100px 0 0 100px;
  z-index: -1;
}

/* ===== 余白 (1320px) ===== */
@media (max-width: 1320px) {
  .c-faq__card::before {
    left: calc(-1 * var(--edge-gap) - 30px);
  }
}

.c-faq .c-section-heading {
  gap: 8px;
}

.c-faq__list {
  width: 100%;
}

.c-faq__footer {
  display: flex;
  justify-content: center;
}

/* ===== FAQ Accordion ===== */

.c-faq-item {
}

.c-faq-item__question {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
}

.c-faq-item__label {
  flex: 0 0 auto;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-dark);
  line-height: var(--line-height-none);
  width: auto;
}

.c-faq-item__question-text {
  flex: 1 1 auto;
}

.c-faq-item__toggle {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.c-faq-item__toggle-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
}

.c-faq-item__toggle-icon::before,
.c-faq-item__toggle-icon::after {
  content: "";
  position: absolute;
  background: var(--color-text);
  border-radius: var(--radius-full);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Vertical bar (becomes hidden when open) */
.c-faq-item__toggle-icon::before {
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  transform: translateX(-50%);
}

/* Horizontal bar */
.c-faq-item__toggle-icon::after {
  top: 50%;
  left: 0;
  width: 100%;
  height: 4px;
  transform: translateY(-50%);
}

.c-faq-item.is-open .c-faq-item__toggle-icon::before {
  opacity: 0;
  transform: translateX(-50%) rotate(90deg);
}

/* ===== Answer ===== */
.c-faq-item__answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.c-faq-item.is-open .c-faq-item__answer {
  max-height: 500px;
}

.c-faq-item__answer-inner {
  padding: 0 0 24px 40px;
  font-size: var(--font-size-base);
  color: var(--color-text);
  line-height: var(--line-height-relaxed);
}

.c-faq-item__answer-inner p {
  margin: 0;
}

/* ===== 余白 (1024px) ===== */
@media (max-width: 1024px) {
  /* FAQ */
  .c-faq {
    padding: 32px 0;
  }

  .c-faq__card {
    padding: 32px 16px;
    border-radius: var(--radius-xl);
    gap: 24px;
  }

  /* PC専用のフルブリード計算式は狭い画面で破綻するため、画面端基準に置き換え。
     左右をビューポート端まで均等にブリードさせ、左右バランスを揃える */
  .c-faq__card::before {
    left: calc(-1 * var(--container-padding));
    right: calc(-1 * var(--container-padding));
    border-radius: 0;
  }

  .c-faq-item__question {
    padding: 20px 0;
    gap: 12px;
  }

  .c-faq-item__answer-inner {
    padding-left: 36px;
  }
}

/* ===== モバイル (767px) ===== */
@media (max-width: 767px) {
  .c-faq .c-section-heading.c-section-heading--center {
    margin-bottom: 0;
  }
}
