/*
 * お知らせ枠 + 申込者様限定特典キャンペーン
 *
 * Figma: ASIR_PC
 *   - お知らせ枠      node 9:1398〜9:1402
 *   - キャンペーン     node 9:1828「ASIRキャンペーン_PC」
 *
 * 数値は Figma の PC 版 (コンテンツ幅 1000px) をそのまま起こしている。
 * SP 版の指定は Figma に無いため、PC の構造を縦積みにして調整したもの。
 *
 * 色はテーマ既存のユーティリティ (.bg-navy-1 等) と同じ値を使っている:
 *   #0d2949 ネイビー / #b69241 ゴールド / #37342d 本文 /
 *   #fdf1e0 お知らせ背景 / #f2f7f9 セクション背景 / #f5b658 CTA
 */

:root {
  --asir-serif: "游明朝体", "Yu Mincho", YuMincho, "ヒラギノ明朝 Pro",
    "Hiragino Mincho Pro", "MS P明朝", "MS PMincho", serif;
  --asir-navy: #0d2949;
  --asir-gold: #b69241;
  --asir-ink: #37342d;
}

/* =============================================================
 * お知らせ枠
 * ============================================================= */

/* 上下の余白はどちらもこのセクションの白地で取っている。
 *   上 … 「計算条件」の枠との間隔
 *   下 … キャンペーンのグレー地との間隔 */
.p-intro {
  padding: 40px 20px;
  background-color: #fff;
}

.p-intro__announcement-wrap {
  max-width: 1000px;
  margin-right: auto;
  margin-left: auto;
}

.c-announcement-box {
  padding: 33px 40px 31px;
  background-color: #fdf1e0;
}

.c-announcement-heading {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--asir-ink);
  color: var(--asir-ink);
  font-family: var(--asir-serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.282;
  text-align: center;
}

.c-announcement-heading__date {
  display: block;
  margin-bottom: 7px;
  font-size: 17px;
}

/* 見出しは中央揃え、本文は左揃え（Figma node 9:1401 に合わせる） */
.c-notice-box {
  color: var(--asir-ink);
  font-family: var(--asir-serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.8;
  text-align: left;
}

.c-text-note {
  font-size: 14px;
}

@media screen and (max-width: 767px) {
  .p-intro {
    padding: 25px 15px;
  }

  .c-announcement-box {
    padding: 20px 15px;
  }

  .c-announcement-heading {
    margin-bottom: 15px;
    padding-bottom: 12px;
    font-size: 17px;
  }

  .c-announcement-heading__date {
    font-size: 14px;
  }

  .c-notice-box {
    font-size: 14px;
  }

  .c-text-note {
    font-size: 12px;
  }
}

/* =============================================================
 * 申込者様限定特典キャンペーン
 * ============================================================= */

.p-campaign {
  padding: 72px 15px 50px;
  background-color: #f2f7f9;
}

.p-campaign__inner {
  max-width: 1000px;
  margin-right: auto;
  margin-left: auto;
}

/* 改行を PC / SP で出し分けるための br。
 * br は display:none で消え、inline に戻すと改行が復活する。 */
.u-br-pc {
  display: inline;
}

.u-br-sp {
  display: none;
}

@media screen and (max-width: 767px) {
  .u-br-pc {
    display: none;
  }

  .u-br-sp {
    display: inline;
  }
}

/* ---- パネル (写真の上にバッジ・見出し・特典カードを重ねる) ---- */

.c-campaign-banner {
  position: relative;
}

.c-campaign-banner__panel {
  position: relative;
  height: 404px;
}

/* 写真は Figma の書き出しと同じ 1000x404。パネルと同じ比率なので切り抜きは起きない。
 * 画面幅が 1000px 未満のときだけ左右が詰まるため、人物のいる左側を優先して寄せる。 */
.c-campaign-banner__photo {
  display: block;
  position: absolute;
  inset: 0;
}

.c-campaign-banner__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0 50%;
}

