/* ═══════════════════════════════════════════════════════════════════════
   ESI Blog Listing — blog.css
   Pixel-matched to Figma "blog" frame (1920px canvas).
   Reuses :root tokens from header.css (--h-accent, --h-font, --h-max, --h-pad, etc.)
   Mobile-first, responsive at 768 / 1200.
   All sections scoped under .blog
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Blog-specific tokens ─────────────────────────────────────────── */
:root {
	--blog-blue: #1b4d5c;
	--blog-dark: #1f1f1f;
	--blog-body: #5f6368;
	--blog-card-radius: 4px;
	--blog-filter-bg: #e8eaed;
	--blog-hero-h: 400px;
}
@media (min-width: 768px) {
	:root { --blog-hero-h: 460px; }
}
@media (min-width: 1200px) {
	:root { --blog-hero-h: 513px; }
}

/* ── Main wrapper ─────────────────────────────────────────────────── */
main.blog {
	background: #fff;
	overflow: hidden;
}


/* ══════════════════════════════════════════════════════════════════════
   HERO — 40% teal / 60% image split (matches service-page hero)
   ══════════════════════════════════════════════════════════════════════ */
.blog-hero {
	position: relative;
	width: 100%;
	min-height: var(--blog-hero-h);
	display: flex;
	flex-direction: column;
}
@media (min-width: 768px) {
	.blog-hero { flex-direction: row; }
}

/* Teal panel (matches service pages) */
.blog-hero__red {
	position: relative;
	z-index: 2;
	background: linear-gradient(135deg, #14383f 0%, #1b4d5c 100%);
	padding: 80px var(--h-pad, 20px) 48px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
@media (min-width: 768px) {
	.blog-hero__red {
		width: 45%;
		min-height: var(--blog-hero-h);
		padding: 0 48px 0 var(--h-pad, 40px);
	}
}
@media (min-width: 1200px) {
	.blog-hero__red {
		width: 40%;
		/* no max-width: panel grows on wide viewports so text never crunches */
		padding-left: max(var(--h-pad, 47px), calc((100vw - var(--h-max, 1440px)) / 2 + var(--h-pad, 47px)));
		padding-right: 67px;
	}
}
@media (min-width: 1600px) {
	.blog-hero__red {
		padding-right: 48px;
	}
}

/* Badge pill */
.blog-hero__badge {
	display: inline-block;
	background: var(--blog-dark);
	color: #fff;
	font-family: var(--h-font);
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	padding: 8px 20px;
	border-radius: 50px;
	margin-bottom: 20px;
	width: fit-content;
}

/* Hero heading */
.blog-hero__title {
	font-family: var(--h-font);
	font-weight: 400;
	font-size: 36px;
	line-height: 1;
	color: #fff;
	margin: 0;
}
@media (min-width: 768px) {
	.blog-hero__title { font-size: 48px; }
}
@media (min-width: 1200px) {
	.blog-hero__title {
		font-size: 58px;
		max-width: 634px;
	}
}

/* Hero image */
.blog-hero__image {
	position: relative;
	min-height: 240px;
	overflow: hidden;
}
@media (min-width: 768px) {
	.blog-hero__image {
		flex: 1;
		min-width: 40%;
		min-height: var(--blog-hero-h);
	}
}
.blog-hero__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	position: absolute;
	inset: 0;
}


/* ══════════════════════════════════════════════════════════════════════
   BREADCRUMBS
   ══════════════════════════════════════════════════════════════════════ */
.blog-breadcrumbs {
	max-width: var(--h-max, 1440px);
	margin: 0 auto;
	padding: 16px var(--h-pad, 20px);
	font-family: var(--h-font);
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
}
.blog-breadcrumbs ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}
.blog-breadcrumbs a {
	color: var(--blog-body);
	text-decoration: none;
}
.blog-breadcrumbs a:hover {
	text-decoration: underline;
}
.blog-breadcrumbs__sep {
	display: inline-block;
	vertical-align: middle;
}
.blog-breadcrumbs span[aria-current] {
	color: var(--blog-dark);
}


/* ══════════════════════════════════════════════════════════════════════
   CONTENT AREA — wraps filters + section header + grid
   ══════════════════════════════════════════════════════════════════════ */
