/*
 * taisei_n Child - Inner page styles
 * 固定ページ (page.php) / 投稿 (single.php) / 記事一覧 (index.php, archive.php)
 * Uses the same palette, eyebrow + heading pattern, cards and buttons as the
 * front page so inner pages read as part of the same site.
 */

body {
	background: var(--color-bg-gray-light);
}

/* The parent (_s) theme's `.post, .page { margin: 0 0 1.5em }` also matches
   <body class="page">, which would leave a strip of background under the
   footer on every 固定ページ. */
body.page {
	margin: 0;
}

/* ---------- Page header ---------- */
.page-hero {
	position: relative;
	overflow: hidden;
	padding-block: 20px 72px;
	background: var(--color-bg-gray);
}

/* Soft brand-green arc in the corner so the header isn't a flat block */
.page-hero::after {
	content: "";
	position: absolute;
	right: -120px;
	top: -140px;
	width: 320px;
	height: 320px;
	border-radius: 50%;
	border: 48px solid rgba(23, 156, 90, 0.07);
	pointer-events: none;
}

.page-hero__inner {
	position: relative;
	z-index: 1;
}

/* Single post / page: the header and article share one 1024px column */
.page-hero--article {
	padding-bottom: 40px;
}

.page-hero--article .page-hero__inner,
.container--article {
	max-width: calc(var(--article-width) + var(--container-padding) * 2);
}

.breadcrumb__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 0;
	list-style: none;
	margin: 0 0 36px;
	padding: 0;
	font-size: 12px;
	color: var(--color-text-light);
}

.breadcrumb__item {
	display: inline-flex;
	align-items: center;
	min-width: 0;
}

.breadcrumb__item + .breadcrumb__item::before {
	content: "";
	flex-shrink: 0;
	width: 5px;
	height: 5px;
	margin-inline: 10px;
	border-top: 1px solid currentColor;
	border-right: 1px solid currentColor;
	transform: rotate(45deg);
	opacity: 0.6;
}

.breadcrumb__item[aria-current] {
	display: block;
	max-width: 16em;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.breadcrumb__item[aria-current]::before {
	display: inline-block;
	vertical-align: middle;
	margin-top: -3px;
}

.breadcrumb a,
.breadcrumb a:visited {
	color: var(--color-green-dark);
	font-weight: 700;
}

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

.page-hero__eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px;
	font-family: var(--font-display);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	color: var(--color-orange);
}

.page-hero__eyebrow::before {
	content: "";
	width: 24px;
	height: 2px;
	background: var(--color-orange);
}

.page-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin-bottom: 12px;
}

.page-hero__date {
	font-size: 14px;
	font-weight: 700;
	color: var(--color-green);
}

.page-hero__title {
	margin: 0;
	font-family: var(--font-display);
	font-size: 26px;
	font-weight: 800;
	line-height: 1.45;
	letter-spacing: 0.02em;
	color: var(--color-green-dark);
	overflow-wrap: anywhere;
}

.page-hero__description {
	max-width: 640px;
	margin-top: 16px;
	font-size: 15px;
	line-height: 1.9;
	color: var(--color-text-light);
}

.page-hero__description p {
	margin: 0;
}

/* Linked category / tag pills (the plain .tag is a non-link label) */
.tag--link,
.tag--link:visited {
	padding: 6px 16px;
	font-size: 12px;
	background: var(--color-white);
	color: var(--color-green-dark);
	border: 1px solid var(--color-border);
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tag--link:hover {
	background: var(--color-green);
	border-color: var(--color-green);
	color: var(--color-white);
}

/* ---------- Article ---------- */
.inner-page {
	--article-width: 1024px;
}

.entry-card {
	margin: 0;
	padding-top: 40px;
}

.entry-card__thumbnail {
	margin: 0 0 32px;
	overflow: hidden;
	border-radius: 12px;
}

.entry-card__thumbnail img {
	width: 100%;
}

.entry-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 40px 0 0;
	padding: 24px 0 0;
	border-top: 1px solid var(--color-border);
}

.entry-card__edit {
	margin: 32px 0 0;
	font-size: 13px;
	text-align: right;
}

