/* ============================================================
   料金（price.html）専用
   読み込み順: style.css → sub.css → price.css
   ※レスポンシブはファイル末尾（820px以下・640px以下）。
============================================================ */

/* ===============================
   商品の選び方：ステップ（番号＋見出し＋カード3枚）
                見出しとカードの間40 / ステップ同士の間 約80
=============================== */
.p-price__step + .p-price__step {
  margin-top: 60px;
}
.p-price__step-title {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 0 30px;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.3;
}
.p-price__step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 45px;
  height: 45px;
  border-radius: 8px;
  background: #848484;
  font-size: 24px;
  color: #FFFFFF;
}

/* ===============================
   カード3枚を「or」「→」でつなぐ並び（商品の選び方／ご利用の流れ で共用）
                カード: 上下余白30・左右20・中の間20・角丸20
                名前28px Bold（付録は20px）/ 画像320×213 角丸15 / 説明18px
=============================== */
.p-price__choices {
  display: grid;
  grid-template-columns: 1fr 82px 1fr 82px 1fr;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.p-price__choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  align-self: stretch;
  padding: 22px 15px;
  border-radius: 15px;
}
.p-price__choice-name {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}
.p-price__choice-name--small {
  font-size: 15px;
}
.p-price__choice-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 320 / 213;
  object-fit: cover;
  border-radius: 11px;
}
.p-price__choice-text {
  margin: 0;
  width: 100%;
  font-size: 14px;
  line-height: 1.6;
}
.p-price__or {
  font-size: 27px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

/* ===============================
   料金表
                1段 = 矢印型ラベル343×270（#BABCBE）＋カード320×3、間29
                ラベル: 名前28px Bold 白 / 画像230×153 角丸15
                カード: 名前28px Bold・付録名16px Medium / 金額40px Semi Bold・単位24px
=============================== */
.p-price__lead {
  margin: 0;
  font-size: 36px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}
.p-price__lead-sub {
  margin: 12px 0 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}
.p-price__table {
  display: flex;
  flex-direction: column;
  gap: 52px;
  margin-top: 52px;
}
.p-price__row {
  display: grid;
  grid-template-columns: 343fr 320fr 320fr 320fr;
  gap: 22px;
  align-items: stretch;
}
/* 右がとがった矢印型のラベル（背景は img/price_label_bg.svg を枠いっぱいに伸ばしている） */
.p-price__label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  aspect-ratio: 343 / 270;
  padding: 0 25% 0 8%;
  background: url(../img/price_label_bg.svg) no-repeat center / 100% 100%;
}
.p-price__label-name {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  color: #FFFFFF;
  text-align: center;
}
.p-price__label-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 230 / 153;
  object-fit: cover;
  border-radius: 11px;
}
.p-price__plan {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 22px 15px;
  border-radius: 15px;
  text-align: center;
}
.p-price__plan-name {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}
.p-price__plan-main {
  display: block;
  font-size: 21px;
  font-weight: 700;
}
.p-price__plan-amount {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.3;
}
.p-price__plan-unit {
  font-size: 18px;
}
.p-price__table-foot {
  margin: 52px 0 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
}

/* ===============================
   ご利用の流れ
=============================== */
.p-price__flow-icon {
  display: block;
  width: 60px;
  height: 60px;
}
.p-price__link {
  color: #3C4043; /* 本文と同じ色（お役立ち資料のパンくずと同じ扱い） */
  text-decoration: underline; /* リンクだと分かるよう、常に下線を付ける */
  text-underline-offset: 3px;
}
.p-price__link:hover {
  text-decoration: none;
}
.p-price__notes {
  list-style: none;
  margin: 52px 0 0;
  padding: 0;
}
.p-price__note {
  padding-left: 1em;
  text-indent: -1em;
  font-size: 15px;
  line-height: 1.75;
}

/* ============================================================
   レスポンシブ
============================================================ */

