:root {
  --rand: clamp(24px, 5vw, 100px);
  --inhalt: 1560px;
  --violett: #443185;
  --violett-tief: #2E2160;
  --gelb: #F7EC7E;
  --koralle: #E65868;
}

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

html { scroll-behavior: smooth; }

/* Der Inhalt sitzt in einem Container, Farbflächen laufen randlos. */
.ck-seite > div > header,
.ck-seite > div > section,
.ck-seite > div > footer { padding-left: 0 !important; padding-right: 0 !important; }

.ck-seite > div > header > .ck-wrap,
.ck-seite > div > section > .ck-wrap,
.ck-seite > div > footer > .ck-wrap {
  max-width: var(--inhalt);
  margin: 0 auto;
  padding-left: var(--rand);
  padding-right: var(--rand);
}

/* Bilder und Schleier in randlosen Abschnitten füllen die Breite. */
.ck-seite img[data-voll], .ck-seite div[data-voll] { width: 100% !important; }

/* Lange Wörter — „Sonntagsfrühstück", „Barockklänge" — trennen statt über den Rand laufen.
   Silbentrennung nach lang="de"; overflow-wrap fängt ab, was die Trennung nicht schafft. */
.ck-seite h1, .ck-seite h2, .ck-seite h3 {
  -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 10 4 4;
  overflow-wrap: break-word;
}

/* --------- Kopfzeile: klebt und blendet die 700 ein --------- */
.ck-kopf {
  position: sticky; top: 0; z-index: 40;
  transition: box-shadow .25s ease;
}
.ck-kopf .ck-marke { opacity: 0; transform: translateY(-6px); transition: opacity .3s ease, transform .3s ease; }
.ck-kopf.ist-gescrollt { box-shadow: 0 6px 24px rgba(30, 24, 51, .09); }
.ck-kopf.ist-gescrollt .ck-marke { opacity: 1; transform: none; }
.ck-unterseite .ck-kopf .ck-marke { opacity: 1; transform: none; }

/* --------- Auftakt --------- */
.ck-auftakt {
  position: fixed; left: 0; right: 0; top: 92px;
  height: calc(100vh - 92px);
  background: var(--violett);
  z-index: 30;
  overflow: hidden;
  display: block;
}
.ck-auftakt-signet {
  position: absolute; color: var(--gelb);
  transform-origin: top left;
  will-change: transform;
}
.ck-auftakt-pfeil { position: absolute; top: 40px; right: 56px; width: 62px; height: 65px; color: var(--gelb); }

/* Der Banner schiebt sich nach. */
.ck-banner-ein { opacity: 0; transform: translateY(60px); }

/* --------- Zustände von Hand --------- */
.ck-hover-heben { transition: transform .2s ease, box-shadow .2s ease; }
.ck-hover-heben:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(30, 24, 51, .13); }
.ck-seite a { transition: color .15s ease, background-color .15s ease, border-color .15s ease; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ck-kopf .ck-marke, .ck-banner-ein { transition: none; }
}

