/**
 * Card component — shared by static blocks and PHP renderer.
 */

.uw-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: var(--uw-radius-card);
	background: var(--wp--preset--color--paper);
	overflow: hidden;
}

.uw-card__title {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 400;
	margin: 0 0 0.5rem;
	color: var(--wp--preset--color--slate-teal);
}

.uw-card__title a {
	color: inherit;
	text-decoration: none;
}

/* Stretched link — title link covers card via ::after */
.uw-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.uw-card:focus-within {
	outline: 2px solid var(--wp--preset--color--slate-teal);
	outline-offset: 3px;
}

.uw-card__text {
	margin: 0;
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--body);
	line-height: 1.5;
}

.uw-card__icon {
	display: inline-flex;
	width: 2.5rem;
	height: 2.5rem;
	color: var(--wp--preset--color--slate-teal);
	margin-bottom: 1rem;
}

.uw-card__icon svg {
	width: 100%;
	height: 100%;
}

/* Overlay (portrait image cards) */
.uw-card--overlay {
	border-radius: var(--uw-radius-image);
	height: 550px;
	min-height: 0;
	aspect-ratio: auto;
	justify-content: flex-end;
	color: var(--wp--preset--color--white);
	isolation: isolate;
}

.uw-card--overlay .uw-card__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.uw-card--overlay::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	height: 55%;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #2a3738 100%);
	border-radius: 0 0 10px 10px;
}

.uw-card--overlay .uw-card__body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 50px;
	z-index: 2;
	padding: 0 20px;
}

.uw-card--overlay .uw-card__title {
	margin: 0 0 0.5rem;
	font-family: var(--wp--preset--font-family--fraunces, "Fraunces", Georgia, serif);
	font-style: normal;
	font-weight: 600;
	font-size: 32px;
	line-height: 32px;
	color: #ffffff;
}

.uw-card--overlay .uw-card__text {
	margin: 0;
	font-family: var(--wp--preset--font-family--source-sans-3, "Source Sans 3", sans-serif);
	font-style: normal;
	font-weight: 400;
	font-size: 20px;
	line-height: 25px;
	color: #ffffff;
}

/* Icon + progress */
.uw-card--icon {
	padding: 1.75rem;
}

/* Teal tiles */
.uw-card--tile {
	background: var(--wp--preset--color--teal);
	color: var(--wp--preset--color--white);
	padding: 1.5rem;
	border-radius: var(--uw-radius-card);
}

.uw-card--tile .uw-card__title {
	color: var(--wp--preset--color--white);
	font-size: 1.5rem;
}

.uw-card--tile .uw-card__text {
	color: var(--wp--preset--color--white);
	font-size: 1rem;
}

.uw-card--tile .uw-card__icon {
	color: var(--wp--preset--color--sand);
}

/* Contrast: small text on teal tiles uses ink when we add a paper inset later;
   for now tile titles are large (≥18.66px bold / ≥24px) — see DESIGN-NOTES.md */

/* Accordion FAQ */
.uw-card--accordion {
	background: transparent;
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--ink) 20%, transparent);
	border-radius: 0;
	padding: 1rem 0;
}

.uw-card--accordion summary {
	cursor: pointer;
	list-style: none;
}

.uw-card--accordion summary::-webkit-details-marker {
	display: none;
}
