/* Family offers: pearl cards with a 4:5 picture, kicker, title, teaser, price and two buttons. The card is a
   shared .ab-card; «Mehr erfahren» carries the link that makes the whole card clickable. */
.wp-block-andrea-brudelin-family-offers {
	display: grid;
	gap: 1.5rem;
}

.wp-block-andrea-brudelin-family-offers.is-empty {
	display: block;
}

.wp-block-andrea-brudelin-family-offers .ab-product-empty {
	margin: 0;
	text-align: center;
	color: var(--wp--preset--color--muted);
}

@media (min-width: 640px) {
	.wp-block-andrea-brudelin-family-offers:not(.is-empty) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* One or two cards keep the width of a card instead of stretching across the page. */
	.wp-block-andrea-brudelin-family-offers.is-count-1:not(.is-wide) {
		grid-template-columns: minmax(0, 26rem);
		justify-content: center;
	}

	.wp-block-andrea-brudelin-family-offers.is-count-2 {
		grid-template-columns: repeat(2, minmax(0, 26rem));
		justify-content: center;
	}

	.wp-block-andrea-brudelin-family-offers.is-wide {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (min-width: 900px) {
	.wp-block-andrea-brudelin-family-offers.is-count-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.wp-block-andrea-brudelin-family-offers {
		gap: 2rem;
	}

	.wp-block-andrea-brudelin-family-offers.is-count-many {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	/* Five or six offers: three per row, so the last row is not left with one or two cards. */
	.wp-block-andrea-brudelin-family-offers.is-count-six {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* ---------------------------------------------------------------- the picture */
.wp-block-andrea-brudelin-family-offers .ab-product__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 5 / 4;
	border-bottom: 1px solid var(--wp--custom--line);
	background: var(--wp--preset--gradient--hero-lagoon);
}

@media (min-width: 640px) {
	.wp-block-andrea-brudelin-family-offers .ab-product__media {
		aspect-ratio: 4 / 5;
	}
}

/* Cut-outs and motifs sit on one of the gradients of «Farbverläufe». */
.wp-block-andrea-brudelin-family-offers .is-grad-sunset { --ab-media-gradient: var(--wp--preset--gradient--sunset); }
.wp-block-andrea-brudelin-family-offers .is-grad-lagoon { --ab-media-gradient: var(--wp--preset--gradient--offer-lagoon); }
.wp-block-andrea-brudelin-family-offers .is-grad-tropic { --ab-media-gradient: var(--wp--preset--gradient--tropic); }
.wp-block-andrea-brudelin-family-offers .is-grad-ocean { --ab-media-gradient: var(--wp--preset--gradient--media-ocean); }
.wp-block-andrea-brudelin-family-offers .is-grad-violet { --ab-media-gradient: var(--wp--preset--gradient--violet); }

.wp-block-andrea-brudelin-family-offers .is-media-freisteller,
.wp-block-andrea-brudelin-family-offers .is-media-motif {
	background: var(--ab-media-gradient);
}

.wp-block-andrea-brudelin-family-offers .is-media-studio {
	background: var(--wp--preset--color--studio);
}

@media (max-width: 639.98px) {
	.wp-block-andrea-brudelin-family-offers .is-media-studio {
		aspect-ratio: 1;
	}
}

.wp-block-andrea-brudelin-family-offers .ab-product__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	background: var(--wp--preset--color--cream-2);
	transform-origin: top;
}

.wp-block-andrea-brudelin-family-offers .is-media-freisteller .ab-product__img {
	object-position: center 12%;
	background: transparent;
}

.wp-block-andrea-brudelin-family-offers .is-media-studio .ab-product__img {
	background: var(--wp--preset--color--studio);
}

@media (prefers-reduced-motion: no-preference) {
	.wp-block-andrea-brudelin-family-offers .ab-product__img {
		transition: transform 0.9s var(--wp--custom--ease);
	}

	.wp-block-andrea-brudelin-family-offers .ab-card.is-linked:hover .ab-product__img {
		transform: scale(1.03);
	}
}

.wp-block-andrea-brudelin-family-offers .ab-product__motif {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	color: var(--wp--preset--color--pearl);
}

/* The family's symbol in a round badge on the motif, where the picture would show a person. */
.wp-block-andrea-brudelin-family-offers .ab-product__badge {
	position: absolute;
	top: 52%;
	right: 22%;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--pearl) 70%, transparent);
	border-radius: 50%;
	background: color-mix(in srgb, var(--wp--preset--color--pearl) 90%, transparent);
	color: var(--wp--preset--color--ocean);
	box-shadow: var(--wp--preset--shadow--lift);
}

.wp-block-andrea-brudelin-family-offers .ab-product__badge .ab-icon {
	width: 1.25rem;
	height: 1.25rem;
}

.wp-block-andrea-brudelin-family-offers .ab-product__label {
	position: absolute;
	bottom: 1rem;
	left: 1rem;
	padding: 0.375rem 0.75rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--wp--preset--color--pearl) 92%, transparent);
	font-size: var(--wp--preset--font-size--tiny);
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--navy);
}

