/* ==========================================================================
   Märchen & Sozialtraining – Styleguide
   Basis: Unterseiten der WordPress-Version (z. B. /fuer-kitas/)
   Aufbau:
     1. Schriften (lokal gehostet, DSGVO-konform)
     2. Design-Tokens (CSS-Variablen)
     3. Reset & Basis
     4. Typografie
     5. Layout (Container, Sektionen, Grid)
     6. Komponenten (Header, Navigation, Buttons, Karten, Trenner,
        Checkliste, Formular, Footer, Scroll-Top)
     7. Hilfsklassen
   ========================================================================== */


/* 1. Schriften
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin-variable.woff2") format("woff2");
}


/* 2. Design-Tokens
   ========================================================================== */

:root {
  /* --- Markenfarben --- */
  --color-primary:        #992054; /* Beere – Header, Buttons, Akzent-Sektionen, Links */
  --color-primary-dark:   #612b48; /* Pflaume – Link-Hover */
  --color-primary-light:  #cb3668; /* Himbeere – Button-Hover, Rahmen, Linien */

  /* --- Neutrale Farben --- */
  --color-heading:        #1e293b; /* Überschriften auf hellem Grund */
  --color-text:           #67768e; /* Fließtext */
  --color-bg:             #f9f6fe; /* Seitenhintergrund (zartes Flieder) */
  --color-surface:        #ffffff; /* Karten, Formular, Footer */
  --color-surface-alt:    #f2f5f7; /* Alternativer heller Hintergrund */
  --color-white:          #ffffff;
  --color-black:          #000000;

  /* --- Formular / Status --- */
  --color-form-text:      #1e1e1e;
  --color-form-muted:     rgb(30 30 30 / 0.65);
  --color-form-border:    rgb(30 30 30 / 0.25);
  --color-form-bg:        rgb(30 30 30 / 0.02);
  --color-form-submit:    #111c44;
  --color-error:          #dc2626;

  /* --- Semantische Zuordnung --- */
  --link-color:           var(--color-primary);
  --link-color-hover:     var(--color-primary-dark);
  --border-color:         var(--color-primary-light);

  /* --- Schriften --- */
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;

  --font-weight-regular:  400;
  --font-weight-semibold: 600;

  /* --- Schriftgrößen (Desktop-Werte, mobil fließend kleiner) --- */
  --fs-h1:      clamp(2.25rem, 1.6rem + 2.4vw, 3rem);     /* 48px */
  --fs-h2:      clamp(1.875rem, 1.4rem + 1.8vw, 2.625rem); /* 42px */
  --fs-h3:      clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);   /* 24px */
  --fs-h4:      1.25rem;                                  /* 20px */
  --fs-h5:      1.125rem;                                 /* 18px */
  --fs-h6:      0.9375rem;                                /* 15px */
  --fs-body:    1.125rem;                                 /* 18px */
  --fs-small:   0.875rem;                                 /* 14px */
  --fs-button:  1.25rem;                                  /* 20px */

  --lh-h1:      1.3;
  --lh-h2:      1.3;
  --lh-h3:      1.3;
  --lh-h5:      1.2;
  --lh-h6:      1.25;
  --lh-body:    1.65;

  --tracking-eyebrow: 2px;

  /* --- Abstände (8er-Raster) --- */
  --space-1:  0.25rem;  /*  4px */
  --space-2:  0.5rem;   /*  8px */
  --space-3:  1rem;     /* 16px */
  --space-4:  1.25rem;  /* 20px */
  --space-5:  1.5rem;   /* 24px */
  --space-6:  2rem;     /* 32px */
  --space-7:  2.5rem;   /* 40px */
  --space-8:  3rem;     /* 48px */
  --space-9:  4.5rem;   /* 72px */
  --space-10: 6.25rem;  /* 100px */

  --section-padding-y: clamp(3.5rem, 2rem + 6vw, var(--space-10));
  --section-padding-x: clamp(1rem, 0.5rem + 2vw, var(--space-7));

  /* --- Layout --- */
  --container-max:        1240px; /* Header/Footer inkl. 20px Innenabstand */
  --content-max:          1200px;
  --content-narrow:       1024px; /* Inhaltsbreite der Sektionen */
  --text-max:             800px;  /* zentrierte Textblöcke */
  --header-height:        110px;
  --logo-width:           176px;

  /* --- Radien --- */
  --radius-sm:  4px;  /* Buttons */
  --radius-md:  6px;  /* Bilder, Formularfelder, Formular-Karte */
  --radius-lg:  10px; /* Feature-Karten */
  --radius-round: 50%;

  /* --- Schatten --- */
  --shadow-xs:   0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-menu: 0 4px 10px -2px rgb(0 0 0 / 0.1);
  --shadow-card: 0 0 45px 0 rgb(0 0 0 / 0.1);

  /* --- Bewegung --- */
  --transition: 0.2s ease;
}


