/*=========================
	CARDS BLOCK
=========================*/

@media (min-width: 1200px) {
	.block-cards.layout-staggered > .container {
		padding-left: var(--space-8);
	}
}
.block-cards .header {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-7);
	margin-bottom: var(--space-6);
	align-items: center;
}
@media only screen and (max-width: 1199.98px) {
	.block-cards .header {
		margin-bottom: var(--space-5);
	}
}
.block-cards .header-content .title {
	margin-bottom: var(--space-4);
}
@media only screen and (max-width: 1199.98px) {
	.block-cards .header-content .title {
		margin-bottom: var(--space-2);
	}
}
.block-cards .header-content .copy p {
	margin-bottom: var(--space-4);
}
.block-cards .header-decoration {
	display: flex;
	justify-content: flex-end;
}
.block-cards .header-decoration img {
	max-width: 450px;
	height: auto;
}
.block-cards .header-decoration--chevron {
	display: flex;
	justify-content: flex-end;
	align-items: center;
}
/* Static header graphic (block `graphic` field set) — same top-right slot and
   sizing as the chevron, but NO slide animation (the chevron JS/transition
   only targets .header-decoration--chevron). */
.block-cards .header-decoration--graphic {
	display: flex;
	justify-content: flex-end;
	align-items: center;
}
.block-cards .header-decoration--graphic .c-icon {
	display: inline-flex;
	height: 280px;
	color: currentColor;
}
@media only screen and (max-width: 1199.98px) {
	.block-cards .header-decoration--graphic .c-icon {
		height: 240px;
	}
}
.block-cards .header-decoration--graphic svg {
	height: 100%;
	width: auto;
}
/* triangle-right runs taller in this slot (James, 2026-07-16) */
.block-cards .header-decoration--graphic.graphic--triangle-right .c-icon {
	height: 380px;
}
.block-cards .header-decoration--chevron .c-icon {
	display: inline-flex;
	height: 280px;
	color: currentColor;
	transform: translateX(0);
	transition: transform .8s cubic-bezier(.4,0,.2,1);
}
@media only screen and (max-width: 1199.98px) {
	.block-cards .header-decoration--chevron .c-icon {
		height: 240px;
	}
}
.block-cards .header-decoration--chevron.is-slid-right .c-icon {
	transform: translateX(100vw);
}
/* Flip the chevron horizontally when returning (instant — no transition on the
   svg itself, so the flip happens at the moment the state changes while
   translateX animates back to 0). */
.block-cards .header-decoration--chevron.is-returned .c-icon svg {
	transform: scaleX(-1);
}
.block-cards .header-decoration--chevron svg {
	height: 100%;
	width: auto;
}
/* Mobile: static chevron — no slide animation. The JS still toggles is-slid-right /
   is-returned, so neutralise the transform + transition (and the returning flip) so
   it just sits in place as a plain image. */
@media only screen and (max-width: 767.98px) {
	.block-cards .header-decoration--chevron .c-icon,
	.block-cards .header-decoration--chevron.is-slid-right .c-icon,
	.block-cards .header-decoration--chevron.is-returned .c-icon {
		transform: none !important;
		transition: none !important;
	}
	.block-cards .header-decoration--chevron.is-returned .c-icon svg {
		transform: none;
	}
}

.block-cards .cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-4);
}

/* ---------- Staggered layout (live "Support and services" 2-3-2) ---------- */
.block-cards.layout-staggered .cards > .card:nth-child(1) { grid-column: 1; grid-row: 1; }
.block-cards.layout-staggered .cards > .card:nth-child(2) { grid-column: 1; grid-row: 2; }
.block-cards.layout-staggered .cards > .card:nth-child(3) { grid-column: 2; grid-row: 1; }
.block-cards.layout-staggered .cards > .card:nth-child(4) { grid-column: 2; grid-row: 2; }
.block-cards.layout-staggered .cards > .card:nth-child(5) { grid-column: 2; grid-row: 3; }
.block-cards.layout-staggered .cards-col-3-stack {
	grid-column: 3;
	grid-row: 1 / 4;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var(--space-4);
}

