/* IC Two-Up Cards (patterns/ic-two-up.php).
 * Section title: an h2 in theme.json's Headline/Section role (no class). The comp labels it H3 (Subhead, 24), but it is
 * the section's top heading, and the Subhead role would set it smaller than the 28 card headlines under it; the Section
 * role keeps section titles one scale across the IC patterns.
 * Linked cards: the headline link's ::after covers the card, so the whole card is one link with the headline as its name.
 * The ring moves from the inline link to the card. */
.tt5c-ic-two-up {
	--tt5c-ic-two-up-w: 1200px; /* approximate — from Figma 5797:192850 (two 580 cards + gap) */
	--tt5c-ic-two-up-ratio: 3 / 2;
}
.tt5c-ic-two-up--4x3 { --tt5c-ic-two-up-ratio: 4 / 3; }
.tt5c-ic-two-up > * { margin-block: 0; }
.tt5c-ic-two-up__title { margin: 0 auto var(--wp--preset--spacing--50); }

.tt5c-ic-two-up__cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40);
	max-width: var(--tt5c-ic-two-up-w);
	margin-inline: auto;
}
.tt5c-ic-two-up__cards > * { margin-block: 0; }

.tt5c-ic-two-up__card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--ico-color-surface);
	color: var(--ico-color-text);
}
.tt5c-ic-two-up__card > * { margin-block: 0; }
.tt5c-ic-two-up__img {
	margin: 0;
	aspect-ratio: var(--tt5c-ic-two-up-ratio);
	overflow: hidden;
	background: var(--ico-color-band-bg);
}
.tt5c-ic-two-up__img img { display: block; width: 100%; height: 100%; object-fit: cover; }

.tt5c-ic-two-up__caption {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--20);
	padding: var(--wp--preset--spacing--35);
}
.tt5c-ic-two-up__caption > * { margin-block: 0; }
.tt5c-ic-two-up__headline { margin: 0; }

/* Linked headline, stretched over the card. */
.tt5c-ic-two-up__headline a {
	color: inherit;
	text-decoration: none;
}
.tt5c-ic-two-up__headline a::after {
	content: "";
	position: absolute;
	inset: 0;
}
.tt5c-ic-two-up__card:hover .tt5c-ic-two-up__headline a,
.tt5c-ic-two-up__headline a:focus-visible {
	text-decoration: underline;
	text-decoration-thickness: var(--ico-btn-text-rule-height);
	text-underline-offset: var(--ico-btn-text-rule-gap);
	text-decoration-color: var(--ico-color-link-attention);
}
@supports selector(:has(*)) {
	.tt5c-ic-two-up__card:has(.tt5c-ic-two-up__headline a) { cursor: pointer; }
	.tt5c-ic-two-up .tt5c-ic-two-up__headline a:focus-visible { outline: none; }
	.tt5c-ic-two-up__card:has(.tt5c-ic-two-up__headline a:focus-visible) {
		outline: var(--ico-btn-focus-ring-width) solid var(--ico-btn-focus-ring-color);
		outline-offset: var(--ico-btn-focus-ring-offset);
	}
}

@media (max-width: 600px) {
	.tt5c-ic-two-up__cards { grid-template-columns: minmax(0, 1fr); gap: var(--wp--preset--spacing--30); }
	.tt5c-ic-two-up__caption { padding: var(--wp--preset--spacing--30); }
}

/* Editor: the stretched link would cover the card and block selecting its blocks. */
.editor-styles-wrapper .tt5c-ic-two-up__headline a::after { content: none; }
