/* Info cards row — three linked cards (two side "default", one "feature").
   Side: text top / image bottom on grey. Feature: image top / text bottom on blue. */

.cards { padding-block: clamp(56px, 9vw, 120px); }

/* WPBakery wraps every home component in its own vc_row, so `.cards + .about`
   never matches the rendered page. Scope the review correction to Home itself:
   remove the cards' trailing pad and keep one deliberate 48–72px transition
   before the intro. `.home` covers both the ES and EUS front pages. */
.home .cards { padding-block-end: 0; }
.home .about { padding-block-start: clamp(48px, 5vw, 72px); }

.cards__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	max-width: 1130px;
	margin-inline: auto;
}

.card {
	position: relative;
	border-radius: var(--radius-md);
	overflow: hidden;
	background-color: var(--bida-grey);
	transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.card__link {
	display: flex;
	flex-direction: column;
	height: 427px;
	color: inherit;
}

/* Shared media panel. The revised component keeps the photograph inside the
   427px pill rather than flush with its top/bottom edge. Reducing the photo by
   the same 16px preserves the approved card height and its 167px copy area. */
.card__media {
	position: relative;
	height: 244px;
	margin-inline: 16px;
	border-radius: var(--radius-md);
	overflow: hidden;
	background: var(--bida-dark);
	flex: none;
}
.card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: bottom;
	opacity: 0.9;
	transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.card__body {
	display: flex;
	flex-direction: column;
	gap: 22px;
	padding-inline: 24px;
	flex: 1 1 auto;
}
.card__eyebrow {
	font-size: var(--fs-eyebrow);
	line-height: var(--lh-eyebrow);
	letter-spacing: var(--ls-eyebrow);
	text-transform: uppercase;
	transition: color var(--dur) var(--ease);
}
.card__title {
	font-size: var(--fs-h4);        /* 24 / 30 Medium */
	line-height: var(--lh-h4);
	letter-spacing: -0.24px;
	font-weight: var(--fw-medium);
	transition: color var(--dur) var(--ease);
}

/* circular arrow indicator */
.card__arrow {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.card__arrow-icon { width: 15px; height: 15px; }

/* ---- Side cards (default) ---- */
.card--default { background: var(--bida-grey); }
.card--default .card__body { order: 1; padding-block-start: 29px; }
.card--default .card__media { order: 2; margin-top: auto; margin-bottom: 16px; }
.card--default .card__eyebrow { color: var(--neutral-500); }
.card--default .card__title { color: var(--bida-blue); }
.card--default .card__arrow {
	top: 24px;
	right: 24px;
	background: var(--white);
	border: 1px solid var(--neutral-200);
	color: var(--bida-blue);
}

/* ---- Feature card (middle) ---- */
.card--feature { background: var(--bida-blue); color: var(--white); }
.card--feature .card__media { margin-top: 16px; }
.card--feature .card__image { opacity: 1; object-position: center; }
.card--feature .card__body {
	justify-content: flex-end;
	padding-block-end: 28px;
	padding-block-start: 24px;
	padding-inline-end: 76px;
}
.card--feature .card__eyebrow { color: var(--neutral-200); }
.card--feature .card__title { color: var(--white); max-width: 280px; }
.card--feature .card__arrow {
	bottom: 24px;
	right: 24px;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.6);
	color: var(--white);
}

/* Rollover from the Figma component.  A side card adopts the same image-first,
   blue treatment as the featured card.  :focus-within mirrors the state for
   keyboard users; the focus ring remains visible against either background. */
@media (hover: hover) and (pointer: fine) {
	.card--default:hover { background: var(--bida-blue); color: var(--white); }
	.card--default:hover .card__media {
		order: 1;
		margin-top: 16px;
		margin-bottom: 0;
	}
	.card--default:hover .card__body {
		order: 2;
		justify-content: flex-end;
		gap: 12px;
		padding-block: 14px 17px;
		padding-inline-end: 76px;
	}
	.card--default:hover .card__eyebrow { color: var(--neutral-200); }
	.card--default:hover .card__title { color: var(--white); }
	.card--default:hover .card__image { opacity: 1; object-position: center; transform: none; }
	.card--default:hover .card__arrow {
		top: auto;
		bottom: 24px;
		background: transparent;
		border-color: rgba(255, 255, 255, 0.6);
		color: var(--white);
	}
}

.card--default:focus-within { background: var(--bida-blue); color: var(--white); }
.card--default:focus-within .card__media {
	order: 1;
	margin-top: 16px;
	margin-bottom: 0;
}
.card--default:focus-within .card__body {
	order: 2;
	justify-content: flex-end;
	gap: 12px;
	padding-block: 14px 17px;
	padding-inline-end: 76px;
}
.card--default:focus-within .card__eyebrow { color: var(--neutral-200); }
.card--default:focus-within .card__title { color: var(--white); }
.card--default:focus-within .card__image { opacity: 1; object-position: center; transform: none; }
.card--default:focus-within .card__arrow {
	top: auto;
	bottom: 24px;
	background: transparent;
	border-color: rgba(255, 255, 255, 0.6);
	color: var(--white);
}

.card__link:hover .card__arrow,
.card__link:focus-visible .card__arrow { transform: translateX(2px); }
.card--feature .card__link:hover .card__arrow,
.card--feature .card__link:focus-visible .card__arrow { background: rgba(255, 255, 255, 0.12); }
.card__link:focus-visible { outline: 3px solid var(--bida-green); outline-offset: -3px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.cards__grid { grid-template-columns: 1fr; max-width: 420px; }
	/* Reserve the feature card's trailing corner for its circular arrow.  The
	   auto height keeps longer Basque copy from being forced back underneath it. */
	.card--feature .card__link { height: auto; min-height: 427px; }
	.card--feature .card__title { max-width: none; }
}