/* 3. Reset & Basis
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--lh-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover,
a:focus-visible {
  color: var(--link-color-hover);
}

:focus-visible {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: var(--space-3);
  top: var(--space-3);
  z-index: 1000;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
}


/* 4. Typografie
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-heading);
  font-weight: var(--font-weight-semibold);
  color: var(--color-heading);
  overflow-wrap: break-word;
}

/* Lange Wörter in Überschriften werden nur an gesetzten Trennstellen (&shy;)
   umbrochen, z. B. „Sozial&shy;training“ → mobil „Sozial-training“.
   Automatische Silbentrennung trennt oft unschön („Sozi-altraining“). */
h1, h2, h3 {
  hyphens: manual;
  -webkit-hyphens: manual;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-h3); }
h5 { font-size: var(--fs-h5); line-height: var(--lh-h5); margin-bottom: var(--space-3); }
h6 { font-size: var(--fs-h6); line-height: var(--lh-h6); }

p {
  margin: 0 0 var(--space-6);
}

p:last-child {
  margin-bottom: 0;
}

strong { font-weight: var(--font-weight-semibold); }

/* Kleine Dachzeile über der H1, z. B. „Wo Worte Wunder weben“ */
.eyebrow {
  margin-bottom: var(--space-5);
  font-size: var(--fs-small);
  line-height: 1;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--color-heading);
}

/* Unterzeile direkt unter einer Überschrift */
.subtitle {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-weight: var(--font-weight-semibold);
  line-height: var(--lh-h3);
}

.text-small { font-size: var(--fs-small); }


/* Textblock mit engeren Absatzabständen (z. B. „Kennen Sie das?“ rechte Spalte) */
.text-tight p {
  margin-bottom: var(--space-3);
}

.text-tight .subtitle {
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}

/* Hochgestellte Zeichen (z. B. Wellenbrecher™) ohne Zeilensprung */
sup {
  line-height: 0;
}

/* Lange Hauptüberschrift (z. B. „… Gewaltprävention als Fortbildung …“) etwas kleiner */
.heading-long {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
}


/* 5. Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.container--narrow {
  max-width: calc(var(--content-narrow) + 2 * var(--section-padding-x));
  padding-inline: var(--section-padding-x);
}

.section {
  padding: var(--section-padding-y) var(--section-padding-x);
  background-color: var(--color-bg);
}

.section > * {
  max-width: var(--content-narrow);
  margin-inline: auto;
}

/* Akzent-Sektion in Beere mit weißer Schrift */
.section--primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* Variante in Pflaume statt Beere, z. B. direkt unter dem beerenfarbenen Header
   <section class="section section--primary section--plum"> */
.section--plum {
  background-color: var(--color-primary-dark);
}

.section--primary :is(h1, h2, h3, h4, h5, h6, p, a:not(.button)) {
  color: var(--color-white);
}

.section--primary .card {
  border-color: var(--color-primary-light);
}

.section--surface {
  background-color: var(--color-surface);
}

.section--flush {
  padding: 0;
}

/* Zentrierter Sektionskopf (Trenner + H2 + Intro) */
.section-head {
  max-width: var(--text-max);
  margin: 0 auto var(--space-8);
  text-align: center;
}

/* Raster */
.grid {
  display: grid;
  gap: var(--space-5);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); row-gap: var(--space-8); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

/* Bild + Text nebeneinander (Hero der Unterseiten) */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
}

.split > * {
  min-width: 0;
}

@media (min-width: 922px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-9);
  }
}

/* Bildreihe innerhalb einer Sektion: Bild rechts statt links */
@media (min-width: 922px) {
  .split--reverse > :first-child {
    order: 2;
  }
}

.split + .split {
  margin-top: var(--space-9);
}

/* Vollbreite Text-Bild-Kombination: Textspalte + randloses Bild.
   Standard: Text auf Beere. Mit .split--light: Text auf hellem Grund. */
.split--media {
  gap: 0;
  align-items: stretch;
  background-color: var(--color-primary);
}

/* Variante in Pflaume statt Beere (z. B. direkt nach einer beerenfarbenen Sektion) */
.split--media.split--plum {
  background-color: var(--color-primary-dark);
}

/* Text bündig mit der Inhaltsspalte der übrigen Sektionen */
@media (min-width: 922px) {
  .split--media {
    gap: 0;
  }

  .split.split--media .split__text {
    padding-left: max(var(--section-padding-x), calc((100vw - var(--content-narrow)) / 2));
  }

  .split--media.split--reverse .split__text {
    padding-left: var(--space-9);
    padding-right: max(var(--section-padding-x), calc((100vw - var(--content-narrow)) / 2));
  }
}

