/*
Theme Name: Anna Momber
Theme URI: https://anna-momber.com/
Author: Anna Momber
Description: Schlankes Block-Theme für anna-momber.com. Farben, Schriften und Abstände stehen zentral in theme.json, Abschnitte liegen als Muster unter „Anna Momber: Abschnitte“.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
Version: 0.2.20
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: anna-momber
*/

/* ---------- Grundlagen ---------- */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/*
   Verlässlicher Seitenrand: WordPress soll diesen Rand bei "wide"-Blöcken
   automatisch über theme.json (useRootPaddingAwareAlignments) setzen, tut
   es aber nicht zuverlässig. Deshalb hier zusätzlich fest vergeben.
   !important, weil WordPress selbst manchmal eine eigene, stärkere
   Padding-Regel für dieselben Elemente einfügt, die sonst gewinnen würde.
*/
.alignfull .alignwide,
.wp-block-group.alignwide,
.wp-block-columns.alignwide {
	box-sizing: border-box !important;
	padding-left: clamp(16px, 4vw, 40px) !important;
	padding-right: clamp(16px, 4vw, 40px) !important;
}

/*
   Innenabstand für die farbigen Karten (z. B. "Drei Wege": Bühne/Kamera/
   Kostenlos starten, und die zwei hellblauen Karten "Kostenlos starten").
   Diese Boxen haben eine eigene Themenfarbe als Hintergrund und liegen in
   normalem (nicht "constrained") Layout, bekommen also keinen Innenabstand
   automatisch von WordPress – hier fest vergeben.
*/
.wp-block-column > .is-style-section-petrol,
.wp-block-column > .is-style-section-seegruen,
.wp-block-column > .is-style-section-himmelblau,
.wp-block-column > .is-style-section-hellblau {
	border-radius: 14px;
}
.am-karte-kopf,
.am-karte > .wp-block-group:not(.am-karte-kopf),
.wp-block-column > .is-style-section-petrol,
.wp-block-column > .is-style-section-seegruen,
.wp-block-column > .is-style-section-himmelblau,
.wp-block-column > .is-style-section-hellblau {
	box-sizing: border-box;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--petrol);
	outline-offset: 3px;
}

/*
   Überschriften, Absätze, FAQ und Listen in vollbreiten Abschnitten stehen linksbündig
   auf derselben Kante wie die breiten Blöcke (Karten, Bilder), behalten aber die
   schmale Lesebreite. Zentrierte Elemente bleiben mittig. !important, weil WordPress
   die Ränder der schmalen Spalte selbst mit !important setzt.
*/
.wp-block-group.alignfull.is-layout-constrained > :where(.wp-block-heading, p, .wp-block-details, .wp-block-list, .wp-block-buttons):not(.has-text-align-center):not(.is-content-justification-center) {
	box-sizing: border-box;
	max-width: 720px;
	margin-left: max(clamp(16px, 4vw, 40px), calc((100% - var(--wp--style--global--wide-size)) / 2 + clamp(16px, 4vw, 40px))) !important;
	margin-right: auto !important;
}

/* ---------- Kopfzeile ---------- */

.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	background: rgba(244, 243, 239, 0.94);
	border-bottom: 1px solid var(--wp--preset--color--sand);
}
/* Admin-Leiste (nur für angemeldete Nutzer): Kopfzeile darunter einrasten lassen */
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; }
}
@media (max-width: 600px) {
	.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; }
	.wp-site-blocks > header.wp-block-template-part { top: 0; }
}
.am-kopf .wp-block-image img { display: block; }
.am-kopf .wp-block-button__link { padding: 0.7rem 1.2rem; font-size: var(--wp--preset--font-size--small); white-space: nowrap; }
.am-kopf .wp-block-buttons { flex-shrink: 0; }
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--oatmilk);
	padding: var(--wp--preset--spacing--50) var(--wp--style--root--padding-right);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-size: var(--wp--preset--font-size--large); }

