/* ---------------------------------------------------------------------------
   News (blog)  —  templates home / archive / search / index / single
   and parts/post-grid, post-topics, post-cta. There is no blog mockup; this
   reuses the subpage language from components.css (hero band, bands, 16px
   bordered tiles, dark CTA band) and adds only what posts need.

   Markup contract:
     header.agenda-page-hero.agenda-news-hero     listing hero
       .agenda-news-hero-copy                     eyebrow + h1 + .lede (search: + form.agenda-news-search)
       nav.agenda-news-topics                     "Browse by topic" + category pills
     section.agenda-band.agenda-news-band         listing band
       .agenda-post-grid > li > article.agenda-post-card
         .agenda-post-card-media / .agenda-post-card-body > .agenda-post-meta
       .agenda-news-pagination
     article.agenda-post
       header.agenda-page-hero.agenda-post-hero   breadcrumbs, columns: copy | image
       .agenda-post-body > .agenda-post-column    720px column, flush left in the 1160px wrap
         .agenda-prose (post content), nav.agenda-post-nav
     section.agenda-band.agenda-post-related      3 cards, same grid

   Load order: assets/css/*.css load alphabetically, so this file comes BEFORE
   components.css. Overrides of .agenda-page-hero rules therefore use the
   compound selector (.agenda-page-hero.agenda-post-hero) to win on specificity.
--------------------------------------------------------------------------- */

/* ---- Listing hero ------------------------------------------------------ */
/* Copy sits in a flow group so max-widths keep it flush left; a max-width on a
   direct child of the constrained hero would centre it. */
.agenda-news-hero-copy > * { max-width: 760px; margin-block: 0; }
.agenda-page-hero.agenda-news-hero h1 { margin-block: 10px 0 !important; }
.agenda-page-hero.agenda-news-hero .lede { margin-block: 18px 0 !important; }
.agenda-news-hero .lede > p { margin: 0; }
.agenda-page-hero.agenda-news-hero > :last-child { margin-block-end: 0; }

