/*
 * Schallert – zusätzliche Frontend-Styles.
 * Grundlegende Typografie/Farben kommen aus theme.json.
 */

/* ===== Basis ===== */
/* Full-bleed-Sektionen nutzen `width: 100vw` + Negativmargin. Bei klassischer
   (nicht-overlay) Vertikal-Scrollbar ist 100vw ≈ clientWidth + Scrollbarbredite,
   was sonst eine horizontale Scrollbar von wenigen Pixeln erzeugt. clip behebt
   das, ohne vertikales Scrollen oder Sticky-Kopf zu beeinflussen. */
html,
body {
	overflow-x: clip;
}

/* ===== Kopfbereich ===== */
.schallert-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #ffffff;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
.schallert-header__inner {
	max-width: 1600px;
	margin-inline: auto;
	min-height: 50px;
	padding: 0 50px;
}
@media (max-width: 781px) {
	.schallert-header__inner {
		padding: 0 20px;
	}
}
.schallert-logo {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
}
.schallert-logo img {
	width: 23px;
	height: auto;
	display: block;
}

/* ===== Navigation ===== */
.schallert-menu {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
}
.schallert-menu__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
}
.schallert-menu__list > li {
	margin: 0;
	padding: 0;
}
.schallert-menu__list a {
	display: inline-block;
	padding: 12px 30px;
	font-family: Roboto, sans-serif;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.7px;
	color: #000000;
	text-decoration: none;
}
.schallert-menu__list a:hover,
.schallert-menu__list a:focus,
.schallert-menu__list .current-menu-item > a,
.schallert-menu__list .current_page_item > a {
	color: #da0813;
}

/* ===== Hamburger-Toggle (nur Mobil) ===== */
.schallert-menu__toggle {
	display: none;
	appearance: none;
	border: 0;
	background: none;
	padding: 8px;
	cursor: pointer;
	align-items: center;
	justify-content: center;
}
.schallert-menu__icon {
	position: relative;
	display: inline-block;
	width: 24px;
	height: 17px;
}
.schallert-menu__icon span {
	position: absolute;
	left: 0;
	right: 0;
	height: 3px;
	background: #000000;
	transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}
.schallert-menu__icon span:nth-child(1) { top: 0; }
.schallert-menu__icon span:nth-child(2) { top: 7px; }
.schallert-menu__icon span:nth-child(3) { top: 14px; }
.schallert-menu.is-open .schallert-menu__icon span:nth-child(1) {
	top: 7px;
	transform: rotate(45deg);
}
.schallert-menu.is-open .schallert-menu__icon span:nth-child(2) {
	opacity: 0;
}
.schallert-menu.is-open .schallert-menu__icon span:nth-child(3) {
	top: 7px;
	transform: rotate(-45deg);
}
@media (max-width: 900px) {
	.schallert-header__inner {
		flex-wrap: nowrap;
		gap: 8px;
	}
	.schallert-logo {
		order: 1;
	}
	.schallert-menu {
		order: 2;
		justify-content: flex-end;
	}
	.schallert-lang {
		order: 3;
		padding-top: 0;
	}
	.schallert-menu__toggle {
		display: none;
	}
	html.js .schallert-menu__toggle {
		display: inline-flex;
	}
	html.js .schallert-menu__list {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		background: #ffffff;
		border-top: 1px solid #eeeeee;
		box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
	}
	html.js .schallert-menu.is-open .schallert-menu__list {
		display: flex;
	}
	.schallert-menu__list a {
		display: block;
		padding: 14px 20px;
		font-size: 14px;
	}
}

/* ===== Sprachumschalter ===== */
.schallert-lang {
	flex: 0 0 auto;
	text-align: right;
	font-size: 16px;
	padding-top: 10px;
}
.schallert-lang a {
	color: #000000;
	text-decoration: none;
}
.schallert-lang a:hover,
.schallert-lang a:focus {
	color: #da0813;
}
.schallert-lang__sep {
	color: #000000;
	padding: 0 2px;
}
@media (max-width: 781px) {
	.schallert-header__inner {
		flex-wrap: wrap;
		row-gap: 4px;
	}
}

/* ===== Hauptbereich ===== */
.wp-site-main.schallert-main > * + * {
	margin-block-start: 0;
}
/* Auf Kontakt/Impressum/Datenschutz steht im Seiteninhalt ein hartes
   `padding-left/right: 0` auf den .alignfull-Gruppen – dadurch klebt der
   Inhalt auf schmalen Schirmen am linken Rand. Der Root-Gutter (theme.json)
   gilt hier nicht, also erzwingen wir ihn mobil. (alignfull-abdeckende Cover
   wie Hero tragen die Klasse nicht und bleiben randlos.) */
@media (max-width: 781px) {
	.wp-block-post-content .alignfull.has-global-padding {
		padding-right: var(--wp--style--root--padding-right) !important;
		padding-left: var(--wp--style--root--padding-left) !important;
	}
}

/* ===== Fußbereich ===== */
.schallert-footer {
	border-top: 1px dotted #9b9b9b;
}
.schallert-footer .schallert-copyright {
	margin: 0;
	padding: 14px 0;
	font-family: Roboto, sans-serif;
	font-size: 12px;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: #ffffff;
}
.schallert-footer .schallert-footer__legal {
	margin: 0;
	padding: 14px 0;
	font-family: Roboto, sans-serif;
	font-size: 14px;
}
.schallert-footer .schallert-footer__legal a {
	color: #ffffff;
	text-decoration: none;
}
.schallert-footer .schallert-footer__legal a:hover,
.schallert-footer .schallert-footer__legal a:focus {
	color: #d50712;
}

