/**
 * cinean – Ergänzende Styles
 *
 * Farben, Schriften, Abstände und Block-Stile kommen aus theme.json und
 * styles/blocks/*.json. Diese Datei enthält nur, was Blöcke nicht selbst
 * können (Pseudo-Elemente, Hover-Effekte, Animationen). Sie wird im Frontend
 * und im Editor geladen. Alle Werte greifen auf die theme.json-Presets zurück.
 */

/* ---------------------------------------------------------------------------
 * 0. Kein automatischer Abstand zwischen Kopf, Inhalt, Kontakt-Band und Fuß.
 *    Die Bereiche bringen ihre Innenabstände selbst mit (Block-Einstellungen),
 *    sonst entstünden weiße Streifen zwischen farbigen Flächen.
 * ------------------------------------------------------------------------- */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* ---------------------------------------------------------------------------
 * 1. Dachzeile (Absatz-Stil „Dachzeile“): roter Rec-Pixel vor dem Text
 * ------------------------------------------------------------------------- */
.is-style-eyebrow::before {
	content: "";
	display: inline-block;
	width: 0.6em;
	height: 0.6em;
	margin-right: 0.6em;
	background: var(--wp--preset--color--accent);
	vertical-align: 0.02em;
}

/* ---------------------------------------------------------------------------
 * 2. Pixel-Aufzählung (Listen-Stil „Pixel-Liste“, Absatz-Stil „Mit Pixel“)
 * ------------------------------------------------------------------------- */
.wp-block-list.is-style-pixel {
	list-style: none;
	padding-left: 0;
}

.wp-block-list.is-style-pixel > li {
	position: relative;
	padding-left: 1.5em;
}

.wp-block-list.is-style-pixel > li + li {
	margin-top: var(--wp--preset--spacing--10);
}

.wp-block-list.is-style-pixel > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.6em;
	width: 0.5em;
	height: 0.5em;
	background: var(--wp--preset--color--accent);
}

/* Absatz-Stil „Mit Pixel“: kurze Kernaussage mit rotem Pixel davor */
p.is-style-pixel {
	position: relative;
	padding-left: 1.4em;
}

p.is-style-pixel::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.6em;
	width: 0.5em;
	height: 0.5em;
	background: var(--wp--preset--color--accent);
}

/* ---------------------------------------------------------------------------
 * 3. Logo-Wand (Galerie-Stil „Logo-Wand“)
 *    Kundenlogos einheitlich hoch, in Graustufen; Farbe beim Überfahren.
 *    Logos einfach in der Galerie hinzufügen, entfernen oder sortieren.
 * ------------------------------------------------------------------------- */
.wp-block-gallery.is-style-logo-wall.has-nested-images figure.wp-block-image {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 9;
}

.wp-block-gallery.is-style-logo-wall.has-nested-images figure.wp-block-image img {
	width: auto;
	height: auto;
	max-width: 88%;
	max-height: 72%;
	object-fit: contain;
	border-radius: 0;
	filter: grayscale(1);
	opacity: 0.65;
	transition: filter 0.3s ease, opacity 0.3s ease;
}

.wp-block-gallery.is-style-logo-wall.has-nested-images figure.wp-block-image:hover img {
	filter: none;
	opacity: 1;
}

/* ---------------------------------------------------------------------------
 * 4. Browserfenster (Stil für Beitragsbild und Bild)
 *    Zeigt einen Screenshot im Browser-Rahmen. Bei ganzseitigen Screenshots
 *    scrollt die Seite beim Überfahren langsam nach unten.
 *    Seitenverhältnis und „Zuschneiden“ stellt man im Block selbst ein.
 * ------------------------------------------------------------------------- */
.is-style-browser {
	position: relative;
	overflow: hidden;
	padding-top: 1.75rem;
	background: var(--wp--preset--color--line);
	border-radius: 10px;
}

