/* =====================
   BLOG PAGE — blog.css
   Covers: hero, category filter bar, post grid, post cards with badge overlay, pagination
   Follows the same naming convention as archive-vigilis_product.php inline styles
   Design ref: Figma node 112:6701
   Breakpoints: 480px, 640px, 768px, 1024px, 1280px (from theme/styles/layout.css)
===================== */

/* =====================
   VISUALLY HIDDEN UTILITY
===================== */
.vg-blog-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* =====================
   HERO
   500px height, background image with #08471b multiply overlay
   Inner: heading bottom-left, search bottom-right
   Filter bar sits at bottom of hero above post grid
===================== */
.vg-blog-hero {
	position: relative;
	height: 500px;
	background-color: var(--color-primary-900); /* fallback if image not loaded */
	overflow: hidden;
}

.vg-blog-hero__bg {
	position: absolute;
	inset: 0;
}

.vg-blog-hero__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.vg-blog-hero__bg::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(6, 55, 21, 0.35) 0%,
		rgba(6, 55, 21, 0.72) 60%,
		rgba(6, 55, 21, 0.88) 100%
	);
}

.vg-blog-hero__inner {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 0 80px 52px; /* 52px bottom keeps filter bar above grid gap */
	gap: 48px;
}

/* Heading (left) + Search (right) — flex row at bottom of hero */
.vg-blog-hero__content {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 40px;
}

.vg-blog-breadcrumb {
	list-style: none;
	padding: 0;
	margin: 0 0 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-family: 'Lexend', sans-serif;
	font-weight: 300;
	font-size: 14px;
	color: #AAC7B4;
}

.vg-blog-breadcrumb li {
	display: flex;
	align-items: center;
}

.vg-blog-breadcrumb li + li::before {
	content: "›";
	margin-right: 8px;
	color: #AAC7B4;
}

.vg-blog-breadcrumb a {
	color: #AAC7B4;
	text-decoration: none;
}

.vg-blog-breadcrumb a:hover {
	text-decoration: none;
}

.vg-blog-breadcrumb li[aria-current="page"] {
	color: #ffffff;
}

.vg-blog-hero__heading {
	font-family: 'Lexend', sans-serif;
	font-weight: 700;
	font-size: 48px;
	line-height: 1.125; /* 54px */
	color: var(--color-neutral-white);
	margin: 0;
}

.vg-blog-hero__subheading {
	font-family: 'Lexend', sans-serif;
	font-weight: 300;
	font-size: 17px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.82);
	margin: 8px 0 0;
}

/* Search bar: icon + underlined input */
.vg-blog-hero__search {
	width: 282px;
	flex-shrink: 0;
}

.vg-blog-hero__search-inner {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.vg-blog-hero__search-icon {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	color: var(--color-neutral-white);
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
}

.vg-blog-hero__search-input {
	background: transparent;
	border: none;
	outline: none;
	font-family: 'Lexend', sans-serif;
	font-weight: 300;
	font-size: 14px;
	color: var(--color-neutral-white);
	width: 100%;
}

.vg-blog-hero__search-input::placeholder {
	color: rgba(255, 255, 255, 0.7);
}

/* Scroll indicator — hidden on desktop, shown/hidden via JS on mobile */
.vg-blog-filter__track {
	display: none;
}

/* =====================
   CATEGORY FILTER BAR
   Pill-shaped border container, sits at bottom of hero section
   Active tab: #F48113 bg, #020202 text
   Inactive tab: transparent bg, white text
===================== */
/* Outer pill — clips to pill shape; overflow:hidden here, scroll on inner */
.vg-blog-filter__tabs {
	display: inline-flex;
	min-width: 0;
	max-width: 100%;
	border: 1px solid var(--color-primary-600);
	border-radius: 9999px;
	overflow: hidden;
	padding: 0;
}

/* Inner scroll strip — handles wrap on desktop, scroll on mobile */
.vg-blog-filter__tabs-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	padding: 10px 13px;
	gap: 4px;
}

.vg-blog-filter__tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 60px;
	padding: 0 32px;
	border-radius: 9999px;
	border: 1px solid rgba(8, 71, 27, 0.15);
	font-family: 'Lexend', sans-serif;
	font-weight: 500;
	font-size: 16px;
	color: var(--color-neutral-white);
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

.vg-blog-filter__tab:hover {
	background: rgba(255, 255, 255, 0.1);
}

