/**
 * _cards.css — the kit's three cards, as classes on Spectra containers.
 * Owns: .rl-card-image (white, 4px sage top, 16:10 photo), .rl-card-icon (64px teal circle, navy outline icon),
 * .rl-card-text; .rl-card-meta; card titles, text and Read More links; the 4px lift on hover.
 * Doesn't own: the Learn More link outside cards (_links.css); buttons (_buttons.css).
 * Depends on: global/_tokens.css. Spectra writes each container's padding, border, shadow and gap into its own block
 * CSS (one class + one block class); the .site-scoped doubled class out-ranks it (module wins). Square corners.
 */
:is(.site, .editor-styles-wrapper) :is(.rl-card-image, .rl-card-icon, .rl-card-text):is(.rl-card-image, .rl-card-icon, .rl-card-text) {
	border: 0;
	border-radius: 0;
	background: var(--rl-white);
	box-shadow: var(--rl-shadow-card);
	transition: transform var(--rl-ease), box-shadow var(--rl-ease);
}

:is(.site, .editor-styles-wrapper) :is(.rl-card-image, .rl-card-icon, .rl-card-text):is(.rl-card-image, .rl-card-icon, .rl-card-text):is(:hover, :focus-within) {
	transform: translateY(-4px);
	box-shadow: var(--rl-shadow-card-hover);
}

/* Image card: a 4px sage top, the photo 16:10, then a padded body. */
:is(.site, .editor-styles-wrapper) .rl-card-image.rl-card-image {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding: 0;
	border-top: 4px solid var(--rl-color-accent);
}

:is(.site, .editor-styles-wrapper) .rl-card-image.rl-card-image .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

:is(.site, .editor-styles-wrapper) .rl-card-image.rl-card-image > .wp-block-uagb-container {
	flex: 1;
	gap: 10px;
	padding: 24px 28px 28px;
}

/* Icon and text cards: 32 × 28, 14px between their parts. */
:is(.site, .editor-styles-wrapper) :is(.rl-card-icon, .rl-card-text):is(.rl-card-icon, .rl-card-text) {
	gap: 14px;
	padding: 32px 28px;
}

/* The icon in a 64px teal circle, 32px navy outline. Spectra stretches a container's non-container children with
   width: 100%, so the circle is held by max-width. */
:is(.site, .editor-styles-wrapper) .rl-card-icon.rl-card-icon .uagb-icon-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	max-width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--rl-color-alt-brand);
}

:is(.site, .editor-styles-wrapper) .rl-card-icon.rl-card-icon .uagb-icon-wrapper svg {
	width: 32px;
	height: 32px;
	fill: var(--rl-color-brand);
}

/* Inside any card: the meta line, the title (Lora 20 / 22, not the page's H3), the text 16 / 26. */
:is(.site, .editor-styles-wrapper) .rl-card-meta.rl-card-meta {
	font-size: 16px;
	line-height: 26px;
	color: var(--rl-color-body);
}

:is(.site, .editor-styles-wrapper) :is(.rl-card-icon, .rl-card-text) :is(h2, h3, h4) {
	font-size: 22px;
	line-height: 30px;
}

:is(.site, .editor-styles-wrapper) .rl-card-image :is(h2, h3, h4) {
	font-size: 20px;
	line-height: 28px;
}

:is(.site, .editor-styles-wrapper) :is(.rl-card-image, .rl-card-icon, .rl-card-text) p:not(.rl-card-meta):not(.is-style-rl-eyebrow):not(.is-style-rl-learn-more) {
	font-size: 16px;
	line-height: 26px;
}

/* The image card's excerpt: two lines, then the Read More at the bottom. */
:is(.site, .editor-styles-wrapper) .rl-card-image.rl-card-image p:not(.rl-card-meta):not(.is-style-rl-learn-more) {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

:is(.site, .editor-styles-wrapper) .rl-card-image.rl-card-image > .wp-block-uagb-container > .is-style-rl-learn-more {
	margin-top: auto;
	padding-top: 8px;
}

/* The arrow moves on card hover, not only on the link's. */
:is(.site, .editor-styles-wrapper) :is(.rl-card-image, .rl-card-icon, .rl-card-text):is(:hover, :focus-within) .is-style-rl-learn-more a::after {
	transform: translateX(4px);
}
