/**
 * ABIO News — index, single and card styles.
 * Every selector is scoped under .abio-news-* / .abio-screen-reader-text.
 */

/* Screen-reader only text */
.abio-screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Full-bleed: cancel the parent blog-archive gutter (body.archive .content .full_width { padding: 44px 20px 25px 45px }) */
body.post-type-archive-news .content .full_width.abio-news-page {
	padding: 0;
}

/* Dark title band (keeps the white transparent-header menu readable) */
.abio-news-band {
	background-color: #1E3C40;
	padding: 120px 0;
	text-align: center;
}

.abio-news-band__title {
	color: #fff;
	margin: 0 auto;
}

/* Single band: featured image behind the homepage hero overlay (.atf_overlay rgba(0,0,0,.6)) */
.abio-news-band--single {
	position: relative;
	overflow: hidden;
}

.abio-news-band--single .grid_section {
	position: relative;
	z-index: 2;
}

.abio-news-band__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	z-index: 0;
}

.abio-news-band__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 1;
}

/* Desktop header (100px menu row) overlays the band above 1000px: clear it (index and single) */
@media only screen and (min-width: 1001px) {
	.abio-news-band {
		padding-top: 200px;
	}
}

/* Index "News" H1: smaller than the global 80px / 44px H1 (News pages only) */
@media only screen and (min-width: 1111px) {
	.abio-news-band h1.abio-news-band__title:not(.abio-news-band__title--single) {
		font-size: 64px;
		line-height: 72px;
	}
}

@media only screen and (max-width: 1110px) {
	.abio-news-band h1.abio-news-band__title:not(.abio-news-band__title--single) {
		font-size: 38px;
		line-height: 46px;
	}
}

.abio-news-band__title--single {
	font-size: 38px;
	line-height: 46px;
	max-width: 1000px;
	margin: 0 auto;
}

.abio-news-band__date {
	display: block;
	color: #fff;
	opacity: 0.8;
	margin-top: 20px;
}

/* Card grid */
.abio-news-grid {
	display: grid;
	gap: 40px;
	grid-template-columns: 1fr;
	padding: 80px 0;
}

@media only screen and (min-width: 600px) {
	.abio-news-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media only screen and (min-width: 1000px) {
	.abio-news-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/*
 * Card. Values reused from the homepage: frame = image frame (.outline 2px #5F9E7D, .main-image radius 20px);
 * lift shadow = #cookie-law-info-bar; button = .wpcf7 input[type="submit"] and its hover state.
 */
.abio-news-card {
	position: relative;
	display: flex;
	flex-direction: column;
	border: 2px solid #5F9E7D;
	border-radius: 20px;
	overflow: hidden;
	transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.abio-news-card:hover,
.abio-news-card:focus-within {
	transform: translateY(-4px);
	box-shadow: rgba(0, 0, 0, 0.2) 0 5px 50px;
}

/* Media block (abio_news_get_media_html): fixed 3:2 frame, image cropped to fill. Shared with the homepage block. */
.abio-news-media {
	position: relative;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background-color: #1E3C40;
}

.abio-news-media__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.abio-news-media__link {
	display: block;
	height: 100%;
}

/* No featured image and no News → Settings override: footer-style logo panel (footer .wp-image-2765 opacity .2) */
.abio-news-media--fallback {
	display: block;
	position: absolute;
	inset: 0;
}

.abio-news-media--fallback::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url("../img/abio-logo-white.svg") center / 40% auto no-repeat;
	opacity: 0.2;
}

.abio-news-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	padding: 32px;
}

.abio-news-card__date {
	display: block;
	color: #75777a;
	font-weight: 500;
	font-size: 18px;
}

/* Beats the parent responsive .content .container_inner.default_template_holder h2 sizes */
.content .abio-news-page .abio-news-card .abio-news-card__title {
	color: #2e2e2e;
	font-size: 22px;
	line-height: 28px;
	font-weight: 600;
	margin: 12px 0 0;
}

.abio-news-card__title .abio-news-card__link,
.abio-news-card__title .abio-news-card__link:hover,
.abio-news-card__title .abio-news-card__link:focus {
	color: #2e2e2e;
	font-size: inherit;
	line-height: inherit;
	text-decoration: none;
}

/* The title link covers the whole card: one link per card */
.abio-news-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: 20px;
}

.abio-news-card__link:focus {
	outline: none;
}

