/* =====================================================================
   10 Base — 本文（.entry-content）の基本スタイル
   見出し・リスト・表・引用・区切り線、ブロック間の余白の正規化
   ※ 本文の構造から自動で効くルール（:has() 等）が含まれる。README「暗黙ルール」参照
   ===================================================================== */

/* ---- 縦リズム・見出し・本文要素 ---- */
/* 縦リズム */
.entry-content.is-layout-constrained,
.entry-content .is-layout-constrained { --wp--style--block-gap: clamp(2.25rem, 1.8rem + 2vw, 3.5rem); }
.entry-content h3.wp-block-heading { margin-block-start: clamp(2.5rem, 1.8rem + 2.5vw, 4rem); }
.entry-content .wp-block-buttons { margin-block-start: clamp(2.5rem, 1.8rem + 2.5vw, 4rem); }
/* 見出し：ネイビー＋h2に金のアクセントバー */
.entry-content :is(h1,h2,h3).wp-block-heading { color: var(--ef-brand-navy); line-height: 1.4; }
.entry-content h2.wp-block-heading { margin-block-start: clamp(4rem, 2.5rem + 5vw, 7rem); padding-block-start: .7rem; position: relative; }
.entry-content h2.wp-block-heading::before { content: ""; position: absolute; top: 0; left: 0; width: 2.5rem; height: 3px; background: var(--ef-gold); }
/* エイブロー（見出し直前の英字ラベル） */
.entry-content p:has(+ h2.wp-block-heading) { color: var(--ef-gold); font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-block-start: clamp(4rem, 2.5rem + 5vw, 7rem); margin-block-end: 0; }
.entry-content p:has(+ h2.wp-block-heading) + h2.wp-block-heading { margin-block-start: .35rem; }
/* カード（見出しで始まるカラム） */
.entry-content .wp-block-column:has(> :is(h2,h3,h4).wp-block-heading:first-child) { background: #fff; border: 1px solid var(--ef-line-soft); border-radius: 12px; padding: clamp(1.25rem, 1rem + 1vw, 2rem); box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.entry-content .wp-block-column:has(> :is(h2,h3,h4).wp-block-heading:first-child) > :is(h2,h3,h4).wp-block-heading:first-child { margin-block-start: 0; }
/* 区切り線 */
.entry-content .wp-block-separator { margin-block: clamp(4rem, 2.5rem + 5vw, 7rem); border: 0; border-top: 1px solid var(--ef-line-soft); opacity: 1; }
/* 引用（お客様の声） */
.entry-content .wp-block-quote { border-inline-start: 4px solid var(--ef-gold); background: var(--ef-tint-soft); padding: 1.25rem 1.5rem; font-style: normal; }
/* テーブル（会社概要等） */
.entry-content .wp-block-table table { border-collapse: collapse; width: 100%; }
.entry-content .wp-block-table :is(th,td) { border: 1px solid var(--ef-line-soft); padding: .75rem 1rem; vertical-align: top; }
.entry-content .wp-block-table th { background: var(--ef-tint-soft); color: var(--ef-brand-navy); text-align: left; width: 12em; }

/* リストアイコン（本文中の箇条書きにチェックマーク）
/* --------------------------------------------------------------- */
/* カラム内カード等の見出し配下リストは対象外にしないよう、entry-content直下系の素のリストに適用 */
.entry-content ul.wp-block-list:not(.is-style-none) {
	list-style: none;
	margin-left: 0;
	padding-left: 0;
}
.entry-content ul.wp-block-list:not(.is-style-none) > li {
	position: relative;
	padding-left: 2rem;
	margin-block: .6rem;
	line-height: 1.75;
}
.entry-content ul.wp-block-list:not(.is-style-none) > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .35em;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 50%;
	background: var(--ef-brand-navy);
	/* 白いチェックをマスクで描画 */
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 1.25rem 1.25rem;
}
/* ネストした子リストは記号を控えめに（同じチェックだが少し小さく） */
.entry-content ul.wp-block-list:not(.is-style-none) ul > li::before {
	background-color: var(--ef-gold);
}

/* ---- 横スクロール抑制（100vw の全幅帯・マーキーがスクロールバー幅ぶんはみ出す対策） ---- */
html{ overflow-x: clip; }

body{overflow-x:clip}

/* ===== 余白バランス総点検：テーマ旧ルール「h2直前の段落＝アイブロウ」の誤爆を解消 ===== */
/* 1) セクション／カード内の先頭・末尾要素はマージンを持たない（paddingとの二重計上を防ぎ、上下を均等に） */
.entry-content :is(.wp-block-group,.wp-block-column,.wp-block-cover__inner-container,.wp-block-media-text__content) > :first-child{margin-top:0 !important;margin-block-start:0 !important}
.entry-content :is(.wp-block-group,.wp-block-column,.wp-block-cover__inner-container,.wp-block-media-text__content) > :last-child{margin-bottom:0 !important;margin-block-end:0 !important}
/* 2) kicker以外の通常段落はアイブロウ化しない（本文の「見出し直前の段落」が金色の小ラベルになる不具合） */
.entry-content p:not(.is-style-ef-kicker):not(.wp-pattern-page-title):has(+ h2.wp-block-heading){color:inherit;font-weight:inherit;font-size:inherit;letter-spacing:inherit;text-transform:none;margin-block-start:clamp(1.5rem,1.296rem + .87vw,2rem)}
/* 3) 本文の見出し（h2）の区切り余白を統一（直前が段落・リスト・表どれでも同じ） */
.entry-content > h2.wp-block-heading,
.entry-content p:not(.is-style-ef-kicker):not(.wp-pattern-page-title):has(+ h2.wp-block-heading) + h2.wp-block-heading{margin-block-start:clamp(3rem,2.2rem + 2.5vw,4.5rem)}
/* 4) kicker → 見出しは常に密着。kickerがセクション先頭以外にあっても112pxが乗らないように */
.entry-content p.is-style-ef-kicker:has(+ :is(h2,h3,h4).wp-block-heading){margin-block-start:clamp(1.5rem,1.296rem + .87vw,2rem)}
.entry-content .is-style-ef-kicker + :is(h2,h3,h4).wp-block-heading{margin-block-start:.35rem !important}

/* ===== 余白バランス追補：リスト末尾liのマージン突き抜け／ヒーローのキッカー→h1間隔 ===== */
.entry-content :is(ul,ol).wp-block-list > li:first-child{margin-block-start:0 !important}
.entry-content :is(ul,ol).wp-block-list > li:last-child{margin-block-end:0 !important}
.entry-content .is-style-ef-kicker + h1.wp-block-heading{margin-block-start:.5rem !important}

/* ===== 幅374px以下で基準文字サイズが53.3%に縮む旧指定（assets/css/app.css）を打ち消し ===== */
@media only screen and (max-width:374px){:root{font-size:100%}}

/* 見出しの色を統一（2026-10-14）：見出しは ef-brand-navy（#1B2A4A）に一本化。
   既定は theme.json の styles.elements.heading。ここでは旧テーマ CSS や編集画面の色指定で外れていた箇所を揃える。
   紺地などで白にしている見出し（has-white-color ほか）はそのまま。 */
.wp-block-post-title a,.entry-content :is(h1,h2,h3,h4,h5,h6) a:not(.wp-element-button){color:inherit}
body .wp-block-entry-item .wp-block-entry-item__link .wp-block-entry-item__title{color:var(--ef-brand-navy)}
body :is(h1,h2,h3,h4,h5,h6).has-ef-navy-color,body :is(h1,h2,h3,h4,h5,h6).has-default-color{color:var(--ef-brand-navy) !important}
