/* =====================================================================
   20 Layout — サイト共通の枠組み
   ヘッダー／ナビ／パンくず／フッター／ページ上余白／ヒーロー（FV）／セクション余白
   ===================================================================== */

/* ブランディング
/* --------------------------------------------------------------- */

@media print, only screen and ( min-width: 782px ) {
	.is-layout-constrained .wp-pattern-site-branding .wp-pattern-site-branding__logo img,
	.is-root-container.block-editor-block-list__layout .wp-pattern-site-branding .wp-pattern-site-branding__logo img {
		width: calc(clamp(0.875rem, 0.25rem + 0.93vw, 1rem) * 10.5);
		height: auto;
	}
}

/* ヘッダーのキャッチ（「デジタルフォレンジック／カンパニー」）：折り返さず2行で表示。
   ナビとボタンが入りきる幅（1580px以上）でだけ出す。それ未満はロゴのみ（狭い幅で1文字ずつ折れるのを防ぐ） */
.wp-pattern-header .wp-pattern-site-branding__title{white-space:nowrap;font-size:12px !important;line-height:1.45 !important}
@media (max-width:1579px){ .wp-pattern-header .wp-pattern-site-branding__title{display:none !important} }
@media (min-width:1580px){ .wp-pattern-header .wp-pattern-site-branding{flex-shrink:0} }

/* ナビゲーション
/* --------------------------------------------------------------- */

@media print, only screen and ( min-width: 782px ) {
	.is-layout-constrained .wp-pattern-navigation .wp-block-navigation-item__content:hover,
	.is-root-container.block-editor-block-list__layout .wp-pattern-navigation .wp-block-navigation-item__content:hover {
		color: var(--wp--preset--color--primary);
		opacity: 1 !important;
	}
}

/* フッターインフォメーション
/* --------------------------------------------------------------- */

.is-layout-constrained .wp-pattern-footer-information .wp-pattern-footer-information__logo img,
.is-root-container.block-editor-block-list__layout .wp-pattern-footer-information .wp-pattern-footer-information__logo img {
	width: 10.5rem;
	height: auto;
}
@media print, only screen and ( min-width: 782px ) {
	.is-layout-constrained .wp-pattern-footer-information .wp-pattern-footer-information__logo img,
	.is-root-container.block-editor-block-list__layout .wp-pattern-footer-information .wp-pattern-footer-information__logo img {
		width: calc(clamp(0.875rem, 0.25rem + 0.93vw, 1rem) * 11.5);
		height: auto;
	}
}
.kl-breadcrumb-bar .breadcrumb { width: 100%; }
.kl-breadcrumb-bar .breadcrumb-lists {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	font-size: .82rem;
	line-height: 1.6;
	color: var(--ef-muted);
}
.kl-breadcrumb-bar .breadcrumb-lists li { display: inline-flex; align-items: center; }
.kl-breadcrumb-bar .breadcrumb-lists li + li::before {
	content: "\203A"; /* › */
	margin: 0 .5rem;
}
.kl-breadcrumb-bar .breadcrumb-lists a { text-decoration: none; }
.kl-breadcrumb-bar .breadcrumb-lists a:hover { text-decoration: underline; }
.kl-breadcrumb-bar .breadcrumb-lists li:last-child a,
.kl-breadcrumb-bar .breadcrumb-lists .current-crumb a {
	pointer-events: none;
	text-decoration: none;
	cursor: default;
}
.kl-breadcrumb-bar .breadcrumb-lists strong { font-weight: 600; }

/* ページ上余白の統一（front-page = body.home は除外） */
body:not(.home) .wp-site-blocks > main.wp-block-group {
	padding-top: clamp(2rem, 1.4rem + 1.8vw, 3rem);
}
body:not(.home) .wp-site-blocks > main.wp-block-group > :first-child { margin-top: 0; }
body:not(.home) .wp-site-blocks > main.wp-block-group > .entry-content > :first-child { margin-top: 0; }

