/*
Theme Name: Werkstatt fürs Leben
Author: Werkstatt fürs Leben
Description: Modernes Block-Theme (Full Site Editing). Transparentes Menü oben, das sich beim Scrollen verändert. Farben: Sonne #F8D87D, Tiefblau #275571, Petrol #46A2A0. Ohne externe Schriften.
Version: 4.8.3
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: werkstatt-fuers-leben
*/

html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { -webkit-font-smoothing: antialiased; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* Kein Standard-Abstand zwischen Kopf, Inhalt und Fuß */
.wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }

:where(a, button, .wp-element-button):focus-visible {
  outline: 3px solid var(--wp--preset--color--sonne);
  outline-offset: 3px;
}

/* ───────── Menü oben ───────── */
/* Alle Seiten beginnen mit einem dunklen Kopfbereich, daher: oben durchscheinend blau mit weißer Schrift */
/* WICHTIG: .ww-header selbst darf kein backdrop-filter, filter oder transform haben.
   Sonst wird das aufgeklappte Handy-Menü (position: fixed) nur so groß wie die Kopfleiste
   und sitzt halb außerhalb des Bildschirms. Hintergrund und Weichzeichner liegen deshalb auf ::before. */
.ww-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding-block: 1.25rem;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.14);
  transition: padding .3s ease, box-shadow .3s ease, color .3s ease, border-color .3s ease;
}
.ww-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(39,85,113,.28);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  transition: background-color .3s ease;
}
.admin-bar .ww-header { top: var(--wp-admin--admin-bar--height, 32px); }

/* Logo: oben helle Fassung (auf dem Foto), nach dem Scrollen die farbige Fassung (auf Weiß) */
.ww-header .ww-logo { margin: 0; flex-shrink: 0; }
.ww-header .ww-logo a { display: block; line-height: 0; }
.ww-header .ww-logo img { height: 3.6rem; width: auto; max-width: none; transition: height .3s ease; }
.ww-header .ww-logo--dunkel { display: none; }
.ww-header.is-scrolled .ww-logo--hell { display: none; }
.ww-header.is-scrolled .ww-logo--dunkel { display: block; }
.ww-header.is-scrolled .ww-logo img { height: 2.7rem; }
@media (max-width: 600px) {
  .ww-header .ww-logo img { height: 2.8rem; }
  .ww-header.is-scrolled .ww-logo img { height: 2.3rem; }
}

/* Nach dem Scrollen: kompakter, fast deckend, mit Schatten */
.ww-header.is-scrolled::before { background: rgba(255,255,255,.94); }
.ww-header.is-scrolled {
  padding-block: .55rem;
  color: var(--wp--preset--color--blau);
  border-bottom-color: transparent;
  box-shadow: 0 10px 30px -14px rgba(19,34,44,.35);
}

.ww-header .wp-block-site-title,
.ww-header .wp-block-site-title a,
.ww-header .wp-block-navigation a,
.ww-header .wp-block-navigation__responsive-container-open { color: inherit; text-decoration: none; }
.ww-header .wp-block-navigation { font-weight: 700; font-size: var(--wp--preset--font-size--small); }
.ww-header .wp-block-navigation-item a { padding: .45rem .9rem; border-radius: 999px; transition: background-color .15s ease, color .15s ease; }
.ww-header .wp-block-navigation-item a:hover { background: var(--wp--preset--color--sonne); color: var(--wp--preset--color--tinte); }
.ww-header .current-menu-item > a,
.ww-header .wp-block-navigation-item a[aria-current="page"] { background: rgba(255,255,255,.18); }
.ww-header.is-scrolled .current-menu-item > a,
.ww-header.is-scrolled .wp-block-navigation-item a[aria-current="page"] { background: rgba(70,162,160,.22); }

/* Aufklapp-Untermenü (z. B. Schule) */
.ww-header .wp-block-navigation__submenu-container {
  background: #fff; color: var(--wp--preset--color--blau);
  border: 1px solid var(--wp--preset--color--linie); border-radius: 16px;
  padding: .5rem; min-width: 220px;
  box-shadow: 0 20px 40px -20px rgba(19,34,44,.45);
}
.ww-header .wp-block-navigation__submenu-container a { color: var(--wp--preset--color--blau); }
.ww-header .wp-block-navigation__submenu-container a:hover { background: var(--wp--preset--color--sonne); color: var(--wp--preset--color--tinte); }

