/* ==========================================================================
   記事一覧（コアの「クエリーループ」ブロック）
     c-post-list  … クエリーループ全体
     c-post-grid  … 投稿テンプレート（グリッド）
     c-post-card  … 1件分（アイキャッチ・日付・カテゴリー・タイトル）
   数値は STUDIO 版に合わせています（3列・間隔 32px・画像の高さ 240px）。
   ========================================================================== */

.c-post-list {
	margin-block: 0 !important;
}

.c-post-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 32px !important;
}

@media (max-width: 1080px) {
	.c-post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 24px !important;
	}
}

@media (max-width: 540px) {
	.c-post-grid {
		grid-template-columns: 1fr !important;
		gap: 10px !important;
	}
}

.c-post-card {
	display: flex;
	flex-direction: column;
	gap: 16px;
	height: 100%;
	padding: 16px 0;
	border-radius: 8px;
	background: var(--wp--preset--color--base);
}

.c-post-card > * {
	margin: 0 !important;
}

.c-post-card__thumb {
	box-sizing: border-box;
	height: 242px;
	border: 1px solid var(--wp--preset--color--360-gray);
	overflow: hidden;
	border-radius: 4px;
	background: var(--wp--preset--color--base);
}

.c-post-card__thumb a {
	display: block;
	height: 100%;
}

.c-post-card__thumb img {
	width: 100%;
	height: 240px !important;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.c-post-card:hover .c-post-card__thumb img {
	transform: scale(1.04);
}

.c-post-card__meta {
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 0 !important; /* 下のタイトルまで 16px */
}

.c-post-card__date {
	font-family: var(--st-font-en);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 0.1em;
	color: var(--st-text);
}

.c-post-card__category a {
	display: inline-block;
	padding: 2px 20px;
	border: 1px solid var(--st-primary);
	border-radius: 16px;
	color: var(--st-primary);
	font-family: var(--st-font-ui);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	white-space: nowrap;
}

.c-post-card__category .wp-block-post-terms__separator,
.c-post-card__category a[href*="/category/uncategorized/"] {
	display: none; /* 「未分類」は表示しない */
}

.c-post-card__title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2; /* タイトルは 2 行まで（STUDIO 版と同じ） */
	font-family: var(--st-font-base);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--st-text);
}

.c-post-card__title a {
	display: inline; /* 2 行で切るため（コアは inline-block） */
}

@media (max-width: 540px) {
	.c-post-card {
		padding: 0 0 16px;
		border-radius: 4px;
	}

	.c-post-card__thumb {
		height: 210px;
		border-radius: 2px;
	}

	.c-post-card__thumb img {
		height: 208px !important;
	}

	.c-post-card__date {
		font-size: 14px;
	}

	.c-post-card__category a {
		padding: 2px 20px 2px 24px;
		font-size: 11px;
	}

	.c-post-card__title {
		font-weight: 500;
		line-height: 1.3;
	}
}

.is-variant-orange .c-post-card__category a {
	border-radius: 4px;
	background: var(--st-primary);
	color: var(--wp--preset--color--base);
}

.is-variant-p360 .c-post-card__title {
	font-family: var(--st-font-base);
}

.c-post-list__empty {
	padding-block: 48px;
	font-family: var(--st-font-en);
	font-size: 24px;
	text-align: center;
}

/* ページ送り（コアの「ページ送り」ブロック） */
.c-pagination {
	justify-content: center;
	gap: 8px;
	margin-top: 48px !important;
}

.c-pagination .page-numbers,
.c-pagination .wp-block-query-pagination-previous,
.c-pagination .wp-block-query-pagination-next {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	margin: 0;
	padding-inline: 12px;
	border: 1px solid var(--st-primary);
	border-radius: 999px;
	background: var(--wp--preset--color--base);
	font-family: var(--st-font-en);
	color: var(--st-primary);
}

.c-pagination .wp-block-query-pagination-numbers {
	display: flex;
	gap: 8px;
	margin: 0;
}

.c-pagination .page-numbers.current {
	background: var(--st-primary);
	color: var(--wp--preset--color--base);
}

.c-pagination .page-numbers.dots {
	border: 0;
	background: none;
}
