/*=========================
	CARDS IMAGE BLOCK
	Icon cards in a grid: icon, accent bar, title (+arrow), copy.
	Accent colour drives the bar (currentColor); text/arrow stay black.
	Mirrors the cards block's arrow-slide + sliding-underline hover.
=========================*/

.block-cards-image {
}

.block-cards-image .header {
	margin-bottom: var(--space-6);
	max-width: 60ch;
}
.block-cards-image .header.has-graphic {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: var(--space-8);
	max-width: none;
}
.block-cards-image .header__content .top-title {
	display: block;
	margin-bottom: var(--space-2);
}
.block-cards-image .header__content .title {
	margin: 0 0 var(--space-2);
}
.block-cards-image .cards-image-graphic {
	color: currentColor;
	pointer-events: none;
	height: 365px;
	margin-left: auto;
}
.block-cards-image .cards-image-graphic svg {
	display: block;
	height: 100%;
	width: auto;
}

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

/* Card — accent class sets the colour the bar inherits (currentColor). */
.block-cards-image .card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-decoration: none;
	color: var(--accent-grey);
	background: transparent;
	border: none;
	gap: 20px;
}

/* --- Icon / Image --- */
.block-cards-image .card-icon {
	width: 100%;
}

.block-cards-image .card-icon img {
	width: 100%;
	height: auto;
	display: block;
}

.block-cards-image .card-icon--svg {
	width: auto;
	display: flex;
	justify-content: flex-start;
}

.block-cards-image .card-icon--svg svg {
	height: 180px;
	width: 180px;
	display: block;
	color: var(--color-n-black);
}

/* --- Accent bar (inherits the card's accent colour) --- */
.block-cards-image .card-bar {
	display: block;
	width: 70%;
	height: 5px;
	background: currentColor;
	margin: 30px 0;
}

/* --- Content (text stays black) --- */
.block-cards-image .card-title {
	display: block;
	margin: 0 0 var(--space-3);
	color: var(--color-n-black);
	font-size: 20px !important;
}
.block-cards-image .card-title__text {
	display: inline;
}
.block-cards-image .card-title__icon {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	width: 18px;
	height: 18px;
	margin-left: 8px;
	flex-shrink: 0;
	color: var(--color-n-black);
	transition: transform .25s ease;
}
.block-cards-image .card-title__icon svg {
	width: 100%;
	height: 100%;
}
.block-cards-image a.card:hover .card-title__icon,
.block-cards-image a.card:focus-visible .card-title__icon {
	transform: translateX(4px);
}

/* Sliding underline on the title text (mirrors the cards block) */
.block-cards-image .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-image a.card:hover .card-title .border-bot-sweep__elem,
.block-cards-image a.card:focus-visible .card-title .border-bot-sweep__elem {
	background-size: 100% 2px;
}

.block-cards-image .card-copy {
	margin: 0;
	color: var(--color-n-black);
}
.block-cards-image .card-copy p {
	margin: 0 0 var(--space-2);
}
.block-cards-image .card-copy p:last-child {
	margin-bottom: 0;
}

/* --- Accent colours (bar uses currentColor; class sets the colour) --- */
.block-cards-image .card.accent-grey       { color: var(--accent-grey); }
.block-cards-image .card.accent-green      { color: var(--accent-green); }
.block-cards-image .card.accent-pink       { color: var(--accent-pink); }
.block-cards-image .card.accent-peach      { color: var(--accent-peach); }
.block-cards-image .card.accent-light-blue { color: var(--accent-light-blue); }
.block-cards-image .card.accent-orange     { color: #ff6e33; }

/* --- Responsive --- */
@media only screen and (max-width: 991.98px) {
	.block-cards-image .cards {
		grid-template-columns: repeat(2, 1fr);
		gap: var(--space-7) var(--space-6);
	}
}
@media only screen and (max-width: 767.98px) {
	/* live: col-xs-16 ⇒ ONE card per row on the whole mobile range (was only <576 —
	   James, 2026-07-16, born-to-lead) */
	.block-cards-image .cards {
		grid-template-columns: 1fr;
	}
}

/* --- Page-specific: About Guide Dogs (post 1615) accreditation logos.
   Cap the logo height so the badges sit at a consistent size. --- */
body.page-id-1615 .block-cards-image .card-icon img {
	max-height: 150px;
	width: auto;
}


/* PHOTO cards (icon empty -> the block renders an <img>): live's grid uses a SQUARE crop
   (o-ratio--100) so every card lines up, a 28px heading and no accent bar (James, 2026-07-14).
   Icon cards (.card-icon--svg) keep their own sizing. */
.block-cards-image .card-icon:not(.card-icon--svg) {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}
.block-cards-image .card-icon:not(.card-icon--svg) img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.block-cards-image .card:has(.card-icon:not(.card-icon--svg)) .card-title,
.block-cards-image .card:has(.card-icon:not(.card-icon--svg)) .card-title.font-heading5 {
	/* live's photo-card heading is a u-h4 (28px); the block's default is heading5 (!important) */
	font-size: var(--font-heading4-size) !important;
	line-height: var(--font-heading4-height) !important;
}

/* --- Page-specific: Our current partners (post 7440) — the card images are
   partner LOGOS (405x150 landscape), not photos, so the square photo-crop
   above zoom-cropped them (Userback, 2026-07-16). Live renders these as
   .img-wrap > img.u-img-responsive: natural aspect ratio, no crop. --- */
body.page-id-7440 .block-cards-image .card-icon:not(.card-icon--svg) {
	aspect-ratio: auto;
	overflow: visible;
}
body.page-id-7440 .block-cards-image .card-icon:not(.card-icon--svg) img {
	width: auto;
	max-width: 100%;
	height: auto;
	object-fit: unset;
}