/* ---------- Aligned grid layout ("Fundraise and get involved" 3x2) ----------
   - cards flow naturally row-by-row in a 3-column grid
   - the col-3-stack wrapper falls back to display:contents so its kids
     participate in the parent grid directly
   - accent highlight bar appears at the TOP of each card instead of bottom
   - card is transparent / no rounded corners; the title carries an inline
     arrow icon and the bottom-right circle button is hidden */
.block-cards.layout-grid .cards {
	gap: var(--space-7) var(--space-6);
}
.block-cards.layout-grid .cards-col-3-stack {
	display: contents;
}
.block-cards.layout-grid .card {
	background: transparent;
	border: none;
	border-radius: 0;
	/* top padding = accent height (5px) + desired gap to content (space-4) */
	padding: calc(5px + var(--space-4)) 0 var(--space-4);
	min-height: 0;
	overflow: visible;
}
.block-cards.layout-grid .card .c-card__highlight {
	top: 0;
	bottom: auto;
	width: 80%;
	height: 5px;
}
.block-cards.layout-grid .card .c-card-services__footer {
	display: none;
}
.block-cards.layout-grid .card .card-title {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 0;
	font-size: 2rem !important;
}
.block-cards.layout-grid .card .card-title__icon {
	display: inline-flex;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: currentColor;
	transition: transform .25s ease;
}
.block-cards.layout-grid .card .card-title__icon svg {
	width: 100%;
	height: 100%;
}
.block-cards.layout-grid a.card:hover .card-title__icon,
.block-cards.layout-grid a.card:focus-visible .card-title__icon {
	transform: translateX(4px);
}

/* Aligned grid, no accent: drop the coloured accent bar + its top padding,
   and neutralise the accent-driven currentColor (arrow/underline stay brand-neutral). */
.block-cards.layout-no-accent .card .c-card__highlight { display: none; }
.block-cards.layout-grid.layout-no-accent .card {
	padding-top: var(--space-4);
	color: var(--color-n-black);
}
.block-cards.layout-grid.layout-no-accent .cards {
	column-gap: 40px;
	row-gap: 30px;
}
.block-cards.layout-no-accent .c-card-services__image {
	border-radius: 0;
}
.block-cards.layout-no-accent .card .card-title__icon {
	width: 22px;
	height: 22px;
	margin-top: 8px;
}
.block-cards.layout-no-accent .header-decoration {
	display: none;
}
.block-cards.layout-no-accent .header {
	margin-bottom: 0;
}
.block-cards.layout-grid.layout-no-accent .card .card-title {
	font-size: var(--font-heading4-size) !important;
	align-items: flex-start;
}
.block-cards.layout-no-accent .c-card-services__body {
	display: flex;
	flex-direction: column;
}
.block-cards.layout-no-accent .card .card-copy {
	order: -1;
	margin-bottom: 0;
}
.block-cards.layout-no-accent .card .card-copy p {
	margin-bottom: 0;
}
.block-cards.layout-grid div.card .card-title__icon {
	display: none;
}

/* Hide the inline title arrow for the staggered layout (which uses the
   bottom-right circle button instead) */
.block-cards.layout-staggered .card .card-title__icon {
	display: none;
}

/* ---------- Staggered-image layout (2-column image cards) ----------
   - container: header (title/copy) left | cards grid right
   - images alternate aspect ratio diagonally: cards 1 & 4 tall (4:3),
     cards 2 & 3 landscape (16:9)
   - copy renders above title via order:-1
   - inline arrow replaces circle button */

.block-cards.layout-staggered-image .header-decoration {
	display: none;
}