/* Topic pills (core/terms-query → ul.agenda-news-topic-list > li > p > a) */
.agenda-news-hero .agenda-news-topics { margin-block-start: 34px; gap: 10px 14px; }
.agenda-news-topics > * { margin: 0; }
.agenda-news-topics-label {
	color: var(--muted);
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.agenda-news-topic-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.agenda-news-topic-list > li,
.agenda-news-topic-list .wp-block-term-name { margin: 0; }
.agenda-news-topic-list a {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 5px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: #fff;
	color: var(--ink);
	font-size: .86rem;
	font-weight: 500;
	line-height: 1.3;
	transition: border-color .2s, color .2s, background .2s;
}
.agenda-news-topic-list a:hover { border-color: var(--green); color: var(--green-dark); }
.agenda-news-topic-list a[aria-current] { border-color: var(--green-dark); background: var(--green-dark); color: #fff; }

/* Search form in the search hero */
.agenda-news-hero-copy > .agenda-news-search { max-width: 560px; margin-block-start: 28px; }
.agenda-news-search .wp-block-search__inside-wrapper { gap: 8px; }
.agenda-news-search .wp-block-search__input {
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid #a8b2a5;
	border-radius: 7px;
	background: #fff;
	font: inherit;
}
.agenda-news-search .wp-block-search__input:focus { border-color: var(--green); outline: 3px solid #8fc875; outline-offset: 1px; }
.agenda-news-search .wp-block-search__button {
	min-height: 48px;
	margin: 0;
	padding: 10px 20px;
	border: 0;
	border-radius: 7px;
	background: var(--green-dark);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}
.agenda-news-search .wp-block-search__button:hover { background: var(--green); }

/* ---- Card grid --------------------------------------------------------- */
/* Six tracks so any count fills its rows: cards take two tracks (three per
   row). When the count leaves one card over (10 per page → 1 + 9) the first
   card spans the row as a lead; when it leaves two, the first two take half
   each. Selectors beat core's generated grid-template-columns. */
.wp-block-post-template.agenda-post-grid.is-layout-grid {
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 22px;
}
.agenda-post-grid > li { display: flex; grid-column: span 2; margin: 0; }
.agenda-post-grid > li:first-child:nth-last-child(3n+1) { grid-column: 1 / -1; }
.agenda-post-grid > li:first-child:nth-last-child(3n+2),
.agenda-post-grid > li:first-child:nth-last-child(3n+2) + li { grid-column: span 3; }

.agenda-post-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: #fff;
	transition: border-color .25s, box-shadow .25s, transform .25s;
}
.agenda-post-card:hover,
.agenda-post-card:focus-within { border-color: #9ab18f; box-shadow: var(--shadow); transform: translateY(-4px); }
.agenda-post-card > * { margin-block: 0; }

.agenda-post-card .wp-block-post-featured-image { margin: 0; overflow: hidden; background: var(--green-soft); }
.agenda-post-card .wp-block-post-featured-image a { display: block; height: 100%; }
.agenda-post-card .wp-block-post-featured-image img { display: block; transition: transform .5s ease; }
.agenda-post-card:hover .wp-block-post-featured-image img { transform: scale(1.03); }

.agenda-post-card-body { display: flex; flex: 1; flex-direction: column; padding: 22px 24px 26px; }
.agenda-post-card-body > * { margin-block: 0; }

.agenda-post-meta { gap: 4px 14px; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.agenda-post-meta > * { margin: 0; }
.agenda-post-meta .wp-block-post-terms {
	color: var(--green);
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.agenda-post-meta .wp-block-post-terms a:hover { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }

.agenda-post-card .wp-block-post-title {
	margin-block: 10px 8px;
	font-size: 1.2rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
}
.agenda-post-card .wp-block-post-title a:hover { color: var(--green-dark); }
.agenda-post-card .wp-block-post-excerpt { color: var(--muted); font-size: .95rem; line-height: 1.6; }
.agenda-post-card .wp-block-post-excerpt__excerpt {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

/* Lead card: image left, text right */
@media (min-width: 901px) {
	.agenda-post-grid > li:first-child:nth-last-child(3n+1) .agenda-post-card { flex-direction: row; }
	.agenda-post-grid > li:first-child:nth-last-child(3n+1) .wp-block-post-featured-image { flex: 0 0 56%; align-self: stretch; }
	.agenda-post-grid > li:first-child:nth-last-child(3n+1) .agenda-post-card-body { justify-content: center; padding: 40px 44px; }
	.agenda-post-grid > li:first-child:nth-last-child(3n+1) .wp-block-post-title { font-size: clamp(1.5rem, 2.3vw, 2rem); line-height: 1.2; margin-block: 12px; }
	.agenda-post-grid > li:first-child:nth-last-child(3n+1) .wp-block-post-excerpt { font-size: 1.02rem; }
	.agenda-post-grid > li:first-child:nth-last-child(3n+1) .wp-block-post-excerpt__excerpt { -webkit-line-clamp: 4; line-clamp: 4; }
}

/* ---- Listing extras ---------------------------------------------------- */
.agenda-news-count { margin-block: 0 22px; color: var(--muted); font-size: .9rem; }
.agenda-news-empty { max-width: 760px; color: var(--muted); font-size: 1.05rem; }
.agenda-news-empty a { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }

.agenda-news-pagination { gap: 12px; margin-block-start: 48px; font-size: .92rem; }
.agenda-news-pagination .wp-block-query-pagination-previous,
.agenda-news-pagination .wp-block-query-pagination-next {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 9px 16px;
	border: 1px solid #a8b2a5;
	border-radius: 7px;
	background: #fff;
	color: var(--ink);
	font-weight: 600;
	transition: border-color .2s, color .2s;
}
.agenda-news-pagination .wp-block-query-pagination-previous:hover,
.agenda-news-pagination .wp-block-query-pagination-next:hover { border-color: var(--green); color: var(--green-dark); }
.agenda-news-pagination .wp-block-query-pagination-previous-arrow,
.agenda-news-pagination .wp-block-query-pagination-next-arrow { margin: 0; }
.agenda-news-pagination .wp-block-query-pagination-numbers { display: flex; flex-wrap: wrap; gap: 4px; }
.agenda-news-pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding: 0 8px;
	border: 1px solid transparent;
	border-radius: 7px;
	color: var(--ink);
	font-weight: 500;
}
.agenda-news-pagination a.page-numbers:hover { border-color: var(--line); background: #fff; color: var(--green-dark); }
.agenda-news-pagination .page-numbers.current { background: var(--green-dark); color: #fff; font-weight: 600; }
.agenda-news-pagination .page-numbers.dots { min-width: 24px; padding: 0; }

/* ---- Single post: hero ------------------------------------------------- */
.agenda-page-hero.agenda-post-hero { padding-block: 64px 72px; }
.agenda-post-hero .wp-block-breadcrumbs li:last-child {
	max-width: 42ch;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.agenda-post-hero .eyebrow a:hover { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
.agenda-page-hero.agenda-post-hero h1 {
	font-size: clamp(2.15rem, 3.7vw, 3.3rem);
	line-height: 1.1;
	margin-block: 12px 18px !important;
	text-wrap: balance;
}
.agenda-post-hero-meta { gap: 6px 14px; color: var(--muted); font-size: .92rem; }
.agenda-post-hero-meta > * { margin: 0; }
.agenda-post-hero-meta > * + *::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 4px;
	margin-inline-end: 14px;
	border-radius: 50%;
	background: #9ab18f;
	vertical-align: middle;
}
.agenda-post-hero-media .wp-block-post-featured-image {
	margin: 0;
	overflow: hidden;
	border-radius: 18px;
	box-shadow: 0 18px 50px rgba(24, 54, 19, .125);
}
.agenda-post-hero-media .wp-block-post-featured-image img { display: block; width: 100%; height: auto; }
/* Posts without a featured image: drop the empty column. */
.agenda-post-hero .agenda-post-hero-media:not(:has(img)) { display: none; }

/* ---- Single post: body ------------------------------------------------- */
.agenda-post-body { padding-block: 56px 88px; }

.agenda-prose { color: #283029; font-size: 1.075rem; line-height: 1.75; }
.agenda-prose > * { margin-block: 0; }
.agenda-prose > * + * { margin-block-start: 1.25em; }
.agenda-prose h2,
.agenda-prose h3,
.agenda-prose h4 { color: var(--ink); font-weight: 600; letter-spacing: -.01em; }
.agenda-prose h2 { margin-block-start: 1.9em; font-size: clamp(1.5rem, 2.4vw, 1.85rem); line-height: 1.25; }
.agenda-prose h3 { margin-block-start: 1.7em; font-size: 1.3rem; line-height: 1.3; }
.agenda-prose h4 { margin-block-start: 1.5em; font-size: 1.1rem; line-height: 1.35; }
.agenda-prose > :is(h2, h3, h4) + * { margin-block-start: .6em; }
.agenda-prose strong { color: var(--ink); font-weight: 600; }
.agenda-prose a:where(:not(.wp-element-button)) {
	color: var(--green-dark);
	text-decoration: underline;
	text-decoration-color: #9abb8b;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
.agenda-prose a:where(:not(.wp-element-button)):hover { color: var(--green); text-decoration-color: currentColor; }
.agenda-prose ul,
.agenda-prose ol { padding-inline-start: 1.4em; }
.agenda-prose li + li { margin-block-start: .45em; }
.agenda-prose li > :is(ul, ol) { margin-block-start: .45em; }
.agenda-prose li::marker { color: var(--green); }
.agenda-prose ol > li::marker { font-weight: 600; }
.agenda-prose blockquote {
	margin-inline: 0;
	padding: 4px 0 4px 22px;
	border-inline-start: 3px solid var(--green);
	color: var(--ink);
	font-family: var(--wp--preset--font-family--roboto-slab);
	font-size: 1.2rem;
	line-height: 1.55;
}
.agenda-prose blockquote > :last-child { margin-block-end: 0; }
.agenda-prose blockquote cite { display: block; margin-block-start: 8px; color: var(--muted); font-family: var(--wp--preset--font-family--poppins); font-size: .88rem; font-style: normal; }
.agenda-prose figure { margin-inline: 0; }
.agenda-prose img { max-width: 100%; height: auto; border-radius: 12px; }
.agenda-prose figcaption { margin-block-start: 8px; color: var(--muted); font-size: .86rem; }
.agenda-prose hr { margin-block: 2.4em; border: 0; border-top: 1px solid var(--line); }
.agenda-prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.agenda-prose th,
.agenda-prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; }
.agenda-prose code { padding: .1em .35em; border-radius: 4px; background: var(--wash); font-size: .9em; }
.agenda-prose iframe { max-width: 100%; }

/* Previous / next */
.agenda-post-nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-block-start: 56px !important;
	padding-block-start: 32px;
	border-top: 1px solid var(--line);
}
.agenda-post-nav > * { margin: 0; }
.agenda-post-nav > :empty { display: none; } /* no older/newer post */
.agenda-post-nav .post-navigation-link-next { grid-column: 2; text-align: end; }
.agenda-post-nav a {
	display: block;
	box-sizing: border-box;
	height: 100%;
	padding: 18px 20px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: #fff;
	transition: border-color .25s, box-shadow .25s;
}
.agenda-post-nav a:hover { border-color: #9ab18f; box-shadow: var(--shadow); }
.agenda-post-nav .post-navigation-link__label {
	display: block;
	margin-block-end: 6px;
	color: var(--green);
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.agenda-post-nav .post-navigation-link__title {
	display: block;
	color: var(--ink);
	font-family: var(--wp--preset--font-family--roboto-slab);
	font-size: 1.02rem;
	font-weight: 600;
	line-height: 1.35;
}

/* Related: section head → grid spacing comes from components.css */
.agenda-post-related .agenda-post-card .wp-block-post-title { font-size: 1.15rem; }

/* ---- Responsive (components.css breakpoints 900 / 700) ------------------ */
@media (max-width: 900px) {
	.wp-block-post-template.agenda-post-grid.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
	.agenda-post-grid > li,
	.agenda-post-grid > li:first-child:nth-last-child(3n+1),
	.agenda-post-grid > li:first-child:nth-last-child(3n+2),
	.agenda-post-grid > li:first-child:nth-last-child(3n+2) + li { grid-column: span 1; }
	/* Two per row: an odd count leads with one full-width card. */
	.agenda-post-grid > li:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
	.agenda-page-hero.agenda-post-hero { padding-block: 52px 58px; }
	.agenda-post-hero-media .wp-block-post-featured-image { max-width: 640px; }
	.agenda-post-body { padding-block: 44px 72px; }
}
@media (max-width: 700px) {
	.wp-block-post-template.agenda-post-grid.is-layout-grid { grid-template-columns: minmax(0, 1fr); }
	.agenda-post-grid > li,
	.agenda-post-grid > li:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
	.agenda-post-card-body { padding: 20px 20px 24px; }
	.agenda-page-hero.agenda-news-hero h1 { font-size: 2.4rem; }
	.agenda-page-hero.agenda-post-hero h1 { font-size: 2.05rem; }
	.agenda-news-pagination .wp-block-query-pagination-numbers { display: none; }
	.agenda-post-nav { grid-template-columns: minmax(0, 1fr); }
	.agenda-post-nav .post-navigation-link-next { grid-column: 1; text-align: start; }
	.agenda-prose { font-size: 1.03rem; }
}
@media (prefers-reduced-motion: reduce) {
	.agenda-post-card:hover,
	.agenda-post-card:focus-within { transform: none; }
	.agenda-post-card:hover .wp-block-post-featured-image img { transform: none; }
}
