/**
 * SWELL 既定スタイル上書き（FCM トップページ専用）
 * 詳細度を最大化し、SWELL 本文 CSS より後に読み込む
 */

/* ----- レイアウト: 全幅・余白リセット ----- */
#body_wrap.fcm-top-page #content.l-container,
#body_wrap.fcm-top-page #content.l-content,
#body_wrap.fcm-top-page .l-mainContent,
#body_wrap.fcm-top-page .l-mainContent__inner,
#body_wrap.fcm-top-page .l-content,
#body_wrap.fcm-top-page .l-article {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#body_wrap.fcm-top-page .l-content {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
}

#body_wrap.fcm-top-page #main_content .post_content,
#body_wrap.fcm-top-page #main_content .fcm-topPage__content {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

/* ----- H2: SWELL 緑背景・上下線を無効化 ----- */
#body_wrap.fcm-top-page #main_content .post_content h2.wp-block-heading,
#body_wrap.fcm-top-page #main_content .post_content h2.is-style-fcm-section-title,
#body_wrap.fcm-top-page #main_content .post_content h2.c-sectionHead__title,
#body_wrap.fcm-top-page #main_content .post_content h2:where(:not([class^="swell-block-"]):not(.faq_q):not(.p-postList__title)) {
  background: none !important;
  background-color: transparent !important;
  padding: 0 !important;
  margin: 0 0 0.5rem !important;
  color: var(--fcm-color-text) !important;
  border: none !important;
  box-shadow: none !important;
  position: static !important;
  font-size: clamp(1.625rem, 4vw, 2.125rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  line-height: 1.4 !important;
  text-align: inherit !important;
}

#body_wrap.fcm-top-page #main_content .post_content h2.wp-block-heading::before,
#body_wrap.fcm-top-page #main_content .post_content h2.wp-block-heading::after,
#body_wrap.fcm-top-page #main_content .post_content h2.is-style-fcm-section-title::before,
#body_wrap.fcm-top-page #main_content .post_content h2.is-style-fcm-section-title::after,
#body_wrap.fcm-top-page #main_content .post_content h2.c-sectionHead__title::before,
#body_wrap.fcm-top-page #main_content .post_content h2.c-sectionHead__title::after,
#body_wrap.fcm-top-page #main_content .post_content h2:where(:not([class^="swell-block-"]):not(.faq_q):not(.p-postList__title))::before,
#body_wrap.fcm-top-page #main_content .post_content h2:where(:not([class^="swell-block-"]):not(.faq_q):not(.p-postList__title))::after {
  display: none !important;
  content: none !important;
  position: static !important;
  width: 0 !important;
  height: 0 !important;
  border: none !important;
  background: none !important;
  pointer-events: none !important;
}

/* ----- H3: SWELL 点線を無効化 ----- */
#body_wrap.fcm-top-page #main_content .post_content h3.wp-block-heading,
#body_wrap.fcm-top-page #main_content .post_content h3.c-eventCard__title,
#body_wrap.fcm-top-page #main_content .post_content h3.c-newsItem__title,
#body_wrap.fcm-top-page #main_content .post_content h3:where(:not([class^="swell-block-"]):not(.faq_q):not(.p-postList__title)) {
  background: none !important;
  background-color: transparent !important;
  padding: 0 !important;
  margin: 0 0 0.5rem !important;
  /* color: var(--fcm-color-text) !important; */
  border: none !important;
  box-shadow: none !important;
  position: static !important;
  text-align: left !important;
}

/* イベントカード内タイトルは body の gap で余白管理（一覧と同一） */
#body_wrap.fcm-top-page #main_content .post_content h3.c-eventCard__title {
  margin: 0 !important;
}

#body_wrap.fcm-top-page #main_content .post_content h3.wp-block-heading::before,
#body_wrap.fcm-top-page #main_content .post_content h3.wp-block-heading::after,
#body_wrap.fcm-top-page #main_content .post_content h3.c-eventCard__title::before,
#body_wrap.fcm-top-page #main_content .post_content h3.c-eventCard__title::after,
#body_wrap.fcm-top-page #main_content .post_content h3.c-newsItem__title::before,
#body_wrap.fcm-top-page #main_content .post_content h3.c-newsItem__title::after,
#body_wrap.fcm-top-page #main_content .post_content h3:where(:not([class^="swell-block-"]):not(.faq_q):not(.p-postList__title))::before,
#body_wrap.fcm-top-page #main_content .post_content h3:where(:not([class^="swell-block-"]):not(.faq_q):not(.p-postList__title))::after {
  display: none !important;
  content: none !important;
  width: 0 !important;
  height: 0 !important;
  background: none !important;
}

/* ----- H1（ヒーロー） ----- */
#body_wrap.fcm-top-page #main_content .post_content h1.c-hero__title {
  background: none !important;
  padding: 0 !important;
  margin: 0 0 0.75rem !important;
  color: #fff !important;
  border: none !important;
  position: static !important;
}

