/**
 * News hub (Posts page) shared styles and the single news article.
 * Layout-specific hub styles: news-hub-single.css and news-hub-multiple.css.
 */

.news-hub,
.news-single {
	--news-hub-accent: var(--amm-palette-primary-1, #005762);
	--news-hub-pill-bg: #e3f2fd;
	--news-hub-pill-text: #0d47a1;
	--news-hub-media-radius: 12px;
	--news-hub-row-gap: clamp(2.5rem, 4vw, 4rem);
}

/* ------------------------------------------------------------------------- */
/* Hub body                                                                  */
/* ------------------------------------------------------------------------- */

.news-hub__body {
	padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(3rem, 5vw, 5rem);
	background: #fff;
	min-width: 0;
}

.news-hub__tag {
	margin: 0 0 0.35rem;
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--news-hub-accent);
}

.news-hub__date {
	margin: 0 0 clamp(1.25rem, 2vw, 1.75rem);
	font-size: 1rem;
	color: var(--amm-text-secondary-color, #757575);
}

.news-hub__read-more {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	margin-top: 1rem;
	font-weight: 700;
	font-size: 0.9375rem;
	color: var(--news-hub-accent);
	text-decoration: none;
}

.news-hub__read-more:hover,
.news-hub__read-more:focus-visible {
	text-decoration: underline;
}

.news-hub__read-more-icon {
	font-weight: 700;
}

/* Search */
.news-hub__search {
	align-items: center;
	display: flex;
	gap: 0.75rem;
	margin-bottom: clamp(1rem, 2vw, 1.5rem);
	position: relative;
}

.news-hub__search-icon {
	align-items: center;
	bottom: 0;
	color: var(--news-hub-accent);
	display: inline-flex;
	height: 20px;
	justify-content: center;
	left: 1rem;
	margin: auto 0;
	pointer-events: none;
	position: absolute;
	top: 0;
	width: 20px;
}

.news-hub__search-icon svg {
	display: block;
	height: 100%;
	width: 100%;
}

.news-hub__search-input {
	background: #fff;
	border: 1px solid #d9d9d9;
	border-radius: 999px;
	color: var(--amm-text-primary-color, #1e1e1e);
	flex: 1 1 auto;
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
	min-width: 0;
	outline: none;
	padding: 0.75rem 3rem 0.75rem 3rem;
	transition: border-color 0.15s ease;
	width: 100%;
}

.news-hub__search-input:focus {
	border-color: var(--news-hub-accent);
}

.news-hub__search-input::-webkit-search-cancel-button {
	appearance: none;
}

.news-hub__search-clear {
	align-items: center;
	appearance: none;
	background: transparent;
	border: 0;
	bottom: 0;
	color: var(--amm-text-secondary-color, #757575);
	cursor: pointer;
	display: inline-flex;
	font-size: 1.25rem;
	height: 24px;
	justify-content: center;
	line-height: 1;
	margin: auto 0;
	padding: 0;
	position: absolute;
	right: 1rem;
	top: 0;
	width: 24px;
}

.news-hub__search-clear {
	text-decoration: none;
}

.news-hub__search-clear[hidden] {
	display: none;
}

.news-hub__search-clear:hover,
.news-hub__search-clear:focus-visible {
	color: var(--amm-text-primary-color, #1e1e1e);
}

/* Enter submits the search; the button is only shown when keyboard-focused. */
.news-hub__search-submit {
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.news-hub__search-submit:focus-visible {
	background: var(--news-hub-accent);
	border: 0;
	border-radius: 999px;
	clip-path: none;
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	height: auto;
	overflow: visible;
	padding: 0.75rem 1.5rem;
	position: static;
	width: auto;
}

/* Filters */
.news-hub__filters {
	margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.news-hub__filter-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.news-hub__filter-pill {
	display: inline-block;
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--amm-text-primary-color, #1e1e1e);
	text-decoration: none;
	border: 1px solid #d9d9d9;
	border-radius: 999px;
	background: #fff;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.news-hub__filter-pill:hover,
.news-hub__filter-pill:focus-visible {
	border-color: var(--news-hub-accent);
}

/* The palette's "active" tint is near-white on this site, so the selected pill takes the
   accent fill instead — a pill that only shifts by a hair reads as unselected. */
.news-hub__filter-pill.is-active {
	background: var(--news-hub-accent);
	border-color: var(--news-hub-accent);
	color: var(--amm-palette-primary-3, #fff);
}

.news-hub__empty {
	text-align: center;
	padding: clamp(3rem, 8vw, 6rem) 1rem;
}

.news-hub__empty-title {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
	font-weight: 700;
}

.news-hub__empty-text {
	margin: 0;
	color: var(--amm-text-secondary-color, #757575);
}

/* ------------------------------------------------------------------------- */
/* Single news                                                               */
/* ------------------------------------------------------------------------- */

.news-single {
	--news-single-gutter: var(--amm-site-padding-x, 1rem);
	padding-bottom: clamp(3rem, 6vw, 5rem);
}

/* Same column as the rest of the site (--amm-site-max-width, 1440px). */
.site-main.news-single {
	align-items: center;
}

.site-main.news-single > .news-single__inner,
.site-main.news-single > .news-single__featured {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--amm-site-max-width);
	margin-inline: auto;
	padding-inline: var(--news-single-gutter);
	padding-top: 0;
	padding-bottom: 0;
}

.site-main.news-single > .news-single__inner--head {
	padding-top: clamp(2rem, 4vw, 3rem);
}

.site-main.news-single > .news-single__featured {
	margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.news-single__meta {
	padding-bottom: 1.5rem;
}

.news-single__meta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
	margin-bottom: 1.25rem;
}

.news-single__category {
	display: inline-block;
	padding: 0.35rem 0.75rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--news-hub-pill-text);
	background: var(--news-hub-pill-bg);
	border-radius: 6px;
}

.news-single__date {
	font-size: 0.875rem;
	color: var(--amm-text-secondary-color, #757575);
}

.news-single__title {
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 1.25rem;
	font-family: var(--amm-heading-font, var(--amm-font-sans));
	font-size: clamp(1.75rem, 3.5vw, 2.75rem);
	font-weight: 700;
	line-height: 1.15;
	color: var(--amm-text-primary-color, #1e1e1e);
}

.news-single__share {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.news-single__share a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	color: var(--amm-text-primary-color, #1e1e1e);
	background: #f0f0f0;
	border-radius: 4px;
	text-decoration: none;
	transition: background 0.15s ease;
}

.news-single__share a:hover,
.news-single__share a:focus-visible {
	background: #e0e0e0;
}

.news-single__share a img {
	display: block;
	width: 16px;
	height: 16px;
}

.news-single__share svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.news-single__featured {
	overflow: hidden;
	border-radius: var(--news-hub-media-radius);
}

.news-single__featured > img,
.news-single__featured .news-single__featured-img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: cover;
	object-position: center;
	border-radius: var(--news-hub-media-radius);
}

.news-single__body {
	margin-bottom: 2rem;
}

/* Keep block content inside the article column (no alignwide/full breakout) */
.news-single__body.entry-content > *,
.news-single__body.entry-content .wp-block-group,
.news-single__body.entry-content .wp-block-columns {
	max-width: 100%;
}

.news-single__body.entry-content .alignwide,
.news-single__body.entry-content .alignfull,
.news-single__body.entry-content [class*="alignwide"],
.news-single__body.entry-content [class*="alignfull"] {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

.news-single__body .wp-block-image {
	margin-top: 2rem;
	margin-bottom: 0;
	text-align: center;
}

.news-single__body .wp-block-image img,
.news-single__body .wp-block-html img {
	display: block;
	margin-inline: auto;
	max-width: 100%;
	height: auto;
	border-radius: var(--news-hub-media-radius, 8px);
}

.news-single__body .wp-block-video,
.news-single__body .wp-block-embed,
.news-single__body .wp-block-table,
.news-single__body .embed-responsive,
.news-single__body figure:has(> video),
.news-single__body figure:has(> table),
.news-single__body figure:has(> iframe) {
	margin-top: 2rem;
	margin-bottom: 0;
	text-align: center;
}

.news-single__body .wp-block-video video,
.news-single__body video {
	display: block;
	max-width: 100%;
	margin-inline: auto;
}

/* Core embed blocks (YouTube, etc.) — do not shrink the aspect-ratio wrapper */
.news-single__body .wp-block-embed {
	float: none;
	clear: both;
	width: 100%;
	max-width: 100%;
	margin-inline: auto;
}

.news-single__body .wp-block-embed.alignleft,
.news-single__body .wp-block-embed.alignright {
	float: none;
	margin-inline: auto;
}

.news-single__body .wp-block-embed .wp-block-embed__wrapper {
	width: 100%;
	max-width: 100%;
	margin-inline: auto;
}

.news-single__body .wp-block-embed iframe {
	display: block;
	max-width: 100%;
	margin-inline: auto;
}

/* Bootstrap / legacy .embed-responsive markup (often in Custom HTML blocks) */
.news-single__body .embed-responsive {
	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	margin-inline: auto;
	padding: 0;
	overflow: hidden;
}

.news-single__body .embed-responsive::before {
	display: block;
	content: "";
}

.news-single__body .embed-responsive-16by9::before,
.news-single__body .embed-responsive.embed-responsive-16by9::before {
	padding-top: 56.25%;
}

.news-single__body .embed-responsive-4by3::before,
.news-single__body .embed-responsive.embed-responsive-4by3::before {
	padding-top: 75%;
}

.news-single__body .embed-responsive-1by1::before,
.news-single__body .embed-responsive.embed-responsive-1by1::before {
	padding-top: 100%;
}

.news-single__body .embed-responsive iframe,
.news-single__body .embed-responsive embed,
.news-single__body .embed-responsive object,
.news-single__body .embed-responsive video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.news-single__body .wp-block-html:has(.embed-responsive),
.news-single__body .wp-block-html:has(iframe) {
	text-align: center;
}

.news-single__body .wp-block-html iframe,
.news-single__body > iframe {
	display: block;
	max-width: 100%;
	margin-inline: auto;
}

.news-single__body .wp-block-table {
	overflow-x: auto;
}

.news-single__body .wp-block-table table,
.news-single__body table {
	max-width: 100%;
	margin-inline: auto;
}

.news-single__cta {
	--news-cta-graphic: color-mix(in srgb, var(--amm-palette-primary-1, #005762) 62%, #000 38%);
	box-sizing: border-box;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: stretch;
	width: 100%;
	margin-top: clamp(2rem, 4vw, 3rem);
	overflow: hidden;
	background: var(--amm-palette-primary-1, #005762);
	color: var(--amm-palette-primary-3, #ffffff);
	border-radius: var(--news-hub-media-radius, 12px);
}

@media (min-width: 800px) {
	.news-single__cta {
		grid-template-columns: minmax(0, 1fr) minmax(160px, 30%);
	}
}

.news-single__cta-copy {
	position: relative;
	z-index: 1;
	padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 2.5rem);
}

.news-single__cta-graphic {
	display: none;
	position: relative;
	min-height: 100%;
	overflow: hidden;
	background: var(--news-cta-graphic);
	clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%);
	color: color-mix(in srgb, var(--amm-palette-primary-1, #005762) 35%, #000 65%);
	pointer-events: none;
}

@media (min-width: 800px) {
	.news-single__cta-graphic {
		display: block;
	}
}

.news-single__cta-graphic-svg {
	position: absolute;
	right: -8%;
	top: 50%;
	width: 130%;
	height: 140%;
	transform: translateY(-50%);
}

.news-single__cta-eyebrow {
	margin: 0 0 0.5rem;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--amm-text-primary-color, #1e1e1e);
}

.news-single__cta-title {
	margin: 0 0 0.75rem;
	font-family: var(--amm-heading-font, var(--amm-font-sans));
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	line-height: 1.2;
	color: inherit;
}

.news-single__cta-text {
	margin: 0;
	max-width: 40rem;
	font-size: 1.0625rem;
	line-height: 1.55;
	color: var(--amm-palette-primary-3, #ffffff);
	opacity: 0.92;
}

.news-single__cta-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
	margin-top: 1.5rem;
}

.news-single__cta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 20px;
	border-radius: var(--amm-radius-button, 4px);
	border: 2px solid transparent;
	text-decoration: none;
	font-weight: 500;
	font-size: 15px;
	line-height: 1.4;
	transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.news-single__cta-btn--primary {
	background: var(--amm-palette-primary-3, #ffffff);
	color: var(--amm-palette-primary-1, #005762);
	border-color: var(--amm-palette-primary-3, #ffffff);
}

.news-single__cta-btn--primary:hover,
.news-single__cta-btn--primary:focus-visible {
	background: transparent;
	color: var(--amm-palette-primary-3, #ffffff);
	border-color: var(--amm-palette-primary-3, #ffffff);
}

.news-single__cta-btn--secondary {
	background: transparent;
	color: var(--amm-palette-primary-3, #ffffff);
	border-color: var(--amm-palette-primary-3, #ffffff);
}

.news-single__cta-btn--secondary:hover,
.news-single__cta-btn--secondary:focus-visible {
	background: var(--amm-palette-primary-3, #ffffff);
	color: var(--amm-palette-primary-1, #005762);
}

.news-single__nav {
	--news-single-nav-box-width: min(459px, calc(50% - 1rem));
	--news-single-nav-gap: 2rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--news-single-nav-gap);
	width: 100%;
	margin-top: clamp(2rem, 4vw, 3rem);
}

.news-single__nav-box {
	flex: 1 1 var(--news-single-nav-box-width);
	max-width: var(--news-single-nav-box-width);
	min-width: min(100%, 280px);
	display: block;
	padding: 1.25rem 1rem;
	text-decoration: none;
	color: inherit;
	border: 1px solid #e0e0e0;
	border-radius: var(--news-hub-media-radius);
	transition: border-color 0.15s ease, background 0.15s ease;
}

.news-single__nav-box--prev {
	text-align: left;
}

.news-single__nav-box--prev .news-single__nav-label {
	justify-content: flex-start;
}

.news-single__nav-box--next {
	text-align: right;
}

.news-single__nav-box--next .news-single__nav-label {
	justify-content: flex-end;
}

.news-single__nav-box--next:only-child {
	margin-left: auto;
}

.news-single__nav-box:hover,
.news-single__nav-box:focus-visible {
	border-color: var(--news-hub-accent);
	background: #fafafa;
}

.news-single__nav-label {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0 0 0.35rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--amm-text-secondary-color, #757575);
}

.news-single__nav-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--amm-text-primary-color, #1e1e1e);
}

@media (max-width: 767px) {
	.news-single__nav {
		flex-direction: column;
		max-width: 100%;
		gap: 1rem;
	}

	.news-single__nav-box {
		flex: 1 1 100%;
		width: 100%;
		max-width: 100%;
	}

	.news-single__nav-box--next:only-child {
		margin-left: 0;
	}
}
