@charset "utf-8";
/* ============================================================
   CMS補助CSS（配布CSSで未カバーの最小要素のみ）
   テーマ変数を使うので、フレーム切替で自動的に色が変わる。
   ============================================================ */

/* 画像1枚パーツ */
.cms-figure { margin: 0 0 1rem; }
.cms-figure img { display: block; width: 100%; height: auto; }
.cms-figure figcaption {
  margin-top: .5rem; font-size: .85rem;
  color: inherit; opacity: .75; text-align: center; /* セクションの文字色を継承（色背景でも可読） */
}

/* ギャラリー */
.cms-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.cms-gallery figure ,
.cms-gallery .image-parts { margin: 0; }
.cms-gallery img,
.cms-gallery video {
  display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
}
.cms-gallery figcaption {
  margin-top: .4rem; font-size: .82rem;
  color: inherit; opacity: .75; text-align: center; /* セクションの文字色を継承（色背景でも可読） */
}
@media (max-width: 640px) {
  .cms-gallery { grid-template-columns: 1fr 1fr; }
}

/* 白カード系パーツの文字色固定（色背景セクション対策）
   これらはカード背景が白／淡色なのに文字色が未指定で、色背景セクション
   （標準色・メインカラー・アクセント）に置くとセクションの白文字を継承して
   カード内の見出し・本文が見えなくなる。カード自身に濃い文字色を固定して防ぐ。
   ※白カード＝白背景なので、濃い文字はどの背景セクションでも常に正しい。 */
.list-icon1-parts .list-parts,
.list-cource1-parts .list-parts,
.list-voice1-parts .list-parts {
  color: var(--bg-inverse-color);
}

/* 箇条書き（ul / ol）パーツ */
.cms-list { margin: 0 0 1rem; padding-left: 1.5em; }
.cms-list li { margin-bottom: .4em; line-height: 1.7; }
ul.cms-list { list-style: disc; }
ol.cms-list { list-style: decimal; }

/* ボタン単体パーツ */
.cms-btn-wrap { margin: 0 0 1rem; }
.cms-btn-wrap.center { text-align: center; }
.cms-btn-wrap.right  { text-align: right; }
.cms-btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  padding: .7em 2em; border-radius: 4px; line-height: 1.4;
  background: var(--primary-color); color: var(--primary-inverse-color);
  border: 2px solid var(--primary-color); transition: opacity .2s;
}
.cms-btn:hover { opacity: .85; }
.cms-btn.outline { background: transparent; color: var(--primary-color); }
.cms-btn i { margin-right: .4em; }
/* メインカラー背景のセクションでは、ボタン(--primary-color)がセクションと同化するので白系に反転して必ず浮かせる。
   ※アクセント背景は色味が異なるため、ここには含めず別途用意する（primaryと同条件で個別対応）。*/
.bg1-primary-parts .cms-btn {
  background: var(--primary-inverse-color);   /* 白系 */
  color: var(--primary-color);                /* メイン色の文字 */
  border-color: var(--primary-inverse-color);
}
.bg1-primary-parts .cms-btn.outline {
  background: transparent;
  color: var(--primary-inverse-color);        /* 白文字 */
  border-color: var(--primary-inverse-color); /* 白枠 */
}