.entry-card__edit a,
.entry-card__edit a:visited {
	color: var(--color-text-light);
	text-decoration: underline;
}

/* ---------- Article body (block editor content) ---------- */
.entry-content {
	margin: 0;
	font-size: 16px;
	line-height: 1.95;
	color: var(--color-text);
	overflow-wrap: anywhere;
}

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

.entry-content > *:last-child {
	margin-bottom: 0;
}

.entry-content p {
	margin: 0 0 1.6em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
	font-family: var(--font-display);
	line-height: 1.5;
	color: var(--color-green-dark);
}

/* h2: short green bar on a pale rule, the same weight as the front page's
   section headings */
.entry-content h2 {
	position: relative;
	margin: 2.4em 0 1em;
	padding-bottom: 14px;
	font-size: 22px;
	font-weight: 800;
	border-bottom: 2px solid var(--color-bg-gray);
}

.entry-content h2::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 64px;
	height: 2px;
	background: var(--color-green);
}

/* h3: the orange eyebrow rule, as a leading mark */
.entry-content h3 {
	position: relative;
	margin: 2em 0 0.8em;
	padding-left: 22px;
	font-size: 19px;
	font-weight: 700;
}

.entry-content h3::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.75em;
	width: 12px;
	height: 3px;
	border-radius: 2px;
	background: var(--color-orange);
}

.entry-content h4 {
	margin: 1.8em 0 0.6em;
	font-size: 17px;
	font-weight: 700;
	color: var(--color-green);
}

.entry-content h5,
.entry-content h6 {
	margin: 1.6em 0 0.5em;
	font-size: 16px;
	font-weight: 700;
}

.entry-content a,
.entry-content a:visited {
	color: var(--color-green-dark);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
	transition: color 0.2s ease;
}

.entry-content a:hover {
	color: var(--color-orange);
}

.entry-content strong {
	font-weight: 700;
	background: linear-gradient(transparent 62%, rgba(243, 152, 0, 0.25) 62%);
}

/* Lists: green dots / green numbers, like the 実績 cards' detail list */
.entry-content ul,
.entry-content ol {
	margin: 0 0 1.6em;
	padding-left: 0;
}

.entry-content ul:where(:not([class]), .wp-block-list) {
	list-style: none;
}

/* Only plain lists / List blocks — galleries, social links etc. are ul too */
.entry-content ul:where(:not([class]), .wp-block-list) > li {
	position: relative;
	padding-left: 20px;
}

.entry-content ul:where(:not([class]), .wp-block-list) > li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 0.8em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--color-green);
}

.entry-content ol {
	padding-left: 1.6em;
}

.entry-content ol > li::marker {
	font-weight: 700;
	color: var(--color-green);
}

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

.entry-content li > ul,
.entry-content li > ol {
	margin: 0.4em 0 0;
}

.entry-content blockquote,
.entry-content .wp-block-quote {
	margin: 0 0 1.6em;
	padding: 20px 22px;
	border-left: 4px solid var(--color-green);
	border-radius: 0 12px 12px 0;
	background: var(--color-bg-gray);
}

.entry-content blockquote p:last-child {
	margin-bottom: 0;
}

.entry-content blockquote cite {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	font-style: normal;
	color: var(--color-text-light);
}

.entry-content hr,
.entry-content .wp-block-separator {
	height: 0;
	margin: 2.4em 0;
	border: 0;
	border-top: 1px solid var(--color-border);
	background: none;
}

.entry-content figure,
.entry-content .wp-block-image {
	margin: 0 0 1.8em;
}

.entry-content img {
	border-radius: 12px;
}

.entry-content figcaption,
.entry-content .wp-caption-text {
	margin-top: 8px;
	font-size: 13px;
	line-height: 1.7;
	text-align: center;
	color: var(--color-text-light);
}

/* Video embeds (block editor, classic editor or pasted iframe code): the
   theme doesn't enable WordPress's responsive-embeds, so size them by ratio
   here — otherwise the iframe keeps its fixed height attribute and gets
   squashed/stretched as the column narrows on phones. */