/* ヘッダー：EASY Forensics ドロップダウンのモダン化 */
.wp-block-navigation .wp-block-navigation__submenu-container {
	min-width: 210px;
	padding: .4rem;
	background: #fff;
	border: 1px solid rgba(27,42,74,.08);
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(27,42,74,.16);
	margin-top: .5rem;
}
.wp-block-navigation .wp-block-navigation__submenu-container li { margin: 0; }
.wp-block-navigation .wp-block-navigation__submenu-container a,
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	border-radius: 8px;
	padding: .55rem .8rem;
	transition: background .18s ease, color .18s ease;
}
.wp-block-navigation .wp-block-navigation__submenu-container a:hover,
.wp-block-navigation .wp-block-navigation__submenu-container a:focus {
	background: rgba(27,42,74,.07);
	color: var(--ef-brand-navy);
}

/* ヘッダー：縦の余白を詰める（96px→74px相当） */
header.wp-block-template-part .wp-pattern-header .wp-pattern-header__container { height: 74px !important; }

/* フッター可読性（暗背景×低コントラスト文字の改善、スマホは文字を大きく） */
footer.wp-block-template-part :is(p,li,span,strong,time){ color:#c5cdda; }
footer.wp-block-template-part a{ color:#eef2f8; }
footer.wp-block-template-part a:hover{ color:#d9bd6b; }
@media (max-width:781px){
	footer.wp-block-template-part :is(p,li,a,span){ font-size:15px; line-height:1.9; }
}

/* パンくず：紺帯（ヒーローと一体化） */
.kl-breadcrumb-bar{border-bottom:0}
.kl-breadcrumb-bar .breadcrumb-lists a{color:var(--ef-slate-300)}
.kl-breadcrumb-bar .breadcrumb-lists a:hover{color:#fff}
.kl-breadcrumb-bar .breadcrumb-lists li:last-child a,.kl-breadcrumb-bar .breadcrumb-lists .current-crumb a{color:var(--ef-cyan-light)}
.kl-breadcrumb-bar .breadcrumb-lists li + li::before{color:var(--ef-slate-500)}
.kl-breadcrumb-bar .breadcrumb-lists strong{color:var(--ef-line)}
main.wp-block-group.is-layout-flow:has(.wp-block-post-content > .alignfull:first-child){padding-top:0}

main.wp-block-group:has(> .alignfull.ef-section:first-child){padding-top:0}

/* ヒーロー（cover）：内容を上揃え（ef-section のヒーローと揃える） */
body:not(.home) .wp-block-post-content > .wp-block-cover:first-child{justify-content:flex-start}

/* ===== hero heading line-height unify (archive h1 was inheriting factor 2.0 -> misaligned glyph) ===== */
.ef-section.is-dark h1.wp-block-heading,
.ef-section.is-dark h1.wp-block-post-title,
.ef-section.has-ef-navy-background-color h1.wp-block-heading,
.ef-section.has-ef-navy-background-color h1.wp-block-post-title,
.wp-block-cover.alignfull.is-dark h1.wp-block-heading,
.wp-block-cover.alignfull.is-dark h1.wp-block-post-title{line-height:1.35}

/* ===== EF cover hero h1: match 48px pages' absolute line-height so first-line vertical center aligns; font-size stays fluid/44 (48 would wrap to 3 lines). !important overrides inline line-height:1.35. home excluded (video hero). ===== */
/* スマホでは文字が26px前後まで小さくなるのに行間64.8pxのままで間延びしていたため、PC幅だけに限定（2026-10-18）。スマホは上の1.35 */
@media(min-width:782px){
body:not(.home) .wp-block-cover.alignfull.is-dark h1.wp-block-heading,
body:not(.home) .wp-block-cover.alignfull.is-dark h1.wp-block-post-title{line-height:64.8px !important}
}

/* ===== 全幅帯で終わるページ：main下パディングを消してフッターと密着（白帯の解消） ===== */
.wp-site-blocks main.wp-block-group:has(> .wp-block-post-content > .alignfull:last-child){padding-bottom:0 !important}
.wp-site-blocks:has(> main > .wp-block-post-content > .alignfull:last-child) > footer .wp-pattern-footer{margin-top:0 !important}

/* ===== フッター上の二重余白を解消（main下128px＋footer上80px→mainの128pxに一本化） ===== */
.wp-site-blocks > footer .wp-pattern-footer{margin-top:0 !important}

/* ===== セクション余白を一段拡大（PC：72→96 / 56→75 / 64→85、スマホ375pxは現状維持で可変） ===== */
.entry-content > .wp-block-group.alignfull[style*="padding-top:72px"]{padding-top:clamp(72px,calc(62px + 2.652vw),96px) !important;padding-bottom:clamp(72px,calc(62px + 2.652vw),96px) !important}
.entry-content > .wp-block-group.alignfull[style*="padding-top:56px"]{padding-top:clamp(56px,calc(48px + 2.1vw),75px) !important;padding-bottom:clamp(56px,calc(48px + 2.1vw),75px) !important}
.entry-content > .wp-block-group.alignfull[style*="padding-top:64px"]{padding-top:clamp(64px,calc(55px + 2.32vw),85px) !important;padding-bottom:clamp(64px,calc(55px + 2.32vw),85px) !important}

/* ===== 下層ページFV（紺帯ヒーロー）の高さを統一：ボタンの有無で高さがブレないよう最小高＋上下中央 ===== */
@media(min-width:782px){
 .entry-content > .ef-section.has-ef-navy-background-color:first-child{min-height:520px;display:flex;flex-direction:column;justify-content:center}
}
/* 規約・個人情報など、見出しだけの紺帯（ef-hero--compact）：最小高を外し、セミナー・お知らせ一覧と同じ上下72px */
.entry-content > .ef-section.ef-hero--compact:first-child{min-height:0}
.entry-content > .wp-block-group.alignfull.ef-hero--compact[style*="padding-top:72px"]{padding-top:72px !important;padding-bottom:72px !important}
/* ===== 下層ページFVの上端をそろえる（2026-10-18）=====
   パンくず直下〜キッカーの距離を全ページ72pxに固定する。
   原因：①上の「セクション余白72→96」がFVにも効いていた（cover・セミナー一覧・compactは72のまま）
         ②最小高520px＋上下中央のため、中身が短いページ（会社概要など）は文字が下がる
   対策：FVは上揃え＋上下72px固定。最小高520pxは外し、高さは中身で決める
         （最小高を残すと、中身の短いページ＝会社概要などで下だけ間延びするため。お知らせ・セミナー一覧・compactの帯と同じ上下72px）。 */
body:not(.home) .entry-content > .wp-block-group.alignfull.ef-section:first-child[style*="padding-top:72px"]{padding-top:72px !important;padding-bottom:72px !important}
@media(min-width:782px){
 body:not(.home) .entry-content > .ef-section.has-ef-navy-background-color:first-child{justify-content:flex-start;min-height:0}
 /* flex 内はマージンが重ならず キッカー下12px＋h1上8px＝20px になるため、h1 側を0にしてほかのページと同じ12pxに */
 body:not(.home) .entry-content > .ef-section.has-ef-navy-background-color:first-child > .is-style-ef-kicker + h1.wp-block-heading{margin-block-start:0 !important}
}
/* 一覧テンプレート（セミナー等）は .entry-content の外なので、キッカー直後の h1 の間隔をページと同じ .5rem に */
body:not(.home) main .ef-section .is-style-ef-kicker + h1.wp-block-heading{margin-block-start:.5rem !important}
/* 記事ページ・白地の一覧の h1：本文の行間（2.0）を継承して1行96pxになっていたので、本文の見出しと同じ1.4に（2026-10-18） */
body:not(.home) main h1:is(.wp-block-post-title,.wp-block-heading,.wp-block-query-title){line-height:1.4}
/* ヘッダーのボタン：文言で幅を決め、折り返さない（資料ダウンロード／お問い合わせの2つに分割したため） */
header .wp-block-buttons .wp-block-button{width:auto !important;flex:0 0 auto !important}
header .wp-block-buttons .wp-block-button__link{white-space:nowrap;padding-left:16px !important;padding-right:16px !important}