/* ---------- Einstieg (Foto auf Bühne / Foto auf Blase) ---------- */

.am-buehne,
.am-buehne-oatmilk {
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}
.am-buehne { background: url("assets/images/buehne-petrol.svg") center bottom / contain no-repeat; }
.am-buehne-oatmilk { background: url("assets/images/bubble-oatmilk.svg") center bottom / contain no-repeat; }
.am-buehne .wp-block-image,
.am-buehne-oatmilk .wp-block-image { margin: 0; width: 92%; }
.am-buehne .wp-block-image img,
.am-buehne-oatmilk .wp-block-image img { width: 100%; height: auto; display: block; }

/* ---------- Karten und Deko-Formen ---------- */

.am-karte { overflow: hidden; }
.am-karte-kopf { position: relative; }
.am-deko {
	position: absolute;
	right: 14px;
	top: 14px;
	width: 96px;
	margin: 0 !important;
	pointer-events: none;
}
.am-deko img { width: 100%; height: auto; }
.am-deko-unten {
	position: absolute;
	right: -30px;
	bottom: -40px;
	width: 200px;
	margin: 0 !important;
	pointer-events: none;
}
.am-relativ { position: relative; overflow: hidden; }
.am-relativ > *:not(.am-deko-unten) { position: relative; }

/* Zeilen in Angebotslisten */
.am-liste { list-style: none; padding-left: 0; }
.am-liste li {
	border-bottom: 1px solid var(--wp--preset--color--sand);
	padding: 0.5rem 0;
	font-weight: 500;
}

/* Zahlen bei „Über Anna“ */
.am-fakt { border-top: 2px solid currentColor; padding-top: 0.6rem; }

/* ---------- Stimmen ---------- */

.wp-block-quote.am-stimme {
	border: 0;
	border-top: 3px solid var(--wp--preset--color--petrol);
	background: var(--wp--preset--color--weiss);
	border-radius: 0 0 14px 14px;
	padding: var(--wp--preset--spacing--40);
	margin: 0;
	height: 100%;
}
.wp-block-quote.am-stimme cite {
	font-family: var(--wp--preset--font-family--montserrat);
	font-style: normal;
	font-size: var(--wp--preset--font-size--small);
	margin-top: 1rem;
	display: block;
}
.wp-block-quote.am-stimme cite strong {
	font-family: var(--wp--preset--font-family--monotalic);
	font-weight: 400;
	font-size: var(--wp--preset--font-size--large);
}

/* ---------- Formulare (Fluent Forms) ---------- */

.fluentform .ff-el-form-control {
	background: var(--wp--preset--color--weiss);
	border: 1px solid var(--wp--preset--color--schwarz);
	border-radius: 10px;
	padding: 0.8rem 1rem;
	font-family: inherit;
	font-size: 1rem;
	color: var(--wp--preset--color--schwarz);
}
.fluentform .ff-el-input--label label { font-weight: 600; }
.fluentform .ff-btn-submit,
.fluentform .ff-btn-submit:hover {
	background: var(--wp--preset--color--orangerot) !important;
	color: var(--wp--preset--color--schwarz) !important;
	border: 0 !important;
	border-radius: 999px !important;
	padding: 0.85rem 1.6rem !important;
	font-family: inherit;
	font-weight: 600;
	font-size: 1rem;
}

/* ---------- FAQ ---------- */

.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--sand);
	padding: 1rem 0;
}
.wp-block-details summary { font-weight: 600; cursor: pointer; }

/* ---------- Beiträge ---------- */

.am-beitrag-karte .wp-block-post-featured-image img { border-radius: 14px; }

/* ---------- Abstände zwischen vollbreiten Abschnitten ---------- */

.wp-site-blocks > main,
.wp-site-blocks > footer { margin-block-start: 0; }
.am-seite > .wp-block-post-content > .alignfull { margin-block-start: 0; margin-block-end: 0; }

/* ---------- Ergänzungen für die Muster ---------- */