.split--media .split__text {
  padding: var(--section-padding-y) var(--section-padding-x);
  color: var(--color-white);
}

.split--media .split__text > * {
  max-width: 500px;
}

.split--media .split__text :is(h1, h2, h3, p) {
  color: var(--color-white);
}

.split--media.split--light {
  background-color: var(--color-bg);
}

.split--media.split--light .split__text {
  color: var(--color-text);
}

.split--media.split--light .split__text :is(h1, h2, h3) {
  color: var(--color-heading);
}

.split--media.split--light .split__text p {
  color: var(--color-text);
}

.split--media .split__media {
  min-height: 320px;
}

.split--media .split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobil steht das Bild immer oben */
@media (max-width: 921px) {
  .split--media .split__media {
    order: -1;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
}

.media-rounded {
  border-radius: var(--radius-md);
}

/* Bild mit festem Seitenverhältnis (zugeschnitten) */
.media-cover {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* Zwei Bilder nebeneinander mit Bildunterschrift (z. B. die beiden Musiker).
   Mobil (schmal) untereinander.
   <div class="photo-pair"><figure><img class="media-rounded media-cover media-cover--portrait object-top" …>
   <figcaption>Name</figcaption></figure> <figure>…</figure></div> */
.photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.photo-pair figure {
  margin: 0;
}

.photo-pair figcaption {
  margin-top: var(--space-2);
  font-size: var(--fs-small);
  font-weight: var(--font-weight-semibold);
  text-align: center;
}

@media (max-width: 559px) {
  .photo-pair {
    grid-template-columns: 1fr;
  }
}

/* Zwischentitel in Bild-Text-Blöcken */
.split__text .card__title {
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

/* Hochformat-Ausschnitt (z. B. Bild-Kacheln mit Hochkant-Fotos) */
.media-cover--portrait { aspect-ratio: 4 / 5; }

/* Bildausschnitt oben ansetzen (z. B. Hochformat-Fotos, damit Gesichter sichtbar bleiben) */
.object-top { object-position: 50% 25%; }

/* Bildausschnitt nach links verschieben (Motiv links der Bildmitte) */
.object-left { object-position: 25% 50%; }

/* Bildausschnitt ganz oben ansetzen (z. B. Kacheln mit Hochformat-Foto, Kopf oben im Bild) */
.object-top-edge { object-position: 50% 0%; }

/* Großer Bild-Header (Startseite): randloses Bild, Text darüber
   <section class="hero"><img class="hero__image" …>
   <div class="hero__content">…</div></section> */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(85vh, 760px);
  padding: var(--space-10) var(--section-padding-x);
  overflow: hidden;
  color: var(--color-white);
  background-color: var(--color-primary-dark);
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Farbverlauf in Markenfarben, damit weiße Schrift gut lesbar bleibt */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgb(97 43 72 / 0.95) 0%, rgb(153 32 84 / 0.85) 50%, rgb(153 32 84 / 0.2) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--content-narrow);
  margin-inline: auto;
}

.hero__content > * {
  max-width: 640px;
}

.hero h1 {
  font-size: clamp(2.75rem, 1.5rem + 5vw, 5rem);
  line-height: 1.1;
  color: var(--color-white);
  hyphens: manual;
  -webkit-hyphens: manual;
}

.hero .eyebrow,
.hero p {
  color: var(--color-white);
}

.hero p:not(.eyebrow) {
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3rem);
  margin-bottom: var(--space-7);
}

/* Kurze Aufzählung im Titeltext mit Gedankenstrich (z. B. „Für Kitas“: zwei Angebote)
   <p class="mb-3">Einleitung:</p><ul class="hero__list"><li><strong>…</strong> …</li></ul> */
.hero__list {
  margin: 0 0 var(--space-7);
  padding: 0;
  list-style: none;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3rem);
  color: var(--color-white);
}

.hero__list li {
  position: relative;
  padding-left: 1.5em;
}

.hero__list li + li {
  margin-top: var(--space-2);
}

.hero__list li::before {
  content: "–";
  position: absolute;
  left: 0;
}

/* Schmuckbild im Titeltext (z. B. die zwei Herzen mit der Sonne über dem Button) */
.hero__ornament {
  display: block;
  width: 180px;
  height: auto;
  margin-bottom: var(--space-6);
}

/* Variante für Unterseiten: etwas niedriger, Überschrift in normaler H1-Größe */
.hero--page {
  min-height: min(70vh, 640px);
}

.hero--page h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
}