.abio-news-card__link:focus-visible::after {
	outline: 2px solid #5e9d7c;
	outline-offset: -6px;
}

.abio-news-card__excerpt {
	margin: 16px 0 30px;
}

/* Site button: copy of .wpcf7 input[type="submit"] and its hover state */
.abio-news-card__more,
.abio-news-back .abio-news-back__link,
.abio-latest-news .abio-latest-news__all-link {
	display: inline-block;
	box-sizing: border-box;
	height: 37px;
	padding: 0 50px;
	line-height: 33px;
	font-family: futura-pt, sans-serif;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #fff;
	background-color: #7e9751;
	border: 2px solid #7e9751;
	transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

.abio-news-card__more {
	margin-top: auto;
}

.abio-news-card:hover .abio-news-card__more,
.abio-news-card:focus-within .abio-news-card__more,
.abio-news-back .abio-news-back__link:hover,
.abio-news-back .abio-news-back__link:focus-visible,
.abio-latest-news .abio-latest-news__all-link:hover,
.abio-latest-news .abio-latest-news__all-link:focus-visible {
	color: #7e9751;
	background-color: transparent;
	border-color: #5e9d7c;
}

/* Link-out card label: "Read on {domain}" + inline arrow icon. Domains can be long, so the button may wrap. */
.abio-news-card__more--external {
	max-width: 100%;
	height: auto;
	min-height: 37px;
	padding: 7px 24px;
	line-height: 1.3;
	text-align: left;
}

.abio-news-link__domain {
	white-space: nowrap;
}

.abio-news-link__domain .abio-news-link__icon {
	display: inline-block;
	margin-left: 8px;
	vertical-align: -1px;
}

/* Standalone News link (abio_news_link_html, e.g. the homepage block) */
.abio-news-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #5e9d7c;
	font-weight: 600;
	transition: color 0.3s ease-in-out;
}

.abio-news-link:hover,
.abio-news-link:focus {
	color: #7e9751;
}

.abio-news-link:focus-visible {
	outline: 2px solid #5e9d7c;
	outline-offset: 3px;
}

.abio-news-link__icon {
	width: 14px;
	height: 14px;
	flex: none;
}

/* A lone card spans the full row, and on desktop becomes a wide feature card */
.abio-news-grid:has(> .abio-news-card:only-child) {
	grid-template-columns: 1fr;
}

