/**
 * Single Post Detail Styles (お知らせ詳細)
 *
 *
 * @package Okayama
 */

/* Breadcrumb and Page Title styles are in portal-common.css */

/* ========================================
   Post Card Container
   ======================================== */

.single-post {
	padding: 100px 0 0;
}

.single-post__inner {
	max-width: 1100px;
	margin: 0 auto;
}

.single-post__card {
	background-color: var(--portal-white);
	border-radius: var(--portal-radius-md);
	padding: 64px 80px;
}

/* ========================================
   Post Meta (date, tag, title, divider)
   ======================================== */

.single-post__meta {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.single-post__meta-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.single-post__date {
	font-family: 'Reddit Sans', sans-serif;
	font-weight: 600;
	font-size: 16px;
	line-height: 1.6;
	color: var(--portal-text);
	white-space: nowrap;
}

.single-post__tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: var(--portal-blue);
	color: var(--portal-white);
	border-radius: var(--portal-radius-pill);
	border: 1px solid var(--portal-blue);
	padding: 0 12px;
	height: 23px;
	font-size: 14px;
	line-height: 1.6;
	white-space: nowrap;
}

/* 緊急お知らせ（トップ帯・single-emergency と同色） */
.single-post__tag--emergency {
	background-color: #e52c2c;
	border-color: #e52c2c;
}

.single-post__title {
	font-size: 28px;
	font-weight: 700;
	line-height: 1.6;
	margin: 0;
	color: var(--portal-text);
}

.single-post__meta-line {
	width: 100%;
	height: 1px;
	background-color: var(--portal-gray);
}

/* ========================================
   Post Body — the_content() typography
   ======================================== */

.single-body {
	margin-top: 40px;
}

/* Headings */
.single-body h2 {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.6;
	color: var(--portal-text);
	margin: 40px 0 24px;
}

.single-body h3 {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.6;
	color: var(--portal-text);
	margin: 32px 0 20px;
}

.single-body h4 {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.6;
	color: var(--portal-text);
	margin: 24px 0 16px;
}

.single-body h5,
.single-body h6 {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.6;
	color: var(--portal-text);
	margin: 24px 0 16px;
}

/* First child heading: no top margin */
.single-body> :first-child {
	margin-top: 0;
}

/* Paragraphs */
.single-body p {
	font-size: 16px;
	font-weight: 400;
	line-height: 2;
	color: var(--portal-text);
	margin: 0 0 24px;
}

.single-body p:last-child {
	margin-bottom: 0;
}

/* Bold / Strong */
.single-body strong,
.single-body b {
	font-weight: 700;
}

/* Links */
.single-body a {
	color: var(--portal-blue);
	text-decoration: underline;
	transition: opacity 0.3s ease;
}

.single-body a:hover {
	opacity: 0.7;
}

/* Images */
.single-body img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 24px 0;
	border-radius: 8px;
}

.single-body p>img {
	margin: 0;
}

.single-body p:has(> img:only-child) {
	margin: 24px 0;
}

/* Figures (WordPress block images) */
.single-body figure {
	margin: 24px 0;
	max-width: 100%;
}

.single-body figure img {
	margin: 0;
}

.single-body figcaption {
	font-size: 14px;
	line-height: 1.6;
	color: #999;
	margin-top: 8px;
}

/* Lists */
.single-body ul,
.single-body ol {
	font-size: 16px;
	line-height: 2;
	color: var(--portal-text);
	margin: 16px 0 24px;
	padding-left: 1.5em;
}

.single-body ul {
	list-style-type: disc;
}

.single-body ol {
	list-style-type: decimal;
}

.single-body li {
	margin-bottom: 4px;
}

.single-body li:last-child {
	margin-bottom: 0;
}

/* Nested lists */
.single-body ul ul,
.single-body ol ol,
.single-body ul ol,
.single-body ol ul {
	margin: 4px 0 0;
}

/* Blockquote */
.single-body blockquote {
	border-left: 4px solid var(--portal-blue);
	padding: 16px 24px;
	margin: 24px 0;
	background-color: #f5f5f5;
	border-radius: 0 8px 8px 0;
}

.single-body blockquote p {
	margin: 0;
}

/* Tables */
.single-body table {
	width: 100%;
	border-collapse: collapse;
	margin: 24px 0;
	font-size: 16px;
	line-height: 1.6;
}

.single-body th,
.single-body td {
	border: 1px solid var(--portal-gray);
	padding: 12px 16px;
	text-align: left;
}