#body_wrap.fcm-top-page #main_content .post_content h1.c-hero__title::before,
#body_wrap.fcm-top-page #main_content .post_content h1.c-hero__title::after {
  display: none !important;
  content: none !important;
}

/* ----- セクション見出し: 左寄せセクション ----- */
#body_wrap.fcm-top-page #main_content .c-sectionHead.-left h2,
#body_wrap.fcm-top-page #main_content .c-sectionHead.-left .c-sectionHead__title {
  text-align: left !important;
}

#body_wrap.fcm-top-page #main_content .c-sectionHead.-left .c-sectionHead__label {
  text-align: left !important;
}

/* ----- 段落: SWELL 中央揃えを解除 ----- */
#body_wrap.fcm-top-page #main_content .post_content p {
  text-align: inherit;
}

#body_wrap.fcm-top-page #main_content .c-sectionHead__label {
  margin: 0 0 0.35rem !important;
}

/* ----- コンテンツ幅: 1120px 中央（デザイン l-container 相当） ----- */
#body_wrap.fcm-top-page #main_content .c-hero__container,
#body_wrap.fcm-top-page #main_content .c-section__inner {
  max-width: var(--fcm-container) !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
  box-sizing: border-box !important;
}

/* スマホ: ヒーロー文言の左右余白をなくす */
@media (max-width: 781px) {
  #body_wrap.fcm-top-page #main_content .c-hero__container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* c-section__inner 未使用の既存ページ向けフォールバック */
#body_wrap.fcm-top-page #main_content .c-section:not(:has(.c-section__inner)) > .wp-block-group,
#body_wrap.fcm-top-page #main_content .c-section:not(:has(.c-section__inner)) > .wp-block-columns,
#body_wrap.fcm-top-page #main_content .c-section:not(:has(.c-section__inner)) > .wp-block-buttons,
#body_wrap.fcm-top-page #main_content .c-section:not(:has(.c-section__inner)) > .wp-block-html {
  max-width: var(--fcm-container) !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
  box-sizing: border-box !important;
}

#body_wrap.fcm-top-page #main_content .c-section .c-sectionHead {
  margin-bottom: var(--fcm-space-xl) !important;
}

#body_wrap.fcm-top-page #main_content .c-section__inner > .wp-block-group,
#body_wrap.fcm-top-page #main_content .c-section__inner > .wp-block-columns,
#body_wrap.fcm-top-page #main_content .c-section__inner > .wp-block-buttons,
#body_wrap.fcm-top-page #main_content .c-section__inner > .wp-block-html {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

/* お知らせ: wp-block-html が全幅化するのを防ぐ */
#body_wrap.fcm-top-page #main_content .c-section .wp-block-html {
  max-width: var(--fcm-container) !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
  box-sizing: border-box !important;
  position: relative !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
}

#body_wrap.fcm-top-page #main_content .c-section__inner .wp-block-html {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

#body_wrap.fcm-top-page #main_content .c-section .wp-block-html.alignfull,
#body_wrap.fcm-top-page #main_content .c-section .wp-block-html.alignwide {
  width: 100% !important;
  max-width: var(--fcm-container) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* リスト自体を1120pxに（wp-block-html が全幅でも効く） */
#body_wrap.fcm-top-page #main_content .c-newsList {
  max-width: var(--fcm-container) !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
  list-style: none !important;
}

#body_wrap.fcm-top-page #main_content .c-section__inner .c-newsList,
#body_wrap.fcm-top-page #main_content .c-section__inner .wp-block-html .c-newsList {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#body_wrap.fcm-top-page #main_content .c-sectionFoot,
#body_wrap.fcm-top-page #main_content .c-sectionFoot.wp-block-buttons {
  justify-content: center !important;
}

/* ----- ボタン（SWELL 既定の pill / 単色を上書き） ----- */
#body_wrap.fcm-top-page #main_content .wp-block-button.is-style-fcm-accent .wp-block-button__link,
#body_wrap.fcm-top-page #main_content .c-hero__actions .wp-block-button__link {
  color: #fff !important;
  background: var(--fcm-color-primary) !important;
  border: 0 !important;
  border-radius: var(--fcm-radius-sm) !important;
  box-shadow: 0 8px 24px rgba(46, 148, 120, 0.28) !important;
}

#body_wrap.fcm-top-page #main_content .wp-block-button.is-style-fcm-outline .wp-block-button__link {
  background: transparent !important;
  border: 1.5px solid rgba(43, 36, 27, 0.2) !important;
  border-radius: var(--fcm-radius-sm) !important;
  color: var(--fcm-color-text) !important;
  box-shadow: none !important;
}

#body_wrap.fcm-top-page #main_content .c-stickyCta .wp-block-button__link {
  color: #fff !important;
  background: var(--fcm-color-primary) !important;
  border: 0 !important;
  border-radius: var(--fcm-radius-sm) !important;
}
