/* =========================================================
   縁結びラボラトリー ブログ — ブログ用の追加スタイル

   見た目の本体はメインサイトの style.css（https://enmusubi-labo.jp/assets/css/style.css）。
   ここには「メインサイトに無い、ブログにしか出てこない部分」だけを書く。
   色・余白・角丸などはメインサイトの CSS 変数（--color-accent など）を使い、値を直書きしない。

   01. WordPress 由来の調整（管理バー・スクリーンリーダー用テキスト）
   02. ページ上部の見出し（.page-hero の調整）
   03. 本文エリアの枠・パンくず
   04. カテゴリーの絞り込み
   05. 記事一覧カード
   06. ページネーション
   07. 記事本文（.entry-content）
   08. 記事末尾（タグ・前後の記事・一覧へ戻る）
   09. 検索フォーム・該当なし・404
   ========================================================= */

/* ---------------------------------------------------------
   01. WordPress 由来の調整
   --------------------------------------------------------- */

/* ログイン中は上部に管理バーが出るので、固定ヘッダーとスマホメニューを下げる */
.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 960px) {
	.admin-bar .global-nav {
		top: calc(var(--header-h) + 32px);
		height: calc(100dvh - var(--header-h) - 32px);
	}
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
	.admin-bar .global-nav {
		top: calc(var(--header-h) + 46px);
		height: calc(100dvh - var(--header-h) - 46px);
	}
}

/* 画面には出さず、読み上げソフトにだけ伝えるテキスト */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	width: auto;
	height: auto;
	margin: 0;
	padding: 8px 16px;
	clip: auto;
	clip-path: none;
	background: var(--color-bg);
	color: var(--color-primary);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow);
	z-index: 1000;
}

/* ---------------------------------------------------------
   02. ページ上部の見出し
   --------------------------------------------------------- */
.blog-hero-lead {
	font-size: 15px;
	line-height: 1.9;
	color: var(--color-text-sub);
}

/* 記事ページ：タイトルが長くなるので一回り小さく */
.blog-hero--single {
	padding-bottom: 48px;
}

.blog-hero--single .page-hero-title {
	font-size: clamp(22px, 3.2vw, 32px);
	line-height: 1.5;
}

.page-hero-meta time {
	font-family: var(--font-sans);
}

.blog-hero-updated {
	margin-left: 1em;
}

/* ---------------------------------------------------------
   03. 本文エリアの枠・パンくず
   --------------------------------------------------------- */
.blog-body {
	padding-top: 20px;
	padding-bottom: clamp(64px, 10vw, 120px);
}

.breadcrumb {
	margin-bottom: clamp(32px, 5vw, 48px);
}

.breadcrumb-list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 0;
	font-size: 12px;
	color: var(--color-text-mute);
	line-height: 1.6;
}

.breadcrumb-item:not(:last-child)::after {
	content: "›";
	margin: 0 8px;
}

.breadcrumb-item a {
	color: var(--color-text-sub);
}

.breadcrumb-item a:hover {
	opacity: 1;
	color: var(--color-accent-dark);
}

.breadcrumb-item [aria-current="page"] {
	/* 記事タイトルが長いとき、パンくずが何行にもならないように */
	display: inline-block;
	max-width: 24em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: bottom;
}

/* ---------------------------------------------------------
   04. カテゴリーの絞り込み
   --------------------------------------------------------- */
.category-nav {
	margin-bottom: 40px;
}

.category-nav-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.category-chip {
	display: inline-block;
	padding: 6px 18px;
	font-size: 13px;
	font-weight: 500;
	color: var(--color-text-sub);
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: 999px;
	transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.category-chip:hover {
	opacity: 1;
	color: var(--color-accent-dark);
	border-color: var(--color-accent);
}

.category-chip.is-current {
	color: #fff;
	background: var(--color-accent);
	border-color: var(--color-accent);
}

/* ---------------------------------------------------------
   05. 記事一覧カード
   --------------------------------------------------------- */
.post-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px 28px;
}

@media (max-width: 960px) {
	.post-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 32px 20px;
	}
}

@media (max-width: 600px) {
	.post-grid {
		grid-template-columns: 1fr;
		gap: 28px;
	}
}

.post-card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: transform var(--transition), box-shadow var(--transition);
}

.post-card-link:hover {
	opacity: 1;
	transform: translateY(-3px);
	box-shadow: var(--shadow);
}

.post-card-thumb {
	aspect-ratio: 16 / 10;
	background: var(--color-bg-alt);
	overflow: hidden;
}

.post-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.post-card-link:hover .post-card-thumb img {
	transform: scale(1.04);
}

/* アイキャッチ未設定のときのロゴマーク */
.post-card-noimage {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}

.post-card-noimage img,
.post-card-link:hover .post-card-noimage img {
	width: auto;
	height: 40%;
	object-fit: contain;
	opacity: 0.5;
	transform: none;
}

.post-card-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 20px 22px 24px;
	flex: 1;
}

