/*
 * Article Page Style
 * ------------------------------------------------- */

/* 記事コンテンツを中央に配置するためのラッパー */

a {
	color: #007cff;
	text-decoration: underline;
}

.header-nav a {
	text-decoration: none;
}
.header-nav ul {
	margin: 0;
}

table {
	border: 1px solid #f2f2f2;
	border-collapse: collapse;
	border-spacing: unset;
	color: #1a1a1a;
	font-size: 14px;
	line-height: 1.4;
	margin: 10px 0;
	table-layout: auto;
}

th {
	background-color: #f5f5f580 !important;
}
th,
td {
	border: 1px solid #f2f2f2 !important;
	max-width: 240px !important;
	min-width: 100px !important;
	padding: 12px !important;
}

ul {
	list-style: initial;
	/* margin-left: 20px; */
	margin: 10px 0 30px 20px;
}

/* ヘッダーメニュのィストスタイルは無し */
header ul {
	list-style: none;
}

.article-wrapper {
	max-width: 1140px; /* コンテンツの最大幅 */
	width: 100%;
	margin: 150px auto 0; /* 上下のマージンと、左右中央寄せ */
	font-family: "ヒラギノ角ゴシック", "Hiragino Sans";
}

/* 記事全体を囲むカードデザイン */
.article-container {
	background-color: #fff;
	border-radius: 15px; /* 角を丸くする */
	box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08); /* 影をつけて立体感を出す */
	overflow: hidden; /* 画像の角丸を適用させるため */
	margin-bottom: 40px;
}

/* アイキャッチ画像 */
.article-thumbnail {
	margin: 7.7% 8.771% 0;
}

.article-thumbnail img {
	width: 100%;
	border-radius: 15px;
	height: auto;
	display: block; /* 画像下の余白を消す */
}

/* タイトルや本文など、画像以外のコンテンツ部分 */
.article-body {
	/* padding: 50px; */
	padding: 0 80px 100px;
	margin: 0 20px;
}

.article-wrapper h2 {
	font-size: 40px;
	font-weight: 700;
	margin: 80px 0 50px;
}

.article-wrapper h3 {
	font-size: 20px;
	font-weight: 700;
	margin: 40px 0 5px;
}

.article-wrapper h4 {
	font-size: 20px;
	font-weight: 700;
	margin: 20px 0 5px;
}

.article-wrapper h5 {
	font-size: 20px;
	font-weight: 700;
	margin: 20px 0 5px;
}

.article-wrapper h6 {
	font-size: 20px;
	font-weight: 700;
	margin: 20px 0 5px;
}

/* 記事ヘッダー（タイトルと日付） */
.article-header {
	/* margin-bottom: 40px; */
	border-bottom: 1px solid #eee; /* タイトルと本文の間に区切り線 */
	/* padding-bottom: 30px; */
}

/* 記事タイトル */
.article-title {
	font-size: 46px;
	font-weight: bold;
	line-height: 1.4;
	margin: 46px 0 15px 0;
}

/* 投稿日 */
.article-date {
	font-size: 16px;
	color: #888;
	margin: 26px 0;
}

/* 記事本文 */
.article-content {
	font-size: 20px;
	line-height: 1.9;
	color: #333;
}

/* 本文内の段落のスタイル */
.article-content p {
	margin-top: 0;
	/* margin-bottom: 1.8em; */
	margin-bottom: 0em;
	line-height: 1.5;
}

/* --- レスポンシブ対応 (スマートフォンなど) --- */
@media (max-width: 768px) {
	.article-content {
		line-height: 1.4;
	}

	.article-wrapper {
		margin: 30px auto;
		padding: 0 10px; /* スマートフォン表示時の左右の余白 */
	}

	.article-body {
		/* padding: 30px 25px; */
		padding: 0;
	}

	.article-thumbnail {
		margin: 7.7% 0 0;
		padding: 30px 20px;
	}

	.article-title {
		font-size: 24px;
		margin: 0;
	}

	.article-date {
		margin: 10px 0 0;
	}

	.article-header {
		margin-bottom: 0;
		padding-bottom: 0;
	}
}

/*
 * Related Posts Section
 * ------------------------------------------------- */

/* 関連記事セクション全体 */
.related-posts-section {
	/* background-color: #f7f7f7;  */
	padding: 80px 0;
	/* margin-top: 60px; */
}

.related-posts-wrapper {
	max-width: 1140px; /* コンテンツの最大幅を少し広げる */
	margin: 0 auto;
	padding: 0 20px;
}

