/*
Theme Name: Leviro
Theme URI: https://leviro.ch
Author: Praxis & Institut Leviro
Description: Schlankes Block-Theme für Praxis & Institut Leviro – Tiefentherapie und Selbstentwicklung. Farben Salbei, Sand, Vogel-Beige und Honig, runde und wellige Formen.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: leviro
*/

/* ---------- Grundlagen ---------- */
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 110px; }
body { -webkit-font-smoothing: antialiased; }
:where(a):focus-visible, :where(button):focus-visible, .wp-element-button:focus-visible {
	outline: 3px solid var(--wp--preset--color--honig);
	outline-offset: 3px;
	border-radius: 6px;
}
.screen-reader-text:focus { clip: auto !important; }

/* ---------- Kopfzeile ---------- */
.leviro-kopf { position: sticky; top: 0; z-index: 50; }
/* Logo aus der Mediathek (final_bright_half.png, 960x540) hat viel Rand: sichtbarer Ausschnitt per CSS (Logo-Fläche x 190–766, y 92–451) */
.kopf-logo, .logo-hell { --logo-h: 64px; margin: 0 !important; overflow: hidden; width: calc(var(--logo-h) * 1.604) !important; height: var(--logo-h) !important; flex-shrink: 0; }
.kopf-logo a, .logo-hell a { display: block; }
.kopf-logo img, .logo-hell img { height: calc(var(--logo-h) * 1.504) !important; width: auto !important; max-width: none !important; margin: calc(var(--logo-h) * -0.2563) 0 0 calc(var(--logo-h) * -0.5306); }
.wp-site-blocks > main, .wp-site-blocks > footer, .wp-site-blocks > .wp-block-template-part { margin-block-start: 0; }
.leviro-kopf .wp-block-navigation { font-family: var(--wp--preset--font-family--raleway); font-weight: 600; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.leviro-kopf .wp-block-navigation a:hover { color: var(--wp--preset--color--salbei); }
.leviro-kopf .wp-block-button__link { padding: 12px 22px; font-size: 15px; letter-spacing: .02em; }
/* Untermenüs im Kopf */
.leviro-kopf .wp-block-navigation .wp-block-navigation__submenu-container { background: #fff !important; border: 0 !important; border-radius: 18px; box-shadow: 0 14px 34px rgba(74,53,64,.14); padding: 10px 0 !important; min-width: 270px !important; text-transform: none; letter-spacing: 0; font-size: 16px; font-weight: 600; }
.leviro-kopf .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 8px 22px !important; color: var(--wp--preset--color--plum); }
.leviro-kopf .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--sand); color: var(--wp--preset--color--plum); }
.leviro-kopf .wp-block-navigation .wp-block-navigation__submenu-icon { margin-left: 4px; }
.leviro-kopf .nur-mobil { display: none !important; }
/* Handy-Menü: linksbündige Zeilen, Untermenüs klappen erst beim Antippen auf */
.leviro-kopf .is-menu-open .wp-block-navigation__responsive-container-content { align-items: stretch !important; padding-top: 28px !important; }
.leviro-kopf .is-menu-open .wp-block-navigation__responsive-container-content > .wp-block-navigation__container { align-items: stretch !important; gap: 0 !important; width: 100%; }
.leviro-kopf .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item { align-items: stretch !important; width: 100%; border-bottom: 1px solid var(--wp--preset--color--sand); }
.leviro-kopf .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content { display: flex !important; justify-content: space-between; align-items: center; width: 100%; padding: 16px 4px !important; font-size: 17px; }
.leviro-kopf .is-menu-open .wp-block-navigation-submenu > .wp-block-navigation-item__content::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -4px 8px 0 12px; transition: transform .2s ease; }
.leviro-kopf .is-menu-open .wp-block-navigation-submenu.ist-offen > .wp-block-navigation-item__content::after { transform: rotate(-135deg); margin-top: 6px; }
.leviro-kopf .is-menu-open .wp-block-navigation-submenu.ist-offen > .wp-block-navigation-item__content { color: var(--wp--preset--color--salbei); }
.leviro-kopf .is-menu-open .wp-block-navigation__submenu-container { display: none !important; box-shadow: none; border-radius: 0; padding: 0 0 12px 12px !important; min-width: 0 !important; font-size: 16px; }
.leviro-kopf .is-menu-open .wp-block-navigation-submenu.ist-offen > .wp-block-navigation__submenu-container { display: flex !important; flex-direction: column; align-items: stretch !important; }
.leviro-kopf .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item { align-items: flex-start !important; width: 100%; }
.leviro-kopf .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 10px 4px !important; width: 100%; text-align: left; }
.leviro-kopf .is-menu-open .nur-mobil { display: flex !important; }
.leviro-kopf .is-menu-open .wp-block-navigation-submenu__toggle { display: none !important; }
@media (max-width: 781px) {
	.kopf-logo { --logo-h: 48px; }
	.leviro-kopf .kopf-knopf { display: none; }
}

