/* =========================================================
   post-detail.css — お知らせ詳細 442:1392 / ブログ詳細 3158:19421
   header 80 → breadcrumb(+33) → meta(+47) → title(+22) → image 674x506(+45)
   → body 833(+103, 段落間 33) → more(+98) → CTA(+169)
   ========================================================= */
.p-post-detail { padding: 33px 0 169px; }
.p-post-detail > .l-container { padding-left: calc(var(--gutter) + 1px); }
.p-post-detail__head { margin-top: 47px; }
.p-post-detail__meta { display: flex; align-items: center; gap: 30px; }
.p-post-detail__date { color: #8a98a6; font-size: 13px; line-height: 1.5; }
.p-post-detail__cats { display: flex; flex-wrap: wrap; gap: 8px; } /* カテゴリーが複数のとき横に並べる */
.p-post-detail__cat { transition: opacity .2s; }
.p-post-detail__cat:hover { opacity: .75; }
.p-post-detail__title {
	margin-top: 22px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.65;
	color: var(--c-text);
}
.p-post-detail__thumb {
	max-width: 674px;
	margin: 45px auto 0;
	aspect-ratio: 674 / 506;
	background: var(--c-blue-pale);
	overflow: hidden;
}
.p-post-detail__thumb img { width: 100%; height: 100%; object-fit: cover; }
.p-post-detail__body { max-width: 833px; margin: 103px auto 0; }
.p-post-detail__head + .p-post-detail__body { margin-top: 64px; } /* アイキャッチなし */
.p-post-detail__body--raw { max-width: 860px; font-feature-settings: normal; } /* 旧サイト移行記事（.ts-wrap 内の独自CSSに任せる） */
.p-post-detail__pages { max-width: 833px; margin: 40px auto 0; display: flex; gap: 8px; }
.p-post-detail__foot { margin-top: 98px; display: flex; justify-content: center; }

/* ---------- 本文（エディタ出力） ---------- */
.c-entry { font-size: 16px; line-height: 1.85; color: var(--c-text); word-break: break-word; }
.c-entry > * + * { margin-top: 33px; }
.c-entry > :first-child { margin-top: 0; }
.c-entry h2 {
	margin-top: 64px;
	padding: 0 0 12px;
	border-bottom: 2px solid var(--c-blue-pale);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.65;
	position: relative;
}
.c-entry h2::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 80px;
	height: 2px;
	background: var(--c-blue);
}
.c-entry h3 {
	margin-top: 48px;
	padding-left: 14px;
	border-left: 4px solid var(--c-blue);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.6;
}
.c-entry h4 { margin-top: 40px; font-size: 17px; font-weight: 700; line-height: 1.6; color: var(--c-blue); }
.c-entry h2 + *, .c-entry h3 + *, .c-entry h4 + * { margin-top: 20px; }
.c-entry a { color: var(--c-blue); text-decoration: underline; text-underline-offset: 3px; }
.c-entry a:hover { text-decoration: none; }
.c-entry strong, .c-entry b { font-weight: 700; }
.c-entry ul, .c-entry ol { padding-left: 1.5em; }
.c-entry ul { list-style: disc; }
.c-entry ol { list-style: decimal; }
.c-entry li + li { margin-top: 6px; }
.c-entry li::marker { color: var(--c-blue); }
.c-entry img { height: auto; }
.c-entry figure { margin-inline: 0; }
.c-entry figcaption, .c-entry .wp-element-caption { margin-top: 8px; font-size: 13px; color: var(--c-text-sub); text-align: center; }
.c-entry .aligncenter { margin-inline: auto; }
.c-entry .alignleft { float: left; margin: 0 24px 16px 0; }
.c-entry .alignright { float: right; margin: 0 0 16px 24px; }
.c-entry::after { content: ""; display: block; clear: both; }
.c-entry blockquote {
	padding: 20px 24px;
	border-left: 4px solid var(--c-blue);
	background: var(--c-bg-gray);
	color: var(--c-text-sub);
}
.c-entry blockquote cite { display: block; margin-top: 8px; font-size: 13px; font-style: normal; }
.c-entry table { width: 100%; font-size: 15px; }
.c-entry th, .c-entry td { padding: 12px 16px; border: 1px solid var(--c-border); text-align: left; vertical-align: top; }
.c-entry th { background: var(--c-bg-gray); font-weight: 700; }
.c-entry .wp-block-table { overflow-x: auto; }
.c-entry hr { border: 0; border-top: 1px solid var(--c-border); }
.c-entry code { padding: 2px 6px; background: var(--c-bg-gray); border-radius: 3px; font-size: .9em; }
.c-entry pre { padding: 16px 20px; background: var(--c-bg-gray); overflow-x: auto; font-size: 14px; line-height: 1.6; }
.c-entry .wp-block-button__link { display: inline-block; padding: 12px 22px; border-radius: 4px; background: var(--c-blue); color: var(--c-white); font-weight: 700; text-decoration: none; }
.c-entry iframe, .c-entry video { max-width: 100%; }

