/**
 * Ahex — blog listing layout (2026).
 *
 * Namespaced under .ahexbl-* so nothing here can touch parent-theme CSS.
 * Colour tokens are deliberately identical to assets/css/blog-single.css so the
 * listing and the post it links to read as one design. The only difference is
 * the typeface: the post layout ships DM Sans + Sora, the listing reuses the
 * site font (Poppins), which the parent theme already loads on every page.
 */

.ahexbl {
	--ahexbl-grad: linear-gradient(120deg, #4f46e5 0%, #7c3aed 55%, #8b5cf6 100%);
	--ahexbl-indigo: #4f46e5;
	--ahexbl-violet: #7c3aed;
	--ahexbl-ink: #151827;
	--ahexbl-body: #475569;
	--ahexbl-muted: #94a3b8;
	--ahexbl-line: #e2e8f0;
	--ahexbl-soft: #f8fafc;
	--ahexbl-wash: linear-gradient(135deg, #f4f4ff, #ede9fe);
	--ahexbl-sans: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;

	font-family: var(--ahexbl-sans);
	color: var(--ahexbl-body);
	font-size: 15px;
	line-height: 1.7;
	background: #fff;
	/* No top padding: the hero is full-bleed and sits flush under the header. */
	padding: 0;
}

/* The parent theme styles bare tags globally; reset inside our subtree only. */
.ahexbl *,
.ahexbl *::before,
.ahexbl *::after {
	box-sizing: border-box;
}

.ahexbl h1,
.ahexbl h2,
.ahexbl h3,
.ahexbl p,
.ahexbl ul,
.ahexbl li,
.ahexbl figure {
	margin: 0;
	padding: 0;
	font-family: var(--ahexbl-sans);
}

.ahexbl ul {
	list-style: none;
}

.ahexbl a {
	text-decoration: none;
	color: var(--ahexbl-indigo);
	transition: color .18s ease, border-color .18s ease, background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.ahexbl a:hover,
.ahexbl a:focus {
	text-decoration: none;
}

.ahexbl img {
	max-width: 100%;
	height: auto;
	display: block;
}

.ahexbl button,
.ahexbl input {
	font-family: var(--ahexbl-sans);
}

.ahexbl-shell {
	max-width: 1360px;
	margin: 0 auto;
	padding: 0 40px;
}

/* ---------------------------------------------------------------- breadcrumb */

/* The breadcrumb sits on the gradient, so it is coloured for a dark ground. */
.ahexbl-crumbs {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 24px;
}

.ahexbl-crumbs a {
	font-size: 13px;
	font-weight: 500;
	color: rgba(255, 255, 255, .85);
}

.ahexbl-crumbs a:hover {
	color: #fff;
}

.ahexbl-crumbs__sep {
	font-size: 12px;
	color: rgba(255, 255, 255, .5);
	line-height: 1;
}

.ahexbl-crumbs__current {
	font-size: 13px;
	font-weight: 600;
	color: rgba(255, 255, 255, .7);
}

/* --------------------------------------------------------------------- hero */

/* Full-bleed: the gradient runs edge to edge and the inner .ahexbl-shell keeps
   the text on the same measure as the rest of the page. */
.ahexbl-hero {
	background: var(--ahexbl-grad);
	border-radius: 0;
	padding: 42px 0 40px;
	overflow: hidden;
}

/* First block of content below the banner. */
.ahexbl-main {
	padding-top: 36px;
}

.ahexbl-main > .ahexbl-featured,
.ahexbl-main > .ahexbl-summary,
.ahexbl-main > .ahexbl-grid:first-child,
.ahexbl-main > .ahexbl-empty:first-child {
	margin-top: 0;
}

.ahexbl-hero__inner {
	max-width: 760px;
	min-width: 0;
}

.ahexbl-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(255, 255, 255, .16);
	border: 1px solid rgba(255, 255, 255, .26);
	padding: 5px 12px;
	border-radius: 999px;
	margin-bottom: 18px;
}

.ahexbl-hero__title {
	font-size: clamp(28px, 4vw, 50px);
	font-weight: 700;
	letter-spacing: -.03em;
	line-height: 1.1;
	color: #fff;
	margin: 0 0 16px;
	text-wrap: pretty;
}

.ahexbl-hero__sub {
	font-size: 16px;
	line-height: 1.7;
	color: rgba(255, 255, 255, .82);
	margin: 0;
	max-width: 600px;
	text-wrap: pretty;
}

/* --------------------------------------------------------------- filter bar */

/* Chips and the search box share one row: the chips get a column that wraps
   internally, the search box keeps a fixed width beside it. Letting the bar
   itself wrap would drop the search onto its own line the moment the chips
   filled the width. */
.ahexbl-bar {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	flex-wrap: nowrap;
	margin-top: 34px;
	padding-bottom: 22px;
	border-bottom: 1px solid var(--ahexbl-line);
}

.ahexbl-chips {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	flex: 1 1 auto;
	min-width: 0;
	/* Matches the search box height so a single row of chips lines up with it. */
	min-height: 41px;
}

.ahexbl-chip {
	display: inline-block;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.35;
	padding: 8px 17px;
	border-radius: 999px;
	border: 1.5px solid var(--ahexbl-line);
	background: #fff;
	color: var(--ahexbl-body);
	white-space: nowrap;
}

.ahexbl-chip:hover {
	border-color: var(--ahexbl-violet);
	color: var(--ahexbl-indigo);
}

.ahexbl-chip.is-active,
.ahexbl-chip.is-active:hover {
	border-color: transparent;
	background: var(--ahexbl-grad);
	color: #fff;
}

.ahexbl-chip.is-extra {
	display: none;
}

.ahexbl-chips-open .ahexbl-chip.is-extra {
	display: inline-block;
}

/* The parent theme paints every <button> (dark fill + border, and again on
   hover/focus), so this has to win outright rather than merely set a value. */
.ahexbl-more,
.ahexbl-more:hover,
.ahexbl-more:focus,
.ahexbl-more:active {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.35;
	background: none !important;
	background-color: transparent !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 8px;
	box-shadow: none !important;
	text-shadow: none !important;
	padding: 8px 4px;
	cursor: pointer;
	white-space: nowrap;
	text-transform: none;
	transform: none;
}

.ahexbl-more,
.ahexbl-more:active {
	color: var(--ahexbl-indigo) !important;
}

.ahexbl-more:hover,
.ahexbl-more:focus {
	color: var(--ahexbl-violet) !important;
}

/* Keyboard users still get a ring; mouse clicks no longer leave a box behind. */
.ahexbl-more:focus {
	outline: 0;
}

.ahexbl-more:focus-visible {
	outline: 2px solid var(--ahexbl-indigo);
	outline-offset: 3px;
}

.ahexbl-more svg {
	width: 14px;
	height: 14px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform .2s ease;
}

.ahexbl-chips-open .ahexbl-more svg {
	transform: rotate(90deg);
}

.ahexbl-search {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	border: 1.5px solid var(--ahexbl-line);
	border-radius: 12px;
	padding: 8px 14px;
	flex: 0 0 280px;
	min-width: 0;
}

/* Category pages drop the chips, so the search box takes that space instead of
   sitting alone against the right edge. */
.ahexbl-bar--searchonly .ahexbl-search {
	flex: 1 1 420px;
	max-width: 460px;
	padding: 10px 16px;
}

.ahexbl-bar--searchonly .ahexbl-search input[type="search"] {
	font-size: 14.5px;
}

.ahexbl-search:focus-within {
	border-color: var(--ahexbl-violet);
}

.ahexbl-search svg {
	width: 16px;
	height: 16px;
	stroke: var(--ahexbl-muted);
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex-shrink: 0;
}

.ahexbl-search input[type="search"],
.ahexbl-search input[type="text"] {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	border: 0;
	outline: 0;
	box-shadow: none;
	background: transparent;
	padding: 0;
	margin: 0;
	height: auto;
	font-size: 13.5px;
	color: var(--ahexbl-ink);
}

.ahexbl-search input::placeholder {
	color: var(--ahexbl-muted);
}

/* Same theme-button override as .ahexbl-more above. */
.ahexbl-search button,
.ahexbl-search button:hover,
.ahexbl-search button:focus,
.ahexbl-search button:active {
	border: 0 !important;
	background: none !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	padding: 0;
	margin: 0;
	cursor: pointer;
	line-height: 0;
	flex-shrink: 0;
	transform: none;
}

.ahexbl-search button {
	color: var(--ahexbl-muted);
	outline: 0;
}

.ahexbl-search button:hover,
.ahexbl-search button:focus {
	color: var(--ahexbl-indigo);
}

.ahexbl-search button:focus-visible {
	outline: 2px solid var(--ahexbl-indigo);
	outline-offset: 3px;
	border-radius: 6px;
}

.ahexbl-search button svg {
	stroke: currentColor;
}

/* The parent theme defines .screen-reader-text, but never rely on that. */
.ahexbl .screen-reader-text {
	position: absolute !important;
	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;
}

/* ------------------------------------- filter bar, as it sits on the banner */

/* The bar lives inside the gradient hero, so every control is re-coloured for
   a dark ground. Rules are scoped to .ahexbl-hero rather than edited in place
   so the light-ground versions above stay available if the bar ever moves. */
.ahexbl-hero .ahexbl-bar {
	margin-top: 34px;
	padding-bottom: 0;
	border-bottom: 0;
}

.ahexbl-hero .ahexbl-chip {
	background: rgba(255, 255, 255, .12);
	border-color: rgba(255, 255, 255, .34);
	color: #fff;
}

.ahexbl-hero .ahexbl-chip:hover {
	background: rgba(255, 255, 255, .24);
	border-color: rgba(255, 255, 255, .6);
	color: #fff;
}

.ahexbl-hero .ahexbl-chip.is-active,
.ahexbl-hero .ahexbl-chip.is-active:hover {
	background: #fff;
	border-color: #fff;
	color: var(--ahexbl-indigo);
}

.ahexbl-hero .ahexbl-more,
.ahexbl-hero .ahexbl-more:active {
	color: rgba(255, 255, 255, .9) !important;
}

.ahexbl-hero .ahexbl-more:hover,
.ahexbl-hero .ahexbl-more:focus {
	color: #fff !important;
}

.ahexbl-hero .ahexbl-more:focus-visible {
	outline-color: #fff;
}

.ahexbl-hero .ahexbl-search {
	background: rgba(255, 255, 255, .14);
	border-color: rgba(255, 255, 255, .34);
}

.ahexbl-hero .ahexbl-search:focus-within {
	border-color: #fff;
	background: rgba(255, 255, 255, .2);
}

.ahexbl-hero .ahexbl-search svg {
	stroke: rgba(255, 255, 255, .78);
}

.ahexbl-hero .ahexbl-search input[type="search"],
.ahexbl-hero .ahexbl-search input[type="text"] {
	color: #fff;
}

.ahexbl-hero .ahexbl-search input::placeholder {
	color: rgba(255, 255, 255, .72);
	opacity: 1;
}

.ahexbl-hero .ahexbl-search button {
	color: rgba(255, 255, 255, .8);
}

.ahexbl-hero .ahexbl-search button:hover,
.ahexbl-hero .ahexbl-search button:focus {
	color: #fff;
}

.ahexbl-hero .ahexbl-search button:focus-visible {
	outline-color: #fff;
}

/* --------------------------------------------------------- results summary */

.ahexbl-summary {
	margin-top: 22px;
	font-size: 14px;
	color: var(--ahexbl-muted);
}

.ahexbl-summary strong {
	color: var(--ahexbl-ink);
	font-weight: 600;
}

.ahexbl-summary a {
	font-weight: 600;
}

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

.ahexbl-featured {
	display: flex;
	gap: 34px;
	flex-wrap: wrap;
	align-items: center;
	margin-top: 30px;
	border: 1.5px solid var(--ahexbl-line);
	border-radius: 22px;
	overflow: hidden;
	background: #fff;
}

.ahexbl-featured:hover {
	border-color: rgba(79, 70, 229, .32);
	box-shadow: 0 18px 40px -28px rgba(79, 70, 229, .5);
}

.ahexbl-featured__media {
	flex: 1 1 420px;
	min-width: 300px;
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--ahexbl-wash);
	overflow: hidden;
}

/* contain, not cover: most banners are 16:9 and fill the box exactly, and the
   wider/squarer ones must not lose the Ahex logo in their corners. */
.ahexbl-featured__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ahexbl-featured__body {
	flex: 1 1 380px;
	min-width: 0;
	padding: 34px 36px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.ahexbl-featured__tags {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.ahexbl-flag {
	background: var(--ahexbl-grad);
	color: #fff;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: 5px 12px;
	border-radius: 999px;
}

.ahexbl-featured__cat {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ahexbl-indigo);
	white-space: nowrap;
}

.ahexbl-featured__title {
	font-size: clamp(21px, 2.2vw, 29px);
	font-weight: 700;
	color: var(--ahexbl-ink);
	line-height: 1.25;
	letter-spacing: -.02em;
	margin: 0 0 14px;
	text-wrap: pretty;
}

.ahexbl-featured:hover .ahexbl-featured__title {
	color: var(--ahexbl-indigo);
}

.ahexbl-featured__excerpt {
	font-size: 15px;
	line-height: 1.7;
	color: var(--ahexbl-body);
	margin: 0 0 20px;
	max-width: 560px;
	text-wrap: pretty;
}

/* ------------------------------------------------------------------- cards */

/* Fixed three across on desktop. auto-fill was letting a fourth column in on
   wide screens, which made the cards too narrow. minmax(0,1fr) rather than 1fr
   so a long unbroken title can't push a column past its share. */
.ahexbl-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin-top: 32px;
}

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

.ahexbl-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: #fff;
	border: 1.5px solid var(--ahexbl-line);
	border-radius: 18px;
	overflow: hidden;
}

