/* セクションの構造スタイルのみ（色・フォントなどの装飾は子テーマ / patterns.css 側）。
   各セクションはブロックエディタで背景色・背景画像を設定できるよう全幅（align:full）。
   見出しと本文は yoga-section__inner でコンテンツ幅に戻す。
   子テーマが無い環境でもレイアウトが崩れないための最小限のベース。 */

.yss-section{
  width: 100vw;
  max-width: 100vw;
  /* 左右は全幅化のための負マージン。上下マージンは 0（子テーマ／Cocoon の
     .wp-block-group { margin-bottom: 1.8em } を上書き）。区切りは padding で作る。 */
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 48px;            /* 従来 72px の約 2/3 */
  padding-bottom: 48px;
}
.yoga-home{ margin-bottom: 0 !important; }

.yss-section .yoga-section__inner{
  width: 100%;
  max-width: var(--yoga-content, 840px);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (max-width: 600px){
  .yss-section{ padding-top: 35px; padding-bottom: 35px; }
  .yss-section .yoga-section__inner{ padding-inline: 18px; }
}

/* ホーム以外の固定ページ（法定ページなど・サイドバーなし）は、本文を読みやすい幅に収めて中央寄せ。
   Cocoon の「サイドバーを固定ページで非表示」にすると本文が全幅（約1200px）になるため。
   幅はセクションの内側と同じ --yoga-content（＋Cocoon の左右余白 29px×2）。
   全幅のセクション（.yss-section）を置いた場合も 100vw で画面いっぱいに広がる。 */
body.page.no-sidebar:not(.home) .main{
  max-width: calc(var(--yoga-content, 840px) + 58px);
  /* 子テーマ base.css の .main { margin-left/right: 0 !important }（ホーム用）を上書き */
  margin-left: auto !important;
  margin-right: auto !important;
}
/* ページのタイトル（h1）を表示する。子テーマ base.css はホームに合わせて .article-header を
   全ページで隠しているため、ホーム以外の固定ページでは表示に戻す。 */
body.page:not(.home) .article-header{ display: block !important; }
/* 固定ページ（法定ページ等）には投稿日・更新日は不要なので出さない（投稿の日付はそのまま） */
body.page:not(.home) .article-header .date-tags{ display: none !important; }
body.page:not(.home) .entry-title{
  margin: 8px 0 28px;
  font-size: 26px;
  line-height: 1.5;
  color: var(--yoga-text, #5B4B45);
}
/* 本文の見出し（h2）の下線は、左寄せの見出しに合わせて左に（セクション見出しは中央のまま） */
body.page:not(.home) .entry-content h2:not(.yoga-section__title)::after{
  margin-left: 0;
  margin-right: auto;
}
@media (max-width: 600px){
  body.page:not(.home) .entry-title{ font-size: 22px; margin-bottom: 20px; }
}