.vg-blog-filter__tab[aria-current="page"] {
	background: var(--color-secondary-500);
	color: var(--color-neutral-black);
}

/* =====================
   POST GRID
   3 columns, 96px gap between grid and hero
   White background
===================== */
.vg-blog-section {
	background: var(--color-bg-light);
}

.vg-blog-grid {
	max-width: var(--container-max-width);
	margin: 0 auto;
	padding: 96px 80px 96px;
	box-sizing: border-box;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

/* =====================
   POST CARD
   Image 264px tall, 20px border-radius
   Category badges overlaid bottom-left of image (absolute)
   Title 24px bold, READ FULL ARTICLE link
===================== */
.vg-blog-card {
	display: flex;
	flex-direction: column;
	gap: 0;
	background: #fff;
	border-radius: 20px;
	border: 1px solid rgba(8, 71, 27, 0.10);
	overflow: hidden;
	transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.vg-blog-card:hover {
	box-shadow: 0 8px 28px rgba(8, 71, 27, 0.14);
	transform: translateY(-3px);
	border-color: rgba(8, 71, 27, 0.22);
}

/* Image wrapper: position relative so badges can overlay */
.vg-blog-card__image-wrap {
	position: relative;
	height: 264px;
	border-radius: 0;
	overflow: hidden;
	flex-shrink: 0;
}

.vg-blog-card__image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 0;
	transition: transform 0.4s ease;
}

.vg-blog-card:hover .vg-blog-card__image-wrap img {
	transform: scale(1.05);
}

/* Placeholder when no featured image */
.vg-blog-card__image-placeholder {
	width: 100%;
	height: 100%;
	background: var(--color-neutral-200);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--color-neutral-500);
	font-size: 14px;
	font-weight: 300;
	border-radius: 20px;
}

/* Category badges: absolute, top-left of image */
.vg-blog-card__badges {
	position: absolute;
	top: 14px;
	left: 17px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	z-index: 1;
}

.vg-blog-card__badge {
	display: inline-block;
	background: var(--color-primary-700);
	color: var(--color-neutral-white);
	font-family: 'Lexend', sans-serif;
	font-weight: 500;
	font-size: 12px;
	line-height: 1.5;
	padding: 2px 12px;
	border-radius: 9999px;
	white-space: nowrap;
	text-decoration: none;
}

.vg-blog-card__badge:hover {
	background: var(--color-primary-800);
}

/* Card body: title + CTA link */
.vg-blog-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 20px 24px 24px;
}

.vg-blog-card__title {
	flex: 1;
	font-family: 'Lexend', sans-serif;
	font-weight: 700;
	font-size: 22px;
	line-height: 1.3;
	color: var(--color-neutral-black);
	margin: 0;
}

.vg-blog-card__title a {
	color: inherit;
	text-decoration: none;
}

.vg-blog-card__title a:hover {
	text-decoration: none;
}

/* READ FULL ARTICLE — uppercase, with arrow */
.vg-blog-card__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: 'Lexend', sans-serif;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.5;
	color: var(--color-secondary-700);
	text-decoration: none;
	transition: gap 0.2s ease;
}

.vg-blog-card__link:hover {
	gap: 14px;
	text-decoration: none;
}

.vg-blog-card__arrow {
	display: inline-block;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	/* Arrow SVG rendered via background or inline SVG in PHP — use inline in template */
}

/* No results */
.vg-blog-no-results {
	text-align: center;
	padding: 80px 20px;
	font-size: 18px;
	color: var(--color-neutral-500);
	font-weight: 300;
	grid-column: 1 / -1;
}

/* =====================
   PAGINATION
   48px circles, active = #08471b bg, inactive = white + #eae8f1 border
   Prev/next arrows as text (← →)
===================== */
.vg-blog-pagination {
	padding: 0 80px 96px;
	background: var(--color-bg-light);
	display: flex;
	justify-content: center;
	max-width: var(--container-max-width);
	margin: 0 auto;
	box-sizing: border-box;
}

.vg-blog-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid var(--color-neutral-200);
	background: var(--color-neutral-white);
	font-family: 'Lexend', sans-serif;
	font-weight: 500;
	font-size: 14px;
	color: var(--color-neutral-500);
	text-decoration: none;
	margin: 0 4px;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.vg-blog-pagination .page-numbers:hover {
	background: var(--color-neutral-200);
	color: var(--color-neutral-black);
}