/* Hamburger-Menü bis 1023 px (Standard wäre nur bis 599 px): sonst läuft das lange Menü auf Tablets rechts aus dem Bild */
@media (min-width: 600px) and (max-width: 1023px) {
  .ww-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
  .ww-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}

/* Mobiles Menü (geöffnet): immer den ganzen Bildschirm füllen */
.ww-header .wp-block-navigation__responsive-container.is-menu-open {
  position: fixed; inset: 0; width: 100%; max-width: 100%; box-sizing: border-box; transform: none;
}
.wp-block-navigation__responsive-container.is-menu-open {
  background: var(--wp--preset--color--blau); color: #fff; padding: 2rem;
}
.wp-block-navigation__responsive-container.is-menu-open a { color: #fff; font-size: 1.4rem; }
.ww-header .is-menu-open .wp-block-navigation__submenu-container { background: transparent; border: 0; box-shadow: none; padding: 0 0 0 1rem; }
.ww-header .is-menu-open .wp-block-navigation__submenu-container a { color: #fff; font-size: 1.1rem; }

/* ───────── Hero mit Foto ───────── */
.ww-hero.wp-block-cover { min-height: 92vh; align-items: center; isolation: isolate; }
/* Blauer Verlauf für lesbaren Text, rechts bleibt das Foto frei */
.ww-hero.wp-block-cover::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(39,85,113,.88) 0%, rgba(39,85,113,.62) 38%, rgba(39,85,113,.08) 75%),
    linear-gradient(180deg, rgba(19,34,44,.45) 0%, rgba(19,34,44,0) 22%);
}
.ww-hero .wp-block-cover__inner-container { position: relative; z-index: 2; width: 100%; }
.ww-hero h1 { max-width: 16ch; color: #fff; }
.ww-hero p { max-width: 36ch; }
.ww-hero .is-style-outline .wp-block-button__link {
  color: #fff; border: 2px solid rgba(255,255,255,.8); background: transparent;
}
.ww-hero .is-style-outline .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--blau); }
@media (max-width: 781px) {
  .ww-hero.wp-block-cover::before {
    background: linear-gradient(180deg, rgba(39,85,113,.85) 0%, rgba(39,85,113,.55) 60%, rgba(39,85,113,.25) 100%);
  }
}

/* ───────── Foto-Abschnitt ───────── */
.ww-photo img { width: 100%; height: auto; border-radius: 28px; display: block; box-shadow: 0 30px 60px -30px rgba(0,0,0,.55); }
.ww-impressionen h2 { color: #fff; }
.ww-impressionen .wp-block-button__link:hover { background: var(--wp--preset--color--petrol); color: #fff; }

/* ───────── Inhalte ───────── */
.ww-card {
  height: 100%; border-radius: 24px; border: 1px solid var(--wp--preset--color--linie);
  transition: box-shadow .2s ease, transform .2s ease;
}
.ww-card:hover { box-shadow: 0 18px 40px -18px rgba(39,85,113,.4); transform: translateY(-2px); }

.ww-teaser {
  background: var(--wp--preset--color--mint); border-radius: 20px;
  border-top: 5px solid var(--wp--preset--color--petrol);
  padding: var(--wp--preset--spacing--40);
}
.ww-teaser h3 { margin-top: 0; }
.ww-teaser a { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--wp--preset--color--sonne); }
.ww-teaser a:hover { background: var(--wp--preset--color--sonne); color: var(--wp--preset--color--tinte); }

.wp-block-post-featured-image img { border-radius: 20px; }
.wp-block-post-title a { text-decoration: none; }
.wp-block-post-title a:hover { text-decoration: underline; text-decoration-color: var(--wp--preset--color--petrol); text-decoration-thickness: 3px; }
.ww-cta { border-radius: 32px; }

/* ───────── Footer ───────── */
.ww-footer a { color: inherit; }
.ww-footer a:hover { color: var(--wp--preset--color--sonne); }
.ww-footer .wp-block-navigation a { text-decoration: none; }
.ww-footer .wp-block-navigation a:hover { text-decoration: underline; }
.wp-block-post-template.is-flex-container li { min-width: 0; }

/* ───────── Titelbild für alle Unterseiten (wie Startseite) ───────── */
/* Standardbild; ein Beitragsbild der Seite ersetzt es automatisch */
.ww-seitenkopf.wp-block-cover {
  min-height: 52vh; align-items: flex-end; isolation: isolate; overflow: hidden;
  background-color: var(--wp--preset--color--blau);
  background-image: url(assets/images/wfl-hero.jpg);
  background-size: cover; background-position: 50% 65%;
}
.ww-seitenkopf.wp-block-cover::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(39,85,113,.88) 0%, rgba(39,85,113,.55) 40%, rgba(39,85,113,.08) 78%),
    linear-gradient(180deg, rgba(19,34,44,.5) 0%, rgba(19,34,44,0) 25%);
}
.ww-seitenkopf .wp-block-cover__inner-container { position: relative; z-index: 2; width: 100%; }
.ww-seitenkopf .wp-block-post-title,
.ww-seitenkopf h1,
.ww-seitenkopf .wp-block-query-title {
  color: #fff; margin: 0; max-width: 18ch;
  font-size: clamp(2.25rem, 5vw, 4rem);
}
.ww-seitenkopf .wp-block-post-date { color: rgba(255,255,255,.9); }
@media (max-width: 781px) {
  .ww-seitenkopf.wp-block-cover { min-height: 46vh; }
  .ww-seitenkopf.wp-block-cover::before {
    background: linear-gradient(180deg, rgba(39,85,113,.85) 0%, rgba(39,85,113,.55) 60%, rgba(39,85,113,.3) 100%);
  }
}