/* Cards: 2×2 grid within the right column */
.block-cards.layout-staggered-image .cards {
	grid-template-columns: 1fr 1fr;
	gap: 60px !important;
	max-width: 900px;
	align-items: start;
	margin: -150px auto 0;
}
.block-cards.layout-staggered-image .card {
	padding: 0;
	min-height: 0;
	border: none;
	border-radius: 5px 5px 5px 0;
}
.block-cards.layout-staggered-image .cards > .card:nth-child(1) {
	align-self: end;
}
.block-cards.layout-staggered-image .cards > .card:nth-child(1) .c-card-services__body {
	padding-bottom: 30px;
}
.block-cards.layout-staggered-image .cards > .card:nth-child(1),
.block-cards.layout-staggered-image .cards > .card:nth-child(2) {
	transform: translateY(-10%);
}
/* Mobile: one card per row, and undo the desktop overlap — the negative top margin
   and translateY lift the 2×2 grid up into the header, which lands on top of the
   title once everything stacks. Reset them so the cards flow BELOW the title. */
@media only screen and (max-width: 767.98px) {
	.block-cards.layout-staggered-image .cards {
		/* !important: a second base `grid-template-columns: 1fr 1fr` rule for this
		   layout sits LATER in the file and would otherwise re-apply 2 columns. */
		grid-template-columns: 1fr !important;
		gap: 40px !important;
		margin: 0 auto;
	}
	.block-cards.layout-staggered-image .cards > .card:nth-child(1),
	.block-cards.layout-staggered-image .cards > .card:nth-child(2) {
		transform: none;
	}
	.block-cards.layout-staggered-image .cards > .card:nth-child(1) {
		align-self: auto;
	}
}
.block-cards.layout-staggered-image .c-card-services__image {
	width: 100%;
	overflow: visible;
	flex-shrink: 0;
	position: relative;
}
.block-cards.layout-staggered-image .c-card-services__image img {
	width: 100%;
	display: block;
	object-fit: cover;
	object-position: center top;
}
.block-cards.layout-staggered-image .c-card-services__image::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 0;
	width: 70%;
	height: 8px;
	background: currentColor;
	transition: width 0.35s ease;
}
.block-cards.layout-staggered-image .c-card-services__image:hover::after {
	width: 100%;
}
.block-cards.layout-staggered-image .c-card-services__body {
	display: flex;
	flex-direction: column;
}
.block-cards.layout-staggered-image .card .card-copy {
	order: -1;
	font-size: 16px;
	margin-top: 0;
	margin-bottom: 10px;
	opacity: 0.7;
}
.block-cards.layout-staggered-image .card .card-copy p {
	margin-bottom: 0;
}
.block-cards.layout-staggered-image .card .card-title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 0;
}
/* Mobile: smaller staggered-image card title */
@media only screen and (max-width: 767.98px) {
	.block-cards.layout-staggered-image .card .card-title {
		font-size: 22px !important;
	}
}
.block-cards.layout-staggered-image .card .card-title__icon {
	display: inline-flex;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	transition: transform .25s ease;
}
.block-cards.layout-staggered-image .card .card-title__icon svg {
	width: 100%;
	height: 100%;
}
/* Title area hover only — cancel card-level trigger, re-enable on body */
.block-cards.layout-staggered-image a.card:hover .card-title__icon {
	transform: none;
}
.block-cards.layout-staggered-image a.card .c-card-services__body:hover .card-title__icon {
	transform: translateX(4px);
}
.block-cards.layout-staggered-image a.card:hover .card-title .border-bot-sweep__elem {
	background-size: 0% 2px;
}
.block-cards.layout-staggered-image a.card .c-card-services__body:hover .card-title .border-bot-sweep__elem {
	background-size: 100% 2px;
}
.block-cards.layout-staggered-image .c-card-services__footer {
	display: none;
}
.block-cards.layout-staggered-image .card .c-card__highlight {
	width: 70%;
}
.block-cards.layout-staggered-image a.card:hover .c-card__highlight,
.block-cards.layout-staggered-image a.card:focus-visible .c-card__highlight {
	width: 100%;
}

.block-cards .card {
	display: flex;
	flex-direction: column;
	position: relative;
	background: var(--color-n-white);
	padding: 3.2rem 3.2rem 1.8rem;
	border-radius: 5px 5px 5px 0;
	overflow: hidden;
	min-height: 265px;
	text-decoration: none;
	color: inherit;
}
.block-cards a.card { cursor: pointer; }