/* Variante „Bild rechts“: Für Fotos, deren Motiv nicht vom Text verdeckt werden soll.
   Desktop: Bild füllt die rechten zwei Drittel, Text links auf Pflaume.
   Mobil: Bild vollständig oben, Text darunter. */
@media (min-width: 922px) {
  .hero--split .hero__image {
    left: auto;
    width: 65%;
    object-position: 50% 40%;
  }

  .hero--split::before {
    background: linear-gradient(90deg,
      var(--color-primary-dark) 0%,
      var(--color-primary-dark) 35%,
      rgb(97 43 72 / 0.6) 45%,
      rgb(97 43 72 / 0) 60%);
  }

  .hero--split .hero__content > * {
    max-width: 480px;
  }
}

@media (max-width: 921px) {
  .hero--split {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
  }

  .hero--split::before {
    display: none;
  }

  .hero--split .hero__image {
    position: relative;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .hero--split .hero__content {
    padding: var(--space-8) var(--section-padding-x) var(--section-padding-y);
  }
}

@media (max-width: 921px) {
  .hero::before {
    background: linear-gradient(180deg, rgb(97 43 72 / 0.85) 0%, rgb(153 32 84 / 0.8) 100%);
  }
}

/* Variante „größerer Titeltext“: Überschrift und Zeile darunter etwas größer.
   Am Desktop zusätzlich 0,5 cm weiter links (mobil bleibt der Text im Seitenrand).
   <section class="hero hero--page hero--split hero--text-large"> */
.hero.hero--text-large h1 {
  font-size: clamp(2.75rem, 1.9rem + 2.6vw, 3.75rem);
}

.hero.hero--text-large p:not(.eyebrow) {
  font-size: clamp(1.25rem, 1.1rem + 0.4vw, 1.5rem);
}

@media (min-width: 922px) {
  .hero--text-large .hero__content {
    inset-inline-start: -0.5cm;
  }

  .hero--text-large.hero--split .hero__content > * {
    max-width: 540px;
  }
}

/* Großer Bild-Header mit Hochformat-Foto: Ausschnitt weiter oben ansetzen */
.hero--split .hero__image.object-top { object-position: 50% 0%; }

/* Großer Bild-Header: Ausschnitt etwas tiefer ansetzen (Motiv wandert nach oben) */
.hero--split .hero__image.object-upper { object-position: 50% 25%; }

/* Bildausschnitt etwas unterhalb der Mitte (z. B. Kinderzeichnung auf dem Tisch) */
.hero--split .hero__image.object-lower { object-position: 50% 68%; }

/* Variante „Bild links“ des großen Headers: für Fotos, deren Motiv links im Bild steht.
   Desktop: Bild füllt die linken zwei Drittel, Text rechts auf Pflaume.
   Mobil: wie .hero--split (Bild oben, Text darunter). */
@media (min-width: 922px) {
  .hero--split-reverse .hero__image {
    left: 0;
    right: auto;
  }

  .hero--split-reverse::before {
    background: linear-gradient(270deg,
      var(--color-primary-dark) 0%,
      var(--color-primary-dark) 50%,
      rgb(97 43 72 / 0.6) 58%,
      rgb(97 43 72 / 0) 70%);
  }

  /* Textblock (inkl. Button) gemeinsam an den rechten Rand der Inhaltsspalte */
  .hero--split-reverse .hero__content {
    display: grid;
    grid-template-columns: minmax(0, 480px);
    justify-content: end;
    justify-items: start;
  }
}

/* Textlink „Mehr erfahren →“ */
.link-more {
  display: inline-block;
  margin-top: var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--fs-h6);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
}

.link-more::after {
  content: " →";
  transition: margin-left var(--transition);
}

a:hover > .link-more::after,
.link-more:hover::after {
  margin-left: 4px;
}

.section--primary .link-more {
  color: var(--color-white);
}

/* Seitenkopf ohne Bild (zentrierte, schmale Textspalte) */
.page-intro {
  max-width: var(--text-max);
}

/* Hervorgehobener Einleitungstext */
.lead {
  font-weight: var(--font-weight-semibold);
  color: var(--color-heading);
}

/* „Für wen geeignet“: Überschrift links, Spalten rechts */
.audience {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 922px) {
  .audience {
    grid-template-columns: 1fr 3fr;
    gap: var(--space-6);
  }
}


/* 6. Komponenten
   ========================================================================== */

/* --- Header --- */
.site-header {
  position: relative;
  z-index: 100;
  background-color: var(--color-primary);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--header-height);
}

