/**
 * Blog listing - posts page and archives.
 *
 * Loaded only on those pages. Fonts are not declared here: Poppins is already
 * loaded site-wide and the body stack falls back to the system font, so this
 * costs no extra request.
 */

.mh-arc-head,
.mh-arc {
	--mh-navy: #172C4B;
	--mh-navy-deep: #121f35;
	--mh-green: #48A625;
	--mh-green-deep: #3a8a1e;
	--mh-slate: #64748b;
	--mh-line: #e6ecf2;
}

/* ---------- header band ---------- */

.mh-arc-head {
	position: relative;
	isolation: isolate;
	/* Runs under the fixed transparent header, same as the single post hero. */
	padding: calc(var(--mh-header-offset, 76px) + clamp(26px, 4vw, 56px)) 0 clamp(78px, 9vw, 128px);
	background-color: #e9f1fa;
	background-image:
		radial-gradient(760px 430px at 8% 2%, rgba(46, 104, 174, 0.34), rgba(46, 104, 174, 0) 68%),
		radial-gradient(760px 430px at 92% 2%, rgba(46, 104, 174, 0.30), rgba(46, 104, 174, 0) 68%),
		radial-gradient(680px 380px at 50% 0%, rgba(46, 104, 174, 0.24), rgba(46, 104, 174, 0) 70%),
		linear-gradient(180deg, #eaf2fb 0%, #eef4fa 100%);
	overflow: hidden;
	text-align: center;
}

.mh-arc-head::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: clamp(70px, 9vw, 130px);
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.42) 52%,
		rgba(255, 255, 255, 0.85) 80%,
		#ffffff 100%
	);
	pointer-events: none;
	z-index: 0;
}

.mh-arc-head__inner {
	position: relative;
	z-index: 1;
	max-width: 780px;
	margin: 0 auto;
	padding: 0 clamp(18px, 4vw, 40px);
}

.mh-arc-head__title {
	margin: 0 0 14px;
	font-family: 'Poppins', system-ui, sans-serif;
	font-size: clamp(30px, 4vw, 46px);
	font-weight: 700;
	line-height: 1.14;
	letter-spacing: -0.018em;
	color: var(--mh-navy);
	text-wrap: balance;
}

.mh-arc-head__lead {
	margin: 0 auto;
	max-width: 60ch;
	font-size: clamp(15px, 1.6vw, 17px);
	line-height: 1.65;
	color: var(--mh-slate);
}

/* ---------- filter pills ---------- */

.mh-arc-filters {
	margin-top: 26px;
}

.mh-arc-filters__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 9px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mh-arc-filters__pill {
	display: inline-block;
	padding: 9px 20px;
	border-radius: 999px;
	border: 1px solid rgba(23, 44, 75, 0.16);
	background: rgba(255, 255, 255, 0.72);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--mh-navy);
	text-decoration: none;
	transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.mh-arc-filters__pill:hover,
.mh-arc-filters__pill:focus-visible {
	background: #fff;
	border-color: rgba(23, 44, 75, 0.34);
	color: var(--mh-navy);
}

.mh-arc-filters__pill.is-active {
	background: var(--mh-green-deep);
	border-color: var(--mh-green-deep);
	color: #fff;
}

/* ---------- grid ---------- */

.mh-arc {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 clamp(18px, 4vw, 40px) clamp(56px, 8vw, 100px);
	font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.mh-arc__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(20px, 2.6vw, 34px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.mh-arc__empty {
	margin: 0;
	padding: 40px 0;
	text-align: center;
	font-size: 17px;
	color: var(--mh-slate);
}

/* ---------- card ---------- */

.mh-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

/* aspect-ratio holds the space before the file arrives, so the grid never
   reflows as the thumbnails decode */
.mh-card__frame {
	display: block;
	aspect-ratio: 16 / 10;
	border-radius: 16px;
	overflow: hidden;
	background: #eef2f6;
	margin-bottom: 16px;
}

.mh-card__frame img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 420ms cubic-bezier(0.2, 0, 0.2, 1);
}

.mh-card__link:hover .mh-card__frame img,
.mh-card__link:focus-visible .mh-card__frame img {
	transform: scale(1.04);
}

.mh-card__body {
	display: block;
}

.mh-card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--mh-slate);
	margin-bottom: 8px;
}

.mh-card__dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: #b6c1cf;
	flex: 0 0 auto;
}

.mh-card__cat {
	font-weight: 600;
	color: var(--mh-green-deep);
}

.mh-card__headline {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.mh-card__title {
	font-family: 'Poppins', system-ui, sans-serif;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.32;
	color: var(--mh-navy);
	transition: color 150ms ease;
}

.mh-card__link:hover .mh-card__title { color: var(--mh-green-deep); }

.mh-card__arrow {
	flex: 0 0 auto;
	margin-top: 3px;
	color: var(--mh-navy);
	transition: transform 200ms ease, color 150ms ease;
}

.mh-card__arrow .mh-blog-icon { width: 17px; height: 17px; display: block; }

.mh-card__link:hover .mh-card__arrow {
	transform: translate(2px, -2px);
	color: var(--mh-green-deep);
}

.mh-card__excerpt {
	display: block;
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--mh-slate);
}

/* ---------- pagination ---------- */

.mh-arc-pager {
	margin-top: clamp(38px, 5vw, 60px);
	padding-top: clamp(24px, 3vw, 36px);
	border-top: 1px solid var(--mh-line);
}

.mh-arc-pager__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mh-arc-pager a,
.mh-arc-pager span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	border-radius: 10px;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--mh-navy);
	text-decoration: none;
	transition: background-color 150ms ease, color 150ms ease;
}

.mh-arc-pager a:hover,
.mh-arc-pager a:focus-visible { background: #eef4fa; }

.mh-arc-pager .current {
	background: var(--mh-navy);
	color: #fff;
}

.mh-arc-pager .dots { color: var(--mh-slate); }

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
	.mh-arc__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
	.mh-arc__grid { grid-template-columns: minmax(0, 1fr); }
	.mh-card__frame { border-radius: 14px; margin-bottom: 13px; }
	.mh-card__title { font-size: 18px; }
	.mh-arc-filters__pill { padding: 8px 16px; font-size: 13px; }
	.mh-arc-head { padding-bottom: clamp(60px, 14vw, 96px); }
}

@media (prefers-reduced-motion: reduce) {
	.mh-card__frame img,
	.mh-card__arrow,
	.mh-arc-filters__pill { transition: none; }
	.mh-card__link:hover .mh-card__frame img { transform: none; }
}