.ahexbl-card:hover {
	border-color: rgba(79, 70, 229, .32);
	transform: translateY(-3px);
	box-shadow: 0 18px 34px -26px rgba(79, 70, 229, .55);
}

.ahexbl-card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--ahexbl-wash);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.ahexbl-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ahexbl-card__mark {
	font-size: 42px;
	font-weight: 700;
	color: rgba(79, 70, 229, .16);
	letter-spacing: -.03em;
}

.ahexbl-card__cat {
	position: absolute;
	top: 14px;
	right: 14px;
	max-width: calc(100% - 28px);
	background: #fff;
	border: 1px solid rgba(79, 70, 229, .14);
	color: var(--ahexbl-indigo);
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 5px 11px;
	border-radius: 999px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ahexbl-card__body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
}

.ahexbl-card__title {
	font-size: 16.5px;
	font-weight: 600;
	color: var(--ahexbl-ink);
	line-height: 1.35;
	letter-spacing: -.01em;
	margin: 0 0 10px;
	text-wrap: pretty;
}

.ahexbl-card:hover .ahexbl-card__title {
	color: var(--ahexbl-indigo);
}

.ahexbl-card__excerpt {
	font-size: 13.5px;
	color: var(--ahexbl-muted);
	line-height: 1.6;
	margin: 0 0 16px;
	text-wrap: pretty;
}

