/* ═══════════════════════════════════════════════════════════════════════════
   BLOG — POST HEADER
   ═══════════════════════════════════════════════════════════════════════════ */

.ce-post-header {
	background: #253d47;
	padding: 2.5rem 0 3rem;
}

/* ── Breadcrumb ── */
.ce-post-header__breadcrumb {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.35rem;
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-utility);
	color: rgba(255, 255, 255, 0.55);
	margin-bottom: 1.75rem;
}

.ce-post-header__breadcrumb a {
	color: rgba(255, 255, 255, 0.55);
	text-decoration: none;
	transition: color 0.15s ease;
}

.ce-post-header__breadcrumb a:hover {
	color: #ffffff;
}

.ce-post-header__sep {
	color: rgba(255, 255, 255, 0.3);
	opacity: 1;
}

.ce-post-header__current {
	color: rgba(255, 255, 255, 0.9);
	font-weight: 600;
}

/* ── 2-column inner ── */
.ce-post-header__inner {
	display: grid;
	/* An even split rather than 55/45. The image is the reason for the change:
	   at 45% it was small enough that the header read as a text block with a
	   picture attached. The cost is title width, and these titles run long —
	   which is why the column is exactly half rather than any less. */
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: center;
}

.ce-post-header__inner--no-image {
	grid-template-columns: 1fr;
	max-width: 720px;
}

/* Stack below tablet portrait: iPad portrait is 768-1024px, and a 55%/1fr
   split is too cramped there. Kept separate from the max-width:768px block
   below (which handles unrelated breadcrumb/meta fixes scoped to narrower
   phones only) so raising this breakpoint doesn't also pull those in. */
@media (max-width: 1024px) {
	.ce-post-header__inner {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	/* Image above text when stacked */
	.ce-post-header__right {
		order: -1;
	}
}

/* ── Left column ── */
.ce-post-header__left {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

/* Category pill — frosted white, matching case study header pill style */
.ce-post-header__cat {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-utility);
	font-weight: 700;
	color: #ffffff;
	background: rgba(255, 255, 255, 0.25);
	padding: 0.35rem 0.9rem;
	border-radius: 9999px;
	border: 1px solid rgba(255, 255, 255, 0.75);
	text-decoration: none;
	margin-bottom: 0.9rem;
	transition: background 0.15s ease;
}

.ce-post-header__cat:hover {
	background: rgba(255, 255, 255, 0.35);
}

/* Title — leads the column, pill sits below */
.ce-post-header__title {
	font-family: var(--ci-font-primary);
	font-size: clamp(1.5rem, 2.5vw, 2.2rem); /* was clamp(1.9rem, 3.5vw, 2.9rem) */
	font-weight: 700;
	color: #ffffff;
	line-height: 1.2;
	margin: 0 0 0.65rem;
}

/* Meta row — plain text with icons */
.ce-post-header__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.4rem 0.6rem;
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-utility);
	color: rgba(255, 255, 255, 0.7);
}

.ce-post-header__meta-item {
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.ce-post-header__meta-item i {
	font-size: 0.9rem;
	opacity: 0.6;
}

.ce-post-header__meta-sep {
	color: rgba(255, 255, 255, 0.3);
}

/* ── Right column (image / placeholder) ── */
.ce-post-header__right {
	border-radius: 0.75rem;
	overflow: hidden;
	/* The ratio the images are uploaded at. It was 4/3 — a taller frame than
	   the source — and with object-fit: contain below, that letterboxed every
	   image inside a pale band top and bottom. Nothing was cropped; the image
	   simply never filled its own frame.

	   contain is kept rather than swapped for cover: at a matching ratio the
	   two are identical, and contain means an odd-sized image on some future
	   post letterboxes politely instead of losing its edges. */
	aspect-ratio: 1000 / 653;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
	align-self: center;
}

.ce-post-header__image {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
}

/* Placeholder — swap for real illustration; exact ratio 4:3 */
.ce-post-header__placeholder {
	width: 100%;
	height: 100%;
	display: block;
	background: rgba(255, 255, 255, 0.08);
}

/* ── Post body ── */
/* The block editor's "constrained" layout only centres content once the
   viewport is wider than its 780px contentSize — below that (i.e. on
   mobile) it adds no horizontal inset at all, so text ran edge-to-edge.
   Add the site's standard gutter explicitly rather than relying on it. */
.ce-post-body {
	padding-top: 4rem !important;
	padding-bottom: 5rem !important;
	padding-left: var(--ci-container-padding) !important;
	padding-right: var(--ci-container-padding) !important;
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-body); /* 15px → 18px, matches case study */
	line-height: 1.65;
	color: #333;
}

.ce-post-body p {
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-body); /* 15px → 18px */
	line-height: 1.65;
	color: #333;
	margin-top: 0;
	margin-bottom: 1.25em; /* was: 1.25em — unchanged, matches case study */
}

.ce-post-body p:last-child {
	margin-bottom: 0;
}

/* Heading hierarchy */
.ce-post-body h2 {
	font-family: var(--ci-font-primary) !important;
	font-size: var(--ci-text-h2) !important; /* was: clamp(1.25rem,2vw,1.6rem) → 20–26px; now 24–32px */
	font-weight: 700 !important;
	color: var(--ci-color-navy) !important;
	margin: var(--ci-size-2xl) 0 var(--ci-size-sm) !important; /* 3rem above, 0.5rem below */
	line-height: 1.2 !important;
}

