/**
 * Blog listing, brought into line with the V3 pages.
 *
 * The blog is the WordPress posts page, rendered by index.php and
 * template-parts/content.php — there is no Elementor widget to rebuild and no
 * way to run a parallel copy, because the posts page is a site setting. So
 * this restyles the existing markup rather than replacing it: every rule here
 * overrides a value style.css already sets, and removing the file restores
 * the previous appearance exactly.
 *
 * Loaded only on the blog, archives and search results.
 *
 * Palette matches the V3 tokens, which the theme already shares:
 * ink #263E56, green #4BB64A, tint #F7FFF6.
 */

.blog-v3 {
	--bl-ink: #263E56;
	--bl-muted: rgba(38, 62, 86, 0.68);
	--bl-green: #4BB64A;
	--bl-green-dark: #3d9c3c;
	--bl-line: rgba(38, 62, 86, 0.09);
}

/* ==========================================================================
   Page header
   ========================================================================== */

.blog-v3 .heading--page-title {
	padding: 56px 24px 44px;
	border-radius: 28px;
	background: linear-gradient(180deg, #F7FFF6 0%, #ffffff 100%);
	border: 1px solid var(--bl-line);
}

.blog-v3 .heading--page-title h1 {
	margin: 0 0 14px;
	font-size: clamp(34px, 4.2vw, 52px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.025em;
	color: var(--bl-ink);
	text-transform: none;
}

.blog-v3 .heading__excerpt p {
	max-width: 58ch;
	margin: 0 auto;
	font-size: 17px;
	line-height: 1.65;
	color: var(--bl-muted);
}

/* The illustration is decoration on a listing page; it is kept but reined
   in so the posts start higher up the page. */
.blog-v3 .heading__image {
	max-width: 340px;
	margin: 26px auto 0;
}

/* A scroll arrow on a page that is already a list of links is noise. */
.blog-v3 .heading__scroll {
	display: none;
}

/* ==========================================================================
   Post cards
   ========================================================================== */

.blog-v3 #content {
	padding-top: 44px;
}

.blog-v3 .post-item {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--bl-line);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 6px 20px rgba(38, 62, 86, 0.05);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-v3 .post-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 36px rgba(38, 62, 86, 0.11);
}

/* The theme already holds the 16:9 box open with padding-top: 56.25% and
   centres the image absolutely inside it. Adding aspect-ratio here would
   stack a second box on top of that one, so only the crop is changed. */
.blog-v3 .post-item__image {
	position: relative;
	display: block;
	overflow: hidden;
	background: rgba(38, 62, 86, 0.05);
	border-radius: 0;
}

.blog-v3 .post-item__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.blog-v3 .post-item:hover .post-item__image img {
	transform: scale(1.04);
}

/* Category chips ---------------------------------------------------------- */

/* The theme pins these to top: 16px. Setting bottom without clearing top
   leaves both edges anchored, which stretches the list into a tall column
   down the side of the image. */
.blog-v3 .post-cats {
	position: absolute;
	top: auto;
	right: auto;
	left: 14px;
	bottom: 14px;
	height: auto;
	width: auto;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.blog-v3 .post-cats li {
	margin: 0;
	padding: 5px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	color: var(--bl-green-dark);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	box-shadow: 0 2px 8px rgba(38, 62, 86, 0.16);
}

/* Card body --------------------------------------------------------------- */

.blog-v3 .post-item__content {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 22px 24px 24px;
}

.blog-v3 .post-item__date {
	display: block;
	margin-bottom: 9px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--bl-muted);
}

.blog-v3 .post-item__content h2 {
	margin: 0 0 10px;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.01em;
}

.blog-v3 .post-item__content h2 a {
	color: var(--bl-ink);
	text-decoration: none;
	transition: color 0.2s ease;
}

.blog-v3 .post-item:hover .post-item__content h2 a {
	color: var(--bl-green-dark);
}

.blog-v3 .post-item__content p {
	margin: 0 0 18px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--bl-muted);
}

/* The old control was a circular arrow button; a text link with a moving
   arrow reads as a link and matches the V3 cards. */
.blog-v3 a.post-item__more {
	margin-top: auto;
	align-self: flex-start;
	padding: 0;
	width: auto;
	height: auto;
	background: none;
	border: 0;
	color: var(--bl-green-dark);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	text-indent: 0;
}

/* The theme draws the arrow as a 32px SVG circle background on ::after, so
   the box and the image both have to go, not just the content. */
.blog-v3 a.post-item__more::after {
	content: "\2192";
	display: inline-block;
	width: auto;
	height: auto;
	background-image: none;
	margin-left: 7px;
	vertical-align: baseline;
	transition: transform 0.2s ease;
}

.blog-v3 .post-item:hover a.post-item__more::after {
	transform: translateX(5px);
}

/* Give the flex row real gutters and equal-height columns. */
.blog-v3 #content .row {
	row-gap: 26px;
}

.blog-v3 #content .row > .col {
	display: flex;
}

.blog-v3 #content .row > .col > article {
	width: 100%;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.blog-v3 .posts-navigation {
	margin-top: 44px;
	padding-top: 30px;
	border-top: 1px solid var(--bl-line);
}

.blog-v3 .posts-navigation .nav-links {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
}

.blog-v3 .posts-navigation .nav-next {
	margin-left: auto;
}

.blog-v3 .posts-navigation a {
	display: inline-block;
	padding: 13px 26px;
	border-radius: 999px;
	background: linear-gradient(180deg, #58c257 0%, #41a940 100%);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(75, 182, 74, 0.3);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-v3 .posts-navigation a:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(75, 182, 74, 0.36);
}

@media (max-width: 768px) {
	.blog-v3 .heading--page-title {
		padding: 40px 18px 32px;
		border-radius: 20px;
	}

	.blog-v3 .heading__image {
		max-width: 240px;
	}

	.blog-v3 #content {
		padding-top: 32px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.blog-v3 .post-item,
	.blog-v3 .post-item__image img,
	.blog-v3 a.post-item__more::after,
	.blog-v3 .posts-navigation a {
		transition: none;
	}

	.blog-v3 .post-item:hover {
		transform: none;
	}

	.blog-v3 .post-item:hover .post-item__image img {
		transform: none;
	}
}