.ahexbl-card__foot {
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid #f1f5f9;
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

/* -------------------------------------------------------- shared byline bit */

.ahexbl-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--ahexbl-grad);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11.5px;
	font-weight: 600;
	color: #fff;
	flex-shrink: 0;
	letter-spacing: .02em;
}

.ahexbl-featured .ahexbl-avatar {
	width: 38px;
	height: 38px;
	font-size: 13px;
}

.ahexbl-byline {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	min-width: 0;
}

.ahexbl-byline__text {
	min-width: 0;
}

.ahexbl-byline__name {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ahexbl-ink);
	line-height: 1.35;
}

.ahexbl-byline__meta {
	font-size: 11.5px;
	color: var(--ahexbl-muted);
	line-height: 1.35;
}

.ahexbl-featured .ahexbl-byline__name {
	font-size: 13.5px;
}

.ahexbl-featured .ahexbl-byline__meta {
	font-size: 12px;
}

/* ------------------------------------------------------------------- empty */

.ahexbl-empty {
	padding: 60px 20px;
	text-align: center;
}

.ahexbl-empty__title {
	font-size: 18px;
	font-weight: 600;
	color: var(--ahexbl-ink);
	margin-bottom: 6px;
}

.ahexbl-empty__text {
	font-size: 14px;
	color: var(--ahexbl-muted);
}

