/* =======================================
 * NewsDetail.css
 * お知らせ詳細ページ専用スタイル
 * ======================================= */

/* ---------------------------------------
 * 共通レイアウト調整 (inner-wrap は共通CSSに依存)
 * --------------------------------------- */
.main-content {
	padding: 40px 0;
}

.inner-wrap {
	max-width: 960px; /* 適切な最大幅を設定 */
	margin: 0 auto;
	padding: 0 20px;
}

/* ページタイトル */
.page-title {
	font-size: 28px;
	font-weight: bold;
	color: #333;
	margin-bottom: 30px;
	border-left: 5px solid #007bff; /* メインカラーに合わせて調整 */
	padding-left: 15px;
}

/* ---------------------------------------
 * 記事本体 (article.news-item)
 * --------------------------------------- */
.news-item {
	background-color: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 30px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 記事ヘッダー */
.item-header {
	border-bottom: 1px solid #eee;
	padding-bottom: 15px;
	margin-bottom: 25px;
}

/* 日付とカテゴリの配置 */
.publish-date,
.category-tag {
	display: inline-block;
	font-size: 14px;
	margin-right: 15px;
	vertical-align: middle;
}

/* 日付 */
.publish-date {
	color: #666;
	font-weight: normal;
}

/* カテゴリタグ */
.category-tag {
	background-color: #007bff; /* メインカラー */
	color: #fff;
	padding: 3px 8px;
	border-radius: 4px;
	font-weight: bold;
}

/* 記事タイトル */
.news-title {
	font-size: 24px;
	font-weight: bold;
	color: #1a1a1a;
	margin-top: 10px;
	margin-bottom: 10px;
	line-height: 1.5;
}

/* ---------------------------------------
 * 記事本文 (div.news-body)
 * --------------------------------------- */

/* 記事画像 */
.news-image {
	margin: 20px 0 30px 0;
	text-align: center;
}

.news-image img {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 本文テキスト */
.content-text {
	font-size: 16px;
	line-height: 1.8;
	color: #333;
	/* 改行を反映するnl2brを使用しているため、段落間には余白を持たせる */
}

.content-text p {
	margin-bottom: 1em;
}

/* 記事メイン画像 (item-headerとnews-bodyの間) */
.news-main-image {
	margin: 20px 0 30px 0; /* ヘッダーと本文の間隔を調整 */
	text-align: center;
}

.news-main-image img {
	max-width: 100%;
	max-height: 512px; /* 最大高さを512pxに制限 */
	width: auto; /* 幅を自動調整 */
	height: auto; /* 高さを自動調整 */

	width: min(100%, 512px;)

	display: block; /* 中央寄せのためにブロック要素に */
	margin: 0 auto; /* 中央寄せ */
	border-radius: 6px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ---------------------------------------
 * ナビゲーション (一覧へ戻るボタン)
 * --------------------------------------- */
.news-navigation {
	text-align: center;
	margin-top: 40px;
}

.btn-back-to-list {
	display: inline-block;
	padding: 10px 25px;
	background-color: #6c757d; /* グレー系 */
	color: #fff;
	text-decoration: none;
	border-radius: 5px;
	font-weight: bold;
	transition: background-color 0.3s;
}

.btn-back-to-list:hover {
	background-color: #5a6268;
}

/* ---------------------------------------
 * エラー表示セクション
 * --------------------------------------- */
#news-detail-error {
	text-align: center;
	padding: 80px 0;
}

#news-detail-error .page-title {
	color: #dc3545; /* エラーを強調する色 */
	border-left: none;
	padding-left: 0;
}

#news-detail-error p {
	font-size: 18px;
	color: #555;
	margin-bottom: 30px;
}


/* =======================================
 * レスポンシブ対応 (スマートフォン向け)
 * ======================================= */
@media (max-width: 768px) {
	.main-content {
		padding: 20px 0;
	}

	.inner-wrap {
		padding: 0 15px;
	}

	.page-title {
		font-size: 24px;
		margin-bottom: 20px;
	}

	.news-item {
		padding: 20px;
	}

	.news-title {
		font-size: 20px;
	}

	.news-main-image {
		margin: 15px 0 20px 0;
	}

	.publish-date,
	.category-tag {
		font-size: 13px;
	}

	.content-text {
		font-size: 15px;
	}

	.btn-back-to-list {
		padding: 8px 20px;
		font-size: 14px;
	}
}
