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

.block-cards .header {
	display: grid;
	grid-template-columns: 3fr 1fr;
	gap: var(--space-7);
	align-items: start;
	margin-bottom: var(--space-6);
}
@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;
}
/* Header CTA button (right column of the title header, matching live). */
.block-cards .header-cta {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	height: 100%;
}
@media only screen and (max-width: 767.98px) {
	.block-cards .header-cta {
		justify-content: flex-start;
		margin-top: var(--space-3);
	}
}
.block-cards .header-decoration img {
	max-width: 450px;
	height: auto;
}
.block-cards .header-decoration--chevron {
	display: flex;
	justify-content: flex-end;
	align-items: center;
}
.block-cards .header-decoration--chevron .c-icon {
	display: inline-flex;
	height: 280px;
	color: currentColor;
	transform: translateX(0);
	transition: transform 0.8s cubic-bezier(0.4, 0, 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;
}

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

/* ---------- Staggered layout (live "Support and services" 2-3-2) ---------- */
@media only screen and (min-width: 768px) {
	.block-cards.layout-staggered .header {
		grid-template-columns: 1fr 1fr;
	}
}
.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;
}
/* Title sits inline with the arrow icon; font-size/margin come from the
   theme's heading class (no per-layout override). */
.block-cards.layout-grid .card .card-title {
	display: flex;
	align-items: center;
	gap: 20px;
}
.block-cards.layout-grid .card .card-title__icon {
	display: inline-flex;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: currentColor;
	transition: transform 0.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, accent BELOW the image: same aligned grid as layout-grid, but
   the coloured accent bar sits directly beneath the image (between the image and
   the title/copy), matching the live divider. */
.block-cards.layout-grid.layout-accent-below-image .card {
	padding: var(--space-4) 0;
}
/* hide the default absolute bottom bar */
.block-cards.layout-grid.layout-accent-below-image .card .c-card__highlight {
	display: none;
}
/* accent bar at the top of the content = directly under the image */
.block-cards.layout-grid.layout-accent-below-image .c-card-services__body {
	position: relative;
	padding-top: var(--space-4);
}
.block-cards.layout-grid.layout-accent-below-image .c-card-services__body::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 80%;
	height: 5px;
	background: currentColor;
}

/* 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 {
	/* Live renders these difficulty links at 28px/600 (between h4=30 and h5=24). */
	font-size: 28px !important;
	line-height: 1.25 !important;
	font-weight: 600 !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;
	font-size: 16px !important;
}
.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;
}
@media (min-width: 1200px) {
	/* .block-cards.layout-staggered-image > .container {
		padding-left: revert;
	} */
}

/* 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: -200px 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%);
}
.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;
}
.block-cards.layout-staggered-image .card .card-title__icon {
	display: inline-flex;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	transition: transform 0.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 0.35s cubic-bezier(0.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 !important;
		margin: 0 auto !important;
	}
	.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 */
}
.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);
}

/* --- Optional per-block image shape (ACF "Image Shape" field) ---
   Overrides the default fixed 240px height (and the staggered-image
   alternating ratios) so every card image shares one aspect ratio. */
.block-cards.cards-img-square .c-card-services__image img,
.block-cards.cards-img-landscape .c-card-services__image img,
.block-cards.cards-img-portrait .c-card-services__image img {
	height: auto !important;
	width: 100%;
	object-fit: cover;
}
.block-cards.cards-img-square .c-card-services__image img {
	aspect-ratio: 1 / 1 !important;
}
.block-cards.cards-img-landscape .c-card-services__image img {
	aspect-ratio: 3 / 2 !important;
}
.block-cards.cards-img-portrait .c-card-services__image img {
	aspect-ratio: 5 / 6 !important;
}

/* --- 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 0.5s cubic-bezier(0.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);
}

/* Per-block override (add block_class "cards-title-first"): render the card
   TITLE above the copy, overriding layouts (e.g. no-accent) that put copy first. */
.block-cards.cards-title-first .card .card-copy {
	order: 1 !important;
}
.block-cards.cards-title-first .card .card-title {
	order: 0 !important;
}

/* -----------------------------------------------
   Optional per-card top / bottom text (e.g. an "Event" / "Case study" tag
   above the title, or a date below it). Mirrors live's light .u-medium label. */
.block-cards .card .card-text {
	font-size: 1.8rem;
	font-weight: 300;
	line-height: 1.4;
	color: var(--color-n-black);
}
.block-cards .card .card-text--top {
	margin-bottom: 0.8rem;
}
.block-cards .card .card-text--bottom {
	margin-top: 0.8rem;
}