/* ===============================
   1199px以下
   ・料金表：ラベルを上の帯にして、その下にカード3枚
     （横4つ並びのままだと、1000px前後でカードが細くなりすぎるため早めに切り替える）
=============================== */
@media (max-width: 1199px) {
  .p-price__table {
    gap: 40px;
  }
  .p-price__row {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  /* 矢印型をやめて、横長のグレーの帯にする（名前＋小さい画像） */
  .p-price__label {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    aspect-ratio: auto;
    padding: 10px 16px;
    background: #BABCBE;
    border-radius: 10px;
  }
  .p-price__label-img {
    width: 96px;
    border-radius: 6px;
  }
}

/* ===============================
   820px以下
   ・カード3枚の並び：「or」「→」の幅を詰めて、横3枚のまま
=============================== */
@media (max-width: 820px) {
  .p-price__choices {
    grid-template-columns: 1fr 36px 1fr 36px 1fr;
  }
  .p-price__choice {
    padding: 18px 12px;
  }
  .p-price__or {
    font-size: 20px;
  }

}

/* ===============================
   640px以下（スマートフォン）
   ・カード3枚の並び：縦に1枚ずつ。カードの中は「左に画像、右に名前と説明」
   ・料金表：カードを縦に1枚ずつ。「左に名前、右に金額」＋下にボタン
=============================== */
@media (max-width: 640px) {
  .p-price__step + .p-price__step {
    margin-top: 40px;
  }
  .p-price__step-title {
    gap: 10px;
    margin-bottom: 18px;
    font-size: 20px;
  }
  .p-price__step-num {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    font-size: 18px;
  }

  .p-price__choices {
    grid-template-columns: 1fr;
  }
  .p-price__choice {
    display: grid;
    grid-template-columns: 36% 1fr;
    column-gap: 14px;
    row-gap: 6px;
    align-items: start;
    padding: 14px;
    border-radius: 12px;
  }
  .p-price__choice-name,
  .p-price__choice-text {
    grid-column: 2;
  }
  .p-price__choice-name {
    font-size: 17px;
    text-align: left;
  }
  .p-price__choice-name--small {
    font-size: 15px;
  }
  .p-price__choice-img,
  .p-price__flow-icon {
    grid-column: 1;
    grid-row: 1 / span 3;
  }
  .p-price__choice-img {
    border-radius: 8px;
  }
  .p-price__flow-icon {
    justify-self: center;
    align-self: center; /* カードの上下の真ん中に置く */
    width: 52px;
    height: 52px;
  }
  .p-price__choice-text {
    font-size: 13px;
  }
  .p-price__or {
    padding: 6px 0;
    font-size: 18px;
  }
  /* ご利用の流れの「→」は、縦並びに合わせて下向きにする */
  .p-price__flow .p-price__or {
    transform: rotate(90deg);
  }

  .p-price__lead {
    font-size: 24px;
  }
  .p-price__lead-sub {
    margin-top: 8px;
    font-size: 16px;
  }
  .p-price__table {
    gap: 32px;
    margin-top: 32px;
  }
  .p-price__row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .p-price__label {
    padding: 8px 14px;
  }
  .p-price__label-name {
    font-size: 18px;
  }
  .p-price__label-img {
    width: 72px;
  }
  .p-price__plan {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    text-align: left;
  }
  .p-price__plan-main {
    font-size: 17px;
  }
  .p-price__plan-amount {
    font-size: 24px;
    text-align: right;
    white-space: nowrap;
  }
  .p-price__plan-unit {
    font-size: 13px;
  }
  .p-price__plan .c-button {
    grid-column: 1 / -1;
    justify-self: end;
  }
  .p-price__table-foot {
    margin-top: 32px;
    font-size: 14px;
    text-align: left;
  }

  .p-price__notes {
    margin-top: 32px;
  }
  .p-price__note {
    font-size: 13px;
    line-height: 1.7;
  }
}

/* ============================================================
   冊子版 #9A7CB6 ／ Web版 #5FA79F ／ 特別セット #C9727D
   ・「学ぶメディアを選ぶ」のカード3枚と、料金表の3段を同じ色で揃える
   ・色を変えるときは、下の --c の値を書き換える
   ※HTMLの並び順（1番目=冊子版、2番目=Web版、3番目=特別セット）で色を当てている
============================================================ */
.p-price__step:nth-of-type(1) .p-price__choice:nth-child(1),
.p-price__row:nth-child(1) { --c: #9A7CB6; } /* 冊子版 */
.p-price__step:nth-of-type(1) .p-price__choice:nth-child(3),
.p-price__row:nth-child(2) { --c: #5FA79F; } /* Web版 */
.p-price__step:nth-of-type(1) .p-price__choice:nth-child(5),
.p-price__row:nth-child(3) { --c: #C9727D; } /* 特別セット */

/* 「学ぶメディアを選ぶ」のカード：上に色の線、名前を色文字に */
.p-price__step:nth-of-type(1) .p-price__choice {
  border-top: 6px solid var(--c);
}
.p-price__step:nth-of-type(1) .p-price__choice-name {
  color: var(--c);
}

/* 料金表：カードの上の線・商品名・ボタン・ラベルを商品の色に */
.p-price__row .p-price__plan {
  border-top: 6px solid var(--c);
}
.p-price__row .p-price__plan-main {
  color: var(--c);
}
.p-price__row .c-button {
  background: var(--c);
}
/* 1200px以上：右がとがった矢印型（色を変えられるようCSSで形を作っている） */
@media (min-width: 1200px) {
  .p-price__label {
    background: var(--c);
    clip-path: polygon(0 0, 78% 0, 100% 50%, 78% 100%, 0 100%);
    border-radius: 14px 0 0 14px;
  }
}
/* 1199px以下：横長の帯 */
@media (max-width: 1199px) {
  .p-price__label {
    background: var(--c);
  }
}

/* 番号（1・2）は濃いグレーに */
.p-price__step-num {
  background: #4D4D4D;
}

/* 「導入料金・基本料金 ゼロ円」：細くて淡い黄色のマーカー */
.p-price__lead {
  width: fit-content;
  margin-inline: auto;
  padding: 0 8px;
  background: linear-gradient(transparent 78%, #FFEDA8 78%);
}