.blog-content {
	max-width: var(--h-max, 1440px);
	margin: 0 auto;
	padding: 0 var(--h-pad, 20px);
}


/* ══════════════════════════════════════════════════════════════════════
   SEARCH + CATEGORY FILTER BAR
   ══════════════════════════════════════════════════════════════════════ */
.blog-filters {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 40px;
}
@media (min-width: 768px) {
	.blog-filters {
		flex-direction: row;
		justify-content: flex-end;
		align-items: center;
		gap: 24px;
	}
}

.blog-filters__search {
	position: relative;
	flex: 0 1 620px;
}
.blog-filters__search-input {
	width: 100%;
	height: 51px;
	background: var(--blog-filter-bg);
	border: none;
	border-radius: 4px;
	padding: 0 50px 0 16px;
	font-family: var(--h-font);
	font-size: 18px;
	font-weight: 400;
	color: var(--blog-dark);
	line-height: 28px;
	outline: none;
}
.blog-filters__search-input::placeholder {
	color: var(--blog-body);
}
.blog-filters__search-input:focus {
	box-shadow: 0 0 0 2px var(--blog-blue);
}
.blog-filters__search-btn {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: var(--blog-body);
	display: flex;
	align-items: center;
}
.blog-filters__search-btn svg {
	width: 24px;
	height: 24px;
}

.blog-filters__category {
	position: relative;
	flex: 0 0 auto;
}
.blog-filters__category-select {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: none;
	border-bottom: 1px solid var(--blog-body);
	padding: 8px 32px 8px 0;
	font-family: var(--h-font);
	font-size: 18px;
	font-weight: 400;
	color: var(--blog-body);
	line-height: 28px;
	cursor: pointer;
	outline: none;
	min-width: 180px;
}
.blog-filters__category-select:focus {
	border-bottom-color: var(--blog-blue);
}
.blog-filters__category::after {
	content: '';
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%) rotate(45deg);
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--blog-body);
	border-bottom: 2px solid var(--blog-body);
	pointer-events: none;
}


/* ══════════════════════════════════════════════════════════════════════
   SECTION HEADER — "Insights" label + large heading
   ══════════════════════════════════════════════════════════════════════ */
.blog-section-header {
	margin-bottom: 40px;
}
.blog-section-header__label {
	display: block;
	font-family: var(--h-font);
	font-size: 24px;
	font-weight: 500;
	color: var(--blog-blue);
	line-height: 1.2;
	margin-bottom: 8px;
}
@media (min-width: 1200px) {
	.blog-section-header__label { font-size: 30px; }
}
.blog-section-header__heading {
	font-family: var(--h-font);
	font-weight: 500;
	font-size: 36px;
	line-height: 1.1;
	color: var(--blog-dark);
	margin: 0;
	max-width: 644px;
}
@media (min-width: 1200px) {
	.blog-section-header__heading {
		font-size: 58px;
		line-height: 60px;
	}
}


/* ══════════════════════════════════════════════════════════════════════
   LAYOUT — section header + filters sit side-by-side on desktop
   ══════════════════════════════════════════════════════════════════════ */
.blog-top {
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin-bottom: 48px;
}
@media (min-width: 1200px) {
	.blog-top {
		flex-direction: row;
		justify-content: space-between;
		align-items: flex-start;
	}
	.blog-top .blog-section-header { flex: 0 1 644px; }
	.blog-top .blog-filters {
		flex: 0 1 auto;
		margin-bottom: 0;
		align-self: flex-start;
		padding-top: 10px;
	}
}


/* ══════════════════════════════════════════════════════════════════════
   FEATURED ROW — first 3 posts: 2 small left + 1 large right
   ══════════════════════════════════════════════════════════════════════ */
.blog__featured {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	margin-bottom: 32px;
}
@media (min-width: 768px) {
	.blog__featured {
		grid-template-columns: 1fr 1fr;
		gap: 24px;
	}
}
@media (min-width: 1200px) {
	.blog__featured {
		grid-template-columns: 1fr 1fr 1.55fr;
		gap: 21px;
	}
}


/* ══════════════════════════════════════════════════════════════════════
   POST GRID — 4-column for remaining posts
   ══════════════════════════════════════════════════════════════════════ */
