/**
 * Ofenbau Lutter 2026 – ergänzende Stile.
 * Farben, Schriften und Abstände stehen in theme.json; hier nur, was sich dort nicht ausdrücken lässt.
 */

/* ---------------------------------------------------------------
 * Vollbild-Sektionen (Stil „Vollbild-Sektion“) und Scroll-Snap
 * ------------------------------------------------------------- */

html.has-fullpage {
	scroll-snap-type: y mandatory;
}

/* Kopf, Inhalt und Fuß stoßen ohne Abstand aneinander. */
.wp-site-blocks > * {
	margin-block: 0;
}

@media (prefers-reduced-motion: no-preference) {
	html,
	.is-style-fp-slides {
		scroll-behavior: smooth;
	}
}

.is-style-fp-section {
	position: relative;
	box-sizing: border-box;
	min-height: 100vh;
	min-height: 100svh;
	scroll-snap-align: start;
	margin-block: 0 !important;
	padding: clamp(5rem, 12vh, 8rem) 6vw clamp(3rem, 8vh, 5rem);
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* Sektionen mit Slides: die Slides selbst füllen die Fläche. */
.is-style-fp-section:has(> .is-style-fp-slides) {
	padding: 0;
}

.wp-block-post-content > .is-style-fp-section + .is-style-fp-section {
	margin-block-start: 0;
}

.site-footer {
	scroll-snap-align: end;
}

/* Startbild (Klasse „lutter-start“): Text links vertikal mittig, Keyvisual als Hintergrund rechts – wie das Original */
.is-style-fp-section.lutter-start {
	padding: 0 8vw;
}

.lutter-start .wp-block-group > h1 {
	font-size: clamp(3rem, 5.6vw, 5rem);
	line-height: 1.05;
	margin: 0.67em 0 0.5em;
}

.lutter-start .wp-block-group > p {
	font-size: 1.225rem;
	line-height: 1.5;
	margin: 0 0 0.5em;
}

.lutter-start .wp-block-group > .wp-block-buttons {
	margin: 0.5rem 0 0;
}

.lutter-start .wp-block-button__link {
	font-size: 1.225rem;
	border: 1px solid #ff7d3d;
}

/* ---------------------------------------------------------------
 * Horizontale Slides (Stil „Horizontale Slides“)
 * ------------------------------------------------------------- */

.is-style-fp-slides {
	position: relative;
	display: flex;
	flex: 1;
	margin-block: 0 !important; /* kein Blockabstand hinter der (per JS eingefügten) Subnav */
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.is-style-fp-slides::-webkit-scrollbar {
	display: none;
}

.is-style-fp-slides > * {
	flex: 0 0 100%;
	box-sizing: border-box;
	min-height: 100vh;
	min-height: 100svh;
	margin: 0 !important;
	scroll-snap-align: start;
	scroll-snap-stop: always;
}

.is-style-fp-slides > .wp-block-cover,
.is-style-fp-slides > .wp-block-group {
	padding: clamp(5rem, 14vh, 9rem) 6vw 4rem;
}

/* Slide-Navigation oben mittig */
.fp-subnav {
	position: absolute;
	z-index: 10;
	top: 1.6rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 10px;
	padding: 0;
	border-radius: 4px;
	background-color: rgb(188 21 34 / 0.41);
	text-shadow: 0 3px 5px rgb(0 0 0 / 0.33);
}

.fp-subnav__link {
	padding: 5px 10px;
	font-family: var(--wp--preset--font-family--francois);
	font-size: 1.2rem;
	color: #fff !important;
	text-decoration: none;
	white-space: nowrap;
}

.fp-subnav__link.is-active {
	background: var(--wp--preset--color--rot);
	border-radius: 1px;
	box-shadow: 0 0 0 3px var(--wp--preset--color--rot), 0 3px 5px 4px rgb(0 0 0 / 0.33);
}

/* Punkte-Navigation rechts */
.fp-nav {
	position: fixed;
	z-index: 100;
	top: 50%;
	right: 17px;
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
}

.fp-nav__link {
	position: relative;
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	margin: 6px 0;
	text-decoration: none;
}

.fp-nav__link::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--wp--preset--color--rot);
	transition: all 0.2s ease;
}

.fp-nav__link.is-active::before {
	width: 14px;
	height: 14px;
	background: #fff;
	border: 2px solid var(--wp--preset--color--rot);
}