.vg-blog-pagination .page-numbers.current {
	background: var(--color-primary-800);
	border-color: var(--color-primary-800);
	color: var(--color-neutral-white);
}

.vg-blog-pagination .page-numbers.dots {
	border: none;
	background: none;
	pointer-events: none;
}

.vg-blog-pagination .page-numbers.prev,
.vg-blog-pagination .page-numbers.next {
	font-size: 18px;
}

/* =====================
   RESPONSIVE — 1024px (tablet landscape)
===================== */
@media (max-width: 1024px) {
	.vg-blog-hero__inner {
		padding: 0 40px 40px;
	}

	.vg-blog-hero__heading {
		font-size: 36px;
	}

	.vg-blog-grid {
		padding: 60px 40px 60px;
	}

	.vg-blog-pagination {
		padding: 0 40px 60px;
	}
}

/* =====================
   RESPONSIVE — 768px (tablet portrait)
===================== */
@media (max-width: 768px) {
	.vg-blog-hero {
		height: 520px;
	}

	.vg-blog-hero__inner {
		padding: 0 24px 32px;
		gap: 32px;
	}

	.vg-blog-hero__content {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.vg-blog-hero__heading {
		font-size: 32px;
	}

	.vg-blog-hero__search {
		width: 100%;
	}

	.vg-blog-filter__tabs {
		max-width: 100%;
	}

	.vg-blog-filter__tabs-inner {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding: 8px;
	}

	.vg-blog-filter__tabs-inner::-webkit-scrollbar {
		display: none;
	}

	/* Scroll progress indicator — shown below the pill on mobile */
	.vg-blog-filter__track {
		display: block;
		width: 40%;
		max-width: 160px;
		height: 4px;
		background: rgba(255, 255, 255, 0.22);
		border-radius: 4px;
		margin: 12px auto 0;
		position: relative;
		overflow: hidden;
		cursor: pointer;
	}

	.vg-blog-filter__thumb {
		position: absolute;
		top: 0;
		left: 0;
		height: 100%;
		background: rgba(255, 255, 255, 0.8);
		border-radius: 4px;
		transition: left 0.08s ease;
		cursor: grab;
	}

	.vg-blog-filter__thumb:active {
		cursor: grabbing;
	}

	.vg-blog-filter__tab {
		height: 48px;
		padding: 0 20px;
		font-size: 14px;
		flex-shrink: 0;
	}

	.vg-blog-grid {
		padding: 48px 24px 48px;
		grid-template-columns: 1fr 1fr;
		gap: 16px;
	}

	.vg-blog-pagination {
		padding: 0 24px 48px;
	}
}

/* =====================
   RESPONSIVE — 480px (mobile)
===================== */
@media (max-width: 480px) {
	.vg-blog-hero {
		height: 500px;
	}

	.vg-blog-hero__inner {
		padding: 0 16px 24px;
	}

	.vg-blog-hero__heading {
		font-size: 28px;
	}

	.vg-blog-grid {
		padding: 40px 16px 40px;
		grid-template-columns: 1fr;
	}

	.vg-blog-pagination {
		padding: 0 16px 40px;
	}

	.vg-blog-pagination .page-numbers {
		width: 40px;
		height: 40px;
		margin: 0 2px;
		font-size: 13px;
	}
}

/* =====================
   POST HEADER BAND
   Dark green, full width, min 400px height
   Breadcrumb, H1, meta row (category pill · date · read time)
===================== */
.vg-post-header {
	position: relative;
	min-height: 500px;
	background-color: var(--color-primary-800);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 52px 80px;
}

.vg-post-header__breadcrumb {
	font-family: 'Lexend', sans-serif;
	font-weight: 300;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.6);
	margin: 0 0 16px;
}

.vg-post-header__title {
	font-family: 'Lexend', sans-serif;
	font-weight: 700;
	font-size: 42px;
	line-height: 1.1;
	color: var(--color-neutral-white);
	margin: 0 0 24px;
	max-width: 780px;
}

.vg-post-header__meta {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.vg-post-header__cat-pill {
	display: inline-block;
	background: var(--color-secondary-500);
	color: var(--color-neutral-black);
	font-family: 'Lexend', sans-serif;
	font-weight: 600;
	font-size: 12px;
	padding: 4px 14px;
	border-radius: 9999px;
	white-space: nowrap;
	text-decoration: none;
}

.vg-post-header__cat-pill:hover {
	opacity: 0.85;
}

.vg-post-header__meta-item {
	font-family: 'Lexend', sans-serif;
	font-weight: 300;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.7);
}