/* --------- Bannerrotor: immer nur eine Ankündigung sichtbar --------- */
.ck-rotor { position: relative; }
.ck-rotor > section { transition: opacity .8s ease; }
.ck-rotor-punkte {
  position: absolute; left: 0; right: 0; bottom: 26px;
  display: flex; justify-content: center; gap: 9px;
  pointer-events: none;
}
.ck-rotor-punkte span {
  width: 12px; height: 5px; border-radius: 999px;
  background: #FFFFFF; opacity: .4; transition: opacity .4s ease, width .4s ease;
}
.ck-rotor-punkte span.ist-vorn { width: 30px; opacity: 1; background: #F7EC7E; }

@media (prefers-reduced-motion: reduce) {
  .ck-rotor > section { transition: none; }
}

/* Sprungmarken nicht unter die klebende Kopfzeile schieben */
.ck-gruppe { scroll-margin-top: 112px; }
/* Der Menüpunkt „Regelmäßige Angebote" springt auf die Kacheln — nicht unter die Kopfzeile */
#angebote { scroll-margin-top: 40px; }

/* --------- Navigation: aktueller Punkt und Hover --------- */
.ck-kopf nav a { transition: border-color .15s ease, color .15s ease; }
.ck-kopf nav a:hover { border-bottom-color: #8F82C0; }

/* ============================================================
   Schmale Schirme
   Die Seiten tragen ihre Maße als Inline-Stil; eine Media Query
   kommt nur mit !important dagegen an. Diese Ebene bricht das
   Desktop-Layout um, sie ersetzt keine saubere Stylesheet-Fassung.
   ============================================================ */
@media (max-width: 860px) {
  :root { --rand: 20px; }

  /* Kopfzeile: Navigation weicht dem Menü-Knopf */
  .ck-kopf .ck-wrap { height: 70px !important; gap: 12px !important; }
  .ck-kopf nav { display: none !important; }
  .ck-kopf svg[role="img"] { width: 164px !important; height: 48px !important; }
  .ck-kopf .ck-marke { width: auto !important; }
  .ck-kopf .ck-marke svg { width: 70px !important; height: 24px !important; }
  .ck-menue { display: flex !important; }

  /* Alles, was nebeneinander steht, untereinander */
  .ck-seite section > .ck-wrap,
  .ck-seite footer > .ck-wrap { flex-direction: column !important; align-items: flex-start !important; }
  .ck-seite [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .ck-seite [style*="display: flex"][style*="gap: 80px"],
  .ck-seite [style*="display: flex"][style*="gap: 70px"],
  .ck-seite [style*="display: flex"][style*="gap: 60px"],
  .ck-seite [style*="display: flex"][style*="gap: 44px"],
  .ck-seite [style*="display: flex"][style*="gap: 36px"],
  .ck-seite [style*="display: flex"][style*="gap: 30px"] { flex-direction: column !important; align-items: flex-start !important; gap: 24px !important; }

  /* Feste Breiten aufheben — alles ab 340 px sprengt sonst die Spalte */
  .ck-seite [style*="width: 340px"],
  .ck-seite [style*="width: 388px"],
  .ck-seite [style*="width: 404px"],
  .ck-seite [style*="width: 420px"],
  .ck-seite [style*="width: 440px"],
  .ck-seite [style*="width: 460px"],
  .ck-seite [style*="width: 470px"],
  .ck-seite [style*="width: 500px"],
  .ck-seite [style*="width: 520px"],
  .ck-seite [style*="width: 560px"],
  .ck-seite [style*="width: 620px"],
  .ck-seite [style*="width: 640px"],
  .ck-seite [style*="width: 700px"],
  .ck-seite [style*="width: 720px"],
  .ck-seite [style*="width: 760px"],
  .ck-seite [style*="width: 780px"],
  .ck-seite [style*="width: 800px"],
  .ck-seite [style*="width: 840px"],
  .ck-seite aside { width: 100% !important; max-width: 100% !important; flex-shrink: 1 !important; }
  .ck-seite [style*="max-width: 1560px"] { max-width: 100% !important; }

  /* Banner: keine feste Höhe, Text unter dem Bild */
  .ck-rotor { height: auto !important; }
  .ck-rotor > section { position: relative !important; }
  .ck-rotor > section[style*="opacity: 0"] { display: none !important; }
  .ck-seite section[style*="height: 540px"],
  .ck-seite section[style*="height: 500px"],
  .ck-seite section[style*="height: 460px"],
  .ck-seite section[style*="height: 440px"],
  .ck-seite section[style*="height: 400px"],
  .ck-seite section[style*="height: 232px"] { height: auto !important; }
  .ck-seite section > .ck-wrap[style*="height: 100%"] { height: auto !important; padding-top: 32px !important; padding-bottom: 36px !important; }
  /* Textblöcke behalten sonst die Bannerhöhe und reißen eine Lücke */
  .ck-seite section .ck-wrap div[style*="height: 540px"],
  .ck-seite section .ck-wrap div[style*="height: 500px"],
  .ck-seite section .ck-wrap div[style*="height: 460px"],
  .ck-seite section .ck-wrap div[style*="height: 440px"],
  .ck-seite section .ck-wrap div[style*="height: 400px"] { height: auto !important; }
  /* Randlose Bilder und ihre Träger aus der absoluten Lage holen */
  .ck-seite section > img[style*="position: absolute"],
  .ck-seite section > div[style*="position: absolute"]:not([style*="opacity"]) {
    position: relative !important; top: auto !important; right: auto !important; left: auto !important;
    width: 100% !important; height: auto !important; overflow: visible !important;
  }
  .ck-seite section > img[style*="position: absolute"],
  .ck-seite section > div[style*="position: absolute"]:not([style*="opacity"]) img { height: 260px !important; width: 100% !important; object-fit: cover !important; }
  .ck-seite section > div[style*="position: absolute"]:not([style*="opacity"]) > svg[aria-hidden] { top: 16px !important; right: 16px !important; }
  .ck-seite div[style*="position: absolute"][style*="opacity: 0.7"],
  .ck-seite div[style*="position: absolute"][style*="opacity: 0.66"],
  .ck-seite div[style*="position: absolute"][style*="opacity: 0.62"],
  .ck-seite div[style*="position: absolute"][style*="opacity: 0.14"] { display: none !important; }
  .ck-seite section:has(> img) > .ck-wrap { background: #241C42 !important; }

  /* Eckmarken kleiner und aus dem Weg */
  .ck-seite svg[aria-hidden="true"][style*="position: absolute"] { width: 38px !important; height: 40px !important; top: 16px !important; right: 16px !important; }

  .ck-seite section[style*="align-items: stretch"] > .ck-wrap { flex-direction: column !important; }
  .ck-seite section > .ck-wrap > div[style*="padding: 72px 80px 76px 100px"] { padding: 0 !important; }

  /* Der Streifen: Signet kleiner, alles untereinander */
  .ck-seite section[style*="background: #443185"] > .ck-wrap svg[role="img"] { width: 150px !important; height: 115px !important; }

  /* Schriftgrößen */
  .ck-seite h1 { font-size: clamp(30px, 8vw, 40px) !important; }
  .ck-seite h2[style*="font-size: 56px"], .ck-seite h2[style*="font-size: 52px"],
  .ck-seite h2[style*="font-size: 50px"], .ck-seite h2[style*="font-size: 46px"],
  .ck-seite h2[style*="font-size: 44px"], .ck-seite h2[style*="font-size: 40px"],
  .ck-seite h2[style*="font-size: 36px"], .ck-seite h2[style*="font-size: 34px"],
  .ck-seite h2[style*="font-size: 32px"], .ck-seite h2[style*="font-size: 30px"],
  .ck-seite h2[style*="font-size: 28px"] { font-size: clamp(26px, 7vw, 32px) !important; }
  .ck-seite h3[style*="font-size: 30px"], .ck-seite h3[style*="font-size: 28px"],
  .ck-seite h3[style*="font-size: 27px"], .ck-seite h3[style*="font-size: 26px"],
  .ck-seite h3[style*="font-size: 24px"], .ck-seite h3[style*="font-size: 23px"] { font-size: 22px !important; }

  /* Terminzeilen: Datum über den Text */
  .ck-seite a[data-termin] { flex-direction: column !important; align-items: flex-start !important; gap: 14px !important; }
  .ck-seite a[data-termin] > svg { display: none !important; }
  /* Kacheln tragen ebenfalls data-termin, sind aber keine Zeilen: Bildträger auf volle
     Breite, sonst fällt das Bild auf sein Eigenformat zurück und steht linksbündig. */
  .ck-seite a[data-termin][style*="min-height: 428px"] { align-items: stretch !important; }
  .ck-seite a[data-termin][style*="min-height: 428px"]:has(> div > img) { gap: 0 !important; }

  /* Kacheln und Bildfelder */
  .ck-seite [style*="height: 196px"], .ck-seite [style*="height: 240px"],
  .ck-seite [style*="height: 260px"] { height: 200px !important; }
  .ck-seite [style*="min-height: 428px"] { min-height: 0 !important; }

  /* Hinweiskästen mit weiter Aufteilung untereinander */
  .ck-seite section [style*="justify-content: space-between"][style*="gap: 40px"] {
    flex-direction: column !important; align-items: flex-start !important; gap: 18px !important;
  }

  /* Fußbereich */
  .ck-seite footer .ck-wrap > div { flex-direction: column !important; gap: 30px !important; }
}

/* Der Menü-Knopf existiert nur auf schmalen Schirmen */
.ck-menue {
  display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 46px; height: 46px; padding: 0; border: 0; border-radius: 999px;
  background: #F5F2FB; cursor: pointer; flex-shrink: 0;
}
.ck-menue span { display: block; width: 20px; height: 2.5px; border-radius: 2px; background: #443185; transition: transform .2s ease, opacity .2s ease; }
.ck-menue:focus-visible { outline: 3px solid #443185; outline-offset: 2px; }
/* offen: aus den drei Strichen wird ein Kreuz (Strich 2,5 px + Abstand 6 px = 8,5 px) */
.ck-menue[aria-expanded="true"] span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.ck-menue[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.ck-menue[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* Das aufgeklappte Menü: eine Fläche unter der Kopfzeile, die den Rest des Schirms füllt.
   top setzt ck.js auf die Unterkante der Kopfzeile. */
.ck-menue-feld {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 39;
  overflow-y: auto; background: #FFFFFF;
  padding: 8px var(--rand) 48px;
  animation: ck-menue-ein .2s ease;
}
.ck-menue-feld[hidden] { display: none; }
.ck-menue-feld nav { display: flex; flex-direction: column; }
.ck-menue-feld a {
  display: flex; align-items: center; min-height: 64px; padding: 12px 0;
  border-bottom: 1px solid #E2DDF0;
  font-size: 24px; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em;
  color: #1E1833; text-decoration: none;
}
.ck-menue-feld a:hover { color: #443185; }
/* der aktuelle Punkt: Violett und Unterstreichung, wie in der Kopfzeile */
.ck-menue-feld a[aria-current="page"] {
  color: #443185; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px;
}
.ck-menue-feld a:focus-visible { outline: 3px solid #443185; outline-offset: -3px; }
html.ist-menue-offen { overflow: hidden; }
@keyframes ck-menue-ein { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ck-menue-feld { animation: none; }
  .ck-menue span { transition: none; }
}
@media (min-width: 861px) { .ck-menue-feld { display: none !important; } }

@media (max-width: 360px) {
  :root { --rand: 16px; }
  .ck-kopf .ck-wrap { gap: 8px !important; }
  .ck-kopf svg[role="img"] { width: 132px !important; height: 39px !important; }
  .ck-kopf .ck-marke svg { width: 58px !important; height: 20px !important; }
}