.c-campaign-banner__badge {
  box-sizing: border-box;
  display: flex;
  position: absolute;
  top: -25px;
  left: 50%;
  z-index: 2;
  align-items: center;
  justify-content: center;
  width: 290px;
  padding: 13px 17px;
  transform: translateX(-50%);
  background-color: var(--asir-navy);
  color: #fff;
  font-family: var(--asir-serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.95px;
  text-align: center;
}

.c-campaign-banner__title {
  display: flex;
  position: absolute;
  top: 39px;
  right: 0;
  left: 0;
  z-index: 1;
  align-items: center;
  justify-content: center;
  height: 86px;
  color: var(--asir-navy);
  font-family: var(--asir-serif);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.c-campaign-banner__title-lead {
  margin-right: 25px;
  font-size: 54px;
  letter-spacing: 2.16px;
}

.c-campaign-banner__title-num {
  margin-right: 4px;
  font-size: 72px;
  letter-spacing: 5.04px;
}

.c-campaign-banner__title-main {
  margin-right: 4px;
  font-size: 54px;
  letter-spacing: 2.16px;
}

.c-campaign-banner__title-sub {
  font-size: 41px;
  letter-spacing: -0.17em;
}

/* ---- 特典カード ---- */

.c-campaign-banner__cards {
  display: flex;
  position: absolute;
  top: 144px;
  right: 25px;
  z-index: 1;
  align-items: stretch;
  gap: 13px;
}

.c-benefit-card {
  box-sizing: border-box;
  display: flex;
  position: relative;
  flex-direction: column;
  width: 271px;
  height: 237px;
  padding: 6px 12px 12px;
  overflow: hidden;
  background-color: #fff;
}

/* 左上のリボン (三角形) */
.c-benefit-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-width: 41px;
  border-style: solid;
  border-color: var(--asir-navy) transparent transparent var(--asir-navy);
}

.c-benefit-card__ribbon {
  display: flex;
  position: absolute;
  top: 10px;
  left: 9px;
  z-index: 1;
  flex-direction: column;
  align-items: center;
  width: 28px;
  color: #fff;
  font-family: var(--asir-serif);
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

.c-benefit-card__ribbon-label {
  font-size: 14px;
}

.c-benefit-card__ribbon-num {
  font-size: 21px;
}

/* リボンを避けるため左に余白を取る。開始位置は Figma に合わせて特典1と特典2で違う。
 * カード左端からの距離は、カード自身の padding-left 12px との合計になる
 * (特典1 = 12 + 74 = 86px / 特典2 = 12 + 59 = 71px)。 */
.c-benefit-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 6px;
  padding-left: 74px;
}

/* 特典2は「入会金」の右に小見出しが並ぶ。開始位置を左に寄せたうえで、
 * カードの右余白にも少し食い込ませて折り返さないようにしている。 */
.c-benefit-card__head--compact {
  margin-right: -8px;
  padding-left: 59px;
}

.c-benefit-card__name {
  color: var(--asir-navy);
  font-family: var(--asir-serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 1.82px;
  white-space: nowrap;
}

.c-benefit-card__lead {
  margin-top: 9px;
  color: var(--asir-navy);
  font-family: var(--asir-serif);
  font-size: 9.6px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.c-benefit-card__lead--trial {
  font-size: 11px;
}

.c-benefit-card__note {
  width: 100%;
  color: var(--asir-ink);
  font-family: var(--asir-serif);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
}

/* ---- ◯◯% OFF ---- */

.c-benefit-card__off {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  color: var(--asir-gold);
  font-family: var(--asir-serif);
  font-weight: 600;
  line-height: 1;
}

.c-benefit-card__off-num {
  font-size: 101px;
  letter-spacing: -0.02em;
}

.c-benefit-card__off-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 5px;
}

.c-benefit-card__off-percent {
  font-size: 40px;
}

.c-benefit-card__off-text {
  font-size: 31px;
}

/* ---- 通常価格 → 割引後 ---- */

.c-benefit-card__result {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin-top: 10px;
  padding-top: 11px;
  border-top: 1px solid var(--asir-navy);
  color: var(--asir-navy);
  font-family: var(--asir-serif);
  font-weight: 600;
  line-height: 1.2;
}

.c-benefit-card__before {
  position: relative;
  flex-shrink: 0;
  padding-top: 14px;
  white-space: nowrap;
}

.c-benefit-card__before-label {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 12px;
  letter-spacing: 0.6px;
}

.c-benefit-card__before-price {
  font-size: 18px;
  letter-spacing: 0.54px;
}

.c-benefit-card__arrow {
  position: relative;
  top: -5px;
  flex-shrink: 0;
  font-size: 18px;
}

.c-benefit-card__after {
  flex-shrink: 0;
  font-size: 29px;
  letter-spacing: 0.58px;
  white-space: nowrap;
}

.c-benefit-card__unit-sm {
  font-size: 11px;
}

.c-benefit-card__unit-md {
  font-size: 17px;
}

.c-benefit-card__tax {
  margin-right: -7px;
  font-size: 10px;
}

/* ---- 「体験授業を受けると」の白帯 ---- */

.c-campaign-banner__resolve {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 29px 21px;
  background-color: #fff;
}

.c-campaign-banner__resolve-lead {
  flex-shrink: 0;
  width: 152px;
  color: var(--asir-navy);
  font-family: var(--asir-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
}

.c-check-list__item {
  position: relative;
  margin-bottom: 11px;
  padding-left: 34px;
  background-image: url("../images/check-yellow.png");
  background-repeat: no-repeat;
  background-position: 0 50%;
  background-size: 23px 23px;
  color: var(--asir-navy);
  font-family: var(--asir-serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

.c-check-list__item:last-child {
  margin-bottom: 0;
}

/* ---- CTA ---- */

.p-campaign__cta {
  margin-top: 46px;
}

.c-button-cta--campaign {
  box-sizing: border-box;
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 386px;
  height: 54px;
  margin-right: auto;
  margin-left: auto;
  padding: 0 56px;
  border-radius: 33px;
  background-color: #f5b658;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  color: var(--asir-ink);
  font-family: var(--asir-serif);
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.c-button-cta__badge {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
}

.c-button-cta__arrow {
  display: flex;
  position: absolute;
  top: 50%;
  right: 18px;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  border-radius: 50%;
  background-color: #fff;
}

.c-button-cta__arrow::before {
  content: "";
  margin-left: 2px;
  border-width: 5px 0 5px 8px;
  border-style: solid;
  border-color: transparent transparent transparent var(--asir-navy);
}

/* ---- SP ----
 * Figma: node 9:2034「ASIRキャンペーン_SP」(フレーム幅 393px / コンテンツ幅 353px)
 *
 * PC と同じく写真の上にバッジ・見出し・特典カードを重ねる構成だが、
 * SP ではバッジが写真の上辺に乗り、特典カードは写真の下に縦積みになる。
 */

@media screen and (max-width: 767px) {
  .p-campaign {
    padding: 20px 20px 23px;
  }

  /* バッジはパネルの外（上）に出す。パネルはその分だけ下げる。 */
  .c-campaign-banner__panel {
    height: auto;
    margin-top: 50px;
    /* 写真 353x397 のうち、上端 17px はバッジに隠れる前提の可視領域 */
    aspect-ratio: 353 / 380;
  }

  .c-campaign-banner__photo img {
    object-position: 50% 100%;
  }

  .c-campaign-banner__badge {
    top: -50px;
    right: 0;
    left: 0;
    box-sizing: border-box;
    width: 100%;
    height: 50px;
    padding: 13px 17px;
    transform: none;
    font-size: 22px;
    letter-spacing: 1.1px;
  }

  .c-campaign-banner__title {
    display: block;
    top: 3px;
    height: auto;
  }

  .c-campaign-banner__title-lead {
    display: block;
    margin-right: 0;
    margin-bottom: -14px;
    font-size: 41px;
    line-height: 1.6;
  }

  /* 「2」は欧文ベースラインで並ぶため、そのままだと「大特典」より上にずれる。
   * 下げて中心を合わせている。 */
  .c-campaign-banner__title-num {
    position: relative;
    top: 4px;
    margin-right: 2px;
    font-size: 48px;
    letter-spacing: 0;
  }

  .c-campaign-banner__title-main {
    margin-right: 0;
    font-size: 41px;
    letter-spacing: 1.64px;
  }

  .c-campaign-banner__title-sub {
    display: block;
    margin-top: -4px;
    font-size: 35px;
  }

  /* ---- 特典カード (縦積み・左に見出し / 右に%OFF) ---- */

  /* 写真のすぐ下に隙間なく続く */
  .c-campaign-banner__cards {
    position: static;
    flex-direction: column;
    gap: 9px;
  }

  /* 上段は「見出し / %OFF」の2列、下段の価格行は全幅。
   * align-content で価格行をカード下辺に寄せる。 */
  .c-benefit-card {
    display: grid;
    align-content: space-between;
    align-items: start;
    grid-template-columns: 1fr auto;
    width: 100%;
    height: auto;
    min-height: 174px;
    padding: 15px 22px 12px 68px;
  }

  .c-benefit-card__ribbon {
    top: 10px;
    left: 9px;
  }

  /* SP は特典1・特典2とも開始位置が同じ（カードの padding-left 68px） */
  .c-benefit-card__head,
  .c-benefit-card__head--compact {
    display: block;
    grid-column: 1;
    margin-right: 0;
    padding-left: 0;
  }

  .c-benefit-card__name {
    font-size: 25px;
    letter-spacing: 1.75px;
  }

  .c-benefit-card__lead {
    display: block;
    margin-top: 0;
    font-size: 10px;
    line-height: 1.2;
  }

  .c-benefit-card__lead--trial {
    font-size: 12px;
  }

  .c-benefit-card__note {
    display: block;
    width: auto;
    margin-top: 8px;
    white-space: normal;
  }

  .c-benefit-card__off {
    grid-column: 2;
    margin-top: 0;
  }

  .c-benefit-card__off-num {
    font-size: 75px;
    letter-spacing: -1.5px;
  }

  .c-benefit-card__off-unit {
    margin-left: 2px;
  }

  .c-benefit-card__off-percent {
    font-size: 30px;
  }

  .c-benefit-card__off-text {
    font-size: 23px;
  }

  /* 区切り線はカード左右 20px の位置まで伸ばす（padding-left 68px 分を戻す） */
  .c-benefit-card__result {
    grid-column: 1 / -1;
    margin-top: 12px;
    margin-left: -48px;
    margin-right: -2px;
    padding-top: 12px;
  }

  /* ---- 「体験授業を受けると」の白帯 ---- */

  .c-campaign-banner__resolve {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 9px;
    padding: 23px 20px 29px;
  }

  .c-campaign-banner__resolve-lead {
    width: 100%;
    margin-bottom: 28px;
  }

  .c-check-list__item {
    margin-bottom: 18px;
    padding-left: 29px;
    background-position: 0 0;
    background-size: 21px 21px;
    font-size: 14px;
    line-height: 1.5;
  }

  /* ---- CTA ---- */

  .p-campaign__cta {
    margin-top: 20px;
  }

  .c-button-cta--campaign {
    width: 100%;
    height: 49px;
    padding: 0 50px;
    border-radius: 30px;
    box-shadow: 0 3.6px 3.6px rgba(0, 0, 0, 0.25);
    font-size: 16px;
  }

  .c-button-cta__badge {
    left: 9px;
    width: 35px;
    height: 35px;
  }

  .c-button-cta__arrow {
    right: 16px;
    width: 20px;
    height: 20px;
  }
}

/* =============================================================
 * 翻訳プラグイン (GTranslate / Google 翻訳) 対応
 *
 * このバナーは日本語の字数に合わせて固定幅・固定高さで組んでいるため、
 * 英語などに置き換わると文字が溢れて重なる。ここでその分を吸収する。
 *
 * translated-ltr / translated-rtl は Google 翻訳が html 要素に付ける
 * クラス。日本語表示のときは付かないので、このブロックは一切効かない
 * ＝ Figma どおりの日本語レイアウトには影響しない。
 * ============================================================= */

/* ---- 画面幅を問わず必要な調整 ---- */

/* 日本語前提で幅を決め打ちしているバッジを、文字数なりに伸ばす */
html[class*="translated-"] .c-campaign-banner__badge {
  box-sizing: content-box;
  width: auto;
  max-width: calc(100% - 88px);
  padding: 13px 24px;
}

/* 日本語では折り返さない前提の箇所を、折り返せるようにする */
html[class*="translated-"] .c-benefit-card__name,
html[class*="translated-"] .c-benefit-card__lead,
html[class*="translated-"] .c-benefit-card__note,
html[class*="translated-"] .c-benefit-card__before,
html[class*="translated-"] .c-benefit-card__after {
  white-space: normal;
}

html[class*="translated-"] .c-benefit-card__name {
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0;
}

/* 価格行は「通常価格 → 割引後（税込）」で横に長くなるため折り返す */
html[class*="translated-"] .c-benefit-card__result {
  flex-wrap: wrap;
  row-gap: 4px;
}

html[class*="translated-"] .c-benefit-card__after {
  font-size: 24px;
}

/* 高さ固定だと中身が切れるので、内容なりに伸ばす */
html[class*="translated-"] .c-benefit-card {
  height: auto;
}

/* CTAも1行前提の高さ。2行になっても収まるようにする（幅はそのまま） */
html[class*="translated-"] .c-button-cta--campaign {
  height: auto;
  min-height: 54px;
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 1.3;
}

/* ---- PC のみ ---- */

@media screen and (min-width: 768px) {
  /* 見出しは高さ86pxの1行前提。折り返せるようにして文字も少し詰める */
  html[class*="translated-"] .c-campaign-banner__title {
    top: 24px;
    height: auto;
    flex-wrap: wrap;
    gap: 0 10px;
    padding: 0 20px;
    line-height: 1.15;
  }

  html[class*="translated-"] .c-campaign-banner__title-lead,
  html[class*="translated-"] .c-campaign-banner__title-main {
    margin-right: 0;
    font-size: 38px;
    letter-spacing: 0;
  }

  html[class*="translated-"] .c-campaign-banner__title-num {
    margin-right: 0;
    font-size: 52px;
    letter-spacing: 0;
  }

  html[class*="translated-"] .c-campaign-banner__title-sub {
    font-size: 30px;
    letter-spacing: 0;
  }

  /* カードが下に伸びる分、重ねる位置を上げて写真からはみ出さないようにする */
  html[class*="translated-"] .c-campaign-banner__cards {
    top: 128px;
    align-items: flex-start;
  }

  html[class*="translated-"] .c-benefit-card {
    min-height: 237px;
  }

  html[class*="translated-"] .c-benefit-card__off-num {
    font-size: 84px;
  }
}