/* =====================
   FEATURED IMAGE
   Full width, max 1440px centred, ~460px tall
   Hidden entirely if no featured image (no-placeholder)
===================== */
.vg-post-image {
	width: 100%;
	max-width: var(--container-max-width);
	margin: 48px auto 0;
	padding: 0 80px;
	box-sizing: border-box;
}

.vg-post-image__img {
	width: 100%;
	height: 460px;
	object-fit: cover;
	display: block;
	border-radius: 20px;
}

/* =====================
   ARTICLE BODY
   Centred reading column, max 900px
   Scoped to .vg-post-body so WP core block styles don't bleed
===================== */
.vg-post-body-wrap {
	max-width: 900px;
	margin: 0 auto;
	padding: 64px 24px;
}

.vg-post-body h2 {
	font-family: 'Lexend', sans-serif;
	font-weight: 700;
	font-size: 28px;
	line-height: 1.3;
	color: var(--color-neutral-black);
	margin: 48px 0 16px;
}

.vg-post-body h3 {
	font-family: 'Lexend', sans-serif;
	font-weight: 600;
	font-size: 22px;
	line-height: 1.35;
	color: var(--color-neutral-black);
	margin: 36px 0 12px;
}

.vg-post-body h4 {
	font-family: 'Lexend', sans-serif;
	font-weight: 600;
	font-size: 18px;
	line-height: 1.4;
	color: var(--color-neutral-black);
	margin: 28px 0 10px;
}

.vg-post-body p {
	font-family: 'Lexend', sans-serif;
	font-weight: 300;
	font-size: 18px;
	line-height: 1.7;
	color: var(--color-neutral-700);
	margin: 0 0 24px;
}

.vg-post-body a {
	color: var(--color-primary-800);
	text-decoration: underline;
}

.vg-post-body a:hover {
	color: var(--color-secondary-700);
}

.vg-post-body blockquote {
	border-left: 4px solid var(--color-primary-600);
	margin: 32px 0;
	padding: 16px 24px;
	font-style: italic;
	background: var(--color-neutral-100);
	border-radius: 0 8px 8px 0;
}

.vg-post-body blockquote p {
	margin: 0;
	color: var(--color-neutral-600);
}

.vg-post-body img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	display: block;
	margin: 32px auto;
}

/* Gallery breakout — negates the 24px wrap padding to span full column width */
.vg-post-body .wp-block-gallery {
	margin-left: -24px;
	margin-right: -24px;
	margin-top: 28px;
	margin-bottom: 28px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2px;
}

.vg-post-body .wp-block-gallery figure {
	margin: 0;
	overflow: hidden;
}

/* Override the global .vg-post-body img rule for images inside the gallery */
.vg-post-body .wp-block-gallery figure img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
	border-radius: 0;
	margin: 0;
}

/* Project details card — used with <dl class="vg-cs-details"> in post content.
   Each dt/dd pair becomes one row in the 2-column grid (dt left, dd right).
   Assumes an even number of pairs; add wrapper divs if stacked pairs are needed. */
.vg-post-body .vg-cs-details {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 32px;
	background: #ffffff;
	border: 1px solid rgba(8, 71, 27, 0.15);
	border-left: 3px solid var(--color-primary-800);
	border-radius: 0 8px 8px 0;
	padding: 16px 20px;
	margin: 24px 0 0;
}

.vg-post-body .vg-cs-details dt {
	font-family: 'Lexend', sans-serif;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--color-primary-800);
	margin-bottom: 2px;
}

.vg-post-body .vg-cs-details dd {
	font-family: 'Lexend', sans-serif;
	font-size: 15px;
	font-weight: 300;
	color: #222222;
	margin: 0;
}

.vg-post-body ul,
.vg-post-body ol {
	font-family: 'Lexend', sans-serif;
	font-weight: 300;
	font-size: 18px;
	line-height: 1.7;
	color: var(--color-neutral-700);
	margin: 0 0 24px;
	padding-left: 28px;
}

.vg-post-body li {
	margin-bottom: 8px;
}

.vg-post-body table {
	width: 100%;
	border-collapse: collapse;
	font-family: 'Lexend', sans-serif;
	font-size: 15px;
	margin: 32px 0;
}

.vg-post-body table th {
	background: var(--color-primary-800);
	color: var(--color-neutral-white);
	font-weight: 600;
	padding: 12px 16px;
	text-align: left;
}