/* «Foto: …» runs up the right edge of a studio photo. */
.wp-block-andrea-brudelin-family-offers .ab-product__credit {
	position: absolute;
	top: 1.25rem;
	right: 0.375rem;
	z-index: 3;
	margin: 0;
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.4;
	letter-spacing: 0.06em;
	white-space: nowrap;
	color: color-mix(in srgb, var(--wp--preset--color--cream) 88%, transparent);
	text-shadow: 0 0 4px color-mix(in srgb, var(--wp--preset--color--studio) 90%, transparent);
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	pointer-events: none;
}

/* ---------------------------------------------------------------- the text */
.wp-block-andrea-brudelin-family-offers .ab-product__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: var(--wp--preset--spacing--50);
}

.wp-block-andrea-brudelin-family-offers .ab-product__body .ab-kicker {
	margin-bottom: 0.75rem;
}

.wp-block-andrea-brudelin-family-offers .ab-product__title {
	margin-bottom: 0.5rem;
}

.wp-block-andrea-brudelin-family-offers .ab-product__excerpt {
	margin: 0 0 1.5rem;
	font-size: 0.98rem;
	color: var(--wp--preset--color--ink);
}

.wp-block-andrea-brudelin-family-offers .ab-product__chips {
	margin-bottom: 1.5rem;
}

/* ---------------------------------------------------------------- price and buttons */
.wp-block-andrea-brudelin-family-offers .ab-product__foot {
	container-type: inline-size;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: auto;
	padding-top: 1.5rem;
	border-top: 1px solid var(--wp--custom--line);
}

.wp-block-andrea-brudelin-family-offers .ab-product__actions {
	display: grid;
	gap: 0.5rem;
}

/* Side by side only where each label fits on one line: the wide card and a phone-wide card; the four-up grid stacks them. */
@container (min-width: 20rem) {
	.wp-block-andrea-brudelin-family-offers .ab-product__actions {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.wp-block-andrea-brudelin-family-offers .ab-product__actions .wp-element-button {
	padding-inline: 0.75rem;
}

/* The booking button stays above the card's link. */
.wp-block-andrea-brudelin-family-offers .ab-product__actions .wp-block-andrea-brudelin-book-link {
	position: relative;
	z-index: 2;
}

/* «Mehr erfahren» is the card's link: its ::before covers the card (the shared .ab-card-link), so the button must not
   be the box that ::before is measured from, and it must not move on hover, which would shrink that cover. */
.wp-block-andrea-brudelin-family-offers .ab-product__more > .wp-element-button {
	position: static;
	overflow: visible;
	isolation: auto;
}

.wp-block-andrea-brudelin-family-offers .ab-product__more > .wp-element-button::after {
	display: none;
}

.wp-block-andrea-brudelin-family-offers .ab-product__more > .wp-element-button:hover,
.wp-block-andrea-brudelin-family-offers .ab-product__more > .wp-element-button:active {
	transform: none;
}

.wp-block-andrea-brudelin-family-offers .ab-card.is-linked:hover .ab-product__more > .wp-element-button,
.wp-block-andrea-brudelin-family-offers .ab-card.is-linked:has(.ab-card-link:focus-visible) .ab-product__more > .wp-element-button {
	border-color: var(--wp--preset--color--navy);
	background: color-mix(in srgb, var(--wp--preset--color--navy) 4%, transparent);
}

/* The link has no outline of its own (it covers the card), so the card shows where the keyboard is. */
.wp-block-andrea-brudelin-family-offers .ab-card.is-linked:has(.ab-card-link:focus-visible) {
	outline: 2px solid var(--wp--preset--color--ocean);
	outline-offset: 3px;
}

/* ---------------------------------------------------------------- one wide card */
@media (min-width: 900px) {
	.wp-block-andrea-brudelin-family-offers .ab-product.is-wide {
		display: grid;
		grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
	}

	.wp-block-andrea-brudelin-family-offers .ab-product.is-wide .ab-product__media {
		aspect-ratio: auto;
		border-right: 1px solid var(--wp--custom--line);
		border-bottom: 0;
	}
}

/* Below 900px the wide card stacks: its picture stays landscape instead of growing to a poster. */
@media (min-width: 640px) and (max-width: 899.98px) {
	.wp-block-andrea-brudelin-family-offers .ab-product.is-wide .ab-product__media {
		aspect-ratio: 5 / 4;
	}
}
