@charset "UTF-8";
/* -------------------------------------------------------------------------------- */
/* CTAフッター                                                      .mgsblk-cta */
/* -------------------------------------------------------------------------------- */

.mgsblk-cta {
  background-color: #2d4a2e;
  padding: 80px 40px;
  text-align: center;
  color: #fff;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.mgsblk-cta--has-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 50, 30, 0.8);
}

.mgsblk-cta__inner {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-width: 960px;
}

.mgsblk-cta__heading-small {
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 16px;
}

.mgsblk-cta__heading-large {
  font-family: "OptimaLTProRoman", YakuHanMP, yu-mincho-pr6n, 'YuMincho', 'Hiragino Mincho ProN', 'Yu Mincho', 'MS PMincho', serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 150%;
  margin-bottom: 24px;
}

.mgsblk-cta__caption {
  font-size: 15px;
  line-height: 190%;
  opacity: 0.9;
  margin-bottom: 24px;
}

.mgsblk-cta__tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.85);
  color: #2d4a2e;
  border-radius: 4px;
  padding: 6px 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 28px;
}

.mgsblk-cta__buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.mgsblk-cta__btn {
  display: inline-block;
  padding: 20px 40px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  color: #2d4a2e;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 4px;
  transition: background-color 0.3s;
}
.mgsblk-cta__btn:hover {
  background-color: rgba(255, 255, 255, 0.9);
}
/* お問い合わせ（contact）リンクのボタンはCTAカラー */
.mgsblk-cta__btn--orange {
  background-color: var(--cta-color);
  color: #fff;
}
.mgsblk-cta__btn--orange:hover {
  background-color: var(--cta-color-dark);
}
/* ラベル末尾の矢印はCSSで描画する（クラス付与は inc/inc_cta.php / inc/button-arrow.php）。
   inline-flex にすることで矢印はテキストと別のフレックスアイテムになり、
   flex-wrap が既定の nowrap なので矢印だけが2行目に落ちなくなる。 */
.mgsblk-cta__btn.mgs-arrow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
}
.mgsblk-cta__btn.mgs-arrow-btn::after {
  content: "→";
  flex-shrink: 0;
}
.mgsblk-cta__btn.mgs-arrow-btn--angle::after {
  content: "＞";
}

.mgsblk-cta__note {
  font-size: 13px;
  line-height: 180%;
  opacity: 0.6;
}

/* -------------------------------------------------------------------------------- */
/*        TABLET                                                                    */
/* -------------------------------------------------------------------------------- */
@media screen and (min-width: 740px) and (max-width: 899px) {
  .mgsblk-cta {
    padding: 60px 30px;
  }
  .mgsblk-cta__heading-large {
    font-size: 28px;
  }
}

/* -------------------------------------------------------------------------------- */
/*         MOBILE                                                                   */
/* -------------------------------------------------------------------------------- */
@media only screen and (max-width: 739px) {
  .mgsblk-cta {
    padding: 50px 15px;
  }

  /* --- 見出し：中央揃えのまま、折り返しだけ整える ---
     ACFの改行は nl2br() で <br> になり全幅で効くため、PC用の改行位置が
     モバイルだと「とで、」のような孤立行を生む。狭い幅では <br> を無効化し、
     text-wrap: balance で各行の長さを自動で揃える（非対応ブラウザは無視するだけ）。 */
  .mgsblk-cta__heading-large {
    font-size: 24px;
    text-wrap: balance;
  }
  .mgsblk-cta__heading-large br {
    display: none;
  }

  /* --- 本文・注釈：文字は左揃え、塊ごと中央に置く ---
     2行以上の文章と「」の列挙は、中央揃えだと左端が揃わず読みにくい。
     inline-block にすることで親の text-align:center でブロック自体は中央に来つつ、
     中の文字は左揃いになる。ここの <br> は列挙の区切りとして意味があるので残す。 */
  .mgsblk-cta__caption,
  .mgsblk-cta__note {
    display: inline-block;
    max-width: 100%;
    text-align: left;
  }

  .mgsblk-cta__buttons {
    flex-direction: column;
  }
  .mgsblk-cta__btn {
    text-align: center;
    padding: 16px 24px;
  }
}