.blog__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	margin-bottom: 48px;
}
@media (min-width: 768px) {
	.blog__grid {
		grid-template-columns: 1fr 1fr;
		gap: 24px;
	}
}
@media (min-width: 1200px) {
	.blog__grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 21px;
	}
}


/* ══════════════════════════════════════════════════════════════════════
   BLOG CARD — reusable post card component
   ══════════════════════════════════════════════════════════════════════ */
.blog-card {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	border-radius: var(--blog-card-radius);
}
.blog-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Card image */
.blog-card__image {
	position: relative;
	overflow: hidden;
	border-radius: var(--blog-card-radius) var(--blog-card-radius) 0 0;
	background: var(--h-accent, #ff4a34);
}
.blog-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	aspect-ratio: 442 / 299;
	transition: transform 0.4s ease;
}
.blog-card:hover .blog-card__image img {
	transform: scale(1.03);
}

/* Fallback when no featured image */
.blog-card__image--fallback {
	aspect-ratio: 442 / 299;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--h-accent, #ff4a34);
}
.blog-card__image--fallback span {
	font-family: var(--h-font);
	font-weight: 700;
	font-size: 24px;
	color: rgba(255, 255, 255, 0.4);
	letter-spacing: 2px;
}

/* Card body */
.blog-card__body {
	padding: 16px 16px 20px;
}

/* Meta row: date + category */
.blog-card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}
.blog-card__date {
	font-family: var(--h-font);
	font-size: 14px;
	font-weight: 500;
	color: var(--blog-body);
	line-height: 12px;
}
.blog-card__category {
	display: inline-block;
	background: var(--blog-blue);
	color: #fff;
	font-family: var(--h-font);
	font-size: 12px;
	font-weight: 500;
	line-height: 12px;
	padding: 6px 12px;
	border-radius: 50px;
	text-decoration: none;
	white-space: nowrap;
}
.blog-card__category:hover {
	opacity: 0.85;
}

/* Card title */
.blog-card__title {
	font-family: var(--h-font);
	font-weight: 500;
	font-size: 20px;
	line-height: 28px;
	color: var(--blog-dark);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
@media (min-width: 1200px) {
	.blog-card__title {
		font-size: 24px;
		line-height: 30px;
	}
}
.blog-card__title a {
	color: inherit;
	text-decoration: none;
}
.blog-card__title a:hover {
	text-decoration: underline;
}

/* ── Large card variant (featured row, right column) ── */
.blog-card--large .blog-card__image img {
	aspect-ratio: 901 / 603;
}
.blog-card--large .blog-card__image--fallback {
	aspect-ratio: 901 / 603;
}
.blog-card--large .blog-card__title {
	font-size: 28px;
	line-height: 36px;
}
@media (min-width: 1200px) {
	.blog-card--large .blog-card__title {
		font-size: 35px;
		line-height: 40px;
	}
}


/* ══════════════════════════════════════════════════════════════════════
   LOAD MORE BUTTON
   ══════════════════════════════════════════════════════════════════════ */
.blog-load-more {
	text-align: center;
	margin-bottom: 64px;
}
.blog-load-more__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--h-accent, #ff4a34);
	color: #fff;
	font-family: var(--h-font);
	font-size: 18px;
	font-weight: 500;
	line-height: 20px;
	padding: 11px 28px;
	border: none;
	border-radius: 50px;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.2s ease;
}
.blog-load-more__btn:hover {
	background: #e8432f;
	transform: translateY(-1px);
}
.blog-load-more__btn svg {
	width: 16px;
	height: 16px;
	animation: blog-spin 1s linear infinite;
	animation-play-state: paused;
}
.blog-load-more__btn:hover svg {
	animation-play-state: running;
}
@keyframes blog-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}


/* ══════════════════════════════════════════════════════════════════════
   TRUST / LOGOS BAR — override for blog context
   ══════════════════════════════════════════════════════════════════════ */
.blog-trust {
	max-width: var(--h-max, 1440px);
	margin: 0 auto;
	padding: 40px var(--h-pad, 20px) 48px;
	border-top: 1px solid #e8eaed;
}
/* Badge layout handled by trust-bar.css */


/* ══════════════════════════════════════════════════════════════════════
   NO RESULTS STATE
   ══════════════════════════════════════════════════════════════════════ */
