/* =========================================================================
   Blog — archive and single post, image-first
   ========================================================================= */

.rw-blog,
.rw-single {
	font-family: var(--rwh-font);
}

.rw-blog *,
.rw-single * {
	box-sizing: border-box;
}

/* ---------- archive head ---------- */

.rw-blog__head {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(110% 150% at 86% 6%, rgba(243, 148, 30, 0.44) 0%, rgba(243, 148, 30, 0) 56%),
		linear-gradient(125deg, #05222c 0%, #08323f 52%, #0e5a73 100%);
	color: #fff;
	padding: 58px 20px 62px;
}

@media (min-width: 768px) {
	.rw-blog__head { padding-inline: 32px; }
}

.rw-blog__head-inner {
	width: 100%;
	max-width: var(--rwh-container, 1280px);
	margin-inline: auto;
}

.rw-blog__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 12px;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.rw-blog__eyebrow::before {
	content: "";
	width: 30px;
	height: 3px;
	background: var(--rwh-red, #b06105);
}

.rw-blog__title {
	margin: 0 0 12px;
	color: #fff;
	font-size: clamp(2rem, 5vw, 3.25rem);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.025em;
}

.rw-blog__intro {
	margin: 0;
	max-width: 62ch;
	color: rgba(255, 255, 255, 0.84);
	font-size: 1.0625rem;
	line-height: 1.6;
}

.rw-blog__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 28px;
}

.rw-blog__body {
	width: 100%;
	max-width: var(--rwh-container, 1280px);
	margin-inline: auto;
	padding: 48px 20px 72px;
}

@media (min-width: 768px) {
	.rw-blog__body { padding-inline: 32px; }
}

/* ---------- post card, shared ---------- */

.rw-post__link {
	display: block;
	height: 100%;
	text-decoration: none;
}

.rw-post__media {
	position: relative;
	display: block;
	overflow: hidden;
	background: linear-gradient(130deg, #08323f 0%, #0e5a73 60%, #05222c 100%);
}

.rw-post__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 620ms cubic-bezier(0.2, 0.6, 0.2, 1);
}

.rw-post__link:hover .rw-post__media img,
.rw-post__link:focus-visible .rw-post__media img {
	transform: scale(1.05);
}

.rw-post__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: rgba(255, 255, 255, 0.36);
	font-size: 1.75rem;
	font-weight: 800;
	letter-spacing: 0.08em;
}

.rw-post__term {
	display: inline-flex;
	align-self: flex-start;
	padding: 5px 13px;
	border-radius: 99px;
	background: var(--rwh-red, #b06105);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.rw-post__title {
	display: block;
	color: var(--rwh-navy, #08323f);
	font-weight: 700;
	line-height: 1.22;
	letter-spacing: -0.015em;
}

.rw-post__excerpt {
	display: block;
	color: var(--rwh-text, #1b2333);
	line-height: 1.6;
}

.rw-post__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	color: var(--rwh-text-muted, #5b6478);
	font-size: 0.8125rem;
	font-weight: 600;
}

/* ---------- lead post ---------- */

.rw-post--lead {
	margin-bottom: 40px;
}

.rw-post--lead .rw-post__link {
	position: relative;
	display: block;
	min-height: clamp(360px, 48vw, 540px);
	border-radius: 6px;
	overflow: hidden;
}

.rw-post--lead .rw-post__media {
	position: absolute;
	inset: 0;
	height: 100%;
}

.rw-post--lead .rw-post__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(5, 34, 44, 0.25) 0%,
		rgba(5, 34, 44, 0.68) 55%,
		rgba(5, 34, 44, 0.92) 100%
	);
}

.rw-post--lead .rw-post__body {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	gap: 12px;
	min-height: clamp(360px, 48vw, 540px);
	max-width: 640px;
	padding: 40px clamp(24px, 4vw, 44px);
}

.rw-post--lead .rw-post__title {
	color: #fff;
	font-size: clamp(1.625rem, 3.2vw, 2.5rem);
}

.rw-post--lead .rw-post__excerpt {
	color: rgba(255, 255, 255, 0.88);
	font-size: 1.0625rem;
	max-width: 54ch;
}

.rw-post--lead .rw-post__meta {
	margin-top: 4px;
	color: rgba(255, 255, 255, 0.72);
}

/* ---------- grid ---------- */

.rw-blog__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 28px;
}

.rw-post--grid {
	border: 1px solid var(--rwh-border, #dde3ed);
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 240ms ease, transform 240ms ease, border-color 240ms ease;
}

.rw-post--grid:hover,
.rw-post--grid:focus-within {
	border-color: transparent;
	box-shadow: 0 16px 34px rgba(13, 26, 62, 0.16);
	transform: translateY(-3px);
}

.rw-post--grid .rw-post__link {
	display: flex;
	flex-direction: column;
}

.rw-post--grid .rw-post__media {
	aspect-ratio: 16 / 10;
}

.rw-post--grid .rw-post__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	gap: 11px;
	padding: 20px 22px 22px;
}