.entry-content .wp-block-embed iframe,
.entry-content iframe[src*="youtube.com"],
.entry-content iframe[src*="youtube-nocookie.com"],
.entry-content iframe[src*="player.vimeo.com"],
.entry-content > p > iframe,
.entry-content > iframe {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border-radius: 12px;
}

.entry-content .wp-embed-aspect-4-3 iframe {
	aspect-ratio: 4 / 3;
}

.entry-content .wp-embed-aspect-1-1 iframe {
	aspect-ratio: 1 / 1;
}

/* Vertical video (YouTube Shorts etc.): keep it from filling the column */
.entry-content .wp-embed-aspect-9-16 iframe {
	max-width: 360px;
	margin-inline: auto;
	aspect-ratio: 9 / 16;
}

/* Tables */
.entry-content table,
.entry-content .wp-block-table table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 15px;
}

.entry-content .wp-block-table,
.entry-content > table {
	margin: 0 0 1.8em;
	overflow-x: auto;
}

.entry-content th,
.entry-content td {
	padding: 12px 14px;
	border: 1px solid var(--color-border);
	text-align: left;
	vertical-align: top;
}

.entry-content th,
.entry-content thead td {
	background: var(--color-bg-gray);
	color: var(--color-green-dark);
	font-weight: 700;
	white-space: nowrap;
}

/* Block editor buttons → the site's orange pill button */
.entry-content .wp-block-buttons {
	margin: 0 0 1.8em;
}

.entry-content .wp-block-button__link,
.entry-content .wp-block-button__link:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 32px;
	border-radius: 999px;
	background: var(--color-orange);
	color: var(--color-white);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.2s var(--ease-brand), background-color 0.2s ease;
}

.entry-content .wp-block-button__link:hover {
	background: var(--color-orange-dark);
	color: var(--color-white);
	transform: translateY(-2px);
}

.entry-content .is-style-outline .wp-block-button__link,
.entry-content .is-style-outline .wp-block-button__link:visited {
	background: transparent;
	color: var(--color-green);
	border: 1px solid var(--color-green);
}

.entry-content .is-style-outline .wp-block-button__link:hover {
	background: var(--color-green);
	color: var(--color-white);
}

.page-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 32px 0 0;
	font-size: 14px;
	font-weight: 700;
}

/* ---------- Previous / next post ---------- */
.entry-nav {
	display: grid;
	gap: 12px;
	margin: 48px 0 0;
}

.entry-nav__link,
.entry-nav__link:visited {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 18px 48px 18px 20px;
	border-radius: 12px;
	background: var(--color-white);
	border: 1px solid var(--color-border);
	color: var(--color-text);
	transition: border-color 0.2s ease, transform 0.2s var(--ease-brand);
}

.entry-nav__link::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 22px;
	width: 8px;
	height: 8px;
	border-top: 2px solid var(--color-green);
	border-right: 2px solid var(--color-green);
	transform: translateY(-50%) rotate(45deg);
	transition: transform 0.2s var(--ease-brand);
}

.entry-nav__link--prev {
	padding: 18px 20px 18px 48px;
}

.entry-nav__link--prev::after {
	right: auto;
	left: 22px;
	transform: translateY(-50%) rotate(-135deg);
}

.entry-nav__link:hover {
	border-color: var(--color-green);
}

.entry-nav__link--next:hover::after {
	transform: translate(3px, -50%) rotate(45deg);
}

.entry-nav__link--prev:hover::after {
	transform: translate(-3px, -50%) rotate(-135deg);
}

.entry-nav__label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--color-orange);
}

.entry-nav__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.6;
}

.entry-back {
	margin-top: 40px;
	text-align: center;
}