.ahexbl-empty__text a {
	font-weight: 600;
}

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

.ahexbl-pager {
	display: flex;
	justify-content: center;
	margin: 34px 0 0;
}

.ahexbl-pager .nav-links,
.ahexbl-pager .ahexbl-pager__links {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
}

.ahexbl-pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 14px;
	border-radius: 12px;
	border: 1.5px solid var(--ahexbl-line);
	background: #fff;
	color: var(--ahexbl-ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
}

.ahexbl-pager a.page-numbers:hover {
	border-color: var(--ahexbl-violet);
	color: var(--ahexbl-indigo);
}

.ahexbl-pager .page-numbers.current {
	border-color: transparent;
	background: var(--ahexbl-grad);
	color: #fff;
}

.ahexbl-pager .page-numbers.dots {
	border-color: transparent;
	color: var(--ahexbl-muted);
	min-width: 24px;
	padding: 0 4px;
}

/* --------------------------------------------------------------------- CTA */

.ahexbl-cta-wrap {
	background: var(--ahexbl-soft);
	border-top: 1px solid var(--ahexbl-line);
	margin-top: 56px;
	padding: 56px 0;
}

.ahexbl-cta {
	background: var(--ahexbl-grad);
	border-radius: 22px;
	padding: 38px 42px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	flex-wrap: wrap;
}

