/*=========================
	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);
	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;
}
.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) ---------- */
.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: var(--space-4);
	font-size: 22px !important;
	font-weight: 600;
}
.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);
}

/* 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;
}

/* Live c-card-services__title scale: 24px/600 base,
   fluid 480-1199px, 32px cap ≥1200px (layout-grid keeps its own 22px rule) */
.block-cards .card .card-title {
	font-size: 24px !important;
	font-weight: 600 !important;
}
@media screen and (min-width: 480px) {
	.block-cards .card .card-title {
		font-size: calc(18.6667px + 1.11111vw) !important;
	}
}
@media screen and (min-width: 1200px) {
	.block-cards .card .card-title {
		font-size: 32px !important;
	}
}

.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: 230px;
	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;
	}
	.block-cards .header {
		grid-template-columns: 1fr;
		gap: 0;
	}
	.block-cards .header-decoration img {
		max-width: 350px;
	}
}