/* Kundenleiste (Variante A): ruhig, zentriert, eine Textzeile zwischen zwei Linien */
.am-kunden { text-align: center; }
.am-kunden > .wp-block-group {
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
}
.am-kunden .is-style-label {
	margin: 0;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: none;
	color: var(--wp--preset--color--petrol);
}
.am-kunden p:not(.is-style-label) {
	width: 100%;
	margin: 0;
	padding: 0.9rem 0;
	border-top: 1px solid #d9d6cc;
	border-bottom: 1px solid #d9d6cc;
	font-size: var(--wp--preset--font-size--medium) !important;
	font-weight: 500;
	line-height: 1.8;
	color: var(--wp--preset--color--schwarz);
}
.am-karte {
	background: var(--wp--preset--color--weiss);
	border-radius: 14px;
	height: 100%;
}
.am-karte-kopf { min-height: 170px; }
.am-karte-kopf h3 { max-width: 13ch; }
.am-rahmen {
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 14px;
	padding: 1.1rem 1.25rem;
}
.am-sprachen { font-size: var(--wp--preset--font-size--small); }
.am-sprachen-liste { margin: 0; white-space: nowrap; }
.am-sprachen-liste a { text-decoration: none; }
.am-sprachen-liste a.ist-aktiv { font-weight: 700; }
.am-sprachen:empty { display: none; }
.wp-block-column > .is-style-karte { height: 100%; }
/*
   Weiße Karten (is-style-karte) sollen immer schwarze Überschriften haben,
   auch wenn sie auf einem farbigen Abschnitt liegen (z. B. Petrol), der
   Überschriften sonst global weiß einfärbt – sonst verschwindet die
   Überschrift auf dem weißen Kartenhintergrund. !important, weil WordPress
   die Abschnittsfarbe über ein eigenes, später geladenes Style-Tag mit
   gleicher Regel-Stärke setzt, das sonst gewinnen würde.
*/
.is-style-karte h1,
.is-style-karte h2,
.is-style-karte h3,
.is-style-karte h4,
.is-style-karte h5,
.is-style-karte h6 {
	color: var(--wp--preset--color--schwarz) !important;
}
.is-style-label { margin-bottom: 0; }
.is-style-label + .wp-block-heading { margin-top: 0.5rem; }

@media (max-width: 781px) {
	.am-kopf .wp-block-image img { width: 160px !important; }
	.am-kopf .am-sprachen { display: none; }
	.am-buehne { max-width: 440px; margin-inline: auto; }
}

/* Handy-Menü: Klappmenü direkt unter der Kopfzeile statt Vollbild; Seite bleibt scrollbar */
@media (max-width: 599px) {
	html.has-modal-open { overflow: auto !important; }
	.am-kopf .wp-block-navigation { position: static; }
	.am-kopf .wp-block-navigation__responsive-container.is-menu-open {
		position: absolute !important;
		top: 100% !important;
		bottom: auto !important;
		left: 0 !important;
		right: 0 !important;
		height: auto !important;
		background: var(--wp--preset--color--oatmilk) !important;
		border-bottom: 1px solid var(--wp--preset--color--sand);
		box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
		padding: 0.25rem clamp(16px, 4vw, 40px) 1rem !important;
	}
	.am-kopf .is-menu-open .wp-block-navigation__responsive-container-close {
		position: absolute !important;
		top: 0.35rem;
		right: clamp(10px, 3vw, 30px);
		padding: 0.4rem;
	}
	.am-kopf .is-menu-open .wp-block-navigation__responsive-container-content {
		--navigation-layout-justification-setting: flex-start;
		--navigation-layout-align: flex-start;
		align-items: flex-start !important;
		padding-top: 2.4rem !important;
		width: 100%;
	}
	.am-kopf .is-menu-open .wp-block-navigation__container,
	.am-kopf .is-menu-open .wp-block-navigation-item,
	.am-kopf .is-menu-open .wp-block-navigation__submenu-container {
		align-items: flex-start !important;
		justify-content: flex-start !important;
		text-align: left !important;
		width: 100%;
		gap: 0;
	}
	.am-kopf .is-menu-open :is(.wp-block-navigation__container, .wp-block-navigation__submenu-container, .wp-block-navigation__responsive-container-content, .wp-block-navigation-item) {
		gap: 0 !important;
		row-gap: 0 !important;
		margin-top: 0 !important;
		margin-bottom: 0 !important;
	}
	.am-kopf .is-menu-open .wp-block-navigation-item { font-size: var(--wp--preset--font-size--medium); padding: 0 !important; }
	.am-kopf .is-menu-open .wp-block-navigation-item__content { padding: 0.65rem 0 !important; line-height: 1.3; }
	.am-kopf .is-menu-open .wp-block-navigation__submenu-container { padding: 0 0 0 1rem !important; position: static !important; }
	/* Untermenü ("Loslegen") startet eingeklappt und öffnet per Tipp */
	.am-kopf .is-menu-open .wp-block-navigation-submenu__toggle[aria-expanded="false"] ~ .wp-block-navigation__submenu-container { display: none !important; }
}