.post-card-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 12px;
	font-size: 12px;
	color: var(--color-text-mute);
	line-height: 1.5;
}

.post-card-cat {
	display: inline-block;
	padding: 2px 10px;
	font-weight: 700;
	color: var(--color-accent-dark);
	background: var(--color-bg-alt);
	border-radius: var(--radius-sm);
}

.post-card-date {
	letter-spacing: 0.05em;
}

.post-card-title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.6;
	color: var(--color-primary);
	letter-spacing: 0.02em;
}

.post-card-excerpt {
	font-size: 13px;
	line-height: 1.8;
	color: var(--color-text-sub);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------------------------------------------------------
   06. ページネーション
   --------------------------------------------------------- */
.pagination {
	margin-top: clamp(48px, 7vw, 72px);
}

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

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 8px;
	font-size: 14px;
	font-weight: 700;
	color: var(--color-text);
	border: 1px solid var(--color-border);
	border-radius: 999px;
	transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.pagination a.page-numbers:hover {
	opacity: 1;
	color: var(--color-accent-dark);
	border-color: var(--color-accent);
}

.pagination .page-numbers.current {
	color: #fff;
	background: var(--color-accent);
	border-color: var(--color-accent);
}

.pagination .page-numbers.dots {
	border-color: transparent;
	min-width: 24px;
}

/* ---------------------------------------------------------
   07. 記事本文（.entry-content）
   メインサイトの CSS は margin・list-style をリセットしているので、
   ブロックエディタが出力する素の要素に、読み物としての体裁を付け直す。
   --------------------------------------------------------- */
.entry-thumb {
	margin-bottom: 40px;
}

.entry-thumb img {
	width: 100%;
	border-radius: var(--radius-lg);
}

.entry-content {
	font-size: 16px;
	line-height: 2;
	color: var(--color-text);
	overflow-wrap: anywhere;
}

.entry-content > * + * {
	margin-top: 1.6em;
}

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

/* 見出し：h2 はメインサイトの規約ページの見出し（左の線）を大きくしたもの */
.entry-content h2 {
	margin-top: 2.6em;
	padding: 14px 18px;
	font-size: clamp(20px, 2.6vw, 24px);
	font-weight: 900;
	line-height: 1.5;
	color: var(--color-primary);
	letter-spacing: 0.03em;
	background: var(--color-bg-alt);
	border-left: 5px solid var(--color-accent);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.entry-content h3 {
	margin-top: 2.2em;
	padding-bottom: 10px;
	font-size: clamp(18px, 2.2vw, 20px);
	font-weight: 700;
	line-height: 1.5;
	color: var(--color-primary);
	border-bottom: 2px solid var(--color-border);
	position: relative;
}

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

.entry-content h4 {
	margin-top: 2em;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.6;
	color: var(--color-accent-dark);
}

.entry-content h2 + *,
.entry-content h3 + *,
.entry-content h4 + * {
	margin-top: 1.2em;
}

.entry-content a {
	color: var(--color-accent-dark);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.entry-content a:hover {
	opacity: 1;
	text-decoration: none;
}

.entry-content strong {
	font-weight: 700;
}

/* 蛍光ペン風の強調（ブロックエディタの「ハイライト」= mark） */
.entry-content mark {
	background: linear-gradient(transparent 60%, var(--color-highlight-light) 60%);
	color: inherit;
	padding: 0 2px;
}

/* リスト：リセットされた記号を戻す */
.entry-content ul,
.entry-content ol {
	padding-left: 1.6em;
}

.entry-content ul {
	list-style: disc;
}

.entry-content ol {
	list-style: decimal;
}

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

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

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

/* 画像・キャプション */
.entry-content img {
	border-radius: var(--radius);
}

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

.entry-content .aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.entry-content .aligncenter img {
	margin-left: auto;
	margin-right: auto;
}

/* 引用 */
.entry-content blockquote {
	padding: 20px 24px;
	background: var(--color-bg-alt);
	border-left: 4px solid var(--color-border-dark);
	border-radius: 0 var(--radius) var(--radius) 0;
	font-size: 15px;
	color: var(--color-text-sub);
}

.entry-content blockquote > * + * {
	margin-top: 1em;
}

.entry-content blockquote cite {
	display: block;
	font-size: 12px;
	font-style: normal;
	color: var(--color-text-mute);
}

/* 表 */
.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14.5px;
	line-height: 1.8;
}

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

.entry-content th,
.entry-content thead td {
	font-weight: 700;
	color: var(--color-primary);
	background: var(--color-bg-alt);
}

/* WordPress 標準の表スタイルが付ける見出し行下の太線を消す */
.entry-content .wp-block-table thead {
	border-bottom: none;
}

/* スマホでは表を横スクロールさせる（ブロックエディタの表は figure で包まれる） */
.entry-content .wp-block-table {
	overflow-x: auto;
}

.entry-content .wp-block-table table {
	min-width: 480px;
}

/* 区切り線 */
.entry-content hr {
	border: none;
	border-top: 1px solid var(--color-border);
	margin: 3em 0;
}

/* コード */
.entry-content code {
	padding: 2px 6px;
	font-size: 0.9em;
	background: var(--color-bg-alt);
	border-radius: var(--radius-sm);
}

.entry-content pre {
	padding: 16px 20px;
	overflow-x: auto;
	font-size: 14px;
	line-height: 1.7;
	background: var(--color-bg-dark);
	color: #fff;
	border-radius: var(--radius);
}

.entry-content pre code {
	padding: 0;
	background: none;
}

/* ボタンブロックはメインサイトの .btn-primary に寄せる */
.entry-content .wp-block-buttons {
	justify-content: center;
}

.entry-content .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 16px 36px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: #fff;
	text-decoration: none;
	background: var(--color-accent);
	border-radius: 999px;
	box-shadow: 0 4px 14px rgba(43, 181, 190, 0.35);
	transition: transform var(--transition), background var(--transition);
}

.entry-content .wp-block-button__link:hover {
	opacity: 1;
	color: #fff;
	background: var(--color-accent-dark);
	transform: translateY(-1px);
}

/* 埋め込み（YouTube など） */
.entry-content iframe {
	max-width: 100%;
}

/* 複数ページ記事のページ送り */
.page-links {
	margin-top: 40px;
	font-size: 14px;
	font-weight: 700;
}

.page-links a,
.page-links > span:not(:first-child) {
	display: inline-block;
	margin-left: 8px;
}

/* ---------------------------------------------------------
   08. 記事末尾（タグ・前後の記事・一覧へ戻る）
   --------------------------------------------------------- */
.entry-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 48px;
}