.site-header__logo img {
  width: var(--logo-width);
  max-width: calc(100vw - 6rem); /* mobil: Platz für den Menü-Knopf lassen */
  height: auto;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

/* Menü-Button (nur mobil sichtbar) */
.nav-toggle {
  display: none;
  padding: var(--space-2);
  color: var(--color-white);
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle svg {
  width: 28px;
  height: 28px;
}

.nav-toggle .icon-close,
.site-header.is-open .nav-toggle .icon-open {
  display: none;
}

.site-header.is-open .nav-toggle .icon-close {
  display: block;
}

/* --- Navigation --- */
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__item {
  position: relative;
}

.nav__link {
  display: block;
  padding: 0 18px;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--color-white);
}

.nav__link:hover,
.nav__link:focus-visible,
.nav__link[aria-current="page"],
.nav__link.is-active {
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

.nav__submenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  min-width: 240px;
  margin: 0;
  padding: 0;
  list-style: none;
  background-color: var(--color-primary);
  border: 2px solid var(--color-primary);
  box-shadow: var(--shadow-menu);
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--transition), visibility var(--transition);
}

/* Menüpunkt ohne eigene Seite: öffnet nur das Untermenü */
.nav__sub-toggle {
  font-family: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav__item:hover > .nav__submenu,
.nav__item:focus-within > .nav__submenu,
.nav__item.is-open > .nav__submenu {
  visibility: visible;
  opacity: 1;
}

.nav__submenu .nav__link {
  padding: 16px 18px;
}

/* Pfeil hinter Menüpunkten mit Untermenü */
.nav__item--has-sub > .nav__link::after {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-left: 0.5em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.2em) rotate(45deg);
}

.social-links {
  display: flex;
  gap: var(--space-3);
}

.social-links a {
  display: block;
  color: var(--color-white);
}

.social-links a:hover {
  color: var(--color-white);
  opacity: 0.8;
}

.social-links svg {
  width: 18px;
  height: 18px;
}

/* Menüpunkt mit zwei Zeilen übereinander (z. B. Sozialtraining / Gewaltpräventionstraining) */
.nav__two-lines {
  display: inline-block;
  font-size: 0.9em;
  line-height: 1.25;
  text-align: center;
}

@media (max-width: 1100px) {
  .nav__two-lines {
    text-align: left;
  }
}

/* Desktop: Menü und Social-Icons immer in einer Zeile;
   auf schmaleren Desktop-Bildschirmen etwas engere Abstände */
@media (min-width: 1101px) {
  .nav {
    flex-wrap: nowrap;
  }

  .nav__link {
    white-space: nowrap;
  }

  .site-header__logo,
  .social-links {
    flex-shrink: 0;
  }
}

@media (min-width: 1440px) and (max-width: 1699px) {
  .nav__link {
    padding: 0 12px;
  }
}

@media (min-width: 1101px) and (max-width: 1439px) {
  .nav__link {
    padding: 0 7px;
  }
}

@media (min-width: 1101px) and (max-width: 1279px) {
  .nav__link {
    padding: 0 5px;
    font-size: 0.94rem;
  }

  .site-header__nav {
    gap: var(--space-3);
  }
}

/* Mobile Navigation */
@media (max-width: 1100px) {
  .site-header__inner {
    flex-wrap: wrap;
    min-height: 80px;
  }

  .nav-toggle {
    display: block;
  }

  .site-header__nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding-bottom: var(--space-5);
  }

  .site-header.is-open .site-header__nav {
    display: flex;
  }

  .nav {
    flex-direction: column;
    align-items: stretch;
  }

  .nav__link {
    padding: 12px 0;
    border-top: 1px solid rgb(255 255 255 / 0.15);
  }

  .nav__submenu {
    position: static;
    min-width: 0;
    padding-left: var(--space-4);
    border: 0;
    box-shadow: none;
    visibility: visible;
    opacity: 1;
  }

  .nav__submenu .nav__link {
    padding: 10px 0;
  }

  .nav__item--has-sub > .nav__link::after {
    display: none;
  }

  /* mobil sind Untermenüs immer offen, der Oberpunkt ist nur Überschrift */
  .nav__sub-toggle {
    width: 100%;
    text-align: left;
    cursor: default;
  }
}

/* --- Buttons --- */
.button {
  display: inline-block;
  padding: 20px 40px;
  font-family: var(--font-body);
  font-size: var(--fs-button);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  text-align: center;
  color: var(--color-white);
  background-color: var(--color-primary);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}

.button:hover,
.button:focus-visible {
  color: var(--color-white);
  background-color: var(--color-primary-light);
  border-color: var(--color-primary-light);
}

/* Heller Button, z. B. auf Beere-Hintergrund („Mehr zum Ablauf“) */
.button--light {
  color: var(--color-primary);
  background-color: var(--color-bg);
  border-color: var(--color-bg);
}

/* Umrandeter Button */
.button--outline {
  color: var(--color-primary);
  background-color: transparent;
}