@media (max-width: 1024px) {
	.p-post-detail { padding-bottom: 120px; }
	.p-post-detail__body { margin-top: 64px; }
	.p-post-detail__foot { margin-top: 64px; }
}
/* SP お知らせ詳細_SP 3443:32305 / ブログ詳細_SP 3443:33396
   header 65 → breadcrumb(+12) → date(+30) → cat(+9) → title 16px(+9) → image 333x250(+11)
   → body 14px/1.85 x=26 段落間36(+36) → more_sp(+54) → CTA(+71) */
@media (max-width: 767px) {
	.p-post-detail { padding: 12px 0 71px; }
	.p-post-detail__head { margin-top: 30px; }
	.p-post-detail__meta { flex-direction: column; align-items: flex-start; gap: 9px; }
	.p-post-detail__date { color: var(--c-text-sub); font-size: 10px; line-height: 1.5; }
	.p-post-detail__cat { font-size: 11px; line-height: 1.5; padding: 4px 10px; }
	.p-post-detail__title { margin-top: 9px; font-size: 16px; line-height: 1.65; }
	.p-post-detail__thumb { max-width: none; margin-top: 11px; aspect-ratio: 333 / 250; }
	.p-post-detail__body,
	.p-post-detail__head + .p-post-detail__body { margin-top: 36px; padding-left: 5px; }
	.p-post-detail__pages { margin-top: 32px; padding-left: 5px; }
	.p-post-detail__foot { margin-top: 54px; }

	/* 本文 SP タイポ */
	.c-entry { font-size: 14px; line-height: 1.85; }
	.c-entry > * + * { margin-top: 36px; }
	.c-entry h2 { margin-top: 48px; padding-bottom: 10px; font-size: 18px; line-height: 1.6; }
	.c-entry h2::after { width: 60px; }
	.c-entry h3 { margin-top: 40px; padding-left: 12px; border-left-width: 3px; font-size: 16px; line-height: 1.6; }
	.c-entry h4 { margin-top: 32px; font-size: 15px; }
	.c-entry h2 + *, .c-entry h3 + *, .c-entry h4 + * { margin-top: 16px; }
	.c-entry li + li { margin-top: 4px; }
	.c-entry .alignleft, .c-entry .alignright { float: none; margin: 0 auto; }
	.c-entry figcaption, .c-entry .wp-element-caption { font-size: 12px; }
	.c-entry blockquote { padding: 16px 18px; border-left-width: 3px; }
	.c-entry table { font-size: 13px; }
	.c-entry th, .c-entry td { padding: 10px 12px; }
	.c-entry pre { padding: 14px 16px; font-size: 12px; }
	.c-entry .wp-block-button__link { padding: 10px 20px; font-size: 13px; }
}

/* =========================================================
   ブログ詳細 2カラム + サイドバー（Figma sidebar 5146:14293）
   本文カラム x=151 w=780 / サイドバー x=989 w=300（gap 58）/ サイドバー上端 = 日付行
   SP: サイドバーは記事の一番下へ
   ========================================================= */