.entry-tags a {
	display: inline-block;
	padding: 4px 12px;
	font-size: 12px;
	color: var(--color-text-sub);
	background: var(--color-bg-alt);
	border-radius: var(--radius-sm);
}

.entry-tags a::before {
	content: "#";
	margin-right: 2px;
	color: var(--color-accent-dark);
}

.post-navigation {
	margin-top: 56px;
	padding-top: 32px;
	border-top: 1px solid var(--color-border);
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.post-navigation .nav-next {
	grid-column: 2;
	text-align: right;
}

.post-navigation a {
	display: flex;
	flex-direction: column;
	gap: 4px;
	height: 100%;
	padding: 16px 20px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	transition: border-color var(--transition);
}

.post-navigation a:hover {
	opacity: 1;
	border-color: var(--color-accent);
}

.post-nav-label {
	font-size: 12px;
	font-weight: 700;
	color: var(--color-accent-dark);
}

.post-nav-title {
	font-size: 14px;
	line-height: 1.6;
	color: var(--color-primary);
}

@media (max-width: 600px) {
	.post-navigation .nav-links {
		grid-template-columns: 1fr;
	}
	.post-navigation .nav-next {
		grid-column: auto;
	}
}

.blog-back {
	margin-top: 48px;
	text-align: center;
}

/* コメント欄（コメントを受け付ける記事のみ表示） */
.comments {
	margin-top: 56px;
	padding-top: 32px;
	border-top: 1px solid var(--color-border);
	font-size: 14px;
}

.comments-title,
.comment-reply-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--color-primary);
	margin-bottom: 20px;
}

.comment-list .comment {
	padding: 16px 0;
	border-bottom: 1px solid var(--color-border);
}

.comment-list .children {
	padding-left: 24px;
}

.comment-form p {
	margin-bottom: 16px;
}

.comment-form label {
	display: block;
	font-weight: 700;
	margin-bottom: 4px;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
	width: 100%;
	padding: 10px 14px;
	font: inherit;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
}

.comment-form .submit {
	padding: 12px 28px;
	font: inherit;
	font-weight: 700;
	color: #fff;
	background: var(--color-accent);
	border: none;
	border-radius: var(--radius);
	cursor: pointer;
}

/* ---------------------------------------------------------
   09. 検索フォーム・該当なし・404
   --------------------------------------------------------- */
.search-form {
	display: flex;
	gap: 8px;
	max-width: 480px;
	margin: 24px auto 0;
}

.search-form label {
	flex: 1;
}

.search-form .search-field {
	width: 100%;
	height: 48px;
	padding: 0 16px;
	font: inherit;
	font-size: 15px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	background: var(--color-bg);
}

.search-form .search-field:focus {
	outline: none;
	border-color: var(--color-accent);
	box-shadow: 0 0 0 3px rgba(43, 181, 190, 0.2);
}

.search-form .search-submit {
	height: 48px;
	padding: 0 24px;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	background: var(--color-accent);
	border: none;
	border-radius: var(--radius);
	cursor: pointer;
	transition: background var(--transition);
}

.search-form .search-submit:hover {
	background: var(--color-accent-dark);
}

.no-results,
.error-404 {
	text-align: center;
	color: var(--color-text-sub);
	line-height: 1.9;
}