/* Kleiner, runder Umriss-Button (z. B. Links zu Musiker:innen) */
.button--pill {
  padding: 10px 20px;
  color: var(--color-primary);
  background-color: transparent;
  border: 3px solid var(--color-primary-light);
  border-radius: 30px;
  box-shadow: none;
}

.button--pill:hover,
.button--pill:focus-visible {
  color: var(--color-white);
  background-color: var(--color-primary-light);
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

@media (max-width: 921px) {
  .button { padding: 18px 32px; }
  .button--pill { padding: 10px 20px; }
}

@media (max-width: 544px) {
  .button { padding: 15px 28px; }
}

/* --- Trennlinie (kurze Linie über Sektionstiteln) --- */
.divider {
  width: 100px;
  height: 3px;
  margin: 0 0 var(--space-6);
  border: 0;
  background-color: var(--color-primary);
}

.divider--center {
  margin-inline: auto;
}

.section--primary .divider {
  background-color: var(--color-white);
}

/* --- Karten --- */
.card {
  padding: var(--space-5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

/* Feature-Karte mit Icon (z. B. „Aktives Zuhören“) */
.card__icon {
  width: 32px;
  height: 32px;
  margin-bottom: var(--space-3);
  fill: currentColor;
}

.card__title {
  margin: 0;
  font-size: var(--fs-h5);
  line-height: var(--lh-h5);
}

.card p {
  margin-top: var(--space-2);
  font-size: var(--fs-small);
  line-height: 1.7;
}

/* Ganze Karte als Link (z. B. Wegweiser auf der Startseite) */
.card--link {
  display: block;
  color: inherit;
  transition: border-color var(--transition), background-color var(--transition);
}

.card--link:hover,
.card--link:focus-visible {
  color: inherit;
  border-color: var(--color-primary);
}

.section--primary .card--link:hover,
.section--primary .card--link:focus-visible {
  color: var(--color-white);
  border-color: var(--color-white);
  background-color: rgb(255 255 255 / 0.06);
}

/* Linie-Icon in Karten (Strichgrafik statt Fläche) */
.card__icon--line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Weiße Infokarte auf hellem Grund (z. B. „Auf einen Blick“) */
.card--surface {
  background-color: var(--color-surface);
  border-radius: 0;
}

.card--surface h3 {
  margin: 0;
  font-size: var(--fs-h4);
  line-height: 1.3;
}

/* Eckdaten mit Icon (z. B. „Der Rahmen“: Dauer, Alter, Ort …)
   <ul class="facts"><li><svg class="facts__icon">…</svg>
   <div><strong class="facts__title">…</strong><p>…</p></div></li></ul> */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: var(--space-6) var(--space-8);
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.facts__icon {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  fill: currentColor;
}

.facts__title {
  display: block;
  margin-bottom: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--fs-h6);
  font-weight: var(--font-weight-semibold);
  line-height: var(--lh-h6);
  color: var(--color-heading);
}

.facts p {
  font-size: var(--fs-small);
  line-height: 1.7;
}

.section--primary .facts__title {
  color: var(--color-white);
}

/* Nummerierte Schritte (z. B. „Ablauf“) */
.steps {
  counter-reset: step;
  display: grid;
  gap: var(--space-4);
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  display: flex;
  gap: var(--space-4);
  align-items: baseline;
}

.steps li::before {
  content: counter(step);
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-family: var(--font-heading);
  font-size: var(--fs-h6);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  font-size: var(--fs-h5);
  transform: translateY(-2px);
}

/* Kleine Zusatzangabe, z. B. „Dauer: ca. 90 Minuten“ */
.meta {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
}

/* Nummerierte Schritte als Karten (z. B. Fortbildung → Beratung → Begleitung) */
.steps--cards li {
  align-items: center;
}

.steps--cards li::before {
  transform: none;
}

/* Variante: Karten mit Titel und kurzem Text (z. B. Fortbildung / Beratung / Begleitung)
   <ol class="… steps--cards steps--cards-text"><li class="card"><div><h3>…</h3><p>…</p></div></li></ol> */
.steps--cards-text li {
  align-items: flex-start;
}

/* Kartenreihe mit zentrierter letzter Zeile (z. B. „Sieben Märchen“) */
.cards-centered {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-5);
}

.cards-centered > * {
  flex: 0 1 14rem;
}

/* Nummerierte Karten in zentrierter Reihe: Zahl über dem Titel */
@media (min-width: 545px) {
  .cards-centered.steps--cards li {
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    text-align: center;
  }
}

@media (max-width: 544px) {
  .cards-centered > * {
    flex-basis: 100%;
  }
}

/* Variante: vier Karten pro Reihe (ab Tablet), letzte Reihe zentriert */
@media (min-width: 922px) {
  .cards-centered--4 > * {
    flex: 0 0 calc((100% - 3 * var(--space-5)) / 4);
    min-width: 0;
  }
}

/* Variante: drei Karten pro Reihe (ab Tablet) */
@media (min-width: 922px) {
  .cards-centered--3 > * {
    flex: 0 0 calc((100% - 2 * var(--space-5)) / 3);
    min-width: 0;
  }
}

/* Liste ohne Aufzählungszeichen und Einrückung */
.list-plain {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Kurze Aufzählung mit Gedankenstrich (z. B. in Karten: „einzelne Lehrkräfte – Jahrgangsteams …“) */
.list-dash {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-dash li {
  position: relative;
  padding-left: 1.25em;
}

.list-dash li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

/* Variante mit etwas Abstand zwischen den Punkten (längere Einträge) */
.list-dash--spaced li + li {
  margin-top: var(--space-2);
}

/* Variante mit kleinen runden Punkten statt Gedankenstrich */
.list-dash--dots li::before {
  content: "";
  top: 0.7em;
  left: 0.2em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--color-primary);
}

/* innerhalb nummerierter Karten (.steps) nicht mitzählen */
.steps .list-dash li {
  counter-increment: none;
  display: block;
}

/* in Karten so groß wie der Kartentext */
.card .list-dash {
  margin-top: var(--space-2);
  font-size: var(--fs-small);
  line-height: 1.7;
}

.steps .list-dash li::before {
  content: "–";
  display: inline;
  width: auto;
  height: auto;
  top: 0;
  background: none;
  border-radius: 0;
  font: inherit;
  color: var(--color-primary);
  transform: none;
}

/* Aufzählung mit Punkten auf Beere */
.list {
  margin: 0;
  padding-left: 1.2em;
}

.list li + li {
  margin-top: var(--space-1);
}

/* Bild-Teaser: Bild oben, Titel und Text darunter (z. B. „Für welche Anlässe“) */
.teaser img {
  margin-bottom: var(--space-5);
}

.teaser h3 {
  margin-bottom: var(--space-3);
  font-size: var(--fs-h5);
  line-height: 1.3;
}

.teaser p {
  font-size: var(--fs-small);
  line-height: 1.7;
}

/* Mehrere Absätze in einer Karte: kleinerer Abstand als im Fließtext */
.teaser p:not(:last-child) {
  margin-bottom: var(--space-3);
}

/* Zentriertes Zitat mit Bericht (z. B. Kundenbericht) */
.quote {
  max-width: var(--text-max);
  margin-inline: auto;
  text-align: center;
}

.quote blockquote {
  margin: 0 0 var(--space-6);
  font-size: 1.1em;
  font-style: italic;
  color: var(--color-heading);
}

.quote__text p {
  margin-bottom: var(--space-3);
}

/* Erfahrungsbericht / Referenz
   <figure class="testimonial"><blockquote>…</blockquote>
   <figcaption class="testimonial__author">…</figcaption></figure> */
.testimonial {
  margin: 0;
  padding: var(--space-8);
  background-color: var(--color-surface);
  border: 1px solid var(--border-color);
  border-radius: 0;
}

.testimonial blockquote {
  margin: 0;
}

.testimonial blockquote p {
  margin-bottom: var(--space-3);
}

.testimonial__author {
  margin: var(--space-5) 0 0;
  font-family: var(--font-heading);
  font-size: var(--fs-h6);
  font-weight: var(--font-weight-semibold);
  line-height: var(--lh-h6);
  color: var(--color-heading);
}

@media (max-width: 544px) {
  .testimonial { padding: var(--space-5); }
}

/* Weiße Karte mit großem weichem Schatten (Kontaktformular) */
.panel {
  padding: 35px 75px;
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

@media (max-width: 921px) {
  .panel { padding: var(--space-6) var(--space-5); }
}

/* --- Checkliste (Häkchen-Spalten, z. B. „Feste märchenhaft feiern“) ---
   <ul class="checklist"><li><strong class="checklist__title">…</strong>
   <p>optionaler Text</p></li></ul> */
.checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  font-size: var(--fs-small);
  line-height: 1.7;
}

.checklist__title {
  display: block;
  margin-bottom: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--fs-h6);
  font-weight: var(--font-weight-semibold);
  line-height: var(--lh-h6);
  color: var(--color-heading);
}

.section--primary .checklist__title,
.section--primary .checklist li::before {
  color: var(--color-white);
}

.section--primary .checklist li::before {
  background-color: var(--color-white);
}

.checklist li::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  margin-bottom: var(--space-4);
  background-color: var(--color-heading);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Variante: eigenes Strich-Symbol statt Häkchen (z. B. „Märchen auf Feiern“)
   <ul class="checklist checklist--icons"><li><svg class="checklist__icon" viewBox="0 0 24 24">…</svg>
   <strong class="checklist__title">…</strong></li></ul> */
.checklist--icons li::before {
  content: none;
}

.checklist__icon {
  display: block;
  width: 28px;
  height: 28px;
  margin-bottom: var(--space-4);
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section--primary .checklist__icon {
  stroke: var(--color-white);
}

/* --- Formular --- */
.form {
  display: grid;
  gap: var(--space-6);
}

.form__field {
  display: grid;
  gap: var(--space-1);
}

.form__label {
  font-size: 1rem;
  font-weight: var(--font-weight-regular);
  color: var(--color-form-text);
}

.form__label .required {
  color: var(--color-error);
}

.form__hint {
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--color-form-muted);
}

.form__input,
.form__textarea,
.form__select {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-form-text);
  background-color: var(--color-form-bg);
  border: 1px solid var(--color-form-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition);
}

