/**
 * core/group: sections, background variations (Sand, Waldgrün), card grid,
 * and the small structured components used by the patterns (price rows, cards).
 */

/* ── Sections ───────────────────────────────────────────────── */

.furra-section {
	padding-block: var(--section);
}

/* Two paper sections in a row share one gap (the upper section's bottom padding).
   After a coloured section the paper section needs its own top padding. */
.furra-section:not(.is-style-sand, .is-style-forest, .furra-section--facts) + .furra-section:not(.is-style-sand, .is-style-forest) {
	padding-top: 0;
}

.furra-section:is(.is-style-sand, .is-style-forest) + .furra-section:not(.is-style-sand, .is-style-forest) {
	padding-top: clamp(4rem, 7vw, 6.5rem);
}

/* Fakten: a cream band of its own, clearly set apart from the house section below. */
.furra-section--facts {
	padding-block: clamp(1.5rem, 3vw, 2.25rem);
	background: var(--wp--preset--color--sand);
}

.furra-section--facts + .furra-section {
	padding-top: clamp(4.5rem, 8vw, 7rem) !important;
}

/* A section followed by the closing band ends with one calm margin, not a full section gap. */
.furra-section:has(+ .furra-closing) {
	padding-bottom: clamp(4rem, 7vw, 6rem);
}

/* Intro under a page hero: a quiet editorial opening, with a short wood rule. */
.furra-section--intro {
	padding-block: clamp(4rem, 9vw, 8rem) clamp(3rem, 7vw, 6rem);
}

.furra-section--intro::before {
	content: "";
	display: block;
	width: 3rem;
	height: 1px;
	margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
	background: var(--wp--preset--color--wood);
}

.furra-section--intro > p:not([class*="is-style-"], [class*="furra-"]) {
	color: var(--wp--preset--color--ink-muted);
}

.furra-section--intro > .is-style-lead + p {
	margin-top: 1.75rem;
}

