/* WordPress blog additions */

/* Page hero (BLOG / ブログ): WebP background — blog theme only */
#container main h2#etc.title {
	background-image: url('../images/bg_etc.webp');
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
}

/* ヒーロー直下のグレー帯は h2 の margin ではなく main-00 側で余白を取る */
#container main .main-cont h2.title {
	margin-bottom: 0;
}

#container main .main-cont h2.title > span {
	background: rgba(137, 137, 137, 0.2);
}

#container main > .main-00 {
	padding-top: 3rem;
}

/* Typography */
#container main h2.title,
#container main h2.title span,
#container main h2.title span span,
#container .head02,
#container .head02 span,
#container h1,
#container h2,
#container h3,
#container h4 {
	font-family: "BIZ UDPMincho", "Noto Serif JP", serif;
	font-weight: 400;
}

.nakabayashi-blog-main .markdown-body {
	font-family: "Noto Sans JP", sans-serif;
	font-weight: 300;
	background: none;
}

.nakabayashi-single-title {
	font-family: "BIZ UDPMincho", "Noto Serif JP", serif;
	font-weight: 400;
	font-size: 1.6rem;
	margin: 0 0 0.75rem;
	padding: 0 0 0.75rem;
	text-align: left;
	line-height: 1.5;
	background: none;
	border: none;
	border-bottom: 2px solid #a49367;
	box-shadow: none;
}

.nakabayashi-single .entry-content h3 {
	margin: 2rem 0 1rem;
	padding-left: 1rem;
	border-left: 4px solid #a49367;
	color: #524a3e;
	text-align: left;
	font-weight: 500;
	line-height: 1.5;
}

.nakabayashi-single-header {
	margin-bottom: 1.5rem;
	padding: 0;
	background: none;
	color: #524a3e;
}

.nakabayashi-single-meta {
	display: flex;
	justify-content: flex-end;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	margin: 0 0 1.5rem;
	color: #837256;
	font-size: 0.9rem;
	line-height: 1.5;
}

.nakabayashi-single-meta time {
	font-weight: 300;
}

.nakabayashi-single-category {
	display: inline-block;
	padding: 0.1rem 0.5rem;
	border: 1px solid #999;
	border-radius: 2px;
	background: #fff;
	font-size: 0.8rem;
	color: #524a3e;
	line-height: 1.5;
}

.nakabayashi-single .entry-content {
	font-family: inherit;
	font-weight: inherit;
}

.nakabayashi-single .entry-content h1,
.nakabayashi-single .entry-content h2,
.nakabayashi-single .entry-content h3,
.nakabayashi-single .entry-content h4,
.nakabayashi-single .entry-content h5,
.nakabayashi-single .entry-content h6 {
	font-family: inherit;
	font-weight: 500;
}

/* cont3.css main h2 / main h2 > span は静的ページ用。記事本文では無効化 */
.nakabayashi-single .entry-content h2 {
	max-width: none;
	color: #524a3e;
	font-size: 1.4rem;
	padding: 0;
	border-radius: 0;
	background: none;
	text-align: left;
	margin: 2.5rem 0 1rem;
	line-height: 1.5;
	position: static;
	display: block;
}

.nakabayashi-single .entry-content h2 > span {
	position: static;
	left: auto;
	top: auto;
	width: auto;
	height: auto;
	background: none;
	display: inline;
	flex-direction: row;
	align-items: normal;
	justify-content: normal;
}

.nakabayashi-single .entry-content h2 span span {
	display: inline;
	font-size: inherit;
}

.nakabayashi-single .entry-content .ez-toc-section,
.nakabayashi-single .entry-content .ez-toc-section-end {
	display: block;
	height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	overflow: hidden;
	line-height: 0;
	background: none;
	position: static;
}

.nakabayashi-blog-instagram {
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid #ddd;
}

.nakabayashi-blog-instagram .head02 {
	margin-bottom: 1.5rem;
}

.nakabayashi-blog-google-reviews {
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid #ddd;
}

.nakabayashi-blog-google-reviews .head02 {
	margin-bottom: 1.5rem;
}

.nakabayashi-blog-google-reviews .ti-widget {
	max-width: 100%;
}

.nakabayashi-pagination {
	margin: 2.5rem 0 1rem;
	padding-top: 2rem;
	border-top: 1px solid #e8e0d4;
	text-align: center;
}

.nakabayashi-pagination .nav-links {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	align-items: center;
}

