/**
 * FCM トップページテンプレート — フル幅レイアウト / SWELL 上書き
 */

#body_wrap.fcm-top-page {
  --wp--style--global--content-size: 1120px;
  --wp--style--global--wide-size: 1120px;
  font-family: var(--fcm-font);
}

/* ----- SWELL レイアウト幅・余白の上書き ----- */
#body_wrap.fcm-top-page .l-article {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

#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 {
  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 .fcm-topPage__content,
#body_wrap.fcm-top-page .post_content.fcm-topPage__content,
#body_wrap.fcm-top-page .post_content {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

/* ページタイトル・パンくず非表示 */
#body_wrap.fcm-top-page .p-pageHead,
#body_wrap.fcm-top-page .c-pageTitle,
#body_wrap.fcm-top-page .p-breadcrumb,
#body_wrap.fcm-top-page .c-pageTitleWrap {
  display: none !important;
}

/* WordPress is-layout-constrained の 800px 制限を解除 */
#body_wrap.fcm-top-page .fcm-topPage__content .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#body_wrap.fcm-top-page .fcm-topPage__content .wp-block-group.is-layout-constrained,
#body_wrap.fcm-top-page .fcm-topPage__content .wp-block-group.c-section,
#body_wrap.fcm-top-page .fcm-topPage__content .wp-block-group.c-heroArea {
  max-width: none !important;
}

/* ----- SWELL H2/H3 擬似要素（上下線・点線）を無効化 ----- */
#body_wrap.fcm-top-page .post_content h2:where(:not([class^="swell-block-"]):not(.faq_q):not(.p-postList__title))::before,
#body_wrap.fcm-top-page .post_content h2:where(:not([class^="swell-block-"]):not(.faq_q):not(.p-postList__title))::after,
#body_wrap.fcm-top-page .fcm-topPage__content h2::before,
#body_wrap.fcm-top-page .fcm-topPage__content h2::after {
  display: none !important;
  content: none !important;
  position: static !important;
  width: 0 !important;
  height: 0 !important;
  border: none !important;
  background: none !important;
}

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

/* ----- SWELL 見出し・段落の既定スタイルを無効化 ----- */
#body_wrap.fcm-top-page .post_content h1,
#body_wrap.fcm-top-page .post_content h2,
#body_wrap.fcm-top-page .post_content h3,
#body_wrap.fcm-top-page .post_content h4,
#body_wrap.fcm-top-page .fcm-topPage__content h1,
#body_wrap.fcm-top-page .fcm-topPage__content h2,
#body_wrap.fcm-top-page .fcm-topPage__content h3,
#body_wrap.fcm-top-page .fcm-topPage__content h4 {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  text-align: inherit !important;
  position: static !important;
}

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

#body_wrap.fcm-top-page .fcm-topPage__content p {
  margin-top: 0;
  text-align: inherit;
}

#body_wrap.fcm-top-page .fcm-topPage__content .wp-block-group {
  margin-top: 0;
  margin-bottom: 0;
}

/* セクション内コンテナ（デザインの l-container 相当） */
#body_wrap.fcm-top-page .c-section__inner {
  max-width: var(--fcm-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

/* About セクション — ブロック余白のリセット */
#body_wrap.fcm-top-page .c-section.-alt .c-section__inner > .wp-block-group,
#body_wrap.fcm-top-page .c-section.-alt .c-section__inner > .wp-block-columns {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

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

#body_wrap.fcm-top-page .c-section.-alt .c-aboutDiagram .wp-block-group {
  margin: 0 !important;
  padding: 0 !important;
}

#body_wrap.fcm-top-page .c-hero__container {
  max-width: var(--fcm-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 781px) {
  #body_wrap.fcm-top-page .c-hero__container {
    padding-left: 0;
    padding-right: 0;
  }
}

/* イベントスライダー — SP はセクション幅いっぱいの3列グリッド */
@media (max-width: 781px) {
  #body_wrap.fcm-top-page .c-section__inner:has(.c-eventSlider) {
    padding-left: 0;
    padding-right: 0;
  }

  #body_wrap.fcm-top-page .c-section__inner:has(.c-eventSlider) .c-sectionFoot {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}
