/**
 * Aryon blog article templates (Blog Concept 1 / Blog Concept 2).
 *
 * Loaded only on posts using an article template (see inc/blog-templates).
 * Shared block styles first, then per-concept overrides via the
 * .aryon-post--concept-N modifier. Class names follow BEM.
 */

/* ---------------------------------------------------------------------------
 * Design tokens
 * ------------------------------------------------------------------------ */
.aryon-blog-template {
	--aryon-navy: #004b75;
	--aryon-navy-dark: #003363;
	--aryon-blue: #0a6aa1;
	--aryon-teal: #009e9a;
	--aryon-green: #00a371;
	--aryon-ice: #edf7f8;
	--aryon-sand: #efebe7;
	--aryon-mist: #f5f7fa;
	--aryon-text: #2b2b2b;
	--aryon-muted: #5b6470;
	--aryon-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
	--aryon-serif: "Old Standard TT", Georgia, "Times New Roman", serif;
	/* Space kept clear below the theme's sticky header (143px) when scrolling. */
	--aryon-sticky-offset: 167px;
}

/* Logged-in users also have the 32px WordPress admin bar. */
.admin-bar.aryon-blog-template {
	--aryon-sticky-offset: 199px;
}

/* Smooth scrolling when a link in "On this page" is clicked (page scrolls on <html>). */
html:has(body.aryon-blog-template) {
	scroll-behavior: smooth;
}

/* Full-bleed sections use 100vw; stop the scrollbar width causing a sideways scroll. */
.aryon-blog-template #content-wrap {
	overflow-x: clip;
}

/* Banner: plain blue gradient as in the approved design, instead of the theme photo. */
.aryon-blog-template #pageheader {
	background: linear-gradient(90deg, #014c76 0%, #0177a5 100%);
}

/* The design has no breadcrumb in the banner. */
.aryon-blog-template #pageheader .kt-breadcrumb-container,
.aryon-blog-template #pageheader #kadbreadcrumbs {
	display: none;
}

/* Banner title: the theme's <h1> rendered as <p> (see aryon_blog_banner()). */
.aryon-blog-template .titleclass .aryon-banner-title {
	margin: 10px 0;
	font-family: "Didact Gothic", var(--aryon-sans);
	font-size: 60px;
	font-weight: 400;
	line-height: 50px;
	color: #fff;
}

/* ---------------------------------------------------------------------------
 * Article frame
 * ------------------------------------------------------------------------ */
.aryon-post {
	/* Same width as the theme .container (it sits in .container > .row; the 15px padding cancels the row's negative margin). */
	padding: 36px 15px 64px;
	font-family: var(--aryon-sans);
	font-size: 14px;
	line-height: 1.75;
	color: var(--aryon-text);
}

.aryon-post__header {
	margin-bottom: 24px;
}

.aryon-post .aryon-post__title {
	margin: 0 0 10px;
	font-family: var(--aryon-sans);
	font-size: 38px;
	font-weight: 700;
	line-height: 1.16;
	letter-spacing: -0.01em;
	color: var(--aryon-navy);
}

.aryon-post__meta {
	margin: 0;
	font-size: 12px;
	line-height: 1.4;
	color: var(--aryon-muted);
}

.aryon-post__meta-sep {
	margin: 0 4px;
}

.aryon-post__hero {
	margin: 0 0 32px;
}

.aryon-post__hero-image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1140 / 440;
	object-fit: cover;
}

.aryon-post__layout {
	display: grid;
	/* Slightly narrower than the container (header and image stay full width), centred. */
	width: 90%;
	margin: 0 auto;
	grid-template-columns: minmax(0, 1fr) 240px;
	column-gap: 56px;
	align-items: start;
}

.aryon-post__body {
	grid-column: 1;
	grid-row: 1;
	min-width: 0;
}

.aryon-post__aside {
	grid-column: 2;
	grid-row: 1;
	/* Desktop: the navigation follows the reader down the article. */
	position: sticky;
	top: var(--aryon-sticky-offset);
}

