/* Fizzics — category archive styles.
 *
 * Sourced from theme/wireframes/q-cat-v2/style.css (Ben Section A sign-off
 * 2026-05-20 + R2 tweaks merged in PR #164 2026-05-22). Wireframe-only rules
 * (`.why-strip`, `.wireframe-r2 .cookie-consent`, mobile dev-annotation
 * collapse) are intentionally excluded — they were dev annotations on the
 * review surface, not site styling.
 *
 * Loaded conditionally on category pages by fizzics_enqueue_category_assets().
 */

/* SUBCATEGORY PILLS — top-level + nested */
.subcat-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: var(--s-4) 0 var(--s-6);
	list-style: none;
	padding: 0;
}
.subcat-pill {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	padding: 8px 16px;
	background: var(--surface, #fff);
	border: 1.5px solid var(--ink-soft, #5b5680);
	border-radius: 999px;
	color: var(--ink, var(--navy));
	text-decoration: none;
	font-size: var(--step--1);
	font-weight: 600;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.subcat-pill:hover,
.subcat-pill:focus-visible {
	background: var(--green-900);
	border-color: var(--green-900);
	color: #fff;
}
.subcat-pill__count {
	font-size: var(--step--2);
	font-weight: 500;
	color: var(--muted, #6f6a8a);
}
.subcat-pill:hover .subcat-pill__count,
.subcat-pill:focus-visible .subcat-pill__count {
	color: rgba( 255, 255, 255, 0.85 );
}
.subcat-pill[aria-current="page"] {
	background: var(--navy);
	border-color: var(--navy);
	color: #fff;
}
.subcat-pill[aria-current="page"] .subcat-pill__count { color: #d6cdf2; }

/* POST GRID — 3 columns desktop, 2 columns tablet + mobile (R2 TL-10 / N-4) */
.cat-post-grid {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: var(--s-4);
	margin: 0 0 var(--s-6);
	list-style: none;
	padding: 0;
}
@media ( max-width: 1024px ) {
	.cat-post-grid { grid-template-columns: repeat( 2, 1fr ); }
}
@media ( max-width: 720px ) {
	.cat-post-grid { grid-template-columns: repeat( 2, 1fr ); gap: var(--s-3); }
}

/* POST CARD */
.cat-post-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--surface-2, #ece8f5);
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: var(--ink, var(--navy));
	transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.cat-post-card:hover,
.cat-post-card:focus-visible {
	transform: translateY( -2px );
	box-shadow: 0 8px 24px rgba( 27, 20, 100, 0.12 );
	border-color: var(--green);
}
.cat-post-card__media {
	aspect-ratio: 16 / 10;
	background: var(--surface-2, #ece8f5);
	position: relative;
	overflow: hidden;
}
.cat-post-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
/*
 * Podcast cards (Ben, 24 Nov 2026, FCA-I314): the episode artwork is 1200 x 630
 * with the title written on it, so the 16 / 10 cover crop cut the words off.
 * Match the artwork's own proportion and contain the image so every word shows.
 */
.category-podcast .cat-post-card__media {
	aspect-ratio: 1200 / 630;
}
.category-podcast .cat-post-card__media img {
	object-fit: contain;
}
.cat-post-card__media .missing {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	padding: var(--s-3);
}
.cat-post-card__media .missing__title {
	color: var(--ink, var(--navy));
	font-weight: 700;
	margin: 0;
}
.cat-post-card__media .missing__tag {
	font-size: var(--step--2);
	color: var(--muted, #6f6a8a);
	margin-bottom: 4px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.cat-post-card__body {
	padding: var(--s-4);
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}
.cat-post-card__tag {
	display: inline-block;
	font-size: var(--step--2);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
	color: var(--green-dark, #3f7d2d);
	padding: 2px 8px;
	background: rgba( 82, 159, 59, 0.10 );
	border-radius: 3px;
	align-self: flex-start;
}
.cat-post-card__tag--podcast { color: #6b3fa0; background: rgba( 107, 63, 160, 0.10 ); }
.cat-post-card__tag--programme { color: var(--orange-dark, #b75612); background: rgba( 235, 121, 35, 0.10 ); }
.cat-post-card__tag--experiment { color: #1f6f9b; background: rgba( 31, 111, 155, 0.10 ); }
.cat-post-card h3 {
	font-size: var(--step-1);
	margin: 0;
	line-height: 1.3;
}
.cat-post-card__excerpt {
	font-size: var(--step--1);
	color: var(--ink-soft, #4a4666);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-clamp: 3;
}

/* CAT TOOLBAR — search-within (nested only) */
.cat-toolbar {
	display: flex;
	gap: var(--s-3);
	align-items: center;
	padding: var(--s-3) var(--s-4);
	background: var(--surface-2, #ece8f5);
	border-radius: 8px;
	margin: 0 0 var(--s-4);
	flex-wrap: wrap;
}
.cat-toolbar__search {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	min-width: 220px;
	background: #fff;
	padding: 8px 12px;
	border-radius: 6px;
	border: 1px solid var(--surface-2, #ece8f5);
	color: var(--muted);
}
.cat-toolbar__search input {
	flex: 1;
	border: 0;
	background: transparent;
	font: inherit;
	outline: none;
	color: var(--ink, var(--navy));
}
.cat-toolbar__count {
	font-size: var(--step--1);
	color: var(--muted);
	font-weight: 500;
}

/* CAT PAGINATION */
.cat-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin: var(--s-5) 0;
	flex-wrap: wrap;
}
.cat-pagination a,
.cat-pagination span {
	min-width: 40px;
	padding: 8px 12px;
	border: 1.5px solid var(--surface-2, #ece8f5);
	border-radius: 6px;
	text-align: center;
	text-decoration: none;
	color: var(--ink, var(--navy));
	font-weight: 600;
	font-size: var(--step--1);
}
.cat-pagination a:hover,
.cat-pagination a:focus-visible {
	border-color: var(--green);
	color: var(--green);
}
.cat-pagination .is-current {
	background: var(--navy);
	color: #fff;
	border-color: var(--navy);
	cursor: default;
}
.cat-pagination .is-disabled {
	opacity: 0.45;
	cursor: not-allowed;
}
.cat-pagination__loadmore {
	margin-left: var(--s-3);
	background: var(--green, #529F3B) !important;
	color: #fff !important;
	border-color: var(--green, #529F3B) !important;
	font-weight: 700;
}
.cat-pagination__loadmore:hover,
.cat-pagination__loadmore:focus-visible {
	background: #3f7d2d !important;
	border-color: #3f7d2d !important;
	color: #fff !important;
}
@media ( max-width: 560px ) {
	.cat-pagination__loadmore { margin-left: 0; margin-top: 6px; flex-basis: 100%; text-align: center; }
}

/* CROSS-SELL STRIP */
.cat-cross {
	margin: var(--s-7) 0 var(--s-5);
}
.cat-cross__head {
	text-align: center;
	margin-bottom: var(--s-4);
}
.cat-cross__head h2 { margin: 0 0 6px; }
.cat-cross__head p {
	margin: 0;
	color: var(--muted);
	font-size: var(--step--1);
}
.cat-cross__grid {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: var(--s-3);
}
@media ( max-width: 900px ) {
	.cat-cross__grid { grid-template-columns: repeat( 2, 1fr ); }
}
@media ( max-width: 480px ) {
	.cat-cross__grid { grid-template-columns: 1fr; }
}
.cat-cross__tile {
	display: block;
	padding: var(--s-4);
	border: 1.5px solid var(--surface-2, #ece8f5);
	border-radius: 12px;
	text-decoration: none;
	color: var(--ink, var(--navy));
	background: #fff;
	transition: border-color 0.15s, transform 0.18s, box-shadow 0.18s;
}
.cat-cross__tile:hover,
.cat-cross__tile:focus-visible {
	border-color: var(--green);
	transform: translateY( -2px );
	box-shadow: 0 6px 18px rgba( 27, 20, 100, 0.10 );
}
.cat-cross__tile-eyebrow {
	font-size: var(--step--2);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
	color: var(--green-dark, #3f7d2d);
	display: block;
	margin-bottom: 4px;
}
.cat-cross__tile h3 {
	margin: 0 0 6px;
	font-size: var(--step-0);
}
.cat-cross__tile p {
	margin: 0;
	font-size: var(--step--1);
	color: var(--ink-soft, #4a4666);
}

/* SECTION HEAD */
.cat-section-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin: var(--s-5) 0 var(--s-3);
	gap: var(--s-3);
	flex-wrap: wrap;
}
.cat-section-head h2 { margin: 0; }
.cat-section-head--most-booked { align-items: center; margin-top: var(--s-5); }
/* Paged listing head (Ben, 23 Nov 2026): WordPress's flow layout zeroes the top margin of a block
   inside the .container group, so "All projects" sat hard against the intro above it. Two classes
   beat that reset. */
.cat-section-head.cat-section-head--listing { margin-block-start: var(--s-5); }
.cat-section-head__hint {
	font-size: var(--step--1);
	color: var(--muted, #6f6a8a);
	font-style: italic;
}

/* INTRO PARAGRAPH */
.cat-intro {
	max-width: 65ch;
	font-size: var(--step-0);
	color: var(--ink-soft, #4a4666);
}

/* PODCAST INTRO (Ben, 25 Oct 2026): show blurb + "Listen on" links on /category/podcast/.
   Same pill buttons as the episode pages' listen-on row (podcast.css); they wrap on phones. */
.cat-podcast-intro {
	margin: var(--s-4) 0 var(--s-3);
}
.cat-podcast-intro__title { margin: 0 0 var(--s-2); }
.cat-podcast-intro__host {
	color: var(--green-900, #1C3A12);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.cat-podcast-intro__label {
	margin: var(--s-3) 0 var(--s-2);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--ink-soft, #4a4666);
}
.cat-podcast-intro__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-2, 0.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}
.cat-podcast-intro__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.5rem 0.875rem;
	border: 1px solid var(--line, #DAD6E1);
	border-radius: 999px;
	background: var(--paper, #FFFFFF);
	color: var(--ink, #181421);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}
.cat-podcast-intro__link:hover,
.cat-podcast-intro__link:focus-visible {
	border-color: currentColor;
	text-decoration: underline;
}
.cat-podcast-intro__link:focus-visible {
	outline: 2px solid var(--ink, #181421);
	outline-offset: 2px;
}
.cat-podcast-intro__icon { flex: none; }
.cat-podcast-intro__link--apple .cat-podcast-intro__icon { color: #872EC4; }
.cat-podcast-intro__link--spotify .cat-podcast-intro__icon { color: #1DB954; }
.cat-podcast-intro__link--iheart .cat-podcast-intro__icon { color: #C6002B; }

/* MOST-BOOKED grid — slightly tighter margin so featured grid still reads canonical */
.cat-post-grid--most-booked { margin-bottom: var(--s-5); }

/* FINDER CTA (Ben, 24 Oct 2026): link to the programme finder, above "View all". */
.finder-cta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-2) var(--s-4);
	justify-content: center;
	align-items: center;
	margin: var(--s-2) 0 var(--s-3);
	text-align: center;
}
.finder-cta__text {
	margin: 0;
	color: var(--ink-soft);
}
.finder-cta__btn {
	min-height: 44px;
}

/* OFFERS & DISCOUNTS CALLOUT: moved to programme.css (27 Oct 2026), which loads on category
 * archives too, so the consultancy callout on programme pages can share it. */

/* VIEW-ALL CTA (R2 TL-4) — promoted to a centered orange button, font-size ≥ 16px floor */
.view-all-cta {
	display: flex;
	justify-content: center;
	margin: var(--s-2) 0 var(--s-7);
}
.view-all-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 28px;
	background: var(--orange, #EB7923);
	color: #fff;
	border: 2px solid var(--orange, #EB7923);
	border-radius: 999px;
	font-size: 1.125rem;
	font-weight: 700;
	text-decoration: none;
	letter-spacing: 0.01em;
	box-shadow: 0 4px 14px rgba( 235, 121, 35, 0.28 );
	transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.view-all-btn:hover,
.view-all-btn:focus-visible {
	background: #d56a16;
	border-color: #d56a16;
	transform: translateY( -2px );
	box-shadow: 0 8px 20px rgba( 235, 121, 35, 0.34 );
}
@media ( max-width: 560px ) {
	.view-all-btn { font-size: 1rem; padding: 12px 22px; }
}

/* MOBILE tile-density tweaks at 375 */
@media ( max-width: 560px ) {
	.cat-post-card__body { padding: var(--s-3); gap: 6px; }
	.cat-post-card h3 { font-size: var(--step-0); line-height: 1.25; }
	.cat-post-card__excerpt {
		-webkit-line-clamp: 2;
		line-clamp: 2;
		font-size: var(--step--2);
	}
	.cat-post-card__tag { font-size: 10px; padding: 2px 6px; }
}
@media ( max-width: 480px ) {
	.subcat-pill { font-size: var(--step--2); padding: 6px 12px; }
}

/* BREADCRUMBS — bottom variant (R2 N-6 / G-1) */
.crumbs--bottom {
	margin: var(--s-5) 0 var(--s-3);
	padding-top: var(--s-3);
	border-top: 1px dashed var(--surface-2, #ece8f5);
}

/* CLOSING CTA — Ben R2-T2 "Get in touch", guaranteed breathing room above */
.cat-closing {
	background: var(--green-050, #f1f8ee);
	border-top: 1px solid var(--line-soft, rgba( 0, 0, 0, 0.08 ));
	padding: var(--s-7) 0 var(--s-6);
	margin-top: var(--s-7);
}
.cat-closing__inner { text-align: center; max-width: 720px; margin: 0 auto; }
.cat-closing h2 { color: var(--navy); margin-bottom: var(--s-3); }
.cat-closing p { color: var(--ink-soft); margin-bottom: var(--s-5); }
.cat-closing__lookthrough { font-size: var(--step--1); }

/* ARTICLE CATEGORIES (Media, Projects, Customer Feedback), Ben Newsome 22-23 Oct 2026 */
.cat-section-head__count {
	margin: 0;
	color: var(--muted);
	font-size: var(--step--1);
}
.cat-post-card__date {
	display: block;
	font-size: var(--step--2);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--muted);
}
.cat-cross__tile--has-media {
	padding: 0;
	overflow: hidden;
}
.cat-cross__tile--has-media > :not(.cat-cross__tile-media) {
	margin-left: var(--s-4);
	margin-right: var(--s-4);
}
.cat-cross__tile--has-media > p {
	margin-bottom: var(--s-4);
}
.cat-cross__tile-media {
	display: block;
	aspect-ratio: 16 / 10;
	margin-bottom: var(--s-3);
	background: var(--surface-2, #ece8f5);
}
.cat-cross__tile-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.cat-work-with-us {
	margin: var(--s-6) 0 var(--s-5);
	padding: var(--s-5) var(--s-4);
	border-radius: 12px;
	background: var(--surface-2, #ece8f5);
	text-align: center;
}
.cat-work-with-us h2 { margin: 0 0 8px; }
.cat-work-with-us p {
	max-width: 640px;
	margin: 0 auto var(--s-4);
	color: var(--ink-soft, #4a4666);
}
.cat-trustpilot .trustpilot-programme-reviews {
	margin: var(--s-4) 0 var(--s-5);
}
.cat-trustpilot .trustpilot-programme-reviews h2 {
	text-align: center;
	margin: 0 0 var(--s-3);
}
.cat-trustpilot .trustpilot-programme-reviews:not(:has(iframe)) {
	display: none;
}
.cat-trustpilot__note {
	max-width: 720px;
	margin: 0 auto var(--s-5);
	text-align: center;
	color: var(--ink-soft, #4a4666);
}

/* INTENT HUB (/category/schools/; Ben, 17 Nov 2026, FCA-I351) */

/* Search in the hero: the finder's year-level and topic selects, one row on desktop. */
.cat-hero-search {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--s-3);
	margin: var(--s-4) 0 var(--s-2);
	padding: var(--s-4);
	background: #f4f1fb;
	border-radius: 16px;
}
.cat-hero-search__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1 1 220px;
	min-width: 0;
}
.cat-hero-search__field label {
	font-size: var(--step--1);
	font-weight: 600;
}
.cat-hero-search__field select {
	min-height: 48px;
	width: 100%;
	padding: 0 12px;
	font-size: 1rem;
	border: 1px solid #d6d2e4;
	border-radius: 10px;
	background: #fff;
	color: inherit;
}
.cat-hero-search__submit {
	min-height: 48px;
	flex: 0 0 auto;
}
@media ( max-width: 720px ) {
	.cat-hero-search__submit { flex: 1 1 100%; }
}

.cat-stage-cards { margin-bottom: var(--s-5); }

/* Science Parties: "How a Fizzics Party Works" (Ben, 20 Nov 2026, FCA-I314). */
.cat-party-steps { margin: var(--s-6) 0; }
.cat-party-steps__list {
	display: grid;
	gap: var(--s-4);
	grid-template-columns: 1fr;
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: party-step;
}
@media ( min-width: 800px ) {
	.cat-party-steps__list { grid-template-columns: repeat( 3, 1fr ); }
}
.cat-party-steps__item {
	counter-increment: party-step;
	background: var(--paper, #fff);
	border: 1px solid var(--line, #e4e1f0);
	border-radius: var(--r-3, 12px);
	padding: var(--s-5);
	text-align: center;
	font-weight: 600;
	color: var(--navy);
}
.cat-party-steps__item::before {
	content: counter( party-step );
	display: block;
	width: 2.5rem;
	height: 2.5rem;
	line-height: 2.5rem;
	margin: 0 auto var(--s-3);
	border-radius: 50%;
	background: var(--navy);
	color: #fff;
	font-weight: 700;
}

/* Science Parties extras layout (Ben, 21 Nov 2026, FCA-I314): the 500 px reviews box used to
 * stand alone under the steps, leaving a tall white area. From 1024 px the steps (stacked) and
 * the booking prompt sit in a column beside the reviews; below that everything stacks. */
.cat-party-extras { margin: var(--s-6) 0; }
.cat-party-extras__inner {
	display: grid;
	gap: var(--s-6);
	grid-template-columns: minmax( 0, 1fr );
}
.cat-party-extras .cat-party-steps,
.cat-party-extras .cat-party-reviews { margin: 0; }
.cat-party-extras .cat-section-head { margin: 0 0 var(--s-4); }
.cat-party-extras .cat-party-steps h2,
.cat-party-extras .cat-party-reviews h2 {
	margin: 0;
	font-size: var(--step-2);
	color: var(--navy);
}
.cat-party-extras .cat-party-reviews h2 { margin-bottom: var(--s-4); }
.cat-party-extras__side {
	display: flex;
	flex-direction: column;
	gap: var(--s-5);
}
.cat-party-book {
	background: var(--navy, #1d1060);
	color: #fff;
	border-radius: var(--r-3, 12px);
	padding: var(--s-5);
}
.cat-party-book h2 {
	color: #fff;
	margin: 0 0 var(--s-2);
	font-size: 1.5rem;
}
.cat-party-book p { margin: 0 0 var(--s-4); }
.cat-party-book .cat-party-book__cta { margin: 0; }
@media ( min-width: 1024px ) {
	.cat-party-extras--split .cat-party-extras__inner {
		grid-template-columns: minmax( 0, 5fr ) minmax( 0, 7fr );
		align-items: start;
	}
	.cat-party-extras--split .cat-party-steps__list {
		grid-template-columns: 1fr;
		gap: var(--s-3);
	}
	.cat-party-extras--split .cat-party-steps__item {
		display: flex;
		align-items: center;
		gap: var(--s-4);
		text-align: left;
		padding: var(--s-4);
	}
	.cat-party-extras--split .cat-party-steps__item::before {
		flex: none;
		margin: 0;
		text-align: center;
	}
}

/* Most booked: four cards sit 4 across on desktop, 2 x 2 below. */
@media ( min-width: 1025px ) {
	.cat-post-grid--most-booked.cat-post-grid--n4 { grid-template-columns: repeat( 4, 1fr ); }
}

.view-all-cta--intent { margin: var(--s-2) 0 var(--s-6); }

/* FEATURED PROJECTS BAR (Ben, 24 Nov 2026): five cards in a row on wide screens; on tablets and
   phones the row scrolls sideways inside the bar (scroll-snap), so the page itself never scrolls
   horizontally. Cards are the archive's own .cat-post-card. */
.cat-featured-projects { margin: 0 0 var(--s-5); }
.cat-featured-projects__grid {
	display: grid;
	grid-template-columns: repeat( 5, minmax( 0, 1fr ) );
	gap: var(--s-4);
}
.cat-featured-projects .cat-post-card__body { padding: var(--s-3); }
.cat-featured-projects .cat-post-card h3 { margin: 0; font-size: var(--step-0); line-height: 1.25; }
@media ( max-width: 1100px ) {
	.cat-featured-projects__grid {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: minmax( 220px, 38% );
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x proximity;
		padding-bottom: var(--s-2);
	}
	.cat-featured-projects__grid > .cat-post-card { scroll-snap-align: start; }
}
@media ( max-width: 720px ) {
	.cat-featured-projects__grid { grid-auto-columns: 72%; gap: var(--s-3); }
}