.ce-post-body h3 {
	font-family: var(--ci-font-primary) !important;
	font-size: var(--ci-text-h3) !important; /* was: clamp(1.05rem,1.5vw,1.25rem) → 17–20px; now 19–24px */
	font-weight: 700 !important;
	color: var(--ci-color-navy) !important;
	margin: var(--ci-size-xl) 0 var(--ci-size-xs) !important; /* 2rem above, 0.25rem below */
	line-height: 1.25 !important;
}

/* Links */
/* :not(.ci-btn) matters more than it looks. This rule is (0,1,1) and
   .ci-btn--develop is (0,1,0), so without the exclusion every button placed in
   post content lost its own colour and took the prose link colour — dark plum
   text on a plum button, which measured 2.01:1 against WCAG's 4.5:1 minimum.
   The :hover opacity below did the same job to the hover state, fading the
   whole button instead of letting .ci-btn's own hover run, which is why the
   resting state looked like a hover and the hover looked like a resting one. */
.ce-post-body a:not(.ci-btn) {
	color: #692D46;
	text-underline-offset: 2px;
}

.ce-post-body a:not(.ci-btn):hover {
	opacity: 0.8;
}

/* ── Images — matches case-study-single.css ── */
.ce-post-body img {
	border-radius: 0.75rem;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	max-width: 100%;
	height: auto;
}

/* Block editor wraps images in <figure> — give them the same breathing room */
.ce-post-body figure,
.ce-post-body .wp-block-image {
	margin-top: var(--ci-size-xl) !important;    /* 2rem above */
	margin-bottom: var(--ci-size-xl) !important; /* 2rem below */
}

.ce-post-body .aligncenter {
	display: block;
	margin-top: var(--ci-size-xl);    /* 2rem above */
	margin-bottom: var(--ci-size-xl); /* 2rem below */
	margin-left: auto;
	margin-right: auto;
}

.ce-post-body .alignleft {
	float: left;
	margin: 0.25rem 1.5rem 1rem 0;
}

.ce-post-body .alignright {
	float: right;
	margin: 0.25rem 0 1rem 1.5rem;
}

.ce-post-body .alignnone {
	display: block;
}

.ce-post-body .size-large,
.ce-post-body .size-full {
	width: 100%;
	height: auto;
}

/* Figure captions */
.ce-post-body figcaption,
.ce-post-body .wp-element-caption {
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-utility);
	color: rgba(0, 0, 0, 0.5);
	text-align: center;
	margin-top: 0.5rem;
	font-style: italic;
	line-height: 1.5;
}

/* Block image alignment breakouts */
.ce-post-body .wp-block-image.alignwide {
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
}

.ce-post-body .wp-block-image.alignfull {
	max-width: none;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	width: 100vw;
}

.ce-post-body .wp-block-image.alignfull img {
	border-radius: 0;
}

/* Side-by-side image columns */
.ce-post-body .wp-block-columns {
	gap: 1.5rem;
}

/* Spacing lives on .ci-btn-wrap now (see buttons.css), so the button itself
   carries none — two sources of vertical rhythm was how they drifted apart. */

/* ════════════════════════════════════════════════════
   BLOG CTA (navy)
   ════════════════════════════════════════════════════ */

.ce-blog-cta {
	background: #253d47;
	padding: 4.5rem 0;
}

.ce-blog-cta__inner {
	max-width: 620px;
	margin: 0 auto;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
}

.ce-blog-cta__heading {
	font-family: var(--ci-font-primary) !important;
	font-size: var(--ci-text-h2) !important;
	font-weight: 700 !important;
	color: #ffffff !important;
	margin: 0 !important;
	line-height: 1.2 !important;
}

.ce-blog-cta__text {
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-body);
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.78);
	margin: 0 !important;
}

.ce-blog-cta__buttons {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	flex-wrap: wrap;
}

/* ════════════════════════════════════════════════════
   MORE BLOGS LIKE THIS (blog cards grid)
   ════════════════════════════════════════════════════ */

.ce-blog-more {
	background: #f9f9f9;
	padding: 4rem 0;
}

.ce-blog-more__heading {
	font-family: var(--ci-font-primary) !important;
	font-size: var(--ci-text-h2) !important;
	font-weight: 700 !important;
	color: #253d47 !important;
	margin: 0 0 2rem !important;
	text-align: center !important;
	line-height: 1.25 !important;
}

.ce-blog-more__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}

/* ── Mobile ── */
@media (max-width: 768px) {
	.ce-post-header {
		padding: 1.5rem 0 2.5rem;
	}

	/* The current-page breadcrumb segment repeats the full post title in
	   small text right above the same title in large bold type (the H1
	   just below) — on mobile it has no room to fit on one line, so it
	   wraps across 2-3 lines and just looks like clutter above the real
	   heading. Drop it (and the separator before it) here; keep it on
	   desktop where it usually fits on a single line. */
	.ce-post-header__breadcrumb > :last-child,
	.ce-post-header__breadcrumb > :nth-last-child(2) {
		display: none;
	}

	.ce-post-header__title {
		font-size: clamp(1.35rem, 5vw, 1.75rem);
	}

	/* Tighter than the desktop gap (not wider — the previous 1rem value
	   here was pushing author/date/read-time onto 2 lines on narrow
	   screens instead of fitting them on one). */
	.ce-post-header__meta {
		gap: 0.3rem 0.45rem;
		font-size: var(--ci-text-utility);
	}

	.ce-post-header__meta-item {
		gap: 0.25rem;
	}


	.ce-blog-cta {
		padding: 3rem 0;
	}

	.ce-blog-cta__buttons {
		flex-direction: column;
		align-items: stretch;
	}

	.ce-blog-more {
		padding: 2.5rem 0;
	}

	.ce-blog-more__grid {
		grid-template-columns: 1fr;
	}
}