/* Sliding underline on the title text on card hover/focus */
.block-cards .card .card-title .border-bot-sweep__elem {
	display: inline;
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 0% 2px;
	padding-bottom: 2px;
	transition: background-size .35s cubic-bezier(.4,0,0,1);
}
.block-cards a.card:hover .card-title .border-bot-sweep__elem,
.block-cards a.card:focus-visible .card-title .border-bot-sweep__elem {
	background-size: 100% 2px;
}

/* Colored highlight bar at the bottom: starts at 60% width, sweeps to 100% on hover */
.block-cards .card .c-card__highlight {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 60%;
	height: 8px;
	background: currentColor;
	transition: width 0.35s ease;
}
.block-cards a.card:hover .c-card__highlight,
.block-cards a.card:focus-visible .c-card__highlight { width: 100%; }

.block-cards .card.accent-color-p { color: var(--color-p); }
.block-cards .card.accent-color-s { color: var(--color-s); }
.block-cards .card.accent-color-t { color: var(--color-t); }
.block-cards .card.accent-color-a { color: var(--color-a); }
.block-cards .card.accent-color-n-black { color: var(--color-n-black); }
.block-cards .card.accent-color-n-white { color: var(--color-n-white); }

.block-cards .card.accent-grey       { color: var(--accent-grey); }
.block-cards .card.accent-green      { color: var(--accent-green); }
.block-cards .card.accent-pink       { color: var(--accent-pink); }
.block-cards .card.accent-peach      { color: var(--accent-peach); }
.block-cards .card.accent-light-blue { color: var(--accent-light-blue); }

.block-cards .c-card-services__body {
	flex: 1;
}
.block-cards .card .card-title {
	color: var(--color-n-black);
	margin-bottom: var(--space-2);
}
.block-cards .card .card-copy {
	color: var(--color-n-black);
	margin-bottom: var(--space-3);
}
.block-cards .c-card-services__footer {
	display: flex;
	justify-content: flex-end;
	margin-top: var(--space-3);
}

/* Circular arrow button (matches live c-btn-circle--lg) */
.block-cards .c-btn-circle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: var(--color-n-black);
	color: var(--color-n-white);
	flex-shrink: 0;
	transition: transform 0.25s ease;
}
.block-cards .c-btn-circle svg {
	width: 16px;
	height: 16px;
}
.block-cards a.card:hover .c-btn-circle,
.block-cards a.card:focus-visible .c-btn-circle { transform: translateX(4px); }

.block-cards .cta {
	display: flex;
	justify-content: flex-end;
	align-items: end;
}

/* Tablet and below (≤ 1199.98px): 2 cards per row, drop explicit grid placement */
@media only screen and (max-width: 1199.98px) {
	.block-cards .cards {
		grid-template-columns: repeat(2, 1fr);
	}
	.block-cards.layout-staggered .cards > .card:nth-child(n),
	.block-cards.layout-grid .cards > .card:nth-child(n),
	.block-cards .cards .card:nth-child(n) {
		grid-column: auto !important;
		grid-row: auto !important;
	}
	/* Let the col-3-stack wrapper dissolve so its children participate
	   directly in the parent grid (no forced grid-column: 3).
	   Selector matches the layout-specific .cards-col-3-stack to win specificity. */
	.block-cards.layout-staggered .cards-col-3-stack,
	.block-cards.layout-grid .cards-col-3-stack,
	.block-cards .cards-col-3-stack {
		display: contents !important;
	}
}

/* Below 768px: 1 card per row, no header gap, header stacks to 1 column */
@media only screen and (max-width: 767.98px) {
	.block-cards .cards {
		grid-template-columns: 1fr;
	}
	.block-cards .header {
		grid-template-columns: 1fr;
		gap: 0;
	}
}

