/**
 * Pattern: News index  (templates/home.html — the assigned "Posts page", /blog/)
 *
 * pages-final-sweep row 10 (2026-08-21). No Figma frame exists for this page
 * (figma-analysis-2026-08.md design gap #2: "News/blog page not designed —
 * extrapolate from starter news patterns, system-apply class, batch review").
 * This partial applies the site's existing token/spacing system to the native
 * core Query block markup already in home.html (post-featured-image/post-date/
 * post-title/post-excerpt) rather than inventing new custom card markup —
 * system-apply fidelity per the brief, not a pixel-designed card.
 *
 * Scoped to `.kd-archive--news` (set on home.html's <main> only) — templates/
 * archive.html and templates/search.html share the SAME base kd-archive /
 * kd-archive__body wrapper classes for other CPT-archive/search contexts and
 * must not pick up these rules.
 *
 * One pattern = one CSS partial (auto-enqueued by inc/enqueue.php glob).
 */

/* ── Grid ─────────────────────────────────────────────────────────────────── */

.kd-archive--news .wp-block-post-template {
	gap: var(--blg-space-md); /* 24px — matches the site's established card-grid gap */
}

/* ── Card content ─────────────────────────────────────────────────────────── */

.kd-archive--news .wp-block-post-featured-image img {
	object-fit: cover;
	width: 100%;
}

/* Placeholder well when a post has no featured image — same neutral fill
   convention as card-grid.css / news-featured.css. */
.kd-archive--news .wp-block-post-featured-image:empty,
.kd-archive--news .wp-block-post-featured-image:not(:has(img)) {
	background-color: var(--blg-color-neutral-100);
	aspect-ratio: 7 / 6;
	border-radius: var(--blg-radius-md);
}

.kd-archive--news .wp-block-post-date {
	font-family: var(--blg-font-body);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.kd-archive--news .wp-block-post-title {
	font-family: var(--blg-font-heading);
	font-weight: 800;
	color: var(--blg-color-contrast);
	line-height: 1.3;
}

.kd-archive--news .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}

.kd-archive--news .wp-block-post-title a:hover,
.kd-archive--news .wp-block-post-title a:focus-visible {
	color: var(--blg-color-primary);
}

.kd-archive--news .wp-block-post-excerpt {
	font-family: var(--blg-font-body);
	color: var(--blg-color-body);
	line-height: 1.65;
}

.kd-archive--news .wp-block-post-excerpt__more-link {
	color: var(--blg-color-primary);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.kd-archive--news .wp-block-post-excerpt__more-link:hover,
.kd-archive--news .wp-block-post-excerpt__more-link:focus-visible {
	color: var(--blg-color-secondary);
}

/* ── Pagination ───────────────────────────────────────────────────────────── */

.kd-archive--news .wp-block-query-pagination a {
	font-family: var(--blg-font-body);
	font-weight: 700;
	color: var(--blg-color-primary);
	text-decoration: none;
}

.kd-archive--news .wp-block-query-pagination a:hover,
.kd-archive--news .wp-block-query-pagination a:focus-visible {
	text-decoration: underline;
}

.kd-archive--news .wp-block-query-pagination .page-numbers.current {
	font-weight: 800;
	color: var(--blg-color-contrast);
}

/* ── No-results ───────────────────────────────────────────────────────────── */

.kd-archive--news .wp-block-query-no-results p {
	color: var(--blg-color-body);
	font-size: var(--blg-size-body-lg);
	text-align: center;
}

/* ── Responsive — the block's fixed columnCount:3 has no built-in collapse
   (no minimumColumnWidth set in home.html), so without this the grid would
   squeeze 3 columns at every width. Ladder matches the site-wide convention
   (card-grid.css / member-grid.css): 3 → 2 → 1. ────────────────────────────── */

@media (max-width: 1023.98px) {
	.kd-archive--news .wp-block-post-template {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 767.98px) {
	.kd-archive--news .wp-block-post-template {
		grid-template-columns: 1fr !important;
	}
}