/* セクション見出し */
.section-header {
	margin-bottom: 50px;
}

.section-subtitle {
	display: block;
	font-size: 21px;
	color: #777777;
	font-weight: bold;
	margin-bottom: 8px;
	padding-left: 20px;
	position: relative;
}

.section-subtitle::before {
	content: "";
	display: block;
	width: 6.75px;
	height: 6.75px;
	background-color: #cb2020;
	border-radius: 1.35px;
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
}

.section-title {
	font-size: 64.84px;
	font-weight: bold;
	line-height: 1.2;
	margin: 0;
	font-family: sans-serif; /* シンプルなフォントを指定 */
	text-align: justify;
}

/* 関連記事リスト (Flexboxで横並び) */
.related-posts-list {
	display: flex;
	gap: 30px; /* カード間の隙間 */
	margin-bottom: 60px;
}

/* 関連記事カード */
.related-post-item {
	flex: 1; /* 均等に幅を分ける */
	min-width: 0;
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
	overflow: hidden;
	transition: transform 0.3s, box-shadow 0.3s;
}

.related-post-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

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

.related-post-thumbnail img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10; /* 画像の縦横比を固定 */
	object-fit: cover; /* 比率を保ったままトリミング */
	display: block;
}

.related-post-body {
	padding: 20px;
}

.related-post-title {
	font-size: 18px;
	font-weight: bold;
	line-height: 1.5;
	margin: 0 0 10px 0;
	/* 3行で省略(...)表示する場合 */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	/* min-height: 81px;  */
}

.related-post-date {
	font-size: 13px;
	color: #888;
	margin: 0 0 15px 0;
}

.related-post-excerpt {
	font-size: 14px;
	line-height: 1.7;
	color: #555;
	/* 3行で省略(...)表示する場合 */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

/* ナビゲーションボタン */
.navigation-buttons {
	display: flex;
	justify-content: center;
	gap: 20px;
}

.btn {
	display: inline-block;
	padding: 12px 30px;
	border-radius: 50px;
	background-color: #333;
	color: #fff;
	text-decoration: none;
	font-weight: bold;
	font-size: 14px;
	transition: background-color 0.3s;
	border: 2px solid #333;
}

.btn:hover {
	background-color: #555;
}

/* 引用 */
blockquote {
	border-left: 3px solid rgba(0, 0, 0, 0.15);
	font-style: italic;
	margin: 10px 0;
	padding: 10px 15px;
}

blockquote p {
	margin-bottom: 0 !important;
}

/* 目次全体↓ */
#toc_container {
	background: #f5f5f5;
	border: 1px solid #e0e0e0;
	padding: 20px 30px;
	margin: 30px 0;
	border-radius: 5px;
}

/* 目次のタイトル */
.toc_title {
	font-weight: bold;
	font-size: 16px;
	text-align: center;
	margin-bottom: 15px;
	color: #333; /* タイトルの文字色 */
}

/* 目次リストの基本スタイル */
#toc_container ul {
	list-style: none;
	padding-left: 0; /* デフォルトのパディングをリセット */
	margin: 0;
	font-size: 16px;
}

#toc_container li {
	margin-bottom: 10px;
	line-height: 1.5;
}

/* 階層のインデント */
/* h3以降のネストされたリストに左パディングを追加してインデント */
#toc_container ul ul {
	margin-top: 10px;
	padding-left: 25px; /* インデント幅（この数値を調整してください） */
}

/* リンクのスタイル */
#toc_container a {
	/* text-decoration: none; */
	text-decoration: underline;
	color: #616161;
	transition: all 0.3s ease;
}

#toc_container a:hover {
	/* text-decoration: underline; */
	opacity: 0.5;
}

/* チェックリストのアイコン */
#toc_container li.toc-checklist::before {
	content: "📄";
	margin-right: 8px;
	font-family: sans-serif;
}
/* 目次全体↑ */

/* --- レスポンシブ対応 (スマートフォンなど) --- */
@media (max-width: 768px) {
	.related-posts-section {
		padding: 50px 0;
	}

	.related-posts-list {
		flex-direction: column; /* 縦並びにする */
	}

	.related-post-title {
		font-size: 16px;
		/* min-height: 0;  */
	}

	.navigation-buttons {
		flex-direction: column;
		align-items: center;
	}

	.btn {
		width: 80%;
		text-align: center;
	}
}