.single-body th {
	background-color: #f5f5f5;
	font-weight: 700;
}

/* Horizontal Rule */
.single-body hr {
	border: none;
	border-top: 1px solid var(--portal-gray);
	margin: 40px 0;
}

/* WordPress alignment classes */
.single-body .alignleft {
	float: left;
	margin: 0 24px 16px 0;
}

.single-body .alignright {
	float: right;
	margin: 0 0 16px 24px;
}

.single-body .aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

/* WordPress block: gallery */
.single-body .wp-block-gallery {
	margin: 24px 0;
}

/* WordPress block: embed / video */
.single-body .wp-block-embed,
.single-body .wp-block-video {
	margin: 24px 0;
}

.single-body .wp-block-embed__wrapper {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
}

.single-body .wp-block-embed__wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* WordPress Gutenberg: text color classes */
.single-body .has-text-color {
	color: inherit;
}

.single-body p.has-text-color {
	color: inherit;
}

.single-body .has-error-color {
	color: red;
	font-weight: 700;
}

/* Clear floats */
.single-body::after {
	content: '';
	display: table;
	clear: both;
}

/* ========================================
   Back Button
   ======================================== */

.single-back {
	display: flex;
	justify-content: center;
	padding: 100px 0 0;
}

.single-back__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 240px;
	height: 56px;
	background-color: var(--portal-text);
	color: var(--portal-white);
	border: 1px solid var(--portal-text);
	border-radius: var(--portal-radius-pill);
	font-family: 'Noto Sans JP', sans-serif;
	font-weight: 500;
	font-size: 16px;
	line-height: 1.6;
	text-align: center;
	transition: background-color 0.3s ease, color 0.3s ease;
	position: relative;
}

.single-back__btn:hover {
	background-color: var(--portal-white);
	color: var(--portal-text);
}

.single-back__arrow {
	position: absolute;
	left: 16px;
	flex-shrink: 0;
}

.single-back__text {
	color: inherit;
}

/* ========================================
   Banner Wrapper
   ======================================== */

.single-banner-wrap {
	display: flex;
	justify-content: center;
	padding: 100px 0;
}

/* ========================================
   Responsive — Tablet (max-width: 1024px)
   ======================================== */

@media (max-width: 1024px) {

	.single-post__card {
		padding: 48px 40px;
	}
}

/* ========================================
   Responsive — Mobile (max-width: 768px)
   ======================================== */

@media (max-width: 768px) {

	/* --- Post Card --- */
	.single-post {
		padding: 80px 5% 0;
	}

	.single-post__inner {
		max-width: none;
	}

	.single-post__card {
		padding: 40px 20px;
		border-radius: var(--portal-radius-sm);
	}

	/* --- Meta --- */
	.single-post__meta {
		gap: 16px;
	}

	.single-post__meta-row {
		flex-wrap: wrap;
		gap: 10px;
	}

	.single-post__date {
		font-size: 15px;
	}

	.single-post__title {
		font-size: 23px;
	}

	/* --- Content Body --- */
	.single-body {
		margin-top: 20px;
	}

	.single-body h2 {
		font-size: 18px;
		margin: 32px 0 16px;
	}

	.single-body h3 {
		font-size: 16px;
		margin: 24px 0 12px;
	}

	.single-body h4 {
		font-size: 15px;
		margin: 20px 0 12px;
	}

	.single-body h5,
	.single-body h6 {
		font-size: 14px;
		margin: 20px 0 12px;
	}

	.single-body p {
		font-size: 14px;
		margin: 0 0 20px;
	}

	.single-body ul,
	.single-body ol {
		font-size: 14px;
		margin: 12px 0 20px;
	}

	.single-body table {
		font-size: 14px;
	}

	.single-body th,
	.single-body td {
		padding: 8px 12px;
	}

	.single-body blockquote {
		padding: 12px 16px;
		margin: 20px 0;
	}

	.single-body img {
		margin: 16px 0;
	}

	.single-body figure {
		margin: 16px 0;
	}

	.single-body figcaption {
		font-size: 12px;
	}

	.single-body hr {
		margin: 32px 0;
	}

	/* WordPress alignment: stack on mobile */
	.single-body .alignleft,
	.single-body .alignright {
		float: none;
		margin: 16px 0;
	}

	/* --- Back Button --- */
	.single-back {
		padding: 80px 5% 0;
	}

	.single-back__btn {
		height: 50px;
	}

	/* --- Banner --- */
	.single-banner-wrap {
		padding: 80px 5%;
	}
}