.form__textarea {
  min-height: 120px;
  resize: vertical;
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgb(153 32 84 / 0.15);
}

.form__check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: 1rem;
  color: var(--color-form-text);
}

.form__check input {
  margin-top: 0.3em;
  accent-color: var(--color-primary);
}

.form__error {
  font-size: var(--fs-small);
  color: var(--color-error);
}

/* Spam-Schutzfeld: für Menschen unsichtbar */
.form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Meldung über dem Formular (z. B. „Bitte füllen Sie alle Pflichtfelder aus“) */
.form__status {
  margin-bottom: var(--space-5);
  padding: var(--space-3) var(--space-4);
  font-size: 1rem;
  color: var(--color-error);
  background-color: rgb(220 38 38 / 0.06);
  border-left: 4px solid var(--color-error);
  border-radius: var(--radius-sm);
}

/* --- Kurzformular: E-Mail-Feld + Button in einer Zeile (z. B. Zugang anfordern) --- */
.signup {
  display: grid;
  gap: var(--space-3);
  max-width: 560px;
  margin-inline: auto;
  text-align: left;
}

.signup__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.signup__row .form__input {
  flex: 1 1 240px;
  width: auto;
}

.section--primary .signup .form__input {
  background-color: var(--color-white);
  border-color: transparent;
}