.is-style-browser::before {
	content: "";
	position: absolute;
	top: 0.7rem;
	left: 0.8rem;
	width: 0.4rem;
	height: 0.4rem;
	border-radius: 50%;
	background: var(--wp--preset--color--muted);
	box-shadow: 0.7rem 0 0 var(--wp--preset--color--muted), 1.4rem 0 0 var(--wp--preset--color--muted);
	opacity: 0.5;
}

.is-style-browser img {
	display: block;
	border-radius: 0;
	object-position: top center;
	transition: object-position 6s ease-in-out;
}

.is-style-browser:hover img {
	object-position: bottom center;
}

/* ---------------------------------------------------------------------------
 * 5. Zoom bei Hover (Bild-Stil „Zoom bei Hover“), z. B. für Leistungskarten
 * ------------------------------------------------------------------------- */
.is-style-hover-zoom {
	overflow: hidden;
}

.is-style-hover-zoom img {
	transition: transform 0.6s ease;
}

.is-style-hover-zoom:hover img {
	transform: scale(1.04);
}

/* ---------------------------------------------------------------------------
 * 6. FAQ (Details-Block): Plus/Minus statt Pfeil
 * ------------------------------------------------------------------------- */
.wp-block-details summary {
	display: flex;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--30);
	list-style: none;
	cursor: pointer;
	font-weight: 600;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "+";
	flex: none;
	font-weight: 400;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1;
	color: var(--wp--preset--color--accent);
}

.wp-block-details[open] summary::after {
	content: "–";
}

.wp-block-details > :not(summary) {
	margin-top: var(--wp--preset--spacing--20);
}

/* ---------------------------------------------------------------------------
 * 7. Einblenden beim Scrollen
 *    Für jeden Block nutzbar: unter „Erweitert → Zusätzliche CSS-Klasse(n)“
 *    die Klasse „reveal“ eintragen (oder entfernen). Reine CSS-Lösung,
 *    respektiert „Bewegung reduzieren“ und hat keine Wirkung in Browsern
 *    ohne Unterstützung. Ersetzt das Animations-Plugin.
 * ------------------------------------------------------------------------- */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.reveal {
			animation: cinean-reveal linear both;
			animation-timeline: view();
			animation-range: entry 0% cover 22%;
		}
	}
}

@keyframes cinean-reveal {
	from {
		opacity: 0;
		transform: translateY(1.5rem);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* ---------------------------------------------------------------------------
 * 8. Hauptmenü: Hamburger-Menü bis 1024 px Breite (WordPress schaltet
 *    standardmäßig schon ab 600 px auf das ausgeklappte Menü, das passt auf
 *    Tablets nicht neben Logo und Button).
 * ------------------------------------------------------------------------- */
@media (min-width: 600px) and (max-width: 1023px) {
	.cinean-header .wp-block-navigation .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.cinean-header .wp-block-navigation .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	.cinean-header .wp-block-navigation .wp-block-navigation__responsive-container-close:not(.always-shown) {
		display: flex;
	}
}

/* ---------------------------------------------------------------------------
 * 9. Logo-Wand auf dem Handy: drei statt zwei Logos pro Zeile
 * ------------------------------------------------------------------------- */
@media (max-width: 599px) {
	.wp-block-gallery.is-style-logo-wall.has-nested-images figure.wp-block-image:not(#individual-image) {
		width: calc(33.333% - var(--wp--style--unstable-gallery-gap, 16px) * 2 / 3);
	}
}

/* ---------------------------------------------------------------------------
 * 10. Geöffnetes Handy-/Tablet-Menü: große, linksbündige Einträge
 * ------------------------------------------------------------------------- */
.cinean-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: flex-start;
	padding-top: var(--wp--preset--spacing--50);
}

.cinean-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: flex-start;
	gap: var(--wp--preset--spacing--30);
}

.cinean-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
	letter-spacing: -0.02em;
}