.vg-post-body table td {
	padding: 12px 16px;
	border-bottom: 1px solid var(--color-neutral-200);
	color: var(--color-neutral-700);
}

.vg-post-body table tr:nth-child(even) td {
	background: var(--color-neutral-100);
}

/* =====================
   HOWTO STEPS
   Lives inside .vg-post-body so list/heading typography is inherited.
   Only renders when ACF howto_steps is populated.
===================== */
.vg-howto {
	margin: 40px 0;
}

.vg-howto__total-time {
	display: inline-block;
	font-family: 'Lexend', sans-serif;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--color-primary-800);
	background: var(--color-neutral-100);
	border-radius: 999px;
	padding: 6px 14px;
	margin: 0 0 24px;
}

.vg-howto__list {
	/* Inherits .vg-post-body ol base styles (font, padding, line-height). */
	margin: 0;
}

.vg-howto__step {
	margin-bottom: 24px;
}

.vg-howto__step-name {
	/* Inherits .vg-post-body h3 styles. */
	margin-top: 8px;
	margin-bottom: 12px;
}

.vg-howto__step-image {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 16px 0;
	border-radius: 8px;
}

.vg-howto__step-text {
	/* Inherits .vg-post-body p styles. */
	margin: 0 0 8px;
}

/* =====================
   RELATED POSTS SECTION
   Reuses .vg-blog-grid and .vg-blog-card — no card CSS needed here
===================== */
.vg-post-related {
	background: var(--color-bg-light);
	padding: 96px 0 0;
	box-sizing: border-box;
}

.vg-post-related__heading {
	font-family: 'Lexend', sans-serif;
	font-weight: 700;
	font-size: 32px;
	line-height: 1.2;
	color: var(--color-neutral-black);
	margin: 0 auto 48px;
	max-width: var(--container-max-width);
	padding: 0 80px;
	box-sizing: border-box;
}