@media only screen and (min-width: 1000px) {
	.abio-news-card:only-child {
		flex-direction: row;
	}

	.abio-news-card:only-child .abio-news-card__media {
		flex: 0 0 50%;
	}

	.abio-news-card:only-child .abio-news-card__body {
		justify-content: center;
		padding: 48px;
	}

	.abio-news-card:only-child .abio-news-card__more {
		margin-top: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.abio-news-card,
	.abio-news-card__more,
	.abio-news-link,
	.abio-news-back .abio-news-back__link,
	.abio-latest-news .abio-latest-news__all-link {
		transition: none;
	}

	.abio-news-card:hover,
	.abio-news-card:focus-within {
		transform: none;
	}
}

/* Single item content */
.abio-news-content {
	padding: 80px 0 40px;
}

/* Article links: keep the theme's green, but replace its orange hover with the News hover accent */
.abio-news-content a:hover,
.abio-news-content a:focus {
	color: #7e9751;
}

.abio-news-content a:focus-visible {
	outline: 2px solid #5e9d7c;
	outline-offset: 2px;
}

/* Paragraph rhythm: one 32px line between blocks, the gap the site gets from its empty <p>&nbsp;</p> spacers */
.abio-news-content > * + * {
	margin-top: 32px;
}

.abio-news-content ul {
	list-style: disc outside;
	padding-left: 1.25em;
}

.abio-news-content ul li {
	list-style: inherit;
	padding: 0 0 10px;
	line-height: 32px;
}

.abio-news-back {
	padding: 20px 0 80px;
}

.abio-news-back .abio-news-back__link {
	text-decoration: none;
}

.abio-news-back .abio-news-back__link:focus-visible {
	outline: 2px solid #5e9d7c;
	outline-offset: 4px;
}

/*
 * Pagination: parent .pagination layout (centred numbers, arrows at the row ends),
 * with Montserrat numbers instead of the parent's Crete Round italic and the site colours.
 */
.abio-news-pagination {
	margin: 0 0 80px;
}

.abio-news-pagination ul {
	margin: 0;
	padding: 0;
	display: inline-block;
}

.abio-news-pagination li {
	padding: 0;
	line-height: 33px;
	list-style: none;
}

.abio-news-pagination ul li > a,
.abio-news-pagination ul li > span {
	font-family: inherit;
	font-style: normal;
	font-size: 18px;
	font-weight: 500;
	color: #2e2e2e;
}

.abio-news-pagination ul li.prev > a,
.abio-news-pagination ul li.next > a {
	font-size: 30px;
}

.abio-news-pagination ul li > a:hover,
.abio-news-pagination ul li > a:focus-visible {
	color: #7e9751;
}

.abio-news-pagination ul li.active > span {
	font-family: inherit;
	font-style: normal;
	font-size: 18px;
	font-weight: 700;
	color: #2e2e2e;
	box-shadow: inset 0 -2px 0 #7e9751;
}

.abio-news-pagination ul li > a:focus-visible {
	outline: 2px solid #5e9d7c;
	outline-offset: 2px;
}

.abio-news-empty {
	padding: 80px 0;
}

@media only screen and (min-width: 1000px) {
	.abio-news-content,
	.abio-news-back {
		max-width: 66.666%;
		margin-left: auto;
		margin-right: auto;
	}
}

@media only screen and (max-width: 767px) {
	.abio-news-band {
		padding: 80px 0;
	}

	.abio-news-band__title--single {
		font-size: 30px;
		line-height: 38px;
	}
}

/*
 * Homepage "Latest news" block ([abio_latest_news]), placed between "Building a Sustainable Future" and "Partner with Us".
 * Frame, media, date, stretched title link and buttons come from the card rules above.
 * Spacing copies the "Building a Sustainable Future" row (.vc_custom_1744060576118 { margin-top: 100px }); the Customizer
 * zeroes that row's margin at max-width 1110px (#contact, #approach, .vc_custom_1744060576118 { margin: 0 }), so this does too.
 * All spacing lives on the section, so an empty shortcode leaves a zero-height row.
 */
.abio-latest-news {
	margin-top: 100px;
	padding: 0 0 20px;
}

.abio-latest-news .abio-latest-news__heading {
	text-align: center;
	margin: 0 0 60px;
}

.abio-latest-news .abio-latest-news__title {
	color: #2e2e2e;
	font-size: 30px;
	line-height: 38px;
	font-weight: 600;
	margin: 12px 0 0;
}

.abio-latest-news__title .abio-news-card__link,
.abio-latest-news__title .abio-news-card__link:hover,
.abio-latest-news__title .abio-news-card__link:focus {
	color: #2e2e2e;
	font-size: inherit;
	line-height: inherit;
	text-decoration: none;
}

.abio-latest-news .abio-latest-news__all-link {
	text-decoration: none;
}

.abio-latest-news .abio-latest-news__all-link:focus-visible {
	outline: 2px solid #5e9d7c;
	outline-offset: 4px;
}

.abio-latest-news__all {
	text-align: center;
	margin-top: 60px;
}

/* Wide feature card on desktop: media left, text right (as the lone /news/ card); stacks with media first below 1001px */
@media only screen and (min-width: 1001px) {
	.abio-latest-news__card {
		flex-direction: row;
	}

	.abio-latest-news__card .abio-latest-news__media {
		flex: 0 0 50%;
	}

	.abio-latest-news__card .abio-latest-news__body {
		justify-content: center;
		padding: 48px;
	}

	.abio-latest-news__card .abio-news-card__more {
		margin-top: 0;
	}
}

@media only screen and (max-width: 1110px) {
	.abio-latest-news {
		margin-top: 0;
		padding: 60px 0 80px;
	}

	.abio-latest-news .abio-latest-news__heading {
		margin-bottom: 40px;
	}

	.abio-latest-news__all {
		margin-top: 40px;
	}
}

@media only screen and (max-width: 767px) {
	.abio-latest-news .abio-latest-news__title {
		font-size: 22px;
		line-height: 28px;
	}
}

/* Sticky header: Customizer forces the active item to white on a white bar; this is the only forced override, needed to beat it. */
body.post-type-archive-news header.sticky.sticky_animate nav.main_menu > ul > li.active > a,
body.single-news header.sticky.sticky_animate nav.main_menu > ul > li.active > a {
	color: #7e9751 !important;
}
