/**
 * IEMA News card (News page template).
 *
 * The card shown in the News grid: a rounded featured image, the post
 * date, a 2-line navy title, a 2-line grey excerpt and a "Read Article"
 * outline button. Matches Figma frame 6281-3860 (image radius 12, navy
 * 24/26.4 title, grey #707070 14/19.6 date & excerpt, 24px stack gap).
 *
 * The surrounding grid, filter dropdown and pagination reuse the Projects
 * archive styles (.iema-projects__*), so only the card itself is defined
 * here. Scoped to .iema-news-card, so inert elsewhere. Built on the
 * shared IEMA tokens (navy #002147, Helvetica).
 */

.iema-news-card {
	display: flex;
	flex-direction: column;
	gap: 24px;
	font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
}

.iema-news-card:hover .iema-news-card__figure img {
	transform: scale(1.1);
}

.iema-news-card:hover .iema-news-card__cta {
	background-color: #00152D;
	border-color: #C1D82A;
	color: #FFFFFF;
	box-shadow: 0 5px 25px 0 rgba(0, 0, 0, 0.15);
}

.iema-news-card__figure {
	display: block;
	position: relative;
	aspect-ratio: 400 / 320;
	border-radius: 12px;
	overflow: hidden;
	background-color: #e8e8e8;
}

.iema-news-card__figure img,
.iema-news-card__placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}

.iema-news-card__placeholder {
	background: linear-gradient(135deg, #002147 0%, #0a3a6b 100%);
}

.iema-news-card__texts {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.iema-news-card__date {
	margin: 0;
	color: #707070;
	font-weight: 400;
	font-size: 14px;
	line-height: 19.6px;
}

.iema-news-card__title {
	margin: 0;
	color: #002147;
	font-weight: 700;
	font-size: 24px;
	line-height: 26.4px;
	/* Clamp to two lines so cards align across the row. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.iema-news-card__title a {
	color: inherit;
	text-decoration: none;
}

.iema-news-card__excerpt {
	margin: 0;
	color: #707070;
	font-weight: 400;
	font-size: 14px;
	line-height: 19.6px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.iema-news-card__cta {
	align-self: flex-start;
	margin-top: 4px;
	transition: background 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

@media (max-width: 1024px) {
	.iema-news-card__title {
		font-size: 22px;
		line-height: 24.2px;
	}
}

/* ==================================================================
   Single News post (single.php → iema_news_single_sections)
   Hero reuses the compact page-banner; the body renders the post's own
   the_content() in a reading column. Matches Figma 6284-3947 (desktop)
   / 6603-6627 (mobile): 40px hero title, 1240 content column, navy H2
   32/41.6 + H3 20/28, grey #767676 16/24 body, 16px image radius.
   Scoped to .iema-post-hero / .iema-post, so inert elsewhere.
   ================================================================== */

/* Hero: breadcrumb + darker left-weighted overlay, 40px title. */
.iema-page-banner.iema-post-hero .iema-page-banner__overlay {
	background: linear-gradient(
		90deg,
		rgba(0, 0, 0, 0.72) 0%,
		rgba(0, 0, 0, 0.5) 45%,
		rgba(0, 0, 0, 0.32) 100%
	);
}

.iema-post-hero .iema-page-banner__content {
	gap: 16px;
	max-width: 700px;
}

.iema-post-hero .iema-page-banner__title {
	font-size: 40px;
	line-height: 44px;
}

.iema-post-hero__sep {
	opacity: 0.7;
}

.iema-post-hero__current {
	max-width: 520px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	opacity: 0.92;
	padding-bottom: 4px;
	border-bottom: 1px solid #ffffff;
}

/* Article body -------------------------------------------------------- */
.iema-post {
	background-color: #ffffff;
	color: #002147;
	font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
}

.iema-post__inner {
	box-sizing: border-box;
	max-width: 1440px;
	margin: 0 auto;
	padding: 64px 100px 80px;
}

.iema-post-content {
	color: #767676;
	font-weight: 400;
	font-size: 16px;
	line-height: 24px;
}

.iema-post-content > :first-child {
	margin-top: 0;
}

.iema-post-content > :last-child {
	margin-bottom: 0;
}

.iema-post-content p {
	margin: 0 0 16px;
}

.iema-post-content h2 {
	margin: 32px 0 20px;
	color: #002147;
	font-weight: 700;
	font-size: 32px;
	line-height: 41.6px;
}

.iema-post-content h3 {
	margin: 32px 0 20px;
	color: #002147;
	font-weight: 700;
	font-size: 20px;
	line-height: 28px;
}

.iema-post-content a {
	color: #002147;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.iema-post-content ul,
.iema-post-content ol {
	margin: 0 0 16px;
	padding-left: 36px;
}

.iema-post-content ul {
	list-style: disc;
}

.iema-post-content ol {
	list-style: decimal;
}

.iema-post-content li {
	margin: 0 0 2px;
}

.iema-post-content li:last-child {
	margin-bottom: 0;
}

/* Inline figure (image + caption) and gallery. */
.iema-post-content figure,
.iema-post-content .iema-post-figure {
	margin: 32px 0 32px;
}

.iema-post-content img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 16px;
}

.iema-post-content figcaption {
	margin-top: 16px;
	color: #767676;
	font-weight: 400;
	font-size: 14px;
	line-height: 21px;
}

.iema-post-gallery {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin: 8px 0 0;
}

.iema-post-gallery figure {
	margin: 0;
	aspect-ratio: 608 / 400;
	border-radius: 16px;
	overflow: hidden;
}

.iema-post-gallery img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 1024px) {
	.iema-post__inner {
		padding: 40px 24px;
	}

	.iema-post-hero .iema-page-banner__title {
		font-size: 30px;
		line-height: 34px;
	}

	.iema-post-content h2 {
		font-size: 26px;
		line-height: 32px;
		margin-top: 32px;
	}

	.iema-post-gallery {
		grid-template-columns: 1fr;
	}
}