/* =====================
   POST CTA BAND
   Dark green (#063715), orange top border, centred text, pill buttons.
   Shown on all single posts (case studies and regular posts alike).
===================== */
.vg-post-cta {
	background: #063715;
	border-top: 4px solid var(--color-secondary-500, #F48113);
	padding: 80px;
	margin-top: 96px;
	text-align: center;
}

.vg-post-cta__eyebrow {
	font-family: 'Lexend', sans-serif;
	font-weight: 500;
	font-size: 13px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #AAC7B4;
	margin: 0 0 16px;
}

.vg-post-cta__heading {
	font-family: 'Lexend', sans-serif;
	font-weight: 700;
	font-size: clamp(28px, 3vw, 42px);
	line-height: 1.15;
	color: #ffffff;
	margin: 0 0 16px;
}

.vg-post-cta__subtext {
	font-family: 'Lexend', sans-serif;
	font-weight: 300;
	font-size: 16px;
	line-height: 1.6;
	color: #C8DDD1;
	margin: 0 0 36px;
	max-width: 640px;
	margin-left: auto;
	margin-right: auto;
}

.vg-post-cta__actions {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.vg-post-cta__btn {
	display: inline-block;
	font-family: 'Lexend', sans-serif;
	font-weight: 600;
	font-size: 16px;
	padding: 15px 32px;
	border-radius: 999px;
	text-decoration: none;
	white-space: nowrap;
	transition: opacity 0.15s ease, background 0.15s ease;
}

.vg-post-cta__btn--primary {
	background: var(--color-secondary-500, #F48113);
	color: #020202;
}

.vg-post-cta__btn--primary:hover {
	opacity: 0.88;
}

.vg-post-cta__btn--secondary {
	background: transparent;
	color: #ffffff;
	border: 1.5px solid rgba(255, 255, 255, 0.55);
}

.vg-post-cta__btn--secondary:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.8);
}

/* =====================
   RESPONSIVE — 1024px
===================== */
@media (max-width: 1024px) {
	.vg-post-header {
		padding: 40px 40px;
		min-height: 460px;
	}

	.vg-post-header__title {
		font-size: 34px;
	}

	.vg-post-image {
		padding: 0 40px;
		margin-top: 36px;
	}

	.vg-post-image__img {
		height: 360px;
	}

	.vg-post-related {
		padding: 60px 0 0;
	}

	.vg-post-related__heading {
		padding: 0 40px;
	}

	.vg-post-cta {
		padding: 60px 40px;
		margin-top: 72px;
	}
}

/* =====================
   RESPONSIVE — 768px
===================== */
@media (max-width: 768px) {
	.vg-post-header {
		padding: 32px 24px;
		min-height: 420px;
	}

	.vg-post-header__title {
		font-size: 28px;
		margin-bottom: 20px;
	}

	.vg-post-image {
		padding: 0 24px;
		margin-top: 28px;
	}

	.vg-post-image__img {
		height: 280px;
		border-radius: 12px;
	}

	.vg-post-body-wrap {
		padding: 48px 24px;
	}

	.vg-post-body p,
	.vg-post-body ul,
	.vg-post-body ol {
		font-size: 16px;
	}

	.vg-post-body .wp-block-gallery {
		/* padding unchanged at 24px — negative margins stay -24px */
		grid-template-columns: repeat(2, 1fr);
	}

	.vg-post-body .wp-block-gallery figure img {
		height: 160px;
	}

	.vg-post-body .vg-cs-details {
		grid-template-columns: 1fr;
	}

	.vg-post-related {
		padding: 48px 0 0;
	}

	.vg-post-related__heading {
		font-size: 26px;
		margin-bottom: 32px;
		padding: 0 24px;
	}

	.vg-post-cta {
		padding: 48px 24px;
		margin-top: 60px;
	}

	.vg-post-cta__heading {
		font-size: 24px;
	}
}

/* =====================
   RESPONSIVE — 480px
===================== */
@media (max-width: 480px) {
	.vg-post-header {
		padding: 24px 16px;
		min-height: 380px;
	}

	.vg-post-header__title {
		font-size: 24px;
	}

	.vg-post-image {
		padding: 0 16px;
		margin-top: 20px;
	}

	.vg-post-image__img {
		height: 220px;
		border-radius: 8px;
	}

	.vg-post-body-wrap {
		padding: 36px 16px;
	}

	.vg-post-body .wp-block-gallery {
		margin-left: -16px;
		margin-right: -16px;
		grid-template-columns: repeat(2, 1fr);
	}

	.vg-post-body .wp-block-gallery figure img {
		height: 130px;
	}

	.vg-post-related {
		padding: 40px 0 0;
	}

	.vg-post-related__heading {
		padding: 0 16px;
	}

	.vg-post-cta {
		padding: 40px 16px;
		margin-top: 48px;
	}

	.vg-post-cta__actions {
		flex-direction: column;
		align-items: center;
	}

	.vg-post-cta__btn {
		width: 100%;
		text-align: center;
	}
}

/* =====================
   CASE STUDY — PRODUCTS USED SECTION
   Shown below article body on case study posts when ACF relationship is populated.
===================== */
.vg-cs-products {
	background: var(--color-bg-light);
	padding: 80px 80px;
}

.vg-cs-products__inner {
	max-width: var(--container-max-width);
	margin: 0 auto;
}

.vg-cs-products__heading {
	font-family: 'Lexend', sans-serif;
	font-size: clamp(26px, 2.8vw, 36px);
	font-weight: 700;
	color: var(--color-primary-900);
	margin: 0 0 40px;
}

.vg-cs-products__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 24px;
}

.vg-cs-product-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid rgba(8, 71, 27, 0.12);
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.vg-cs-product-card:hover {
	box-shadow: 0 6px 20px rgba(8, 71, 27, 0.12);
	transform: translateY(-2px);
}

.vg-cs-product-card__image {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--color-bg-light);
}

.vg-cs-product-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.vg-cs-product-card:hover .vg-cs-product-card__image img {
	transform: scale(1.04);
}

.vg-cs-product-card__placeholder {
	width: 100%;
	height: 100%;
	background: #e8ede9;
}

.vg-cs-product-card__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 20px;
}

.vg-cs-product-card__cat {
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-primary-700, #08471b);
	opacity: 0.8;
}

.vg-cs-product-card__title {
	font-size: 1rem;
	font-weight: 600;
	color: var(--color-primary-900);
	line-height: 1.35;
}

.vg-cs-product-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--color-accent, #F48113);
	margin-top: 8px;
}

@media (max-width: 1024px) {
	.vg-cs-products {
		padding: 64px 40px;
	}
}

@media (max-width: 768px) {
	.vg-cs-products {
		padding: 56px 24px;
	}
}

@media (max-width: 480px) {
	.vg-cs-products {
		padding: 48px 16px;
	}

	.vg-cs-products__grid {
		grid-template-columns: 1fr;
	}
}