.ahexbl-cta__title {
	font-size: 25px;
	font-weight: 700;
	letter-spacing: -.02em;
	color: #fff;
	margin: 0 0 8px;
	line-height: 1.3;
	text-wrap: pretty;
}

.ahexbl-cta__text {
	font-size: 14.5px;
	line-height: 1.65;
	color: rgba(255, 255, 255, .82);
	margin: 0;
	max-width: 520px;
}

.ahexbl-cta__copy {
	flex: 1 1 360px;
	min-width: 0;
}

.ahexbl-cta__btn {
	background: #fff;
	color: var(--ahexbl-indigo) !important;
	font-size: 14px;
	font-weight: 600;
	padding: 14px 28px;
	border-radius: 11px;
	white-space: nowrap;
	flex: 0 0 auto;
}

.ahexbl-cta__btn:hover {
	background: #ede9fe;
	transform: translateY(-2px);
}

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

@media (max-width: 1024px) {
	.ahexbl-hero {
		padding: 34px 0 32px;
	}
}

/* Below this the two columns stop fitting, so the search takes its own row. */
@media (max-width: 860px) {
	.ahexbl-bar {
		flex-wrap: wrap;
		gap: 12px;
	}

	.ahexbl-chips {
		flex: 1 1 100%;
		min-height: 0;
	}

	.ahexbl-search {
		flex: 1 1 100%;
	}
}

@media (max-width: 767px) {
	.ahexbl-shell {
		padding: 0 20px;
	}

	.ahexbl-hero {
		padding: 26px 0 26px;
	}

	.ahexbl-crumbs {
		margin-bottom: 18px;
	}

	.ahexbl-hero .ahexbl-bar {
		margin-top: 24px;
	}

	.ahexbl-main {
		padding-top: 28px;
	}

	.ahexbl-hero__sub {
		font-size: 15px;
	}

	.ahexbl-featured__body {
		padding: 24px 22px 28px;
	}

	.ahexbl-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.ahexbl-cta {
		padding: 28px 24px;
		border-radius: 18px;
	}

	.ahexbl-cta-wrap {
		padding: 40px 0;
		margin-top: 40px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ahexbl a,
	.ahexbl .ahexbl-card,
	.ahexbl .ahexbl-more svg {
		transition: none;
	}

	.ahexbl-card:hover,
	.ahexbl-cta__btn:hover {
		transform: none;
	}
}