/* Alte Divi-Seiten (Divi-Builder-Plugin): Inhalt über die volle Seitenbreite statt in der schmalen Textspalte */
.wp-block-post-content > #et-boc {
	max-width: none !important;
	margin-left: calc(-1 * var(--wp--style--root--padding-left, 0px)) !important;
	margin-right: calc(-1 * var(--wp--style--root--padding-right, 0px)) !important;
}

/* ---------- Angebotsseiten (Masterclass, Kamerareife) ---------- */

.am-buehne-seegruen {
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: url("assets/images/bubble-seegruen.svg") center bottom / contain no-repeat;
}
.am-buehne-seegruen .wp-block-image { margin: 0; width: 88%; }
.am-buehne-seegruen .wp-block-image img { width: 100%; height: auto; display: block; }
.am-buehne.am-buehne-hoch .wp-block-image { width: 64%; }
@media (max-width: 781px) { .am-buehne-seegruen { max-width: 440px; margin-inline: auto; } }

.am-hero-meta { margin-top: 1.5rem; font-size: var(--wp--preset--font-size--small); color: #3d3d3a; }

/* „Das nimmst du mit": nummerierte Zeilen im farbigen Band */
.am-ergebnis { counter-reset: erg; }
.am-ergebnis-zeile {
	counter-increment: erg;
	position: relative;
	padding: 1.9rem 0 1.9rem 3.4rem;
	border-top: 1px solid rgba(255, 255, 255, 0.4);
}
.am-ergebnis-zeile:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.am-ergebnis-zeile::before {
	content: counter(erg);
	position: absolute;
	left: 0;
	top: 1.9rem;
	font-family: var(--wp--preset--font-family--monotalic);
	font-size: 1.6rem;
	line-height: 1.2;
}
.am-ergebnis-zeile h3 { margin-top: 0; margin-bottom: 0.6rem; }
.am-ergebnis-zeile p { margin: 0; }
.is-style-section-seegruen .am-ergebnis-zeile { border-top-color: rgba(17, 17, 17, 0.35); }
.is-style-section-seegruen .am-ergebnis-zeile:last-child { border-bottom-color: rgba(17, 17, 17, 0.35); }

/* Bausteine, Schritte, Preise */
.am-baustein { border-top: 4px solid var(--wp--preset--color--petrol) !important; }
.am-baustein-gruen { border-top-color: var(--wp--preset--color--seegruen) !important; }
.am-baustein h3, .am-schritt h3 { font-size: var(--wp--preset--font-size--medium); margin-top: 0.4rem; }
.am-schritt p:last-child, .am-baustein p:last-child { margin-bottom: 0; }
.am-preis-betrag { font-size: 2.2rem; font-weight: 700; line-height: 1.1; margin: 0.4rem 0 0.2rem; }
.am-preis-hl { border: 2px solid var(--wp--preset--color--orangerot); }
.am-punkt { margin-top: 1rem; }