.blog-no-results {
	text-align: center;
	padding: 80px 20px;
}
.blog-no-results__heading {
	font-family: var(--h-font);
	font-weight: 500;
	font-size: 36px;
	color: var(--blog-dark);
	margin: 0 0 16px;
}
.blog-no-results__text {
	font-family: var(--h-font);
	font-size: 18px;
	color: var(--blog-body);
	margin: 0;
}
.blog-no-results__actions {
	margin: 24px 0 0;
}
.blog-no-results__back {
	display: inline-flex !important;
}


/* ══════════════════════════════════════════════════════════════════════
   CATEGORY ARCHIVE — category.php
   Reuses blog hero, breadcrumbs, cards, and trust bar styles.
   Only new elements below: header, grid, and pagination.
   ══════════════════════════════════════════════════════════════════════ */

/* Hero intro paragraph (category description) */
.blog-hero__intro {
	font-family: var(--h-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.85);
	margin: 16px 0 0;
	max-width: 520px;
}
@media (min-width: 1200px) {
	.blog-hero__intro {
		font-size: 18px;
	}
}

/* ── Category header — label + count + back link ───────────────────── */
.cat-header {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-bottom: 48px;
	padding-bottom: 32px;
	border-bottom: 1px solid #e8eaed;
}
@media (min-width: 768px) {
	.cat-header {
		flex-direction: row;
		justify-content: space-between;
		align-items: flex-end;
	}
}

.cat-header__label {
	display: flex;
	align-items: center;
	gap: 14px;
	font-family: var(--h-font);
	font-size: 22px;
	font-weight: 500;
	color: #1b4d5c;
	line-height: 1.2;
	margin-bottom: 4px;
}
.cat-header__label::before {
	content: '';
	display: block;
	width: 32px;
	height: 2px;
	background: #1b4d5c;
	flex-shrink: 0;
	opacity: 0.5;
}
@media (min-width: 1200px) {
	.cat-header__label {
		font-size: 28px;
		gap: 18px;
	}
	.cat-header__label::before {
		width: 40px;
	}
}

.cat-header__heading {
	font-family: var(--h-font);
	font-weight: 400;
	font-size: 16px;
	line-height: 1.4;
	color: var(--blog-body);
	margin: 0;
}
@media (min-width: 1200px) {
	.cat-header__heading {
		font-size: 18px;
	}
}

.cat-header__back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--h-font);
	font-size: 15px;
	font-weight: 500;
	color: var(--blog-body);
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.2s ease;
}
.cat-header__back:hover {
	color: var(--blog-dark);
}
.cat-header__back svg {
	flex-shrink: 0;
	transition: transform 0.2s ease;
}
.cat-header__back:hover svg {
	transform: translateX(-3px);
}

/* ── Category post grid — 3-column ─────────────────────────────────── */
.cat-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	margin-bottom: 56px;
}
@media (min-width: 768px) {
	.cat-grid {
		grid-template-columns: 1fr 1fr;
		gap: 24px;
	}
}
@media (min-width: 1200px) {
	.cat-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 28px;
	}
}

/* ── Pagination ────────────────────────────────────────────────────── */
.cat-pagination {
	display: flex;
	justify-content: center;
	margin-bottom: 64px;
}
.cat-pagination .page-numbers {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 6px;
}
.cat-pagination .page-numbers li {
	display: flex;
}
.cat-pagination .page-numbers a,
.cat-pagination .page-numbers span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	font-family: var(--h-font);
	font-size: 15px;
	font-weight: 500;
	color: var(--blog-body);
	text-decoration: none;
	border-radius: 8px;
	transition: background 0.2s ease, color 0.2s ease;
}
.cat-pagination .page-numbers a:hover {
	background: #f0f1f3;
	color: var(--blog-dark);
}
.cat-pagination .page-numbers .current {
	background: #1b4d5c;
	color: #fff;
}
.cat-pagination .page-numbers .dots {
	color: var(--blog-body);
	pointer-events: none;
}
.cat-pagination .page-numbers .prev,
.cat-pagination .page-numbers .next {
	padding: 0 8px;
}
.cat-pagination .page-numbers .prev svg,
.cat-pagination .page-numbers .next svg {
	flex-shrink: 0;
}