.furra-section--intro > h4 {
	margin-top: 2.25rem;
	color: var(--wp--preset--color--wood);
	font-size: 0.75rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.furra-section__header {
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.furra-section__header > * {
	max-width: 40rem;
}

.furra-section__header h2 {
	margin-bottom: 0;
}

.furra-section__footer {
	margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

/* The "all …" text link sits directly under the section headline, above the cards. */
.furra-section:has(> .furra-section__header + .is-style-cards + .furra-section__footer) {
	display: flex;
	flex-direction: column;
}

/* Auto inline margins (constrained layout) would otherwise shrink flex items to their content. */
.furra-section:has(> .furra-section__header + .is-style-cards + .furra-section__footer) > * {
	width: 100%;
}

.furra-section:has(> .furra-section__header + .is-style-cards + .furra-section__footer) > .furra-section__header {
	margin-bottom: 0;
}

.furra-section:has(> .furra-section__header + .is-style-cards + .furra-section__footer) > .furra-section__footer {
	order: 1;
	margin-top: 0.5rem;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.furra-section:has(> .furra-section__header + .is-style-cards + .furra-section__footer) > .is-style-cards {
	order: 2;
}

/* ── Backgrounds ────────────────────────────────────────────── */

.wp-block-group.is-style-sand {
	background: var(--wp--preset--color--sand);
}

/* Sand section heading list (e.g. Ausstattung): headline and list side by side. */
.wp-block-group.is-style-sand.furra-section > h2 {
	margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.wp-block-group.is-style-forest {
	background: var(--wp--preset--color--forest);
	color: rgb(247 243 236 / 0.82);
}

.wp-block-group.is-style-forest :is(h1, h2, h3, h4) {
	color: var(--wp--preset--color--paper);
}

.wp-block-group.is-style-forest .is-style-eyebrow {
	color: var(--wp--preset--color--wood-light);
}

.wp-block-group.is-style-forest a:not(.wp-element-button) {
	color: var(--wp--preset--color--paper);
}

.wp-block-group.is-style-forest :focus-visible {
	outline-color: var(--wp--preset--color--wood-light);
}

/* The dark price band is the closing strip of every page. */
.wp-block-group.is-style-forest.furra-section {
	padding-block: clamp(3.5rem, 7vw, 6rem);
}

.wp-block-group.is-style-forest + .wp-block-group.is-style-forest {
	margin-top: 0;
	border-top: var(--hairline-dark);
}

/*
 * Band layout on a grid (not core's flex columns): phones stacked, tablets price | rows
 * with the actions on their own row, desktop all parts in one row with hairlines.
 */
.wp-block-group.is-style-forest > .wp-block-columns {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2rem clamp(2rem, 4vw, 4rem);
}

.wp-block-group.is-style-forest > .wp-block-columns > .wp-block-column {
	min-width: 0;
	align-self: center;
	container-type: inline-size;
}

@media (min-width: 640px) {
	.wp-block-group.is-style-forest > .wp-block-columns {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wp-block-group.is-style-forest > .wp-block-columns > .wp-block-column:nth-child(2) {
		padding-left: clamp(2rem, 4vw, 4rem);
		border-left: var(--hairline-dark);
	}

	.wp-block-group.is-style-forest > .wp-block-columns > .wp-block-column:nth-child(3) {
		grid-column: 1 / -1;
		padding-top: 2rem;
		border-top: var(--hairline-dark);
	}
}

@media (min-width: 1024px) {
	.wp-block-group.is-style-forest > .wp-block-columns {
		grid-template-columns: none;
		grid-auto-columns: minmax(0, 1fr);
		grid-auto-flow: column;
	}

	.wp-block-group.is-style-forest > .wp-block-columns > .wp-block-column:nth-child(3) {
		grid-column: auto;
		padding-top: 0;
		padding-left: clamp(2rem, 4vw, 4rem);
		border-top: 0;
		border-left: var(--hairline-dark);
	}

	.wp-block-group.is-style-forest > .wp-block-columns > .wp-block-column:last-child:not(:first-child) .wp-block-buttons {
		justify-content: flex-end;
	}
}

.wp-block-group.is-style-forest > .wp-block-columns > .wp-block-column > p:not([class*="is-style-"], [class*="furra-"]) {
	margin-top: 1rem;
	color: rgb(247 243 236 / 0.7);
	font-size: var(--wp--preset--font-size--small);
}

.wp-block-group.is-style-forest .wp-block-buttons {
	gap: 1rem 1.75rem;
	align-items: center;
}

/* ── Cards (4 → 2 → horizontal scroll on phones) ────────────── */

.wp-block-group.is-style-cards {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(1rem, 2vw, 1.75rem);
}

.wp-block-group.is-style-cards > * {
	margin: 0 !important;
}

@media (max-width: 1023px) {
	.wp-block-group.is-style-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 639px) {
	.wp-block-group.is-style-cards {
		display: flex;
		gap: 0.75rem;
		margin-inline: calc(-1 * var(--gutter));
		padding-inline: var(--gutter);
		padding-bottom: 0.5rem;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-padding-inline: var(--gutter);
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.wp-block-group.is-style-cards > * {
		flex: 0 0 78%;
		scroll-snap-align: start;
	}
}

/* Photo card: portrait crop, season kicker, title with a short rule, one line of text.
   A link in the title makes the whole card clickable (stretched link). */
.furra-card {
	position: relative;
	display: flex;
	flex-direction: column;
}

.furra-card .wp-block-image {
	margin: 0 0 1.1rem;
	overflow: hidden;
	background: var(--wp--preset--color--sand);
}

.furra-card .is-style-eyebrow {
	margin-bottom: 0.5rem;
	font-size: 0.6875rem;
}

.furra-card .is-style-eyebrow::before {
	flex-basis: 1.25rem;
}

.furra-card h3 a {
	color: inherit;
	text-decoration: none;
}

.furra-card h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.furra-card h3 a:focus-visible {
	outline: none;
}

.furra-card:has(h3 a:focus-visible) {
	outline: 2px solid var(--wp--preset--color--wood);
	outline-offset: 4px;
}

.furra-card:has(a):hover h3 {
	color: var(--wp--preset--color--wood);
}

.furra-card .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	transition: transform 700ms var(--ease, ease);
}

/* Only linked cards react to the pointer (unlinked cards must not look clickable). */
.furra-card:has(a):hover .wp-block-image img {
	transform: scale(1.04);
}

.furra-card h3 {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	margin: 0;
	transition: color var(--dur, 200ms) ease;
	font-size: clamp(1.4rem, 1.2rem + 0.6vw, 1.75rem);
	font-weight: 500;
}

.furra-card h3::after {
	content: "→";
	margin-left: auto;
	color: var(--wp--preset--color--wood);
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	transition: transform var(--dur, 200ms) ease;
}

.furra-card:has(a):hover h3::after {
	transform: translateX(0.25rem);
}

.furra-card p:not(.is-style-eyebrow) {
	margin: 0.55rem 0 0;
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.55;
}

/* ── Price card & rows ──────────────────────────────────────── */

.furra-price-card {
	container-type: inline-size;
	max-width: 36rem;
	padding: clamp(1.75rem, 4vw, 3rem);
	border: var(--hairline);
	border-top: 3px solid var(--wp--preset--color--forest);
	background: var(--wp--preset--color--white);
}

.furra-price-card .wp-block-buttons {
	margin-top: 2rem;
}

.furra-price {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	/* Sized by its card/column (cqi), so the price (e.g. „CHF 140.00“) never outgrows a narrow column. */
	font-size: clamp(2.25rem, 1.8rem + 2.4vw, 4rem);
	font-size: clamp(2rem, 17cqi, 4rem);
	font-weight: 400;
	letter-spacing: -0.01em;
	line-height: 1;
}

.furra-price__note {
	margin: 0.6rem 0 1.5rem;
	color: var(--wp--preset--color--ink-muted);
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.25rem;
	font-style: italic;
}

.is-style-forest .furra-price {
	color: var(--wp--preset--color--paper);
}

.is-style-forest .furra-price__note {
	margin-bottom: 0;
	color: var(--wp--preset--color--wood-light);
}

.furra-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.25rem 1rem;
	padding-block: 0.9rem;
	border-bottom: var(--hairline);
}

.furra-row:first-child,
:not(.furra-row) + .furra-row {
	border-top: var(--hairline);
}

.furra-row > * {
	margin: 0 !important;
}

.furra-row__label {
	color: var(--wp--preset--color--ink-muted);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.furra-row__value {
	font-weight: 600;
	text-align: right;
}

.furra-row__note {
	flex-basis: 100%;
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
}

.is-style-forest .furra-row {
	border-color: rgb(247 243 236 / 0.16);
}

.is-style-forest .furra-row__label,
.is-style-forest .furra-row__note {
	color: rgb(247 243 236 / 0.68);
}

.is-style-forest .furra-row__value {
	color: var(--wp--preset--color--paper);
}

/* Kurtaxe & Gästekarte (sand section with a single row). */
.is-style-sand.furra-section > .furra-row {
	max-width: var(--measure);
}

/* ── Address & contact cards ────────────────────────────────── */

.furra-address-card,
.furra-contact-card {
	padding: clamp(1.75rem, 4vw, 2.5rem);
	border: var(--hairline);
	background: var(--wp--preset--color--white);
}

.furra-address-card {
	border-top: 3px solid var(--wp--preset--color--wood);
}

.furra-address-card p {
	margin: 0;
}

.furra-address__name {
	margin-bottom: 0.5rem !important;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem);
	line-height: 1.15;
}

.furra-contact-card {
	background: var(--wp--preset--color--sand);
	border-color: transparent;
}

.furra-contact-card h2 {
	margin-bottom: 0.75rem;
	font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem);
}

.furra-contact-card > p:not([class*="is-style-"], [class*="furra-"]) {
	margin-block: 0;
}

.furra-contact-card .wp-block-buttons {
	flex-direction: column;
	align-items: stretch;
	gap: 0.6rem;
	margin-block: 1.5rem;
}

/* Phone/e-mail buttons carry long values: normal case, no tracking, may wrap. */
.furra-contact-card .wp-block-button__link {
	justify-content: flex-start;
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0;
	text-transform: none;
	overflow-wrap: anywhere;
	text-align: left;
}

/* Contact column: cards stacked with a clear rhythm. */
.wp-block-column > .furra-contact-card + .furra-price-card {
	margin-top: 1.5rem;
}

/* Next to the (longer) form the cards travel along and end flush with it,
   so no empty column is left beside the form. */
@media (min-width: 782px) {
	.wp-block-columns > .wp-block-column:has(> .furra-contact-card) {
		position: sticky;
		top: calc(var(--header-h) + 2rem);
		align-self: flex-start;
	}

	.admin-bar .wp-block-columns > .wp-block-column:has(> .furra-contact-card) {
		top: calc(var(--header-h) + var(--wp-admin--admin-bar--height, 0px) + 2rem);
	}
}

/* ── Abschluss (closing invitation above the footer) ─────────── */

/* Light sand band with one clear main action; the footer below stays dark and compact. */
.furra-closing.furra-section {
	padding-block: clamp(4.5rem, 8vw, 7rem);
	border-top: var(--hairline);
}

.furra-closing > .wp-block-columns {
	gap: clamp(2rem, 5vw, 5rem);
}

@media (min-width: 782px) {
	.furra-closing > .wp-block-columns {
		align-items: center !important;
	}
}

.furra-closing h2 {
	max-width: 16ch;
	margin-bottom: 0.4em;
}

/* Balanced lines: no single word left alone on the second line. */
.furra-closing > .wp-block-columns > .wp-block-column > p:not([class*="is-style-"], [class*="furra-"]) {
	max-width: 36rem;
	color: var(--wp--preset--color--ink-muted);
	text-wrap: balance;
}

/* Main action first; the further link sits small underneath, never beside it. */
.furra-closing .wp-block-buttons {
	flex-direction: column;
	align-items: flex-start;
	gap: 0.6rem;
	margin-top: 1.75rem;
}

.furra-closing .wp-block-button.is-style-text-link .wp-block-button__link {
	min-height: 2.25rem;
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
}

.furra-closing .wp-block-button.is-style-text-link .wp-block-button__link:hover {
	color: var(--wp--preset--color--wood);
}

.furra-closing .furra-price-card {
	max-width: none;
	margin-left: auto;
	box-shadow: var(--shadow-soft);
}

.furra-closing .furra-price-card > p:not([class*="is-style-"], [class*="furra-"]) {
	margin: 1rem 0 0;
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
}

/* Short closing (no price card): the actions sit right on desktop, the link under the button. */
@media (min-width: 782px) {
	.furra-closing .wp-block-column:last-child > .wp-block-buttons:only-child {
		align-items: flex-end;
		margin-top: 0;
	}
}

/* Fotogalerie: a short introduction above the photo sections. */
.furra-gallery-hint {
	max-width: 40rem;
	margin-bottom: clamp(3rem, 6vw, 4.5rem) !important;
	color: var(--wp--preset--color--ink-muted);
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.2rem);
	line-height: 1.65;
}

/* ── Anreise: Parkieren with the garage photos in the same sand section ── */

.is-style-sand .furra-garage {
	margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

.is-style-sand .furra-garage > p {
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
}

.furra-garage .wp-block-gallery.has-nested-images figure.wp-block-image img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* Route link in the address card (replaces the empty map placeholder). */
.furra-address-card .wp-block-buttons {
	margin-top: 1.5rem;
}

.furra-address-card .wp-block-button.is-style-text-link .wp-block-button__link[target="_blank"]::after {
	content: " ↗";
}

/* ── Anfrageweg: three short steps in the closing band ── */

.furra-closing .wp-block-list.is-style-steps {
	max-width: 34rem;
	margin: 1.75rem 0 0;
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
}

.furra-closing .wp-block-list.is-style-steps > li {
	min-height: 2.25rem;
	margin-bottom: 0.9rem;
	padding-top: 0.3rem;
}

.furra-closing .wp-block-list.is-style-steps > li strong {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

.furra-closing .wp-block-list.is-style-steps > li::before {
	width: 2rem;
	height: 2rem;
	font-size: 1.05rem;
}

/* Fotogalerie: introduction (eyebrow, heading, text) with room before the first photo section. */
.furra-section__header.furra-gallery-intro {
	margin-bottom: clamp(3.5rem, 7vw, 5.5rem);
}

.furra-gallery-intro > p:not([class*="is-style-"], [class*="furra-"]) {
	color: var(--wp--preset--color--ink-muted);
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.2rem);
	line-height: 1.65;
}

/* ── Einleitung: kicker, H2 and text, aligned with the wide content like every other section ── */

.furra-section--intro:has(> .furra-intro)::before {
	display: none;
}

.furra-intro > * {
	max-width: 44rem;
}

.furra-intro > h2 {
	margin-bottom: 0.55em;
}

.furra-intro > p:not([class*="is-style-"], [class*="furra-"]) {
	color: var(--wp--preset--color--ink-muted);
}

.furra-intro > .is-style-lead {
	margin-top: 0;
}

.furra-intro > .is-style-lead + p {
	margin-top: 1.5rem;
}

/* ── Häufige Fragen: own breathing room, left-aligned with the wide content ── */

.furra-section:is(#faq, #haeufige-fragen) {
	padding-top: clamp(3.5rem, 6vw, 5.5rem);
}

/* After a paper section: a hairline marks the change of topic, both sides get the same air. */
.furra-section:not(.is-style-sand, .is-style-forest):has(+ .furra-section:is(#faq, #haeufige-fragen)) {
	padding-bottom: clamp(3.5rem, 6vw, 5.5rem);
}

.furra-section:not(.is-style-sand, .is-style-forest) + .furra-section:is(#faq, #haeufige-fragen) {
	border-top: var(--hairline);
}

/* The constrained layout centres a 720 px column; the FAQ starts at the wide left edge instead. */
html body .furra-section:is(#faq, #haeufige-fragen) > * {
	max-width: 46rem;
	margin-left: max(0px, calc((100% - var(--wide)) / 2)) !important;
	margin-right: auto !important;
}

/* ── Impressum / Datenschutz: calm reading column on the wide left edge ── */

.furra-legal.furra-section {
	padding-top: clamp(1rem, 3vw, 2rem);
}

html body .furra-legal > * {
	max-width: 44rem;
	margin-left: max(0px, calc((100% - var(--wide)) / 2)) !important;
	margin-right: auto !important;
}

.furra-legal h2 {
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
	margin-bottom: 0.6em;
	font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem);
}

.furra-legal h3 {
	margin-top: 1.75rem;
	margin-bottom: 0.4em;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
}

.furra-legal p:not([class*="is-style-"], [class*="furra-"]),
.furra-legal li {
	color: var(--wp--preset--color--ink);
}

.furra-legal .wp-block-list {
	padding-left: 1.25rem;
}

.furra-legal .wp-block-list li + li {
	margin-top: 0.35rem;
}

.furra-legal .furra-row {
	max-width: 30rem;
}

.furra-legal .furra-address__name {
	margin-bottom: 0.25rem;
	font-size: 1.4rem;
}

.furra-legal .furra-address__name + p,
.furra-legal .furra-address__name + p + p {
	margin-block: 0;
}

.furra-legal__date {
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
}

/* Draft markers for the approval: impossible to overlook, removed before going live. */
.furra-placeholder {
	padding: 0.05em 0.3em;
	background: #fbe7a1;
	color: var(--wp--preset--color--ink);
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

.furra-draft-note {
	margin-bottom: 2rem;
	padding: 1rem 1.25rem;
	border-left: 3px solid var(--wp--preset--color--wood);
	background: var(--wp--preset--color--sand);
	font-size: var(--wp--preset--font-size--small);
}

.furra-draft-note p {
	margin: 0;
}