/* ---------------------------------------------------------------------------
 * Rich text (Text blocks and CTA text)
 * ------------------------------------------------------------------------ */
.aryon-prose > :first-child {
	margin-top: 0;
}

.aryon-prose p {
	margin: 0 0 16px;
}

.aryon-prose h2 {
	margin: 34px 0 12px;
	font-family: var(--aryon-sans);
	font-size: 30px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--aryon-navy-dark);
	scroll-margin-top: var(--aryon-sticky-offset);
}

.aryon-prose h3 {
	margin: 26px 0 10px;
	font-family: var(--aryon-sans);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--aryon-navy-dark);
}

.aryon-post .aryon-prose a {
	color: var(--aryon-blue);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.aryon-post .aryon-prose a:hover,
.aryon-post .aryon-prose a:focus {
	text-decoration: none;
}

.aryon-prose ul {
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.aryon-prose ul li {
	position: relative;
	margin-bottom: 6px;
	padding-left: 18px;
}

.aryon-prose ul li::before {
	content: "";
	position: absolute;
	top: 0.72em;
	left: 2px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--aryon-teal);
}

.aryon-prose ol {
	margin: 0 0 16px;
	padding-left: 22px;
}

.aryon-prose img {
	max-width: 100%;
	height: auto;
}

/* Blockquotes typed directly in a Text block look like the Pull quote block. */
.aryon-prose blockquote {
	margin: 28px 0;
	padding: 0;
	border: 0;
}

/* ---------------------------------------------------------------------------
 * Blocks
 * ------------------------------------------------------------------------ */
.aryon-block {
	margin-bottom: 24px;
}

/* In brief */
.aryon-brief {
	padding: 14px 22px 10px;
	border-top: 3px solid var(--aryon-teal);
	background: var(--aryon-ice);
	font-size: 14px;
	line-height: 1.6;
}

.aryon-post .aryon-brief__title {
	margin: 0 0 8px;
	font-family: var(--aryon-sans);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--aryon-navy-dark);
}

.aryon-brief__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.aryon-brief__item {
	position: relative;
	margin-bottom: 8px;
	padding-left: 16px;
}

.aryon-brief__item::before {
	content: "";
	position: absolute;
	top: 0.6em;
	left: 2px;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--aryon-teal);
}

/* Pull quote (block) and blockquote (typed in a Text block) */
.aryon-quote {
	margin: 32px 0;
}

.aryon-quote__text,
.aryon-prose blockquote {
	margin: 0;
	padding: 30px 52px;
	border: 0;
	background: var(--aryon-navy);
	font-family: var(--aryon-serif);
	font-size: 22px;
	line-height: 1.32;
	color: #fff;
}

.aryon-quote__text p,
.aryon-prose blockquote p {
	margin: 0;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
}

/* Timeline */
.aryon-timeline__list {
	margin: 0;
	padding: 0 0 0 12px;
	border-left: 3px solid var(--aryon-green);
	list-style: none;
}

.aryon-timeline__item {
	margin-bottom: 14px;
	font-size: 14px;
	line-height: 1.6;
}

.aryon-timeline__item:last-child {
	margin-bottom: 0;
}

.aryon-timeline__date {
	display: block;
	font-weight: 700;
	color: var(--aryon-navy-dark);
}

.aryon-timeline__text {
	display: block;
}

.aryon-timeline__source {
	margin: 14px 0 0;
	font-size: 14px;
	word-break: break-word;
}

.aryon-post .aryon-timeline__source a {
	color: var(--aryon-blue);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.aryon-post .aryon-timeline__source a:hover,
.aryon-post .aryon-timeline__source a:focus {
	text-decoration: none;
}

/* Call to action */
.aryon-cta {
	margin-top: 36px;
	padding: 20px 26px 26px;
	background: var(--aryon-sand);
	font-size: 14px;
	line-height: 1.65;
}

.aryon-post .aryon-cta__title {
	margin: 0 0 24px;
	font-family: var(--aryon-sans);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--aryon-navy-dark);
}