.nakabayashi-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	min-height: 2.5rem;
	padding: 0.35rem 0.85rem;
	border: 1px solid #c8b79c;
	background: #fff;
	color: #524a3e;
	font-size: 0.95rem;
	line-height: 1.4;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nakabayashi-pagination a.page-numbers:hover {
	background: #f8f4ee;
	border-color: #a49367;
	color: #a49367;
	text-decoration: none;
}

.nakabayashi-pagination .page-numbers.current {
	background: #c8b79c;
	border-color: #b9a88d;
	color: #524a3e;
	font-weight: 500;
}

.nakabayashi-pagination .page-numbers.dots {
	min-width: auto;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
	border-color: transparent;
	background: transparent;
}

.nakabayashi-pagination .prev.page-numbers,
.nakabayashi-pagination .next.page-numbers {
	padding-left: 1rem;
	padding-right: 1rem;
}

.nakabayashi-post-nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid #e8e0d4;
}

.nakabayashi-post-nav__item {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 1rem 1.1rem;
	border: 1px solid #e8e0d4;
	background: #fff;
	color: #524a3e;
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nakabayashi-post-nav__item:hover {
	background: #f8f4ee;
	border-color: #c8b79c;
	color: #524a3e;
	text-decoration: none;
}

.nakabayashi-post-nav__item--next {
	text-align: right;
}

.nakabayashi-post-nav__item.is-empty {
	visibility: hidden;
	pointer-events: none;
	border: none;
	background: transparent;
}

.nakabayashi-post-nav__label {
	color: #a49367;
	font-size: 0.85rem;
	line-height: 1.4;
}

.nakabayashi-post-nav__title {
	font-size: 0.95rem;
	line-height: 1.6;
	word-break: break-word;
	overflow-wrap: anywhere;
}

@media screen and (max-width: 599px) {
	.nakabayashi-post-nav {
		grid-template-columns: minmax(0, 1fr);
	}

	.nakabayashi-post-nav__item--next {
		text-align: left;
	}

	.nakabayashi-post-nav__item.is-empty {
		display: none;
	}
}

.nakabayashi-no-posts {
	margin: 2rem 0;
}

/* Post list cards */
.nakabayashi-post-list {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin: 2rem 0 0;
}

.nakabayashi-post-card {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 1rem 1.25rem;
	align-items: start;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid #e8e0d4;
}

.nakabayashi-post-card:last-child {
	padding-bottom: 0;
	border-bottom: none;
}

.nakabayashi-post-card__thumb {
	display: block;
	position: relative;
	width: 120px;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #fff;
	flex-shrink: 0;
}

.nakabayashi-post-card__thumb img,
.nakabayashi-post-card__image {
	display: block;
	width: 100%;
	height: 100%;
	min-width: 100%;
	min-height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center center;
}

.nakabayashi-post-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	margin: 0 0 0.5rem;
	color: #837256;
	font-size: 0.9rem;
	line-height: 1.5;
}

.nakabayashi-post-card__category {
	display: inline-block;
	padding: 0.1rem 0.5rem;
	border: 1px solid #999;
	border-radius: 2px;
	background: #fff;
	font-size: 0.8rem;
	color: #524a3e;
}

.nakabayashi-post-card__title {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
	line-height: 1.5;
}

.nakabayashi-post-card__title a {
	color: #524a3e;
	text-decoration: none;
}

.nakabayashi-post-card__title a:hover {
	color: #837256;
	text-decoration: underline;
}

.nakabayashi-post-card__excerpt {
	margin: 0;
	color: #524a3e;
	font-size: 0.92rem;
	line-height: 1.65;
	word-break: break-word;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
	-webkit-line-clamp: 2;
}

@media screen and (max-width: 599px) {
	.nakabayashi-post-card__title {
		margin: 0 0 10px;
		line-height: 20px;
	}

	.nakabayashi-post-card__excerpt {
		font-size: 12px;
		line-height: 16px;
	}
}

@media screen and (min-width: 600px) {
	.nakabayashi-post-card__excerpt {
		-webkit-line-clamp: 3;
	}

	.nakabayashi-post-card {
		grid-template-columns: 160px minmax(0, 1fr);
		gap: 1rem 1.25rem;
	}

	.nakabayashi-post-card__thumb {
		width: 160px;
	}
}

@media screen and (min-width: 900px) {
	.nakabayashi-post-card {
		grid-template-columns: 120px minmax(0, 1fr);
		gap: 0.75rem 1rem;
	}

	.nakabayashi-post-card__thumb {
		width: 120px;
	}
}

/* Homepage embed (index.html) */
.nakabayashi-home-news.nakabayashi-post-list {
	margin: 1.5rem 0 0;
	padding: 0 1rem;
}

