/*
 * Noside Base Theme - content.css
 * 記事 / 固定ページ / 一覧の本文スタイル。.site-main / .entry-content にスコープし、
 * LP白紙テンプレートには読み込ませない(干渉防止)。
 *
 * 方針(嶋崎指示): 無駄な余白を作らない。タイポ階層と最小限の余白だけで構造を示す。
 * 装飾アンチパターン(見出し左の縦線・装飾擬似要素・見出し下線・丸角バッジの多用)は使わない。
 */

/* ============ コンテナ ============ */
.site-main {
	/* セクション上下余白は狭め(SP約20 -> PC約40) */
	padding-block: clamp(20px, 3.5vw, 40px);
}

.site-main__inner {
	max-width: 720px; /* 本文幅。アイキャッチ・ヘッダー幅と統一する */
	margin-inline: auto;
	padding-inline: 20px;
}

.site-main__inner--wide {
	max-width: 1100px; /* 一覧(カードグリッド)用 */
}

/* ============ パンくず(現在ページのタイトルは出さない) ============ */
.breadcrumb {
	margin-bottom: 1.2rem;
	font-size: 0.8rem;
	color: var(--wp--preset--color--sub);
}

.breadcrumb__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.2em 0.45em;
}

.breadcrumb__item {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
}

.breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.breadcrumb a:hover {
	text-decoration: underline;
}

.breadcrumb__sep {
	color: var(--wp--preset--color--line);
}

/* ============ 記事 / ページ ヘッダ ============ */
.entry-header {
	margin-bottom: 1.5rem;
}

.entry-title {
	font-size: clamp(24px, 3vw, 36px);
	font-weight: 800;
	line-height: 1.4;
	letter-spacing: -0.01em;
}

.page-title {
	font-size: clamp(22px, 2.6vw, 32px);
	font-weight: 800;
	line-height: 1.4;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em 1em;
	margin-top: 0.6rem;
	font-size: 0.875rem;
	color: var(--wp--preset--color--sub);
}

.entry-meta a {
	color: inherit;
}

/* ============ アイキャッチ(本文幅に統一) ============ */
.entry-thumbnail {
	margin-bottom: 1.5rem;
}

.entry-thumbnail img {
	width: 100%;
	height: auto;
}

/* ============ 本文 prose ============ */
.entry-content {
	line-height: 1.85;
	letter-spacing: 0.01em;
}

/* ブロック間リズム(無駄に空けない) */
.entry-content > * {
	margin-top: 1.4em;
	margin-bottom: 0;
}

.entry-content > :first-child {
	margin-top: 0;
}

.entry-content h2 {
	margin-top: 1.9em;
	font-size: clamp(22px, 2.4vw, 30px);
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: -0.005em;
}

.entry-content h3 {
	margin-top: 1.6em;
	font-size: clamp(19px, 1.8vw, 23px);
	font-weight: 700;
	line-height: 1.55;
}

.entry-content h4 {
	margin-top: 1.4em;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.6;
}

/* 見出し直後は詰める(冗長な余白を出さない) */
.entry-content :is(h2, h3, h4) + * {
	margin-top: 0.6em;
}

.entry-content a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* 記事本文のリストは marker を復活させる(reset の ul[class] 無効化を上書き) */
.entry-content ul {
	padding-left: 1.4em;
	list-style: disc;
}

.entry-content ol {
	padding-left: 1.4em;
	list-style: decimal;
}

.entry-content :is(ul, ol) :is(ul, ol) {
	margin-top: 0.4em;
}

.entry-content li + li {
	margin-top: 0.4em;
}

.entry-content img {
	height: auto;
}

.entry-content figcaption {
	margin-top: 0.5em;
	font-size: 0.85rem;
	color: var(--wp--preset--color--sub);
	text-align: center;
}

/* 引用(左縦棒は使わない。淡背景+余白で示す) */
.entry-content blockquote {
	margin-inline: 0;
	padding: 0.9em 1.2em;
	background: var(--wp--preset--color--muted);
	color: var(--wp--preset--color--sub);
}

.entry-content blockquote > * {
	margin-top: 0.6em;
}

.entry-content blockquote > :first-child {
	margin-top: 0;
}

/* 区切り線(意味的境界の hairline のみ) */
.entry-content hr {
	margin-block: 2em;
	border: 0;
	border-top: 1px solid var(--wp--preset--color--line);
}

/* テーブル */
.entry-content table {
	width: 100%;
	font-size: 0.95rem;
}

.entry-content :is(th, td) {
	padding: 0.6em 0.8em;
	border: 1px solid var(--wp--preset--color--line);
	text-align: left;
	vertical-align: top;
}

.entry-content th {
	background: var(--wp--preset--color--muted);
	font-weight: 700;
}

/* コード */
.entry-content :is(code, kbd) {
	padding: 0.1em 0.35em;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
	background: var(--wp--preset--color--muted);
}

.entry-content pre {
	overflow: auto;
	padding: 1em 1.2em;
	background: var(--wp--preset--color--ink);
	color: #f5f3ef;
	font-size: 0.9rem;
	line-height: 1.7;
}

.entry-content pre code {
	padding: 0;
	background: none;
	color: inherit;
}

/* ============ 記事下ナビ ============ */
.post-nav {
	display: grid;
	gap: 0.6em;
	margin-top: 2.5em;
	font-size: 0.95rem;
}

.post-nav .nav-label {
	display: block;
	font-size: 0.8rem;
	color: var(--wp--preset--color--sub);
}

.post-nav a {
	color: inherit;
	text-decoration: none;
}

.post-nav a:hover {
	text-decoration: underline;
}

/* ============ アーカイブ ヘッダ ============ */
.archive-header {
	margin-bottom: 1.6rem;
}

.archive-description {
	margin-top: 0.6rem;
	color: var(--wp--preset--color--sub);
}

/* ============ 記事カード一覧(3列 -> 2列。角丸なし) ============ */
.post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}

.post-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.post-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.post-card__thumb {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--wp--preset--color--muted);
}

.post-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.post-card__link:hover .post-card__thumb img {
	transform: scale(1.04);
}

.post-card__title {
	margin-top: 0.7em;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.5;
}

.post-card__excerpt {
	margin-top: 0.4em;
	font-size: 0.9rem;
	line-height: 1.7;
	color: var(--wp--preset--color--sub);
}

@media (max-width: 768px) {
	.post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}
}

/* ============ ページネーション(直線矩形・角丸なし) ============ */
.pagination {
	margin-top: 2.5em;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border: 1px solid var(--wp--preset--color--line);
	color: inherit;
	text-decoration: none;
	font-size: 0.95rem;
}

.pagination .page-numbers.current {
	background: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--base);
}

.pagination a.page-numbers:hover {
	background: var(--wp--preset--color--muted);
}

@media (max-width: 768px) {
	.pagination .page-numbers {
		min-width: 36px;
		height: 36px;
	}
}
