/* Paket and Leistung pages (templates/single-paket.html, single-leistung.html) – loaded only there. */

/* Hero */
.rb-angebot-hero .rb-eyebrow a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.rb-angebot-hero .rb-eyebrow span {
	margin-inline: 0.25em;
}

.rb-angebot-lead p {
	max-width: 60ch;
}

/* Body: the info card comes first in the DOM (key facts first on mobile), right column on desktop. */
.rb-paket-body {
	margin-top: var(--wp--preset--spacing--50);
}

@media (min-width: 782px) {
	.rb-paket-body {
		flex-direction: row-reverse;
		margin-top: 0;
	}

	.rb-paket-main {
		padding-top: var(--wp--preset--spacing--60);
	}

	/* Higher specificity than the column's flow-layout reset (margin-block-start: 0). */
	.rb-paket-aside > .rb-paket-card.rb-paket-card {
		position: sticky;
		top: var(--wp--preset--spacing--40);
		margin-top: calc(-1 * var(--wp--preset--spacing--80));
	}
}

/* Info card */
.rb-paket-card {
	border-top: 4px solid var(--wp--preset--color--custom-rb-gruen-accent);
	box-shadow: 0 24px 48px -24px rgb(0 23 64 / 0.55);
}

/* Spacing between the card sections comes from the block gap; no extra margins around the title. */
.rb-paket-card .rb-paket-card__title {
	margin: 0;
}

.rb-paket-card .rb-label {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.rb-paket-card__amount {
	margin: 0;
	line-height: 1.15;
}

.rb-paket-card__terms p {
	margin: 0;
}

.rb-paket-card__terms p + p::before {
	content: "·";
	margin-inline-end: 0.4em;
}

.rb-paket-card__duration {
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid rgb(255 255 255 / 0.25);
}

.rb-paket-card__duration p {
	margin: 0;
}

.rb-paket-card__actions {
	padding-top: var(--wp--preset--spacing--20);
}

.rb-paket-card__alt a {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* Content typography */
.wp-block-post-content.rb-angebot-content > h2 {
	position: relative;
	margin-top: var(--wp--preset--spacing--60);
	padding-top: var(--wp--preset--spacing--30);
}

.wp-block-post-content.rb-angebot-content > h2:first-child {
	margin-top: 0;
}

.wp-block-post-content.rb-angebot-content > h2::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 3rem;
	height: 4px;
	background: var(--wp--preset--color--dunkelpink);
}

/* Unordered lists: green check marks */
.wp-block-post-content.rb-angebot-content ul.wp-block-list:not(.is-style-checkmark-list) {
	padding-inline-start: 0;
	list-style: none;
}

.wp-block-post-content.rb-angebot-content ul.wp-block-list:not(.is-style-checkmark-list) > li {
	position: relative;
	padding-inline-start: 2rem;
}

.wp-block-post-content.rb-angebot-content ul.wp-block-list:not(.is-style-checkmark-list) > li + li {
	margin-top: 0.6rem;
}

.wp-block-post-content.rb-angebot-content ul.wp-block-list:not(.is-style-checkmark-list) > li::before {
	content: "";
	position: absolute;
	top: 0.2em;
	left: 0;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 50%;
	background: var(--wp--preset--color--custom-rb-gruen-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
}

/* Ordered lists: numbered circles */
.wp-block-post-content.rb-angebot-content ol.wp-block-list {
	padding-inline-start: 0;
	list-style: none;
	counter-reset: rb-step;
}

.wp-block-post-content.rb-angebot-content ol.wp-block-list > li {
	position: relative;
	min-height: 2rem;
	padding-inline-start: 2.75rem;
	counter-increment: rb-step;
}

.wp-block-post-content.rb-angebot-content ol.wp-block-list > li + li {
	margin-top: var(--wp--preset--spacing--30);
}

.wp-block-post-content.rb-angebot-content ol.wp-block-list > li::before {
	content: counter(rb-step);
	position: absolute;
	top: -0.1em;
	left: 0;
	display: grid;
	width: 2rem;
	height: 2rem;
	place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--mattblau);
	color: var(--wp--preset--color--base);
	font-size: 0.95rem;
	font-weight: 600;
}

/* "Weitere Pakete" cards */
.rb-angebot-teaser {
	height: 100%;
	border-top: 4px solid var(--wp--preset--color--custom-rb-blau-accent);
	transition: box-shadow 0.2s ease-in-out;
}

.rb-angebot-cards .wp-block-post-template > li:hover .rb-angebot-teaser {
	box-shadow: 0 16px 32px -18px rgb(0 23 64 / 0.4);
}

.rb-angebot-teaser .wp-block-post-title {
	margin: 0;
}

.rb-angebot-teaser__excerpt p {
	display: -webkit-box;
	overflow: hidden;
	margin: 0;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
}

.rb-angebot-teaser__price {
	margin-top: auto !important;
	color: var(--wp--preset--color--dunkelpink);
}

@media (prefers-reduced-motion: reduce) {
	.rb-angebot-teaser {
		transition: none;
	}
}

/* Leistung: text column 760px, left-aligned to the centred content grid (like header, hero and cards).
   Wide/full blocks keep their own widths. The flow layout sets margins with !important. */
.rb-leistung .wp-block-post-content.rb-angebot-content > :where(:not(.alignwide, .alignfull, .alignleft, .alignright)) {
	max-width: 760px;
	margin-left: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
	margin-right: auto !important;
}