.nakabayashi-search-form {
	display: flex;
	gap: 0.5rem;
	margin: 0 0 2rem;
	max-width: 32rem;
}

.nakabayashi-search-form input[type="search"] {
	flex: 1;
	padding: 0.5rem 0.75rem;
	border: 1px solid #ccc;
}

.nakabayashi-search-form button {
	padding: 0.5rem 1rem;
	cursor: pointer;
}

.markdown-body .entry-content img {
	max-width: 100%;
	height: auto;
}

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

/* Article body: always light (github-markdown.css follows OS dark mode) */
.nakabayashi-blog-main .markdown-body {
	color-scheme: light;
	background-color: #fff;
	color: #524a3e;
	--color-fg-default: #524a3e;
	--color-fg-muted: #837256;
	--color-fg-subtle: #6e7781;
	--color-canvas-default: #ffffff;
	--color-canvas-subtle: #f6f8fa;
	--color-border-default: #e8e0d4;
	--color-border-muted: #e8e0d4;
	--color-neutral-muted: rgba(131, 114, 86, 0.15);
	--color-accent-fg: #837256;
	--color-accent-emphasis: #837256;
}

@media (prefers-color-scheme: dark) {
	.nakabayashi-blog-main .markdown-body {
		color-scheme: light;
		background-color: #fff;
		color: #524a3e;
		--color-fg-default: #524a3e;
		--color-fg-muted: #837256;
		--color-fg-subtle: #6e7781;
		--color-canvas-default: #ffffff;
		--color-canvas-subtle: #f6f8fa;
		--color-border-default: #e8e0d4;
		--color-border-muted: #e8e0d4;
		--color-neutral-muted: rgba(131, 114, 86, 0.15);
		--color-accent-fg: #837256;
		--color-accent-emphasis: #837256;
	}

	.nakabayashi-blog-main .markdown-body table tr {
		background-color: #fff;
	}

	.nakabayashi-blog-main .markdown-body table tr:nth-child(2n) {
		background-color: #f6f8fa;
	}
}

.nakabayashi-blog-main .markdown-body .entry-content a {
	color: #837256;
}

.nakabayashi-blog-main .markdown-body dl dt {
	font-style: normal;
}

/* Blog two-column layout */
.nakabayashi-blog-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
	gap: clamp(30px, 4vw, 60px);
	align-items: start;
}

/* ロゴ h1→div 化でヘッダーが縮むのを補正（静的サイトは h1 の margin で約100px） */
@media screen and (min-width: 900px) {
	#container {
		position: relative;
	}

	#container header.head {
		min-height: 100px;
		box-sizing: border-box;
	}

	#container header.head #logo {
		margin: 0;
		line-height: 0;
	}
}

/* cont3.css の main p / main h4 余白をブログ一覧・サイドバーで無効化 */
.nakabayashi-blog-main .nakabayashi-post-card p,
.nakabayashi-blog-sidebar p {
	margin-left: 0;
	margin-right: 0;
}

.nakabayashi-blog-main .nakabayashi-post-card__excerpt {
	margin-bottom: 0;
}

.nakabayashi-blog-main .nakabayashi-post-card h4,
.nakabayashi-blog-sidebar .nakabayashi-sidebar-title {
	margin-left: 0;
	margin-right: 0;
}

.nakabayashi-blog-main {
	min-width: 0;
}

.nakabayashi-blog-sidebar {
	min-width: 0;
}

.nakabayashi-sidebar-block {
	padding-bottom: 1.5rem;
	margin-bottom: 1.5rem;
}

.nakabayashi-sidebar-block:last-child {
	padding-bottom: 0;
	margin-bottom: 0;
}

.nakabayashi-sidebar-title {
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #c8b79c;
	color: #a49367;
	font-size: 1rem;
	font-weight: bold;
	line-height: 1.4;
}

.nakabayashi-sidebar-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nakabayashi-sidebar-list > li {
	margin: 0;
	padding: 0.75rem 0;
	border-bottom: 1px solid #e8e0d4;
	line-height: 1.6;
	word-break: break-word;
	overflow-wrap: anywhere;
	list-style: none;
}

.nakabayashi-category-accordion > .nakabayashi-cat-item {
	margin: 0;
	padding: 0;
	border-bottom: none;
	line-height: 1.6;
	word-break: break-word;
	overflow-wrap: anywhere;
	list-style: none;
}

.nakabayashi-category-accordion > .nakabayashi-cat-item:not(.has-children) {
	padding: 0.75rem 0;
	border-bottom: 1px solid #e8e0d4;
}

