/**
 * ブログ一覧・カテゴリ絞り込み・記事本文・アルバム（ギャラリーブロック）・ライトボックス。
 * カードで囲わず、ヘアラインのみで区切る（design-policy.md）。
 *
 * @package goonies
 */

/* 投稿一覧。アイキャッチが無い記事はサムネイル領域ごと出ない（要素自体を出力しない） */
.post-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* 記事間（第2階層。design-policy.md 2章） */
.post-list__item {
	padding: calc(var(--space-tier-2) / 2) 0;
	border-bottom: var(--rule-2);
	transition: background var(--duration-standard) var(--ease-standard);
}

.post-list__item:first-child {
	padding-top: 0;
}

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

/* リスト行ホバー：背景をごく淡く（design-policy.md 9章） */
.post-list__item:hover {
	background: var(--c-hover);
}

.post-list__thumbnail {
	display: block;
	margin: 0 0 16px;
}

.post-list__thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--radius-none);
}

.post-list__date {
	font-family: var(--f-display);
	font-weight: var(--fw-display-regular);
	font-size: var(--fs-annotation);
	letter-spacing: var(--ls-number);
	font-variant-numeric: tabular-nums;
	color: var(--c-gray-50);
	margin: 0 0 6px;
}

.post-list__title {
	margin: 0 0 8px;
	font-family: var(--f-display);
	font-weight: var(--fw-display-regular);
	font-size: var(--fs-list-heading);
}

.post-list__title a {
	text-decoration: none;
	color: var(--c-ink);
}

.post-list__excerpt {
	color: var(--c-gray-70);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
}

.post-list__excerpt p {
	margin: 0;
}

/* カテゴリ絞り込み。ページ遷移する通常のリンク。選択状態は下線のみ（赤は使わない） */
.blog-filter {
	margin: 0 0 32px;
}

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

.blog-filter__link {
	display: inline-flex;
	align-items: center;
	min-height: var(--tap-min);
	font-family: var(--f-display);
	font-weight: var(--fw-display-regular);
	font-size: var(--fs-list-heading);
	color: var(--c-gray-50);
	text-decoration: none;
}

.blog-filter__link.is-active {
	color: var(--c-ink);
	font-weight: var(--fw-display-medium);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* 個別記事の投稿日（Archivo、更新日は出さない） */
.entry-date {
	font-family: var(--f-display);
	font-weight: var(--fw-display-regular);
	font-size: var(--fs-annotation);
	letter-spacing: var(--ls-number);
	font-variant-numeric: tabular-nums;
	color: var(--c-gray-50);
	margin: 0 0 24px;
}

/* 本文（読み物レイアウト）。見出し・段落・画像・リスト・引用のスタイル */
.entry-content h2 {
	font-family: var(--f-body);
	font-weight: var(--fw-body-medium);
	font-size: var(--fs-article-h2);
	line-height: 1.4;
	color: var(--c-ink);
	margin: 40px 0 16px;
}

.entry-content h3 {
	font-family: var(--f-body);
	font-weight: var(--fw-body-medium);
	font-size: var(--fs-article-h3);
	line-height: 1.5;
	color: var(--c-ink);
	margin: 32px 0 12px;
}

.entry-content h2:first-child,
.entry-content h3:first-child {
	margin-top: 0;
}

.entry-content p {
	margin: 0 0 24px;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 24px;
	padding-left: 1.4em;
}

.entry-content li + li {
	margin-top: 8px;
}

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

.entry-content img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius-none);
}

.entry-content figure {
	margin: 0 0 24px;
}

.entry-content figcaption {
	font-size: var(--fs-annotation);
	color: var(--c-gray-50);
	margin-top: 8px;
}

.entry-content blockquote {
	margin: 0 0 24px;
	padding-left: 16px;
	border-left: 2px solid var(--c-gray-25);
	color: var(--c-gray-70);
	font-style: italic;
}

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

/* 記事末尾の前後リンク */
.entry-nav {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin-top: var(--space-section);
	padding-top: 24px;
	border-top: 0.5px solid var(--c-gray-15);
}

.entry-nav__link {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-width: 48%;
	text-decoration: none;
	color: var(--c-ink);
}

.entry-nav__link--next {
	text-align: right;
	margin-left: auto;
}

.entry-nav__label {
	font-family: var(--f-display);
	font-weight: var(--fw-display-regular);
	font-size: var(--fs-annotation);
	letter-spacing: var(--ls-label);
	text-transform: uppercase;
	color: var(--c-gray-50);
}

.entry-nav__title {
	font-size: var(--fs-body);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* アルバム: 標準のギャラリーブロック（core/gallery）にスタイルを当てる。
   角丸なし、ヘアライン（1pxのグリッド地）で区切る。loading=lazyはWP core側で既定付与される */
.wp-block-gallery {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1px;
	background: var(--c-gray-15);
	margin: 0 0 var(--space-section);
	padding: 0;
	list-style: none;
}

@media (min-width: 601px) {
	.wp-block-gallery {
		grid-template-columns: repeat(3, 1fr);
	}
}

.wp-block-gallery .wp-block-image,
.wp-block-gallery figure {
	margin: 0;
	background: var(--c-paper);
}

.wp-block-gallery img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: var(--radius-none);
}

.wp-block-gallery figcaption {
	font-size: var(--fs-annotation);
	color: var(--c-gray-50);
	padding: 8px;
	margin: 0;
}

/* ライトボックス（素のJS、assets/js/gallery-lightbox.js） */
.lightbox {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(20, 20, 20, 0.92);
	padding: 24px;
	z-index: 200;
}

.lightbox.is-open {
	display: flex;
}

.lightbox__image {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.lightbox__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: var(--tap-min);
	height: var(--tap-min);
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	color: var(--c-paper);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

body.has-lightbox-open {
	overflow: hidden;
}
