/* Consecutive ordinary news paragraphs use the existing 24px spacing rhythm.
   Heading, list, image and caption spacing stays with its component rules. */
.nh-article .wp-block-post-content > p:not(.nh-local-note):has(+ p:not(.nh-local-note)) {
	margin-bottom: 24px;
}

.editor-styles-wrapper p.is-style-nh-promotion-note,
.nh-article .wp-block-post-content > p.is-style-nh-promotion-note {
	color: #a32929;
}

/* Grid rows stretch independently; each excerpt carries its read link to the bottom. */
.nh-page-news .nh-news-grid {
	row-gap: 52px;
}

.nh-page-news .nh-news-grid > .wp-block-post,
.nh-page-news .nh-news-grid .wp-block-post-excerpt {
	display: flex;
	flex-direction: column;
}

.nh-page-news .nh-news-grid .wp-block-post-excerpt {
	flex-grow: 1;
}

.nh-page-news .nh-news-grid .wp-block-post-excerpt__more-text {
	display: flex;
	margin-top: auto;
}

/* Both native archives retain the saved inner pagination wrapper. */
.nh-page-news .wp-block-query-pagination,
.nh-page-news .wp-block-query-pagination-numbers {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.nh-page-news nav.wp-block-query-pagination:has(a) {
	margin-top: 52px;
}

.nh-page-news .wp-block-query-pagination > * {
	margin: 0;
}

.nh-page-news .wp-block-query-pagination-numbers {
	gap: 8px;
}

.nh-page-news .wp-block-query-pagination :is(a, .current) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid var(--nh-mint);
	border-radius: 30px;
	color: var(--nh-teal);
	background: #fff;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
}

.nh-page-news .wp-block-query-pagination .page-numbers:not(.dots) {
	padding-inline: 10px;
}

.nh-page-news .wp-block-query-pagination .current {
	border-color: var(--nh-teal);
	background: var(--nh-teal);
	color: #fff;
}

.nh-page-news .wp-block-query-pagination a:hover {
	background: var(--nh-mint-hover);
	color: var(--nh-ink);
}

.nh-page-news .wp-block-query-pagination a:active {
	background: var(--nh-mint-pressed);
	color: var(--nh-ink);
}

@media (width <= 700px) {
	.nh-page-news .nh-news-grid {
		row-gap: 40px;
	}

	.nh-page-news nav.wp-block-query-pagination:has(a) {
		margin-top: 40px;
	}
}

.nh-page-news .nh-news-grid .wp-block-post-featured-image a {
	display: block;
	overflow: hidden;
	border-radius: 8px;
}

.nh-page-news .nh-news-grid .wp-block-post-featured-image img {
	transition: transform var(--nh-motion-image) var(--nh-motion-ease);
}

.nh-page-news .nh-news-grid .nh-news-image-fallback {
	/* Match the owner-selected photo viewer color; height shares the image rules. */
	box-sizing: border-box;
	width: 100%;
	border: 2px solid #163c3b;
	background: transparent;
	transform-origin: center;
	transition: transform 220ms var(--nh-motion-ease) 50ms,
		border-color 180ms var(--nh-motion-ease) 50ms;
}

.nh-page-news .nh-news-grid .wp-block-post-title a {
	/* Clamp the link itself so its outer focus outline has no clipped ancestor. */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	transition: opacity var(--nh-motion-state) var(--nh-motion-ease);
}

@media (width > 700px) and (hover: hover) and (pointer: fine) {
	.nh-page-news .nh-news-grid .nh-news-image-fallback:hover {
		border-color: #315b59;
		transform: scale(.92);
	}

	.nh-page-news .nh-news-grid .nh-news-image-fallback:active {
		border-color: #163c3b;
		transform: none;
		transition-duration: var(--nh-motion-press);
		transition-delay: 0s;
	}
}

@media (hover: hover) and (pointer: fine) {
	.nh-page-news .nh-news-grid .wp-block-post-featured-image a:hover img {
		transform: scale(1.1);
	}

	.nh-page-news .nh-news-grid .wp-block-post-title a:hover {
		opacity: .6;
	}
}

.nh-page-news .nh-news-grid .wp-block-post-title a:active {
	opacity: 1;
	transition-duration: var(--nh-motion-press);
}

@media (prefers-reduced-motion: reduce) {
	.nh-page-news .nh-news-grid .nh-news-image-fallback,
	.nh-page-news .nh-news-grid .wp-block-post-featured-image img,
	.nh-page-news .nh-news-grid .wp-block-post-title a {
		transition: none;
	}

	.nh-page-news .nh-news-grid .nh-news-image-fallback:hover {
		transform: none;
	}
}