.section--primary .form__check,
.section--primary .form__check a {
  color: var(--color-white);
}

.section--primary .form__check a {
  text-decoration: underline;
}

/* --- Footer --- */
.site-footer {
  padding: var(--space-4) 0;
  font-size: var(--fs-body);
  text-align: center;
  background-color: var(--color-surface);
  border-top: 1px solid var(--border-color);
}

.site-footer__nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
}

/* --- Nach-oben-Button --- */
.scroll-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 99;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-size: 15px;
  color: var(--color-white);
  background-color: var(--color-primary);
  border-radius: 2px;
}

.scroll-top:hover {
  color: var(--color-white);
  background-color: var(--color-primary-light);
}


/* 7. Hilfsklassen
   ========================================================================== */

.text-center  { text-align: center; }
.text-white   { color: var(--color-white); }
.text-primary { color: var(--color-primary); }
.text-heading { color: var(--color-heading); }

.bg-primary { background-color: var(--color-primary); }
.bg-page    { background-color: var(--color-bg); }
.bg-surface { background-color: var(--color-surface); }

.max-text { max-width: var(--text-max); margin-inline: auto; }

/* Abstände (Werte aus dem 8er-Raster, siehe --space-*).
   !important, damit Hilfsklassen immer vor Komponenten-Regeln gelten. */
.mt-0 { margin-top: 0 !important; }
.mt-5 { margin-top: var(--space-5) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mt-8 { margin-top: var(--space-8) !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-3 { margin-bottom: var(--space-3) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }
.mb-7 { margin-bottom: var(--space-7) !important; }
.mb-8 { margin-bottom: var(--space-8) !important; }

.text-italic { font-style: italic; }

/* Textbreite begrenzen, ohne zu zentrieren */
.measure { max-width: var(--text-max); }

/* Sektion ohne Abstand oben (schließt direkt an die vorherige gleichfarbige an) */
.section--flush-top { padding-top: 0; }

/* Spalten oben bündig statt mittig (z. B. Überschrift links, langer Text rechts) */
.split--top { align-items: start; }

/* Raster mit größerem Abstand */
.grid--spacious { gap: var(--space-8); }

/* Linie direkt unter einer Kartenüberschrift (Formular-Box) */
.panel > h3 + .divider { margin-top: var(--space-4); }

/* Postanschrift ohne kursive Standarddarstellung */
.address { font-style: normal; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