/* ───────── Inhalt von Unterseiten ───────── */
.ww-inhalt h2 { margin-top: 2.2em; margin-bottom: .5em; }
.ww-inhalt h3 { margin-top: 1.8em; margin-bottom: .4em; }
.ww-inhalt :where(h2, h3, h4):first-child { margin-top: 0; }
.ww-inhalt :where(ul, ol) { padding-left: 1.3em; }
.ww-inhalt li::marker { color: var(--wp--preset--color--petrol); font-weight: 700; }
.ww-inhalt a:not(.wp-element-button) {
  text-decoration-color: var(--wp--preset--color--sonne); text-decoration-thickness: 3px; text-underline-offset: 3px;
}
.ww-inhalt a:not(.wp-element-button):hover { text-decoration-color: var(--wp--preset--color--petrol); }
.ww-inhalt .wp-block-image img,
.ww-inhalt .wp-block-gallery img,
.ww-inhalt .wp-block-embed iframe { border-radius: 20px; }
.ww-inhalt .wp-block-separator { border-color: var(--wp--preset--color--linie); }
.ww-inhalt table { border-collapse: collapse; width: 100%; }
.ww-inhalt th { background: var(--wp--preset--color--mint); text-align: left; }
.ww-inhalt th, .ww-inhalt td { padding: .7rem .9rem; border: 1px solid var(--wp--preset--color--linie); }
.ww-inhalt .wp-block-details { border-bottom: 1px solid var(--wp--preset--color--linie); padding: 1rem 0; }
.ww-inhalt .wp-block-details summary { font-weight: 700; cursor: pointer; color: var(--wp--preset--color--blau); }
.ww-inhalt .wp-block-details[open] summary { margin-bottom: .6rem; }

/* ───────── Handy-Menü geöffnet: blau, weiße Schrift, rechtsbündig, mit Rand ─────────
   WordPress setzt für das offene Menü selbst Weiß/Schwarz mit höherer Gewichtung,
   deshalb hier mit !important. */
.ww-header .wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open {
  background-color: var(--wp--preset--color--blau) !important;
  color: #fff !important;
  padding: 1.25rem 1.5rem 2.5rem !important;
}
.ww-header .is-menu-open .wp-block-navigation__responsive-container-content {
  padding-top: 3.5rem; width: 100%; box-sizing: border-box;
}
.ww-header .is-menu-open .wp-block-navigation__responsive-container-content,
.ww-header .is-menu-open .wp-block-navigation__container,
.ww-header .is-menu-open .wp-block-navigation__submenu-container {
  align-items: flex-end !important; justify-content: flex-start !important; text-align: right;
}
.ww-header .is-menu-open .wp-block-navigation__submenu-container { padding: 0 !important; }
.ww-header .is-menu-open .wp-block-navigation__container { gap: .35rem; }
.ww-header .is-menu-open .wp-block-navigation-item a { padding: .45rem 0; border-radius: 0; background: none; color: #fff !important; }
.ww-header .is-menu-open .wp-block-navigation-item a:hover { background: none; color: var(--wp--preset--color--sonne) !important; }
.ww-header .is-menu-open .wp-block-navigation__responsive-container-close { top: 1rem; right: 1rem; color: #fff; }
.ww-header .is-menu-open .wp-block-navigation__responsive-container-close svg { width: 28px; height: 28px; }