/* 区切り線パーツ */
.cms-hr { border: 0; border-top: 1px solid var(--bg-border-color, #ddd); margin: 1.5rem 0; }
.cms-hr.dashed { border-top-style: dashed; }
.cms-spacer { height: 2.5rem; }

/* 埋め込み（YouTube・地図・iframe）レスポンシブ枠（16:9） */
.cms-embed {
  position: relative; width: 100%; height: 0;
  padding-bottom: 56.25%; margin: 0 0 1rem; overflow: hidden;
}
.cms-embed iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}
.cms-embed-caption {
  margin: .4rem 0 1rem; font-size: .85rem; color: inherit; opacity: .75; text-align: center;
}

/* メイン画像に動画を使った場合（.slide picture img と同じ収まりに） */
.mainimg .slide video.mv-video {
  display: block; width: 100%; height: 100%; object-fit: cover;
}

/* メニュー：PC/モバイルでの項目表示制御。
   固定pxの@mediaではなく、JSが付ける .small-screen / .large-screen（=メニュー切替幅と同基準）に追従させる。
   これで管理画面でブレイクポイントを変えても、項目の出し分けが一緒に切り替わる。 */
body.large-screen #menubar .hide-pc { display: none !important; }
body.small-screen #menubar .hide-mobile { display: none !important; }
/* メニュー内の見出し（リンクなしラベル） */
#menubar .menu-heading { display: block; font-weight: 700; opacity: .7; padding: .2em 0; }

/* ============================================================
   背景色セクション（.bg-parts）の“端”の隙間調整（全フレーム共通）
   ・bg-parts同士の連続は各フレームの「.bg-parts + .bg-parts」で相殺済み。
   ・ここは「メイン画像の直後」と「フッターの直前」という“端”の隙間を整える。
   ・:has() で条件付きに効かせるので、対象外のページ・白背景セクションには影響しない。
   （隙間の正体＝section{margin: var(--content-space-l) 0} の上下マージン）
   ============================================================ */
/* (A) 最後のブロックが背景色セクション → 下のフッターとの隙間を1pxだけに。
   ※同じ色がフッターと続くと境目が分からなくなるので、敢えて1pxだけ残す（色違いなら1pxはほぼ見えない）。 */
body:has(main > section.bg-parts:last-child) main > section.bg-parts:last-child { margin-bottom: 0 !important; }
body:has(main > section.bg-parts:last-child) footer { margin-top: 1px !important; }

/* (B) ホームで、メイン画像の直下（最初のブロック）が背景色セクション → 完全に密着（隙間ゼロ）。 */
body.home main > section.bg-parts:first-child { margin-top: 0 !important; }
body.home:has(main > section.bg-parts:first-child) .mainimg { margin-bottom: 0 !important; }

/* ============================================================
   フッター（全ページ共通・ベースライン）
   ※ レイアウト選択（プリセット）は次ステップで拡張
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--light-border-color, #ddd);
  padding: 2.6rem var(--content-space-s, 1.5rem);
  margin-top: 3rem;
  color: var(--bg-inverse-color, #555);
}
.footer-inner {
  max-width: 1000px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: .9rem;
  text-align: center;
}
.footer-sns .sns-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap;
}
.footer-sns .sns-list a {
  display: inline-flex; width: 42px; height: 42px;
  align-items: center; justify-content: center; border-radius: 50%;
  font-size: 1.15rem; text-decoration: none;
  color: var(--bg-inverse-color, #555);
  border: 1px solid var(--light-border-color, #ddd);
  transition: background .2s, color .2s, border-color .2s;
}
.footer-sns .sns-list a:hover {
  background: var(--primary-color, #333);
  color: var(--primary-inverse-color, #fff);
  border-color: var(--primary-color, #333);
}
.footer-info { font-size: .85rem; margin: 0; }
.footer-copy { font-size: .8rem; margin: 0; opacity: .85; }

/* 著作クレジット（.pr a）を全フレーム共通で中央寄せに。
   各フレームの style.css は .pr a { text-align:right } だが、この cms-extra.css は
   フレームCSSより後に読み込まれる（layout：style.css → {{{HEAD_CSS}}} の順／同 specificity）ため上書きできる。
   ＝今後フレームを追加しても、ここ1か所で中央寄せが効く（フレーム個別の修正・修正忘れが不要）。 */
.pr a { text-align: center; }

/* フッター：大型（full）レイアウト */
.footer-full .footer-inner { align-items: stretch; text-align: left; }
.footer-cols { display: flex; gap: 2.5rem; justify-content: space-between; flex-wrap: wrap; width: 100%; }
.footer-col { flex: 1; min-width: 220px; }
.footer-col-info .footer-sns .sns-list { justify-content: flex-start; }
.footer-site { font-weight: 700; font-size: 1.05rem; margin: 0 0 .5rem; }
.footer-text { font-size: .85rem; line-height: 1.9; margin: 0 0 .9rem; }
.footer-col-info .footer-info { margin: 0 0 .9rem; }
.footer-nav { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: .55rem; }
.footer-nav a { color: inherit; text-decoration: none; font-size: .9rem; }
.footer-nav a:hover { text-decoration: underline; }
.footer-full .footer-copy {
  width: 100%; text-align: center; margin-top: 1.6rem;
  border-top: 1px solid var(--light-border-color, #ddd); padding-top: 1.1rem;
}
@media (max-width: 640px) {
  .footer-cols { flex-direction: column; gap: 1.5rem; }
}