.aryon-cta__text p {
	margin-bottom: 12px;
}

.aryon-cta__button {
	display: inline-block;
	margin-top: 4px;
	padding: 9px 16px;
	background: var(--aryon-navy);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	color: #fff;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.aryon-cta__button:hover,
.aryon-cta__button:focus {
	background: var(--aryon-navy-dark);
	color: #fff;
	text-decoration: none;
}

/* ---------------------------------------------------------------------------
 * On this page
 * ------------------------------------------------------------------------ */
.aryon-post .aryon-toc__title {
	margin: 0 0 10px;
	padding-bottom: 6px;
	border-bottom: 2px solid var(--aryon-navy);
	font-family: var(--aryon-sans);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--aryon-navy-dark);
}

.aryon-toc__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.aryon-toc__item {
	margin-bottom: 10px;
	font-size: 14px;
	line-height: 1.45;
}

.aryon-post .aryon-toc__link {
	color: var(--aryon-text);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.aryon-post .aryon-toc__link:hover,
.aryon-post .aryon-toc__link:focus {
	text-decoration: none;
}

/* ---------------------------------------------------------------------------
 * Similar posts (full-bleed band)
 * ------------------------------------------------------------------------ */
.aryon-similar {
	clear: both;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	padding: 34px 0 56px;
	background: var(--aryon-mist);
	font-family: var(--aryon-sans);
}

.aryon-similar__inner {
	/* Matches the theme .container so cards line up with the article. */
	max-width: 1170px;
	margin: 0 auto;
	padding: 0 15px;
}

.aryon-similar .aryon-similar__title {
	margin: 0 0 22px;
	font-family: var(--aryon-sans);
	font-size: 30px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	color: var(--aryon-navy-dark);
}

.aryon-similar__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.aryon-similar__card {
	display: flex;
	flex-direction: column;
	background: #fff;
}

.aryon-similar__media {
	display: block;
	aspect-ratio: 16 / 10;
	background: linear-gradient(90deg, var(--aryon-navy), #0177a5);
	overflow: hidden;
}

.aryon-similar__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.aryon-similar__body {
	padding: 14px 18px 18px;
}

.aryon-similar .aryon-similar__heading {
	margin: 0 0 8px;
	font-family: var(--aryon-sans);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
}

.aryon-similar .aryon-similar__heading a {
	color: var(--aryon-navy-dark);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.aryon-similar .aryon-similar__heading a:hover,
.aryon-similar .aryon-similar__heading a:focus {
	text-decoration: none;
}

.aryon-similar__excerpt {
	margin: 0 0 8px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--aryon-muted);
}

.aryon-similar .aryon-similar__more {
	font-size: 14px;
	font-weight: 700;
	color: var(--aryon-blue);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.aryon-similar .aryon-similar__more:hover,
.aryon-similar .aryon-similar__more:focus {
	text-decoration: none;
}

/* ---------------------------------------------------------------------------
 * Focus visibility (keyboard users)
 * ------------------------------------------------------------------------ */
.aryon-post a:focus-visible,
.aryon-similar a:focus-visible {
	outline: 2px solid var(--aryon-blue);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
 * Tablet
 * ------------------------------------------------------------------------ */
@media (max-width: 991px) {
	.aryon-post__layout {
		width: auto;
		grid-template-columns: minmax(0, 1fr);
	}

	/* The navigation sits above the text as a compact box. */
	.aryon-post__aside {
		grid-column: 1;
		grid-row: 1;
		position: static;
		margin-bottom: 28px;
		padding: 14px 18px 8px;
		border: 1px solid #dde3ea;
	}

	.aryon-post__body {
		grid-row: 2;
	}
}

/* ---------------------------------------------------------------------------
 * Mobile
 * ------------------------------------------------------------------------ */
@media (max-width: 767px) {
	.aryon-blog-template .titleclass .aryon-banner-title {
		font-size: 40px;
		line-height: 1.1;
	}

	.aryon-post {
		padding-top: 24px;
		font-size: 15px;
	}

	.aryon-post .aryon-post__title {
		font-size: 28px;
	}

	.aryon-post__hero {
		margin-bottom: 24px;
	}

	.aryon-prose h2 {
		font-size: 24px;
	}

	.aryon-quote__text,
	.aryon-prose blockquote {
		padding: 22px 24px;
		font-size: 19px;
	}

	.aryon-cta {
		padding: 18px 20px 22px;
	}

	.aryon-similar__list {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	html:has(body.aryon-blog-template) {
		scroll-behavior: auto;
	}

	.aryon-cta__button {
		transition: none;
	}
}

/* ===========================================================================
 * Concept 2
 * Split header, single centred column. Text blocks and the pull quote are
 * 760px wide; the highlight intro, timeline and call to action use 1000px.
 * ======================================================================== */
.aryon-post--concept-2 {
	--aryon-green: #2fbb96;
	--aryon-green-line: #a9dbe9;
	--aryon-c2-heading: #0d567f;
	--aryon-c2-wide: 1000px;
	--aryon-c2-text: 760px;
}

/* Split header: title box beside the featured image */
.aryon-post__header--split {
	display: grid;
	grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
	gap: 24px;
	margin-bottom: 32px;
}

.aryon-post__header--no-image {
	grid-template-columns: minmax(0, 1fr);
}

.aryon-post--concept-2 .aryon-post__intro {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 400px;
	padding: 40px 40px 34px;
	background: var(--aryon-ice);
}

/* Short green rule under the date */
.aryon-post--concept-2 .aryon-post__intro::after {
	content: "";
	display: block;
	width: 52px;
	height: 3px;
	margin-top: 22px;
	background: var(--aryon-green);
}

.aryon-post--concept-2 .aryon-post__title {
	font-size: 36px;
	line-height: 1.2;
}

.aryon-post--concept-2 .aryon-post__meta {
	margin-top: 22px;
}

.aryon-post--concept-2 .aryon-post__hero {
	margin: 0;
}

.aryon-post--concept-2 .aryon-post__hero-image {
	height: 100%;
	min-height: 400px;
	aspect-ratio: auto;
}

/* Column widths */
.aryon-post--concept-2 .aryon-post__body {
	max-width: var(--aryon-c2-wide);
	margin: 0 auto;
}

.aryon-post--concept-2 .aryon-post__body > .aryon-block {
	max-width: var(--aryon-c2-text);
	margin-left: auto;
	margin-right: auto;
}

.aryon-post--concept-2 .aryon-post__body > .aryon-highlight,
.aryon-post--concept-2 .aryon-post__body > .aryon-timeline,
.aryon-post--concept-2 .aryon-post__body > .aryon-cta {
	max-width: none;
}

/* Headings, bullets */
.aryon-post--concept-2 .aryon-prose h2 {
	color: var(--aryon-c2-heading);
}

.aryon-post--concept-2 .aryon-prose ul li::before {
	background: var(--aryon-green);
}

/* Highlight intro */
.aryon-highlight {
	padding: 28px 40px 14px;
	border-left: 4px solid var(--aryon-green);
	background: var(--aryon-ice);
}

.aryon-highlight > p:first-child,
.aryon-highlight > p:first-child strong {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.55;
	color: var(--aryon-navy-dark);
}

/* Pull quote: sand box with a green top rule */
.aryon-post--concept-2 .aryon-quote__text,
.aryon-post--concept-2 .aryon-prose blockquote {
	padding: 28px 50px;
	border-top: 3px solid var(--aryon-green);
	background: #f5f1ee;
	font-family: var(--aryon-sans);
	font-size: 20px;
	line-height: 1.45;
	color: var(--aryon-navy);
}

/* Timeline: horizontal milestones on a line */
.aryon-post--concept-2 .aryon-timeline {
	margin-top: 28px;
	margin-bottom: 32px;
}

.aryon-post--concept-2 .aryon-timeline__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	column-gap: 32px;
	row-gap: 24px;
	padding: 0;
	border-left: 0;
}

.aryon-post--concept-2 .aryon-timeline__item {
	position: relative;
	margin: 0;
}

.aryon-post--concept-2 .aryon-timeline__date {
	min-height: 18px;
	margin-bottom: 30px;
	font-size: 12px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--aryon-blue);
}

/* Line runs across the item and its gap so the milestones connect. */
.aryon-post--concept-2 .aryon-timeline__item::before {
	content: "";
	position: absolute;
	top: 32px;
	left: 0;
	right: -32px;
	height: 2px;
	background: var(--aryon-green-line);
}

.aryon-post--concept-2 .aryon-timeline__item:last-child::before {
	right: 0;
}

/* Milestone dot */
.aryon-post--concept-2 .aryon-timeline__item::after {
	content: "";
	position: absolute;
	top: 26px;
	left: 0;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--aryon-green);
}

.aryon-post--concept-2 .aryon-timeline__source {
	margin-top: 22px;
	text-align: center;
}

.aryon-post--concept-2 .aryon-timeline__source a {
	color: var(--aryon-blue);
}

/* Call to action: navy box, green rule and button */
.aryon-post--concept-2 .aryon-cta {
	margin-top: 40px;
	padding: 36px 44px 40px;
	background: var(--aryon-navy);
	color: #fff;
}

.aryon-post--concept-2 .aryon-cta__title {
	color: #fff;
}

.aryon-post--concept-2 .aryon-cta__title::after {
	content: "";
	display: block;
	width: 52px;
	height: 3px;
	margin-top: 12px;
	background: var(--aryon-green);
}

.aryon-post--concept-2 .aryon-cta__text a {
	color: #8fe3c8;
	font-weight: 700;
}

.aryon-post--concept-2 .aryon-cta__button {
	padding: 11px 20px;
	background: var(--aryon-green);
	color: var(--aryon-navy-dark);
}

.aryon-post--concept-2 .aryon-cta__button:hover,
.aryon-post--concept-2 .aryon-cta__button:focus {
	background: #8fe3c8;
	color: var(--aryon-navy-dark);
}

.aryon-post--concept-2 .aryon-cta a:focus-visible {
	outline-color: #fff;
}

/* Concept 2 – tablet */
@media (max-width: 991px) {
	.aryon-post__header--split {
		grid-template-columns: minmax(0, 1fr);
	}

	.aryon-post--concept-2 .aryon-post__intro {
		min-height: 0;
	}

	.aryon-post--concept-2 .aryon-post__hero-image {
		min-height: 0;
		aspect-ratio: 16 / 9;
	}
}

/* Concept 2 – mobile: timeline becomes a vertical list */
@media (max-width: 767px) {
	.aryon-post--concept-2 .aryon-post__intro {
		padding: 28px 22px 24px;
	}

	.aryon-post--concept-2 .aryon-post__title {
		font-size: 28px;
	}

	.aryon-highlight {
		padding: 22px 22px 8px;
	}

	.aryon-post--concept-2 .aryon-quote__text,
	.aryon-post--concept-2 .aryon-prose blockquote {
		padding: 22px 24px;
		font-size: 18px;
	}

	.aryon-post--concept-2 .aryon-timeline__list {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 20px;
		padding-left: 26px;
		border-left: 2px solid var(--aryon-green-line);
	}

	.aryon-post--concept-2 .aryon-timeline__item::before {
		display: none;
	}

	.aryon-post--concept-2 .aryon-timeline__item::after {
		top: 3px;
		left: -34px;
	}

	.aryon-post--concept-2 .aryon-timeline__date {
		margin-bottom: 4px;
	}

	.aryon-post--concept-2 .aryon-timeline__source {
		text-align: left;
	}

	.aryon-post--concept-2 .aryon-cta {
		padding: 26px 22px 28px;
	}
}