/* ---------- Post card grid (一覧 / 関連記事) ---------- */
.post-grid {
	display: grid;
	gap: 36px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.post-archive {
	padding-block: 40px 72px;
}

.post-archive__empty {
	margin: 0;
	padding: 48px 0;
	text-align: center;
	color: var(--color-text-light);
}

/* Category filter: sits inside the page header, under the title; pills
   wrap onto more rows as categories are added and all stay on the header's
   background. */
.page-hero--has-after {
	padding-bottom: 32px;
}

.category-filter {
	margin-top: 28px;
}

.category-filter__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.category-filter__link,
.category-filter__link:visited {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 6px 18px;
	border-radius: 999px;
	border: 1px solid var(--color-border);
	background: var(--color-white);
	color: var(--color-green-dark);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.category-filter__link:hover,
.category-filter__link.is-current,
.category-filter__link.is-current:visited {
	background: var(--color-green);
	border-color: var(--color-green);
	color: var(--color-white);
}

/* Pagination */
.pagination {
	margin-top: 56px;
}

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

.pagination .page-numbers,
.pagination a.page-numbers:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding-inline: 8px;
	border-radius: 999px;
	border: 1px solid var(--color-border);
	background: var(--color-white);
	color: var(--color-green-dark);
	font-size: 15px;
	font-weight: 700;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pagination .page-numbers.dots {
	min-width: auto;
	border: 0;
	background: none;
}

.pagination a.page-numbers:hover,
.pagination .page-numbers.current {
	background: var(--color-green);
	border-color: var(--color-green);
	color: var(--color-white);
}

.pagination .prev,
.pagination .next {
	font-size: 22px;
	line-height: 1;
}

/* ---------- Related posts ---------- */
.related-posts {
	margin-top: 72px;
	padding-block: 64px 72px;
	background: var(--color-white);
}

.related-posts__eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 8px;
	font-family: var(--font-display);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	color: var(--color-orange);
}

.related-posts__eyebrow::before {
	content: "";
	width: 24px;
	height: 2px;
	background: var(--color-orange);
}

.related-posts__heading {
	margin: 0 0 32px;
	font-family: var(--font-display);
	font-size: 26px;
	font-weight: 800;
	line-height: 1.3;
	color: var(--color-green-dark);
}

/* ---------- 404 ---------- */
.not-found {
	padding-top: 64px;
}

.not-found__actions {
	text-align: center;
}

.not-found + .related-posts {
	margin-top: 56px;
}

/* ---------- Support CTA ---------- */
.support-cta {
	margin-top: 72px;
	padding-block: 56px;
	background: var(--color-bg-gray);
	text-align: center;
}

.related-posts + .support-cta {
	margin-top: 0;
}

.post-archive + .support-cta {
	margin-top: 0;
}

.support-cta__eyebrow {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	color: var(--color-orange);
}

.support-cta__heading {
	margin: 0 0 28px;
	font-family: var(--font-display);
	font-size: 24px;
	font-weight: 800;
	line-height: 1.5;
	color: var(--color-green-dark);
}

/* =====================================================
   Responsive
   ===================================================== */
@media (min-width: 600px) {
	.post-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 40px 32px;
	}

	.entry-nav {
		grid-template-columns: 1fr 1fr;
	}

	/* Keep "next" on the right even when there's no previous post */
	.entry-nav__link--next {
		grid-column: 2;
		text-align: right;
		align-items: flex-end;
	}
}

@media (min-width: 768px) {
	.page-hero {
		padding-block: 28px 96px;
	}

	.page-hero::after {
		right: -80px;
		top: -160px;
		width: 440px;
		height: 440px;
		border-width: 64px;
	}

	.breadcrumb__list {
		margin-bottom: 48px;
	}

	.breadcrumb__item[aria-current] {
		max-width: 28em;
	}

	.page-hero__title {
		font-size: 34px;
	}

	.page-hero--article {
		padding-bottom: 56px;
	}

	.entry-card {
		padding-top: 56px;
	}

	.entry-card__thumbnail {
		margin-bottom: 40px;
	}

	.entry-content {
		font-size: 17px;
	}

	.entry-content h2 {
		font-size: 26px;
	}

	.entry-content h3 {
		font-size: 21px;
	}

	.page-hero--has-after {
		padding-bottom: 40px;
	}

	.category-filter {
		margin-top: 36px;
	}

	.related-posts__heading {
		font-size: 32px;
	}

	.support-cta {
		padding-block: 72px;
	}

	.support-cta__heading {
		font-size: 30px;
	}

	.not-found {
		padding-top: 96px;
	}

	.not-found + .related-posts {
		margin-top: 72px;
	}
}

@media (min-width: 1024px) {
	.page-hero__title {
		font-size: 40px;
	}

	.post-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}