/* ---------- Abschnitte und Wellen ---------- */
.abschnitt { position: relative; }
/* Welle als Hintergrundbild (nicht als ::after, weil der Editor ::after für seinen Markierungsrahmen braucht) */
[class*="is-style-welle-"] {
	position: relative; padding-bottom: calc(var(--wp--preset--spacing--60) + 70px) !important;
	background-image: var(--welle); background-repeat: no-repeat; background-size: 100% 90px; background-position: left 0 bottom -1px;
}
.is-style-welle-weiss { --welle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0,30 C260,80 520,90 760,55 C1000,20 1230,25 1440,60 L1440,90 L0,90 Z' fill='%23ffffff'/%3E%3C/svg%3E"); }
.is-style-welle-sand { --welle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C300,10 560,20 780,50 C1000,80 1240,70 1440,30 L1440,90 L0,90 Z' fill='%23F4EEE6'/%3E%3C/svg%3E"); }
.is-style-welle-salbei { --welle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0,50 C220,95 430,5 720,40 C1010,75 1220,10 1440,45 L1440,90 L0,90 Z' fill='%234E6B4A'/%3E%3C/svg%3E"); }
.is-style-welle-honig { --welle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0,55 C280,15 540,10 800,45 C1060,80 1260,75 1440,35 L1440,90 L0,90 Z' fill='%23F6EBDA'/%3E%3C/svg%3E"); }
.is-style-welle-beige { --welle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0,35 C280,80 540,85 780,55 C1020,25 1240,20 1440,55 L1440,90 L0,90 Z' fill='%23D3C3B1'/%3E%3C/svg%3E"); }

/* ---------- Einstieg mit grossem Bild ---------- */
.hero { position: relative; overflow: hidden; min-height: 780px; display: flex; align-items: center; }
.hero > .hero-bild { position: absolute !important; inset: 0; margin: 0 !important; max-width: none !important; width: 100%; height: 100%; z-index: 0; }
.hero > .hero-bild img { width: 100%; height: 100% !important; object-fit: cover; object-position: 30% 30%; }
/* Bild und Verlauf unten wellenförmig ausschneiden, darunter liegt die Welle als Hintergrund (kein ::after, Editor-sicher) */
.hero > .hero-bild, .hero::before {
	-webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 89px) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L1440,0 L1440,45 C1220,10 1010,75 720,40 C430,5 220,95 0,50 Z'/%3E%3C/svg%3E") bottom / 100% 90px no-repeat;
	mask: linear-gradient(#000 0 0) top / 100% calc(100% - 89px) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L1440,0 L1440,45 C1220,10 1010,75 720,40 C430,5 220,95 0,50 Z'/%3E%3C/svg%3E") bottom / 100% 90px no-repeat;
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to right, rgba(244,238,230,0) 30%, rgba(244,238,230,.80) 54%, rgba(244,238,230,.94) 100%); }
.hero > .hero-inhalt { position: relative; z-index: 2; width: 100%; max-width: 1240px; margin: 0 auto !important; display: flex; justify-content: flex-end; }
.hero .hero-text { max-width: 560px; }
.hero h1 { font-size: clamp(44px, 6vw, 76px); line-height: 1.02; }
.hero h1 .betont { color: var(--wp--preset--color--salbei); }
.hero .hero-lead { font-size: 21px; line-height: 1.55; }
@media (max-width: 781px) {
	.hero { min-height: 0; flex-direction: column; align-items: stretch; }
	.hero > .hero-bild { position: relative !important; height: 320px; -webkit-mask: none; mask: none; }
	.hero::before { display: none; }
	.hero > .hero-inhalt { background: var(--wp--preset--color--sand); padding: 28px 20px 0; }
}

/* ---------- Überzeile, Kennzahlen ---------- */
.ueberzeile { font-family: var(--wp--preset--font-family--raleway); font-weight: 600; font-size: 15px !important; letter-spacing: .12em; text-transform: uppercase; color: var(--wp--preset--color--salbei); }
.kennzahlen { text-align: center; }
.kennzahlen .zahl { font-family: var(--wp--preset--font-family--raleway); font-weight: 800; font-size: 40px; line-height: 1.1; margin: 0; }
.kennzahlen .zahl-text { font-size: 17px; margin: 0; }

/* ---------- Fachbereich-Pillen ---------- */
.is-style-pille {
	position: relative; background: #fff; border-radius: 999px; padding: 18px 84px 18px 28px !important;
	transition: transform .15s ease, box-shadow .15s ease;
}
.is-style-pille::after {
	content: "→"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
	width: 48px; height: 48px; border-radius: 50%; background: var(--wp--preset--color--salbei-hell);
	display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--wp--preset--color--plum);
	pointer-events: none; z-index: 2;
}
.is-style-pille .pille-titel a::after { z-index: 1; }
.is-style-pille:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(74,53,64,.10); }
.is-style-pille p { margin: 0 !important; }
.is-style-pille .pille-titel { font-family: var(--wp--preset--font-family--raleway); font-weight: 700; font-size: 22px; line-height: 1.3; }
.is-style-pille .pille-titel a { color: inherit; text-decoration: none; }
.is-style-pille .pille-titel a::after { content: ""; position: absolute; inset: 0; border-radius: 999px; }
.is-style-pille .pille-text { font-size: 16px; color: var(--wp--preset--color--plum-hell); }

/* ---------- Bilder in organischen Formen ---------- */
.is-style-organisch img { border-radius: 58% 42% 46% 54% / 44% 50% 50% 56%; object-fit: cover; }
.is-style-blatt img { border-radius: 140px 40px 140px 40px; object-fit: cover; }
.is-style-blatt-gespiegelt img { border-radius: 40px 140px 40px 140px; object-fit: cover; }
.is-style-weich img { border-radius: 36px; object-fit: cover; }
.bild-hoch img { aspect-ratio: 4 / 5; width: 100%; }
.bild-breit img { aspect-ratio: 16 / 9; width: 100%; }

/* ---------- Kleine Etiketten ---------- */
.etiketten { gap: 10px !important; }
.etiketten p { background: var(--wp--preset--color--sand); border-radius: 999px; padding: 8px 16px; font-size: 15px; margin: 0 !important; }

/* ---------- Erfahrungsberichte: hell mit Honig ---------- */
.stimmen { overflow: hidden; }
.stimmen::before, .stimmen > .licht-klein { pointer-events: none; }
.stimmen::before { content: ""; position: absolute; width: 560px; height: 520px; right: -140px; top: -120px; border-radius: 58% 42% 55% 45% / 50% 60% 40% 50%; background: var(--wp--preset--color--honig-licht); z-index: 0; }
.stimmen > * { position: relative; z-index: 1; }
.stimmen .zitat-gross { font-family: var(--wp--preset--font-family--raleway); font-weight: 600; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.3; margin: 0; }
.stimmen .zitat-gross::before { content: "«"; display: block; font-weight: 800; font-size: 140px; line-height: .6; height: 64px; margin-bottom: 22px; color: var(--wp--preset--color--honig); }
.stimmen .zitat-name { color: var(--wp--preset--color--salbei); font-weight: 600; }
.is-style-stimme { background: #fff; border-radius: 36px 36px 36px 10px; padding: 28px 32px !important; box-shadow: 0 10px 30px rgba(138,100,39,.10); }
.is-style-stimme p:first-child::before { content: "«"; display: block; font-family: var(--wp--preset--font-family--raleway); font-weight: 800; font-size: 44px; line-height: .5; height: 18px; margin-bottom: 12px; color: var(--wp--preset--color--honig); }
.is-style-stimme p { margin: 0; }
.is-style-stimme .stimme-name { font-size: 16px; font-weight: 600; color: var(--wp--preset--color--plum-hell); margin-top: 10px; }

/* ---------- Karten (Termine, Angebote) ---------- */
.is-style-karte { background: #fff; border-radius: 40px; padding: 30px !important; position: relative; }
.is-style-karte-salbei { background: var(--wp--preset--color--salbei); color: #fff; border-radius: 40px; padding: 30px !important; position: relative; }
.is-style-karte-salbei a { color: #fff; }
.karte-datum { font-family: var(--wp--preset--font-family--raleway); margin: 0 !important; }
.karte-datum strong { font-weight: 800; font-size: 46px; line-height: 1; margin-right: 8px; }
.karte-datum span { font-weight: 700; font-size: 16px; text-transform: uppercase; }
.karte-titel { font-family: var(--wp--preset--font-family--raleway); font-weight: 700; font-size: 20px; line-height: 1.3; }
.karte-link a { font-family: var(--wp--preset--font-family--raleway); font-weight: 700; font-size: 15px; text-decoration: none; }
.karte-link a::after { content: ""; position: absolute; inset: 0; border-radius: 40px; }
.leise { color: var(--wp--preset--color--plum-hell); font-size: 16px; }
.is-style-karte-salbei .leise { color: var(--wp--preset--color--sand); }

/* ---------- Knopf-Varianten (auch im Editor sichtbar) ---------- */
.wp-block-button.is-style-hell .wp-block-button__link { background: #fff; color: var(--wp--preset--color--plum); }
.wp-block-button.is-style-hell .wp-block-button__link:hover { background: var(--wp--preset--color--sand); }
.wp-block-button.is-style-honig .wp-block-button__link { background: #8A6427; color: #fff; }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; border: 2px solid currentColor; }

/* ---------- Pfeil-Links ---------- */
.pfeil-link a { font-family: var(--wp--preset--font-family--raleway); font-weight: 700; font-size: 17px; text-decoration: none; color: var(--wp--preset--color--salbei); }
.pfeil-link a:hover { text-decoration: underline; }
/* Kacheln: die ganze Kachel ist anklickbar */
.kachel { position: relative; }
.kachel .pfeil-link a::after { content: ""; position: absolute; inset: 0; }
.kachel img { transition: transform .3s ease; }
.kachel:hover img { transform: scale(1.02); }
.kachel:hover .pfeil-link a { text-decoration: underline; }
/* Magazin: Rücklink und Kategorien */
.zurueck { margin: 0 0 18px !important; }
.zurueck a { font-family: var(--wp--preset--font-family--raleway); font-weight: 700; font-size: 15px; text-decoration: none; color: var(--wp--preset--color--salbei); }
.zurueck a:hover { text-decoration: underline; }
.magazin-nav { gap: 10px; margin-block: 20px 44px !important; align-items: center; }
.magazin-nav p, .magazin-kategorien { margin: 0 !important; }
.magazin-kategorien { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.magazin-nav a { display: inline-block; padding: 8px 18px; border-radius: 999px; background: var(--wp--preset--color--sand); color: var(--wp--preset--color--plum); text-decoration: none; font-family: var(--wp--preset--font-family--raleway); font-weight: 600; font-size: 15px; }
.magazin-nav a:hover, .magazin-nav .ist-aktiv a, .magazin-kategorien .current-cat a { background: var(--wp--preset--color--plum); color: #fff; }

/* ---------- Fusszeile ---------- */
.leviro-fuss { font-size: 16px; }
.leviro-fuss a { color: var(--wp--preset--color--plum); }
.leviro-fuss .fuss-titel { font-family: var(--wp--preset--font-family--raleway); font-weight: 700; margin-bottom: 6px; }
.leviro-fuss p { margin: 0; }
.leviro-fuss .logo-hell { --logo-h: 84px; }
.leviro-fuss .fuss-unten { font-size: 14px; }

/* ---------- Häufige Fragen ---------- */
.wp-block-details { background: #fff; border-radius: 24px; padding: 18px 24px; margin-block: 12px; }
.wp-block-details summary { font-family: var(--wp--preset--font-family--raleway); font-weight: 700; font-size: 19px; cursor: pointer; }

/* ---------- Formulare (Easy Appointments und Formular-Plugin) ---------- */
.leviro-formular input:not([type=checkbox]):not([type=radio]), .leviro-formular select, .leviro-formular textarea,
.ea-standard input, .ea-standard select, .ea-standard textarea,
.ea-bootstrap input:not([type=checkbox]):not([type=radio]), .ea-bootstrap select, .ea-bootstrap textarea {
	border: 1px solid var(--wp--preset--color--beige); border-radius: 14px; padding: 12px 14px; font: inherit; width: 100%; background: #fff; box-sizing: border-box;
}
.leviro-formular p { margin: 0 0 16px; }
.leviro-formular label, .ea-bootstrap label { font-weight: 600; font-size: 16px; }
.leviro-formular .wpcf7-acceptance label, .leviro-formular .wpcf7-list-item-label { font-weight: 400; }
.leviro-formular .wpcf7-list-item { margin-left: 0; }
.wpcf7-submit, .ea-bootstrap .btn-primary, .ea-bootstrap button[type=submit] {
	background: var(--wp--preset--color--salbei); color: #fff; border: 0; border-radius: 999px; padding: 16px 30px; font-family: var(--wp--preset--font-family--raleway); font-weight: 700; font-size: 17px; cursor: pointer;
}
.wpcf7-submit:hover, .ea-bootstrap .btn-primary:hover { background: #3F5A3C; }
.wpcf7-not-valid-tip { color: var(--wp--preset--color--terrakotta); font-size: 15px; }
.wpcf7 form .wpcf7-response-output { border-radius: 14px; margin: 16px 0 0; padding: 12px 16px; }
.ea-bootstrap .time-value { display: inline-block; margin: 4px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--wp--preset--color--beige); text-decoration: none; }
.ea-bootstrap .time-value.selected-time, .ea-bootstrap .time-value:hover { background: var(--wp--preset--color--salbei); color: #fff; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .is-style-pille { transition: none; } }