/* --- Per-card image (new per-card image sub-field) --- */
.c-card-services__image {
	width: 100%;
	margin-bottom: 20px;
	overflow: hidden;
	border-radius: 8px;
}
.c-card-services__image img {
	display: block;
	width: 100%;
	height: 240px;
	object-fit: cover;
}

/* ---------- Staggered with Image (transparent cards, photo on top, accent under image) ---------- */
.block-cards.layout-staggered-image .card {
	background: transparent;
	padding: 0;
	border-radius: 0;
	min-height: 0;
	overflow: visible;
}
.block-cards.layout-staggered-image .c-card-services__image {
	margin: 0 0 22px;
	border-radius: 0;
}
.block-cards.layout-staggered-image .c-card-services__image img {
	height: auto;
	border-radius: 0;
}
/* 2 full-width columns (not the 3-col staggered grid); big column gap like live */
.block-cards.layout-staggered-image .cards {
	grid-template-columns: 1fr 1fr;
	column-gap: var(--space-8);
	row-gap: var(--space-7);
}
/* Alternating image aspect ratios create the stagger:
   col1 = short(5:4) then tall(5:6); col2 = tall then short */
.block-cards.layout-staggered-image .cards > .card:nth-child(1) .c-card-services__image img,
.block-cards.layout-staggered-image .cards > .card:nth-child(4) .c-card-services__image img {
	aspect-ratio: 5 / 4;   /* 420 x 336 landscape */
}
.block-cards.layout-staggered-image .cards > .card:nth-child(2) .c-card-services__image img,
.block-cards.layout-staggered-image .cards > .card:nth-child(3) .c-card-services__image img {
	aspect-ratio: 5 / 6;   /* 420 x 504 portrait */
}
/* Mobile + tablet: no stagger — all card images are SQUARE (!important beats the
   more-specific nth-child aspect-ratio rules above). */
@media only screen and (max-width: 991.98px) {
	.block-cards.layout-staggered-image .cards > .card .c-card-services__image img {
		aspect-ratio: 1 / 1 !important;
	}
}
.block-cards.layout-staggered-image .card .c-card__highlight { display: none; }  /* no bottom bar */
.block-cards.layout-staggered-image .card-title { color: var(--color-n-black); }
.block-cards.layout-staggered-image .c-card-services__footer { margin-top: var(--space-2); }

/* --- Hover zoom on card images (matches live ~0.5s) --- */
.block-cards .c-card-services__image { overflow: hidden; }
.block-cards .c-card-services__image img { transition: transform .5s cubic-bezier(.4, 0, 0, 1); }
.block-cards a.card:hover .c-card-services__image img,
.block-cards a.card:focus-visible .c-card-services__image img { transform: scale(1.06); }