/* ===== Cover-Hero (Startseiten) ===== */
/* Dim-Opazitäten der Cover-Overlays explizit definieren (WP liefert
   nicht alle Werte aus; ohne diese Regeln fällt alles auf 0.5 zurück). */
.wp-block-cover .has-background-dim-30 { opacity: 0.3; }
.wp-block-cover .has-background-dim-80 { opacity: 0.8; }
.wp-block-cover .has-background-dim-90 { opacity: 0.9; }

.wp-block-post-content > .alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}
.schallert-hero .wp-block-cover__inner-container > * {
	width: 100%;
}
.schallert-hero .schallert-hero-logo img {
	width: 50%;
	max-width: 600px;
	height: auto;
	margin-inline: auto;
}
@media (max-width: 781px) {
	.schallert-hero .schallert-hero-logo img {
		width: 100%;
	}
}
/* Text im weißen Kasten der Startseite (Cover erbt sonst weiße Schrift) */
.schallert-prose,
.schallert-prose p {
	color: #333333 !important;
}
.schallert-prose p {
	font-family: "Proza Libre", sans-serif;
	font-size: 1rem;
	line-height: 1.8em;
	letter-spacing: 0.5px;
}
/* §-Marke im zweiten Abschnitt der Startseite (10 % des 700-px-Containers wie bisher) */
.schallert-portrait {
	text-align: center;
}
.schallert-portrait img {
	width: 70px;
	height: auto;
}
@media (max-width: 781px) {
	.schallert-portrait img {
		width: 44px;
	}
}

/* ===== Über uns: Icon-Zeilen ===== */
.schallert-icon-list {
	display: grid;
	gap: 2.5rem 3rem;
}
@media (min-width: 782px) {
	.schallert-icon-list.columns-3 {
		grid-template-columns: repeat(3, 1fr);
	}
}
.schallert-icon-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.75rem;
	margin: 0;
	color: #868686 !important;
}
.schallert-icon-item span {
	color: #868686;
	font-size: 1rem;
	line-height: 1.8em;
}
.schallert-icon-item svg {
	width: 50px;
	height: 50px;
	color: #000000;
	fill: #000000;
}

/* ===== Erwartungen: Bild-Kacheln (Boxen) ===== */
.schallert-expectation-grid {
	display: grid;
	gap: 2.25rem 1.5rem;
}
/* WP setzt Default-"flow"-Margins (Block-Gap) auf Geschwister – in den
   CSS-Grids/Flex-Karten sind die unerwünscht: Boxen exakt auf einer Linie. */
.schallert-expectation-grid > * + *,
.schallert-icon-list > * + *,
.schallert-expectation > * + * {
	margin-top: 0 !important;
}
@media (min-width: 782px) {
	.schallert-expectation-grid.columns-4 {
		grid-template-columns: repeat(4, 1fr);
	}
	.schallert-expectation-grid.columns-3 {
		grid-template-columns: repeat(3, 1fr);
	}
}
.schallert-expectation {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.75rem;
	min-height: 100%;
	background: #ffffff;
	border-radius: 3px;
	box-shadow: 0 2px 8px rgba(61, 65, 84, 0.1);
	padding: 30px 26px;
}
.schallert-expectation img {
	width: 15%;
	height: auto;
	border-radius: 0;
	margin-bottom: 15px;
}
.schallert-expectation .schallert-expectation__title {
	margin: 0 0 12px;
	font-family: "Work Sans", sans-serif;
	font-weight: 700;
	text-transform: capitalize;
	color: #080e1b;
	font-size: 1rem;
}
.schallert-expectation .schallert-expectation__text {
	margin: 0;
	font-family: Lato, sans-serif;
	font-size: 0.8125rem;
	line-height: 1.5em;
	color: #080e1b;
}

/* ===== Einblend-Animationen (wie bisher: fadeInUp / fadeIn, langsam) =====
   Rein CSS, Inhalte bleiben ohne Animation sichtbar → SEO-neutral. */
@keyframes schallertFadeUp {
	from { opacity: 0; transform: translate3d(0, 30px, 0); }
	to   { opacity: 1; transform: none; }
}
@keyframes schallertFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}
.schallert-hero .schallert-hero-logo {
	animation: schallertFadeUp 1.8s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.schallert-icon-list .schallert-icon-item {
	animation: schallertFadeUp 1s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.schallert-icon-list .schallert-icon-item:nth-child(3n+2) {
	animation-delay: 0.15s;
}
.schallert-icon-list .schallert-icon-item:nth-child(3n+3) {
	animation-delay: 0.3s;
}
.schallert-expectation-grid {
	animation: schallertFadeIn 2s ease both;
}
.schallert-expectation-grid.columns-3 {
	animation-delay: 0.4s;
}
@media (prefers-reduced-motion: reduce) {
	.schallert-hero .schallert-hero-logo,
	.schallert-icon-list .schallert-icon-item,
	.schallert-expectation-grid {
		animation: none !important;
	}
}

/* ===== Kontakt ===== */
.schallert-contact {
	font-size: 20px;
	line-height: 1.8em;
	color: #000000;
}
/* Mobil: zuerst der Adressblock, darunter die Karte (im Markup steht die
   Karte in der ersten Spalte). Nur die Kontakt-Spalten betreffen. */
@media (max-width: 781px) {
	.wp-block-columns:has(.schallert-contact) {
		flex-direction: column-reverse;
	}
}
.schallert-contact p {
	margin: 0 0 0.6em;
}
.schallert-contact a {
	color: #000000;
}

/* ===== Karte (Kontaktseiten) ===== */
.schallert-map iframe,
.wp-block-column iframe {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	max-width: 100%;
	border: 0;
	display: block;
}

/* ===== Screen-Reader-Titel (SEO-H1) ===== */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
