/* ===================================================================
   Kreativ-Koch-Workshop: Deine Wunderbox – Stylesheet
   Warme, freundliche, seriöse NGO-/Stiftungs-Anmutung.
   Mobile-first, keine externen Fonts (schnelle Ladezeit).
   =================================================================== */

/* --- Design-Tokens (zentral anpassbar) --------------------------- */
:root {
  /* Farbwelt: warme Orange-/Gelb-Töne, Weiß, Creme, sanftes Grün */
  --orange:        #e8772e;
  --orange-dark:   #cf631e;
  --yellow:        #f4b13e;
  --green:         #7aa861;
  --green-dark:    #5f8a4a;
  --cream:         #fbf5ea;
  --cream-2:       #f5ebd9;    /* leicht dunklere Creme-Variante */
  --white:         #ffffff;
  --ink:           #3a2f25;    /* dunkler Text */
  --ink-soft:      #6f6354;
  --line:          #e7dcc8;    /* sanfte Trennlinien */

  --radius:        16px;
  --radius-sm:     10px;
  --shadow:        0 6px 24px rgba(58, 47, 37, 0.08);
  --shadow-hover:  0 10px 30px rgba(58, 47, 37, 0.14);
  --maxw:          1100px;
  --maxw-narrow:   760px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

/* --- Reset / Basis ------------------------------------------------ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
/* Anker nicht unter der fixen Navigation verschwinden lassen */
section[id], [id="footer"] { scroll-margin-top: 84px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--orange-dark); }

/* [hidden] muss zuverlässig verstecken, auch wenn ein Element ein eigenes display hat */
[hidden] { display: none !important; }

h1, h2, h3 { line-height: 1.2; color: var(--ink); }

/* --- Layout-Helfer ------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}
.container--narrow { max-width: var(--maxw-narrow); }

.section { padding: 64px 0; }
.section--alt { background: var(--cream); }

.section__title {
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.2rem);
  margin: 0 0 8px;
}
.section__title::after {
  content: "";
  display: block;
  width: 56px; height: 4px;
  background: var(--yellow);
  border-radius: 4px;
  margin-top: 12px;
}
.section__intro { color: var(--ink-soft); margin-top: 0; }

.lead { font-size: 1.1rem; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.875rem; }

/* ===================================================================
   NAVIGATION
   =================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
/* Klasse wird per JS gesetzt, sobald man scrollt */
.site-header.is-scrolled { box-shadow: var(--shadow); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 12px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark { font-size: 1.4rem; }

.nav__menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.nav__menu a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav__menu a:hover { background: var(--cream); }

.nav__cta {
  background: var(--orange);
  color: var(--white) !important;
}
.nav__cta:hover { background: var(--orange-dark) !important; }

/* Burger */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 22px; height: 2px;
  margin-inline: auto;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================================================================
   BUTTONS
   =================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--orange); color: var(--white); }
.btn--primary:hover { background: var(--orange-dark); box-shadow: var(--shadow-hover); }

.btn--secondary { background: var(--green); color: var(--white); }
.btn--secondary:hover { background: var(--green-dark); box-shadow: var(--shadow-hover); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--white); border-color: var(--orange); color: var(--orange-dark); }

.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled {
  background: var(--line);
  color: var(--ink-soft);
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}

/* ===================================================================
   HERO
   =================================================================== */
.hero {
  /* Echtes Hero-Foto (Regenbogen aus Obst & Gemüse) mit hellem Creme-Overlay,
     damit der dunkle Text gut lesbar bleibt. Fehlt die Datei, greift der Verlauf. */
  background:
    linear-gradient(150deg, rgba(251,245,234,0.90) 0%, rgba(253,233,207,0.82) 55%, rgba(251,245,234,0.78) 100%),
    url("assets/images/hero.jpg") center/cover no-repeat,
    linear-gradient(160deg, var(--cream) 0%, #fde9cf 100%);
  border-bottom: 1px solid var(--line);
}
.hero__inner { padding: 72px 20px 80px; }
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--orange-dark);
  margin: 0 0 12px;
}
.hero__title {
  font-size: clamp(2rem, 1.3rem + 3.4vw, 3.4rem);
  margin: 0 0 12px;
}
.hero__subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1rem + 0.8vw, 1.5rem);
  color: var(--green-dark);
  margin: 0 0 16px;
}
.hero__text { max-width: 620px; font-size: 1.1rem; margin: 0 0 24px; }

.hero__facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
  padding: 0;
}
.hero__facts li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ===================================================================
   KARTEN-RASTER / TERMINE
   =================================================================== */
.cards { display: grid; gap: 20px; }
.cards--2 { grid-template-columns: repeat(2, 1fr); }

.slot-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}
.slot-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.slot-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.slot-card__head h3 { margin: 0; font-size: 1.3rem; }
.slot-card__time { font-size: 1.15rem; font-weight: 700; margin: 4px 0; }
.slot-card__cap { color: var(--ink-soft); margin: 0 0 4px; }
.slot-card__count { font-weight: 600; color: var(--green-dark); margin: 0 0 16px; min-height: 1.2em; }