.rw-post--grid .rw-post__term {
	margin-top: -34px;
	position: relative;
	z-index: 1;
	box-shadow: 0 3px 10px rgba(13, 26, 62, 0.24);
}

.rw-post--grid .rw-post__title { font-size: 1.1875rem; }
.rw-post--grid .rw-post__excerpt { font-size: 0.9375rem; }

/* =========================================================================
   Single post
   ========================================================================= */

.rw-single__hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(380px, 52vw, 600px);
	overflow: hidden;
	background: linear-gradient(130deg, #08323f 0%, #0e5a73 60%, #05222c 100%);
	color: #fff;
}

.rw-single__hero--no-image {
	min-height: clamp(280px, 34vw, 400px);
	background:
		radial-gradient(110% 150% at 86% 8%, rgba(243, 148, 30, 0.42) 0%, rgba(243, 148, 30, 0) 56%),
		linear-gradient(125deg, #05222c 0%, #08323f 52%, #0e5a73 100%);
}

.rw-single__hero-media {
	position: absolute;
	inset: 0;
}

.rw-single__hero-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rw-single__hero-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(5, 34, 44, 0.3) 0%,
		rgba(5, 34, 44, 0.7) 55%,
		rgba(5, 34, 44, 0.94) 100%
	);
}

.rw-single__hero-inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: var(--rwh-container, 1280px);
	margin-inline: auto;
	padding: 56px 20px 48px;
}

@media (min-width: 768px) {
	.rw-single__hero-inner { padding-inline: 32px; }
}

.rw-single__term {
	display: inline-flex;
	margin-bottom: 16px;
	padding: 6px 15px;
	border-radius: 99px;
	background: var(--rwh-red, #b06105);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 200ms ease;
}

.rw-single__term:hover,
.rw-single__term:focus-visible {
	background: var(--rwh-red-dark, #7d4304);
	color: #fff;
}

.rw-single__title {
	margin: 0;
	max-width: 22ch;
	color: #fff;
	font-size: clamp(1.875rem, 4.8vw, 3.25rem);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

.rw-single__meta {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 16px 0 0;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.9375rem;
	font-weight: 600;
}

.rw-single__body {
	width: 100%;
	max-width: var(--rwh-container, 1280px);
	margin-inline: auto;
	padding: 52px 20px 60px;
}

@media (min-width: 768px) {
	.rw-single__body { padding-inline: 32px; }
}

/* A single measure, centred — long-form wants one column, not a sidebar. */
.rw-single__body .rw-prose {
	max-width: 68ch;
	margin-inline: auto;
	font-size: 1.0625rem;
}

.rw-single__related {
	background: var(--rwh-off-white, #f5f7fa);
	padding: 54px 20px 62px;
}

@media (min-width: 768px) {
	.rw-single__related { padding-inline: 32px; }
}

.rw-single__related-inner {
	width: 100%;
	max-width: var(--rwh-container, 1280px);
	margin-inline: auto;
}

.rw-single__related-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px 24px;
	margin-bottom: 26px;
}

.rw-single__related-title {
	margin: 0;
	color: var(--rwh-navy, #08323f);
	font-size: clamp(1.375rem, 2.4vw, 1.875rem);
	font-weight: 700;
}

.rw-single__related-all {
	color: var(--rwh-navy, #08323f);
	font-size: 0.9375rem;
	font-weight: 700;
	text-decoration: none;
}

.rw-single__related-all:hover,
.rw-single__related-all:focus-visible {
	color: var(--rwh-red, #b06105);
}

.rw-single__related .rw-post--grid {
	background: #fff;
}

.rw-blog :focus-visible,
.rw-single :focus-visible {
	outline: 3px solid var(--rwh-navy, #08323f);
	outline-offset: 3px;
}

.rw-blog__head :focus-visible,
.rw-single__hero :focus-visible,
.rw-post--lead :focus-visible {
	outline-color: #fff;
}

@media (prefers-reduced-motion: reduce) {
	.rw-post--grid,
	.rw-post__media img {
		transition: none;
	}

	.rw-post__link:hover .rw-post__media img {
		transform: none;
	}
}

@media (max-width: 560px) {
	.rw-blog__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.rw-post--lead .rw-post__body {
		padding: 28px 20px;
	}
}


/* -------------------------------------------------------------------------
   Category filter chips.

   Ported from the source theme's utilities.css, which was not otherwise
   needed here. They sit on the dark hero, hence the translucent white.
   ------------------------------------------------------------------------- */

.rw-chip {
	display: inline-flex;
	align-items: center;
	padding: 9px 20px;
	border: 1px solid rgba(255, 255, 255, 0.34);
	border-radius: 99px;
	color: rgba(255, 255, 255, 0.9);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.rw-chip:hover,
.rw-chip:focus-visible {
	background: rgba(255, 255, 255, 0.16);
	border-color: #fff;
	color: #fff;
}

.rw-chip.is-active {
	background: #fff;
	border-color: #fff;
	color: var(--rw-navy, #08323f);
}
