/* ============================================
   WURZELKINDER – Glas-Seitenmenü
   Liegt NACH style.css (und zeitung.css) und überschreibt nur,
   was für das Menü nötig ist. Farben/Schriften kommen aus style.css.
   ============================================ */

:root {
  --gm-w: 296px;                       /* Breite der Leiste, offen */
  --gm-gap: 20px;                      /* Abstand links, oben, unten */
  --gm-inset: calc(var(--gm-w) + 76px);/* Textabstand von links: Leistenbreite + 76 px */
  --gm-dur: 320ms;
  --gm-ease: var(--ease-in-out, cubic-bezier(0.77, 0, 0.175, 1));
  --gm-text: var(--forest-dark, #203327);
}

html.gm-collapsed { --gm-w: 84px; }    /* eingeklappt */

/* ---------- Hilfsklassen ---------- */

.gm-sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Eingebettet (Kinderschutz-Popup als iframe): kein Menü, kein Textabstand */
html.gm-embedded .gm-root { display: none; }

@media print { .gm-root { display: none; } }

/* ---------- Glas (gemeinsam für Leiste und runde Knöpfe) ----------
   Verlauf wie vorgegeben. Darunter liegt eine dünne Aufhellungsschicht,
   damit der Text auch über den dunkelgrünen Flächen und dem Film
   mindestens 4,5:1 erreicht (gemessen: 5,0:1 selbst über reinem Schwarz). */

.gm,
.gm-burger,
.gm-call {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 252, 244, .38) 50%, rgba(255, 255, 255, .5)),
    rgba(255, 252, 246, .40);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 24px 60px rgba(40, 60, 30, .3);
}

/* Fallbacks: fast deckender Hintergrund */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .gm, .gm-burger, .gm-call { background: rgba(255, 252, 246, .96); }
}
@media (prefers-reduced-transparency: reduce) {
  .gm, .gm-burger, .gm-call {
    background: rgba(255, 252, 246, .96);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (prefers-contrast: more) {
  .gm, .gm-burger, .gm-call {
    background: rgba(255, 252, 246, .96);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-color: rgba(32, 51, 39, .55);
  }
}

/* ---------- Leiste ---------- */

.gm {
  position: fixed;
  z-index: 300;
  top: max(var(--gm-gap), env(safe-area-inset-top));
  left: max(var(--gm-gap), env(safe-area-inset-left));
  bottom: max(var(--gm-gap), env(safe-area-inset-bottom));
  width: var(--gm-w);
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-radius: 34px;
  color: var(--gm-text);
  font-family: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: width var(--gm-dur) var(--gm-ease);
}

.gm svg { display: block; flex-shrink: 0; }

/* Kopf: Logo + Name */
.gm-head {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 4px 10px 12px;
}

.gm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border-radius: 999px;
  color: var(--gm-text);
  text-decoration: none;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.1;
}

.gm-brand img {
  width: auto;
  height: 38px;
  object-fit: contain;
}

/* Liste */
.gm-nav {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.gm-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0 -14px;
  padding: 6px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(32, 51, 39, .3) transparent;
  overscroll-behavior: contain;
}

.gm-group + .gm-group { margin-top: 10px; }

.gm-title {
  margin: 0;
  padding: 14px 10px 6px;
  border-top: 1px solid rgba(32, 51, 39, .16);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gm-text);
  white-space: nowrap;
}

.gm-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.gm-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--gm-text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.gm-chip {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  transition: background-color 180ms ease;
}

.gm-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

@media (hover: hover) and (pointer: fine) {
  .gm-item:hover { background: rgba(31, 42, 34, .08); }
}
.gm-item:active { background: rgba(31, 42, 34, .12); }