.p-post-detail__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 0 58px;
	align-items: start;
	margin-top: 47px;
}
.p-post-detail__layout .p-post-detail__head { margin-top: 0; }
.p-post-detail__layout .p-post-detail__thumb { margin-left: 0; margin-right: 0; }
.p-post-detail__layout .p-post-detail__body,
.p-post-detail__layout .p-post-detail__pages { max-width: none; }
.c-entry h2[id] { scroll-margin-top: calc(var(--header-h) + 20px); }
/* 目次の追従（post-detail.js がサイドバー末尾に目次の複製 .p-blog-toc--sticky を置く）
   サイドバーは本文と同じ高さまで伸ばし、その末尾で複製を sticky にする。元の目次が画面内にある間は隠す。SP は追従しない */
.p-blog-toc--sticky { display: none; }
@media (min-width: 768px) {
	.p-post-detail__side { align-self: stretch; }
	.p-blog-toc--sticky {
		display: block;
		position: sticky;
		top: 24px;
		visibility: hidden;
		opacity: 0;
		transition: opacity .3s var(--ease), visibility 0s .3s;
	}
	.p-blog-toc--sticky.is-shown { visibility: visible; opacity: 1; transition: opacity .3s var(--ease); }
	.p-blog-toc--sticky .p-blog-toc__body { max-height: calc(100vh - 48px - 48px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; } /* 目次が長い記事だけ目次内でスクロール */
}

.p-blog-side { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.p-blog-side__box {
	border: 1px solid #dce3ea;
	border-radius: 4px;
	overflow: hidden;
	background: var(--c-white);
}
.p-blog-side__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: var(--c-blue-dark);
}
.p-blog-side__title { font-size: 15px; font-weight: 700; line-height: 1.5; color: var(--c-white); }

/* 目次 */
.p-blog-toc__head { cursor: pointer; user-select: none; -webkit-user-select: none; } /* 帯のどこを押しても開閉（post-detail.js） */
.p-blog-toc__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}
.p-blog-toc__toggle img { transition: transform .3s var(--ease); }
.p-blog-toc__toggle[aria-expanded="false"] img { transform: rotate(180deg); }
.p-blog-toc__body { padding: 8px 0; list-style: none; counter-reset: none; }
.p-blog-toc__body[hidden] { display: none; }
.p-blog-toc__item + .p-blog-toc__item { border-top: 1px solid #dce3ea; }
.p-blog-toc__link {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 8px 16px;
	color: var(--c-blue);
	transition: opacity .2s;
}
.p-blog-toc__link:hover { opacity: .7; }
.p-blog-toc__num {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 2px;
	background: var(--c-blue-dark);
	color: var(--c-white);
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}
.p-blog-toc__text { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; line-height: 1.65; }
/* 人気記事 */
.p-blog-popular__item + .p-blog-popular__item { border-top: 1px solid #dce3ea; }
.p-blog-popular__link { display: flex; align-items: flex-start; gap: 12px; padding: 12px; color: var(--c-text); transition: opacity .2s; }
.p-blog-popular__link:hover { opacity: .7; }
.p-blog-popular__thumb {
	flex-shrink: 0;
	width: 80px;
	height: 60px;
	border-radius: 4px;
	background: #e5e7eb;
	overflow: hidden;
}
.p-blog-popular__thumb img { width: 100%; height: 100%; object-fit: cover; }
.p-blog-popular__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; line-height: 1.5; }
.p-blog-popular__title { font-size: 13px; font-weight: 700; }
.p-blog-popular__date { font-size: 12px; }

/* カテゴリー */
.p-blog-cats__item + .p-blog-cats__item { border-top: 1px solid #dce3ea; }
.p-blog-cats__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px;
	color: var(--c-text);
	line-height: 1.5;
	transition: opacity .2s;
}
.p-blog-cats__link:hover { opacity: .7; }
.p-blog-cats__name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.p-blog-cats__name img { flex-shrink: 0; }
.p-blog-cats__label { font-size: 13px; font-weight: 500; opacity: .55; }
.p-blog-cats__count { flex-shrink: 0; font-size: 12px; }

@media (max-width: 1024px) {
	.p-post-detail__layout { grid-template-columns: minmax(0, 1fr) 260px; column-gap: 32px; }
}
@media (max-width: 767px) {
	.p-post-detail__layout { display: block; margin-top: 30px; }
	.p-post-detail__side { margin-top: 54px; }
}
