/**
 * Recent-posts block: lead story above a row of cards.
 * Scoped under .hpe-posts so it outranks the theme's heading/paragraph rules.
 */

.hpe-posts { width: 100%; }

/* ---------- date ---------- */

.hpe-posts .hpe-post__date {
	font-family: Inter, sans-serif;
	font-size: 13.5px;
	letter-spacing: 0.02em;
	color: #55696B;
	margin: 0 0 14px;
}

/* ---------- lead story ---------- */

.hpe-posts .hpe-posts__lead {
	display: grid;
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
	/* top aligned so the title sits level with the top of the image */
	align-items: start;
	gap: clamp(28px, 3.4vw, 56px);
	margin: 0 0 clamp(36px, 4vw, 60px);
}

.hpe-posts .hpe-posts__media {
	display: block;
	border-radius: 14px;
	overflow: hidden;
	/* 3:2 rather than 4:3 - shorter, but still taller than the copy column so a
	   longer headline later has somewhere to grow before it runs past the image */
	aspect-ratio: 3 / 2;
}

.hpe-posts .hpe-posts__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hpe-posts .hpe-posts__body {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.hpe-posts .hpe-posts__title {
	font-family: Inter, sans-serif;
	font-weight: 700;
	font-size: clamp(24px, 2.5vw, 36px);
	line-height: 1.18;
	letter-spacing: -0.01em;
	color: #004C6D;
	margin: 0 0 8px;
	text-wrap: balance;
}

.hpe-posts .hpe-posts__excerpt {
	font-family: Inter, sans-serif;
	font-size: 16px;
	line-height: 1.62;
	color: #202322;
	margin: 0 0 24px;
	max-width: 68ch;
}

/* ---------- card row ---------- */

.hpe-posts .hpe-posts__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(18px, 2vw, 30px);
}

.hpe-posts .hpe-post-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #E3E9E9;
	border-radius: 14px;
	overflow: hidden;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.hpe-posts .hpe-post-card:hover,
.hpe-posts .hpe-post-card:focus-within {
	border-color: #156082;
	transform: translateY(-2px);
}

.hpe-posts .hpe-post-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.hpe-posts .hpe-post-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hpe-posts .hpe-post-card__body {
	padding: 18px 20px 20px;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

.hpe-posts .hpe-post-card__title {
	font-family: Inter, sans-serif;
	font-weight: 700;
	font-size: 18px;
	line-height: 1.28;
	color: #004C6D;
	margin: 0 0 6px;
	text-wrap: balance;
}

.hpe-posts .hpe-posts__title a,
.hpe-posts .hpe-post-card__title a {
	color: inherit;
	text-decoration: none;
}

.hpe-posts .hpe-posts__title a:hover,
.hpe-posts .hpe-posts__title a:focus-visible,
.hpe-posts .hpe-post-card__title a:hover,
.hpe-posts .hpe-post-card__title a:focus-visible {
	/* no underline: colour shift carries the hover instead */
	text-decoration: none;
	color: #156082;
}

.hpe-posts .hpe-posts__cta { margin: 4px 0 0; }

.hpe-posts .hpe-post-card .hpe-posts__cta { margin-top: auto; }

.hpe-posts .hpe-post-card__excerpt {
	font-family: Inter, sans-serif;
	font-size: 14.5px;
	line-height: 1.55;
	color: #55696B;
	margin: 0 0 18px;
}

@media (prefers-reduced-motion: reduce) {
	.hpe-posts .hpe-post-card { transition: none; }
	.hpe-posts .hpe-post-card:hover { transform: none; }
}

/* ---------- narrow ---------- */

@media (max-width: 1023px) {

	.hpe-posts .hpe-posts__lead { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.hpe-posts .hpe-posts__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639px) {

	.hpe-posts .hpe-posts__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- story buttons ---------- */

/*
 * Teal matched to the header bar (#156082), white label, lime arrow.
 *
 * The arrow is Move Yellow rather than Lime Burst: on this teal Lime Burst is
 * 2.69:1, under the 3:1 a control needs to be perceivable. Move Yellow is the
 * next colour along in the palette and clears it at 3.33:1, at practically the
 * same hue. The white label is 4.84:1.
 *
 * The class is repeated to outrank Elementor's per-element rules for element
 * 928ca5e without !important.
 */

.hpe-posts .hpe-posts__cta.hpe-posts__cta.hpe-posts__cta .elementor-button {
	background-color: #156082;
	color: #fff;
}

.hpe-posts .hpe-posts__cta.hpe-posts__cta.hpe-posts__cta .elementor-button:hover,
.hpe-posts .hpe-posts__cta.hpe-posts__cta.hpe-posts__cta .elementor-button:focus-visible {
	background-color: #004C6D;
	color: #fff;
}

.hpe-posts .hpe-posts__cta.hpe-posts__cta.hpe-posts__cta .vamtam-btn-icon-wrap {
	background-color: #156082;
}

.hpe-posts .hpe-posts__cta.hpe-posts__cta.hpe-posts__cta .elementor-button:hover .vamtam-btn-icon-wrap,
.hpe-posts .hpe-posts__cta.hpe-posts__cta.hpe-posts__cta .elementor-button:focus-visible .vamtam-btn-icon-wrap {
	background-color: #004C6D;
}

.hpe-posts .hpe-posts__cta.hpe-posts__cta.hpe-posts__cta .vamtam-btn-icon-wrap i,
.hpe-posts .hpe-posts__cta.hpe-posts__cta.hpe-posts__cta .elementor-button-icon i {
	color: #FFC000;
}

/* ---------- button shape, page-independent ---------- */

/*
 * The button clones Elementor element 928ca5e, whose layout rules only ship in
 * the home page's stylesheet. Restated here so the pill + circle-arrow shape
 * holds on every page the block appears on.
 */

.hpe-posts .hpe-posts__cta { --vamtam-gap: 0px; --vamtam-icon-size: 12px; --vamtam-icon-padding-ttl: 36px; }

.hpe-posts .hpe-posts__cta .elementor-button-content-wrapper { flex-direction: row-reverse; gap: 0; }

.hpe-posts .hpe-posts__cta.vamtam-has-icon-styles .elementor-button-icon :is(svg, i) {
	font-size: 12px;
	padding: 18px;
	color: #FFC000;
	fill: #FFC000;
}

.hpe-posts .hpe-posts__cta.vamtam-has-outside-icon .vamtam-btn-icon-wrap { border-radius: 100px; }
