/* -------------------------
	詳細ページ用レイアウト
   ------------------------- */

.article-header {
	border-bottom: 1px solid var(--border-color);
	padding-bottom: 30px;
	margin-bottom: 40px;
	background: var(--bg-white);
}

.article-meta {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 20px;
}

.article-title {
	font-size: var(--fs-lg);
	font-weight: 700;
	line-height: 1.4;
	color: var(--text-main);
}
@media (max-width: 768px) {
	.article-title {
		font-size: var(--fs-md);
	}
}

.article-thumbnail {
	margin-bottom: 40px;
	text-align: center;
}
.article-thumbnail img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}

/* -------------------------
	記事本文 (post-content) のスタイル
   ------------------------- */
.post-content {
	line-height: 1.8;
	color: var(--text-main);
	margin-bottom: 60px;
}

.post-content h2 {
	font-size: var(--fs-md);
	border-left: 5px solid var(--primary-orange);
	padding-left: 15px;
	margin: 40px 0 20px;
	font-weight: bold;
}

.post-content h3 {
	margin: 30px 0 15px;
	font-weight: bold;
	border-bottom: 2px solid var(--border-light);
	padding-bottom: 10px;
}

.post-content p {
	margin-bottom: 20px;
}
.post-content a {
	color: var(--text-main);
	transition: color 0.3s ease;
}

.post-content a:hover {
	color: var(--primary-orange);
}

/* 1段目（基本） */
.post-content ul.wp-block-list,
.post-content ul {
	list-style: disc !important; /* 強制的に黒丸 */
}

.post-content ol.wp-block-list,
.post-content ol {
	list-style: decimal !important;
}

/* 2段目（入れ子）: 詳細度を上げるために親クラスを重ねる */
.post-content ul.wp-block-list ul,
.post-content ol.wp-block-list ul,
.post-content ul ul,
.post-content ol ul {
	background: none;
	padding: 0 0 0 1.5em;
	margin: 0.5em 0;
	list-style: circle !important;
}

/* 3段目（さらに入れ子） */
.post-content ul.wp-block-list ul ul,
.post-content ul ul ul {
	list-style: square !important;
}

/* 共通：背景ボックスの設定 */
.post-content ul,
.post-content ol {
	margin: 20px 0;
	background: var(--bg-light);
	padding: 20px 15px 20px 2.5em;
	border-radius: 4px;
	box-sizing: border-box;
}

.post-content img {
	max-width: 100%;
	height: auto;
	margin: 20px 0;
}

.post-content blockquote {
	border-left: 4px solid var(--border-light);
	margin: 20px 0;
	padding-left: 20px;
	color: var(--text-gray);
	font-style: italic;
}

.post-content table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	margin: 32px 0;
	display: table;
	white-space: normal;
}

.post-content th {
	width: 30%;
	background: var(--bg-light);
	font-weight: bold;
	color: var(--text-main);
}

.post-content td {
	width: 70%;
}

.post-content th,
.post-content td {
	border: 1px solid var(--border-light);
	padding: 12px 16px;
	text-align: left;
	vertical-align: top;
	word-break: break-all;
}

@media (max-width: 768px) {
	.post-content ul,
	.post-content ol {
		padding: 20px 10px 20px 2.0em;
	}

	.post-content ul ul,
	.post-content ol ol {
		padding-left: 1.2em;
	}

	.post-content .wp-block-table,
	.post-content .table-wrapper {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		margin: 24px 0;
	}

	.post-content table {
		display: block;
		white-space: nowrap;
		table-layout: auto;
		min-width: 500px;
	}

	.post-content th,
	.post-content td {
		width: auto;
		white-space: normal;
	}
}

/* -------------------------
	詳細ページ用ナビゲーション
   ------------------------- */
.nav-links {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-top: 1px solid var(--border-color);
	padding-top: 40px;
	flex-wrap: wrap;
	gap: 20px;
}

.nav-previous, .nav-next {
	width: 30%;
}
.nav-previous a, .nav-next a {
	text-decoration: none;
	color: var(--text-gray);
	font-size: var(--fs-sub);
	transition: color 0.3s;
}
.nav-previous a:hover, .nav-next a:hover {
	color: var(--primary-orange);
}

.nav-next {
	text-align: right;
}

@media (max-width: 768px) {
	.nav-links {
		flex-direction: column;
		gap: 20px;
		text-align: center;
	}
	.nav-previous, .nav-next {
		width: 100%;
		text-align: center;
	}
	.nav-archive {
		order: 3;
	}
}

.btn-back-list {
	display: inline-block;
	background-color: var(--text-main);
	color: var(--text-white);
	padding: 10px 30px;
	text-decoration: none;
	border-radius: 50px;
	font-size: var(--fs-sub);
	transition: background-color 0.3s;
}

.btn-back-list:hover {
	background-color: var(--primary-orange);
}