.nakabayashi-category-accordion > .nakabayashi-cat-item.has-children {
	padding-top: 0.75rem;
}

.nakabayashi-category-accordion,
.nakabayashi-category-accordion ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nakabayashi-category-accordion .nakabayashi-cat-item::marker {
	content: none;
}

.nakabayashi-sidebar-list a {
	display: block;
	color: #524a3e;
	text-decoration: none;
	padding: 0;
}

.nakabayashi-sidebar-list a:hover {
	color: #837256;
	text-decoration: none;
}

.nakabayashi-category-accordion > .nakabayashi-cat-item.has-children > .nakabayashi-cat-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid #e8e0d4;
}

.nakabayashi-category-accordion > .nakabayashi-cat-item.has-children > .nakabayashi-cat-row > a {
	flex: 1;
	min-width: 0;
}

.nakabayashi-cat-toggle-input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.nakabayashi-cat-toggle {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.25rem;
	margin: 0;
	padding: 0;
	border: none;
	background: none;
	color: #a49367;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
}

.nakabayashi-cat-toggle__mark::before {
	content: "＋";
}

.nakabayashi-cat-toggle-input:checked ~ .nakabayashi-cat-row .nakabayashi-cat-toggle__mark::before {
	content: "－";
}

.nakabayashi-cat-toggle:hover {
	opacity: 0.75;
}

.nakabayashi-category-accordion > .nakabayashi-cat-item.has-children > .nakabayashi-cat-children {
	display: none;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nakabayashi-category-accordion > .nakabayashi-cat-item.has-children > .nakabayashi-cat-toggle-input:checked ~ .nakabayashi-cat-children {
	display: block;
}

.nakabayashi-category-accordion .nakabayashi-cat-children .nakabayashi-cat-item {
	padding: 0.75rem 0 0.75rem 1rem;
	border-bottom: 1px solid #e8e0d4;
}

.nakabayashi-category-accordion .current-cat > a,
.nakabayashi-category-accordion .current-cat > .nakabayashi-cat-row > a {
	color: #a49367;
}

.nakabayashi-sidebar-search {
	display: flex;
	gap: 0.5rem;
	max-width: 100%;
}

.nakabayashi-sidebar-search input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 0.5rem 0.75rem;
	border: 1px solid #ccc;
	color: #524a3e;
}

.nakabayashi-sidebar-search button {
	flex-shrink: 0;
	padding: 0.5rem 1rem;
	cursor: pointer;
	background: #c8b79c;
	border: 1px solid #b9a88d;
	color: #524a3e;
}

.nakabayashi-sidebar-search button:hover {
	opacity: 0.85;
}

.nakabayashi-blog-main img,
.nakabayashi-blog-sidebar img {
	max-width: 100%;
	height: auto;
}

@media screen and (max-width: 899px) {
	.nakabayashi-blog-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}

	.nakabayashi-sidebar-search {
		flex-wrap: wrap;
	}

	.nakabayashi-sidebar-search input[type="search"],
	.nakabayashi-sidebar-search button {
		width: 100%;
	}

	/* main.js の load 前に PC用メニューが一瞬出るのを防ぐ */
	#menubar:not(.d-b) {
		display: none !important;
		animation: none;
	}

	header.head .btn {
		display: none;
	}

	#menubar_hdr {
		position: fixed;
		z-index: 101;
		cursor: pointer;
		right: 30px;
		top: 30px;
		padding: 16px 14px;
		width: 46px;
		height: 46px;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		background: rgb(180, 151, 51, 0.7);
		border-radius: 10%;
	}

	#menubar_hdr span {
		pointer-events: none;
	}

	#menubar_hdr.d-n {
		display: none !important;
	}

	#menubar.d-b {
		position: fixed;
		overflow: auto;
		z-index: 100;
		left: 0;
		top: 0;
		width: 100%;
		height: 100%;
		padding: 100px 20px 20px;
		background: rgba(0, 0, 0, 0.9);
		text-align: center;
		display: block !important;
	}

	#menubar.d-b a {
		padding: 10px;
		color: #fff;
	}

	#menubar.d-b .icons li,
	#menubar.d-b .btn-sm {
		display: inline-block;
	}

	#menubar.d-b .btn-sm li {
		display: inline-block;
	}

	#menubar.d-b .icons li {
		margin: 10px;
		font-size: 20px;
	}
}

@media screen and (min-width: 900px) {
	#menubar_hdr {
		display: none !important;
	}
}

.nakabayashi-default-thumbnail {
	display: block;
	max-width: 100%;
	height: auto;
}