/* Status-Badge */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #e7f1df;
  color: var(--green-dark);
  white-space: nowrap;
}
.badge.is-full { background: #f6e0d8; color: #b34a2b; }

/* Ausgebuchte Karte sichtbar abdämpfen */
.slot-card.is-full { opacity: 0.85; }

.note {
  margin-top: 24px;
  text-align: center;
  color: var(--ink-soft);
  font-style: italic;
}

/* ===================================================================
   SPLIT (Text + Medium)
   =================================================================== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 32px;
}

/* ===================================================================
   FEATURES (Schritte)
   =================================================================== */
.features {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin: 8px 0 0;
  padding: 0;
}
.feature {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 10px;
  text-align: center;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.feature__icon { display: block; font-size: 1.8rem; margin-bottom: 6px; }

/* ===================================================================
   CALLOUT / HINWEISE
   =================================================================== */
.callout {
  display: flex;
  gap: 10px;
  background: #fff7e8;
  border: 1px solid var(--yellow);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 8px;
}

/* ===================================================================
   BILD-PLATZHALTER / GALERIE
   =================================================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.media-placeholder {
  margin: 0;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(45deg, var(--cream) 0 14px, #f1e6d2 14px 28px);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-weight: 600;
  text-align: center;
  padding: 12px;
}
.split__media { aspect-ratio: 4 / 3; }

/* Video-Sektion (Hochformat-freundlich: zentriert, Höhe begrenzt) */
.promo-video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 75vh;       /* verhindert, dass Hochformat-Video die Seite sprengt */
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #000;
}
.media-placeholder--video { aspect-ratio: 16 / 9; }

/* Echtes Foto, das einen Platzhalter ersetzt (siehe setupImages in script.js) */
.media-placeholder.has-img {
  background: none;
  border: 0;
  padding: 0;
  overflow: hidden;
}
.media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

/* Konfetti-Overlay: liegt über allem, blockiert aber keine Klicks */
.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

/* Kleine Feier-Animation für das Emoji in der Bestätigung */
@keyframes pop-bounce {
  0%   { transform: scale(0.4); opacity: 0; }
  60%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}
.confirm__icon { animation: pop-bounce 0.6s ease-out both; }

/* ===================================================================
   ACCORDION / FAQ
   =================================================================== */
.accordion {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.acc__item + .acc__item { border-top: 1px solid var(--line); }
.acc__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: var(--white);
  border: 0;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease;
}
.acc__head:hover { background: var(--cream); }
.acc__icon {
  font-size: 1.4rem;
  color: var(--orange);
  transition: transform 0.25s ease;
  flex: none;
}
.acc__head[aria-expanded="true"] .acc__icon { transform: rotate(45deg); }

/* Sanftes Auf-/Zuklappen über max-height */
.acc__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.acc__panel p { margin: 0; padding: 0 20px 18px; color: var(--ink-soft); }

/* ===================================================================
   FORMULAR
   =================================================================== */
.form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label, .radio-group legend { font-weight: 600; font-size: 0.95rem; }

.field input,
.field select,
.field textarea {
  font: inherit;
  color: var(--ink);
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fffdf9;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232, 119, 46, 0.15);
}
.field textarea { resize: vertical; }

.radio-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 0;
}
.radio-group legend { padding: 0 6px; }
.radio { display: inline-flex; align-items: center; gap: 6px; margin-right: 20px; font-weight: 500; cursor: pointer; }

.checks { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { margin-top: 4px; flex: none; }

/* Markierung für ungültige Felder (per JS gesetzt) */
.field input.is-invalid,
.field select.is-invalid { border-color: #c0492b; box-shadow: 0 0 0 3px rgba(192, 73, 43, 0.12); }
.check.is-invalid span { color: #c0492b; }

/* Fehlermeldung, falls die Übermittlung scheitert */
.form-error {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #fbe7e0;
  border: 1px solid #e0a895;
  color: #8f3b22;
  font-weight: 600;
}
.form-error a { color: #8f3b22; }

/* Demo-Bestätigung */
.confirm {
  text-align: center;
  background: #effae9;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
}
.confirm__icon { font-size: 3rem; }
.confirm h3 { margin: 8px 0; }
.confirm p { color: var(--ink-soft); max-width: 460px; margin: 0 auto 20px; }

/* ===================================================================
   DATENSCHUTZ / SONSTIGES
   =================================================================== */
.draft-flag {
  display: flex;
  gap: 10px;
  background: #fff3e0;
  border-left: 4px solid var(--orange);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-weight: 600;
}
.bullet { padding-left: 20px; color: var(--ink-soft); }
.bullet li { margin-bottom: 8px; }

/* ===================================================================
   FOOTER
   =================================================================== */
.footer {
  background: var(--ink);
  color: #f3ece1;
  padding: 48px 0 24px;
}
.footer .muted { color: #c9bfb0; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}
.footer__title { margin: 0 0 6px; color: #fff; font-size: 1.2rem; }
.footer__contact p, .footer__org p { margin: 4px 0; }
.footer__logo {
  width: 260px;
  max-width: 100%;
  height: auto;
  margin-top: 10px;
  /* helle Karte, damit das Logo auf dem dunklen Footer sauber & seriös sitzt */
  background: var(--white);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.footer__org-text {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
}
.footer__copy { text-align: center; margin: 32px 0 0; }

/* ===================================================================
   ZURÜCK-NACH-OBEN
   =================================================================== */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--orange);
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: var(--shadow-hover);
  z-index: 90;
  transition: transform 0.15s ease, background 0.2s ease;
}
.to-top:hover { transform: translateY(-3px); background: var(--orange-dark); }

/* ===================================================================
   RESPONSIVE / MOBIL
   =================================================================== */
@media (max-width: 860px) {
  .nav__toggle { display: flex; }

  /* Mobiles Menü: standardmäßig verborgen, per .is-open einblenden */
  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 12px 16px 16px;
    display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a { padding: 12px 14px; }
  .nav__cta { text-align: center; }

  .cards--2 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: 1fr; }
  .form__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 48px 0; }
}

/* Bewegungsreduzierung respektieren */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