/* Sektionsname als Tooltip links neben dem Punkt */
.fp-nav__link-text {
	position: absolute;
	right: 30px;
	top: 50%;
	transform: translateY(-50%);
	white-space: nowrap;
	font-family: var(--wp--preset--font-family--francois);
	font-size: 0.95rem;
	color: var(--wp--preset--color--rot);
	text-shadow: 0 2px 2px rgb(0 0 0 / 0.54);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.fp-nav__link:hover .fp-nav__link-text,
.fp-nav__link:focus-visible .fp-nav__link-text {
	opacity: 1;
}

/* ---------------------------------------------------------------
 * Kopf- und Fußbereich
 * ------------------------------------------------------------- */

.site-header {
	position: absolute;
	z-index: 50;
	top: 0;
	left: 0;
	right: 0;
}

.site-header .wp-block-navigation a {
	text-decoration: none;
	padding-block: 4px;
	border-bottom: 2px solid transparent;
}

.site-header .wp-block-navigation a:hover,
.site-header .wp-block-navigation a:focus-visible {
	border-bottom-color: var(--wp--preset--color--rot);
}

.site-footer a {
	color: #fff;
}

.site-footer a:hover {
	color: var(--wp--preset--color--rot);
}

.site-footer .wp-block-navigation a {
	text-decoration: none;
	border-bottom: 2px solid transparent;
}

.site-footer .wp-block-navigation a:hover {
	color: #fff;
	border-bottom-color: var(--wp--preset--color--rot);
}

.site-footer .wp-block-details > summary {
	color: var(--wp--preset--color--rot);
	cursor: pointer;
	text-align: center;
}

.site-footer .wp-block-details[open] > summary {
	margin-bottom: 1.5rem;
}

.site-footer .wp-block-details[open] {
	padding-bottom: 2rem;
}

.site-footer .wp-block-details > :not(summary) {
	max-width: 900px;
	margin-inline: auto;
}

/* ---------------------------------------------------------------
 * Block-Stile
 * ------------------------------------------------------------- */

/* Roter Balken links neben Überschrift und Text */
.is-style-balken {
	border-left: 8px solid var(--wp--preset--color--rot);
	padding-left: 36px;
}

/* Links auf farbigen Flächen (rot, braun, Fotos) weiß statt rot */
:is(.has-feuer-gradient-background, .has-braun-background-color, .wp-block-cover:not(.is-slide-hell), .has-russ-background-color) a:where(:not(.wp-element-button)) {
	color: #fff;
	text-decoration-color: var(--wp--preset--color--rot);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

/* Helle Hintergrundbilder (Klasse „is-slide-hell“ am Cover): dunkler Text mit hellem Schein */
.is-slide-hell :is(h1, h2, h3) {
	color: #fff;
	text-shadow: 0 3px 5px rgb(0 0 0 / 0.3);
}

.is-slide-hell p {
	color: var(--wp--preset--color--russ);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.3;
	text-shadow: 0 2px 25px rgb(255 255 255 / 0.8);
}

/* Weiße Plakette (z. B. „Handwerk PUR“) */
.is-style-badge {
	background: #fff;
	color: #000;
	border-radius: 7px;
	padding: 15px 20px;
	max-width: 280px;
	margin-inline-start: auto;
}

.is-style-badge > * {
	margin-block: 0;
}

.is-style-badge img {
	max-width: 100%;
	height: auto;
}

/* Galerie im Mauerwerk-Stil */
.wp-block-gallery.is-style-masonry {
	display: block !important;
	columns: 3 220px;
	column-gap: var(--wp--style--gallery-gap-default, 16px);
}

.wp-block-gallery.is-style-masonry > .wp-block-image {
	width: 100% !important;
	margin: 0 0 var(--wp--style--gallery-gap-default, 16px) !important;
	break-inside: avoid;
}

.wp-block-gallery.is-style-masonry > .wp-block-image img {
	height: auto !important;
	object-fit: initial !important;
}

/* Partnerlogos: grau, beim Überfahren farbig */
.wp-block-gallery.is-style-logos {
	align-items: center;
}

.wp-block-gallery.is-style-logos .wp-block-image {
	padding: 0 15px;
	box-sizing: border-box;
}

.wp-block-gallery.is-style-logos img {
	width: auto !important;
	max-height: 90px;
	margin-inline: auto;
	filter: grayscale(1);
	opacity: 0.7;
	transition: all 0.2s ease-in-out;
}

.wp-block-gallery.is-style-logos a:hover img,
.wp-block-gallery.is-style-logos a:focus-visible img {
	filter: none;
	opacity: 1;
}

/* Tabellen ohne Rahmen, erste Spalte als Beschriftung */
.wp-block-table td {
	border: 0;
	padding: 0.15em 1.25em 0.15em 0;
	vertical-align: top;
}

.wp-block-table td:first-child {
	white-space: nowrap;
}

.wp-block-table ul {
	margin: 0;
	padding-left: 1em;
}

/* Media & Text als Vollbild-Slide: Bild füllt die ganze Höhe */
.is-style-fp-slides > .wp-block-media-text {
	grid-template-rows: 1fr;
}

.is-style-fp-slides > .wp-block-media-text > .wp-block-media-text__media {
	align-self: stretch;
	height: 100%;
}

.is-style-fp-slides > .wp-block-media-text > .wp-block-media-text__content {
	padding: clamp(5rem, 14vh, 9rem) 6vw 4rem;
	align-self: center;
}

/* Karte mit 2-Klick-Lösung */
.lutter-karte {
	display: grid;
	place-items: center;
	gap: 0.75rem;
	aspect-ratio: 4 / 3;
	max-height: 320px;
	width: 100%;
	padding: 1.5rem;
	box-sizing: border-box;
	text-align: center;
	background: rgb(0 0 0 / 0.25);
	border: 1px solid rgb(255 255 255 / 0.4);
}

.lutter-karte.is-geladen {
	padding: 0;
	border: 0;
}

.lutter-karte iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.lutter-karte p {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
}

/* ---------------------------------------------------------------
 * Kontaktformular (Block „Kontaktformular“)
 * ------------------------------------------------------------- */

.lutter-kontakt__form {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0.9rem 1rem;
}

.lutter-kontakt__form p {
	margin: 0;
}

.lutter-kontakt__voll {
	grid-column: 1 / -1;
}

.lutter-kontakt__form label {
	display: grid;
	gap: 0.25rem;
	font-size: var(--wp--preset--font-size--small);
}

.lutter-kontakt__form :is(input, select, textarea) {
	width: 100%;
	box-sizing: border-box;
	padding: 0.6rem 0.75rem;
	font: inherit;
	font-size: 1rem;
	color: var(--wp--preset--color--russ);
	background: #fff;
	border: 1px solid transparent;
	border-radius: 2px;
}

.lutter-kontakt__form :is(input, select, textarea):focus-visible {
	outline: 3px solid #fff;
	outline-offset: 1px;
}

.lutter-kontakt__form button {
	cursor: pointer;
	border: 1px solid #ff7d3d;
}

.lutter-kontakt__hinweis {
	font-size: var(--wp--preset--font-size--small);
	opacity: 0.85;
}

.lutter-kontakt__falle {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.lutter-kontakt__meldung {
	padding: 0.75rem 1rem;
	border-radius: 2px;
	background: #fff;
	color: var(--wp--preset--color--russ);
}

.lutter-kontakt__meldung.is-fehler {
	border-left: 6px solid var(--wp--preset--color--rot-dunkel);
}

.lutter-kontakt__meldung.is-ok {
	border-left: 6px solid #3c8d3c;
}

/* ---------------------------------------------------------------
 * Kleine Bildschirme: normales Scrollen, Slides untereinander
 * ------------------------------------------------------------- */

@media (max-width: 781px), (max-height: 500px) {
	html.has-fullpage {
		scroll-snap-type: none;
	}

	.is-style-fp-section,
	.is-style-fp-slides > * {
		min-height: 0;
	}

	.is-style-fp-slides {
		display: block;
		overflow: visible;
	}

	.is-style-fp-slides > .wp-block-cover {
		min-height: 80svh;
	}

	.fp-nav,
	.fp-subnav {
		display: none;
	}

	.is-style-fp-section.lutter-start {
		padding: 2rem 6vw 90vw;
		background-size: 100% auto !important;
		background-position: 50% 100% !important;
	}

	.lutter-start .wp-block-group > h1 {
		margin-top: 0;
	}

	.site-header {
		position: relative;
		background: var(--wp--preset--color--russ);
	}
}