/* ── Aligned grid — accent at bottom (mirrors pages lcards-3-columns) ── */
.block-cards.layout-grid-accent-bottom .cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-6) var(--space-5);
	margin: 0;
}
.block-cards.layout-grid-accent-bottom .c-card--gab {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: var(--color-n-black);
	background: transparent;
	border: none;
	border-radius: 0;
	padding: 0;
}
.block-cards.layout-grid-accent-bottom .c-card--gab .c-card__media {
	position: relative;
	display: block;
}
.block-cards.layout-grid-accent-bottom .c-card--gab .c-card__image.o-ratio {
	position: relative;
	display: block;
	width: 100%;
	overflow: hidden;
	background: var(--accent-grey, #f1f1f3);
	aspect-ratio: 3 / 2;
	height: auto;
}
.block-cards.layout-grid-accent-bottom .c-card--gab .c-card__image.o-ratio img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.block-cards.layout-grid-accent-bottom .c-card--gab .c-card__highlight {
	display: block;
	height: 8px;
	width: 60%;
	background: currentColor;
	transition: width .35s ease;
	margin: 0;
}
.block-cards.layout-grid-accent-bottom .c-card--gab:hover .c-card__highlight,
.block-cards.layout-grid-accent-bottom .c-card--gab:focus-within .c-card__highlight {
	width: 100%;
}
.block-cards.layout-grid-accent-bottom .c-card--gab .c-card__content {
	padding: var(--space-3) 0 0;
}
.block-cards.layout-grid-accent-bottom .c-card--gab .c-card__title {
	margin: 0 0 var(--space-2);
	color: var(--color-n-black);
	font-weight: 600 !important;
}
.block-cards.layout-grid-accent-bottom .c-card--gab .c-card__link {
	display: inline-flex;
	align-items: center;
	gap: 20px;
	color: var(--color-n-black);
	text-decoration: none;
}
.block-cards.layout-grid-accent-bottom .c-card--gab .c-card__arrow {
	display: inline-flex;
	flex: 0 0 auto;
}
.block-cards.layout-grid-accent-bottom .c-card--gab .c-card__arrow svg {
	width: 2.2rem;
	height: auto;
	display: block;
}
.block-cards.layout-grid-accent-bottom .c-card--gab .c-card__copy {
	margin: 0;
	color: var(--color-n-black);
}
.block-cards.layout-grid-accent-bottom .c-card--gab.accent-grey         { color: var(--accent-grey); }
.block-cards.layout-grid-accent-bottom .c-card--gab.accent-green        { color: var(--accent-green); }
.block-cards.layout-grid-accent-bottom .c-card--gab.accent-pink         { color: var(--accent-pink); }
.block-cards.layout-grid-accent-bottom .c-card--gab.accent-peach        { color: var(--accent-peach); }
.block-cards.layout-grid-accent-bottom .c-card--gab.accent-light-blue   { color: var(--accent-light-blue); }
.block-cards.layout-grid-accent-bottom .c-card--gab.accent-color-p      { color: var(--color-p); }
.block-cards.layout-grid-accent-bottom .c-card--gab.accent-color-n-black { color: var(--color-n-black); }
@media only screen and (max-width: 991.98px) {
	.block-cards.layout-grid-accent-bottom .cards { grid-template-columns: repeat(2, 1fr); }
}
@media only screen and (max-width: 575.98px) {
	.block-cards.layout-grid-accent-bottom .cards { grid-template-columns: 1fr; }
}


/* Header CTA — opposite the heading, right aligned (live's Resources row). */
.block-cards .header-cta {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-shrink: 0;
}
@media (max-width: 767.98px) {
	.block-cards .header-cta {
		justify-content: flex-start;
		margin-top: var(--space-3);
	}
}


/* Aligned grid, no accent, DESCRIPTION BELOW THE TITLE — the no-accent grid pulls the copy above the
   title with `order:-1`; this option puts it back underneath (James, 2026-07-14). */
.block-cards.layout-copy-below .card .card-copy {
	order: 0;
	margin-top: var(--space-2);
}

/* Aligned grid follows live breakpoints (3 → 991px → 2 → 768px → 1), not the
   global 1199.98px 2-col drop. Restore 3 cols in the 992–1199 range; below that
   the global rules already give 2 cols (≤1199) then 1 col (≤767). */
@media only screen and (min-width: 992px) and (max-width: 1199.98px) {
	.block-cards.layout-grid .cards {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Mobile: live moves the block button AFTER the cards (right-aligned) and the
   header instance disappears (live home renders both; breakpoints swap them). */
.block-cards .cta--mobile-only {
	display: none;
}
@media only screen and (max-width: 767.98px) {
	.block-cards .cta--mobile-only {
		display: flex;
		justify-content: flex-end;
		margin-top: var(--space-5);
	}
	.block-cards .header-cta {
		display: none;
	}
}

/* Mobile: the card-height chevron is WIDER than the viewport (658/442 aspect);
   without min-width:0 it inflates its grid track and the header copy wraps past
   the container and clips. Clip the decoration instead (right edge anchored). */
@media only screen and (max-width: 767.98px) {
	.block-cards .header > * {
		min-width: 0;
	}
	.block-cards .header-decoration--chevron,
	.block-cards .header-decoration--graphic {
		overflow: hidden;
		justify-content: flex-end;
	}
}