/* Aktiver Punkt */
.gm-item[aria-current] {
  background: var(--forest, #2f4a3c);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 22px -10px rgba(32, 51, 39, .6);
}
.gm-item[aria-current] .gm-chip { background: rgba(255, 255, 255, .18); }

/* Sichtbarer Fokus */
.gm a:focus-visible,
.gm button:focus-visible,
.gm-burger:focus-visible,
.gm-call:focus-visible {
  outline: 3px solid var(--forest-dark, #203327);
  outline-offset: 2px;
}
.gm-item:focus-visible { outline-offset: -1px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9); }

/* Knopf unten */
.gm-foot { padding-top: 10px; }

.gm-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--terracotta-dark, #a85634);   /* weiß darauf: 5,2:1 */
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 14px 28px -12px rgba(168, 86, 52, .85);
  touch-action: manipulation;
  transition: transform 160ms var(--ease-out, ease), background-color 180ms ease;
}
.gm-cta .gm-chip { background: rgba(255, 255, 255, .2); }
.gm-cta:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .gm-cta:hover { background: #8e4629; }
}
.gm a.gm-cta:focus-visible { outline-color: var(--forest-dark, #203327); box-shadow: 0 0 0 2px #fff; outline-offset: 2px; }

/* Einklapp-Knopf am rechten Rand */
.gm-collapse {
  position: absolute;
  top: 31px;
  right: -17px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: var(--gm-text);
  box-shadow: 0 6px 16px rgba(40, 60, 30, .28);
  cursor: pointer;
  touch-action: manipulation;
}
.gm-collapse svg { transition: transform var(--gm-dur) var(--gm-ease); }
html.gm-collapsed .gm-collapse svg { transform: rotate(180deg); }

.gm-tip {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--forest-dark, #203327);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}
.gm-collapse:hover .gm-tip,
.gm-collapse:focus-visible .gm-tip { opacity: 1; }

/* Nur Mobil sichtbar */
.gm-close, .gm-burger, .gm-call, .gm-backdrop { display: none; }

/* Link zum Überspringen */
.gm-skip {
  position: fixed;
  z-index: 400;
  left: 12px;
  top: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--forest-dark, #203327);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.gm-skip:focus { transform: none; outline: 3px solid #fff; outline-offset: 2px; }

/* ---------- Eingeklappt (nur Desktop/Tablet) ---------- */

@media (min-width: 761px) {

  html.gm-collapsed .gm-head { justify-content: center; padding-left: 0; padding-right: 0; }
  html.gm-collapsed .gm-brand { gap: 0; }

  /* Beschriftungen bleiben für Screenreader da, sind aber nicht sichtbar */
  html.gm-collapsed .gm-label,
  html.gm-collapsed .gm-brand-name {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  /* Gruppentitel bleiben klein stehen */
  html.gm-collapsed .gm-title {
    padding: 12px 0 4px;
    font-size: 9px;
    letter-spacing: .02em;
    text-align: center;
  }

  html.gm-collapsed .gm-cta { justify-content: center; padding: 0; width: 56px; margin: 0 auto; }
}

/* ---------- Seiteninhalt unter der Leiste ----------
   Hintergründe (Hero, farbige Flächen) laufen in voller Breite durch.
   Nur der Text rückt ein: Leistenbreite + 76 px, bewegt sich beim Ein-/Ausklappen mit. */

@media (min-width: 761px) {
  html:not(.gm-embedded) .container {
    max-width: calc(var(--max-width, 1160px) - 28px + var(--gm-inset));
    padding-left: var(--gm-inset);
    padding-right: max(28px, env(safe-area-inset-right));
    transition: padding-left var(--gm-dur) var(--gm-ease), max-width var(--gm-dur) var(--gm-ease);
  }
  html:not(.gm-embedded) .legal-page .container {
    max-width: calc(792px + var(--gm-inset));
  }
  /* Zwei Abschnitte setzen max-width direkt im HTML */
  html:not(.gm-embedded) .container.text-center {
    max-width: calc(732px + var(--gm-inset)) !important;
  }
}

/* ---------- Handy (bis 760 px): Schublade von links ---------- */

@media (max-width: 760px) {

  .gm-burger,
  .gm-call {
    position: fixed;
    z-index: 200;
    top: max(12px, env(safe-area-inset-top));
    width: 48px;
    height: 48px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--gm-text);
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
  }
  .gm-burger { left: max(12px, env(safe-area-inset-left)); }
  .gm-call { right: max(12px, env(safe-area-inset-right)); }
  .gm-burger svg, .gm-call svg { display: block; }

  .gm-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 290;
    background: rgba(20, 30, 24, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 240ms ease, visibility 0s linear 240ms;
  }
  html.gm-open .gm-backdrop {
    opacity: 1;
    visibility: visible;
    transition: opacity 240ms ease, visibility 0s;
  }

  .gm {
    top: max(12px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: min(296px, calc(100vw - 52px));
    transform: translateX(calc(-100% - 24px));
    visibility: hidden;
    transition: transform 300ms var(--gm-ease), visibility 0s linear 300ms;
  }
  html.gm-open .gm {
    transform: none;
    visibility: visible;
    transition: transform 300ms var(--gm-ease), visibility 0s;
  }
  html.gm-open body { overflow: hidden; }

  .gm-collapse { display: none; }

  .gm-head { justify-content: space-between; }
  .gm-close {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    color: var(--gm-text);
    cursor: pointer;
    touch-action: manipulation;
  }
}

/* ---------- Bewegung reduzieren: keine Übergänge ---------- */

@media (prefers-reduced-motion: reduce) {
  .gm, .gm *, .gm-burger, .gm-call, .gm-backdrop,
  html:not(.gm-embedded) .container {
    transition: none !important;
    animation: none !important;
  }
}

/* Handy: oben Luft für die runden Knöpfe (ersetzt die frühere feste Kopfzeile) */
@media (max-width: 760px) {
  html:not(.gm-embedded) main { margin-top: 36px; }
}
