/* ==========================================================================
   SHLB-Mitmach-Umfrage – Gestaltung
   Copyright (c) 2026 effective WEBWORK GmbH

   Farben, Schrift und Formen entsprechen dem Klickdummy des Mitmach-Portals.
   Die Schrift „Prompt“ (SIL Open Font License) wird lokal ausgeliefert –
   keine Verbindung zu Google Fonts oder anderen Drittanbietern (Datenschutz).

   Inhalt
    1. Schriften
    2. Variablen
    3. Grundlagen
    4. Seitenaufbau: Logoleiste, Kopf, Inhalt, Fußzeile
    5. Karten und Schritte
    6. Fortschritt
    7. Fragen: Grundlagen
    8. Fragen: Auswahl und Freitext
    9. Fragen: Skalen
   10. Abbildungen mit Vergrößerung
   11. Bildergalerie
   12. Lightbox
   13. Schaltflächen und Navigation
   14. Meldungen und Danke-Seite
   15. Hilfsklassen
   16. Kleine Bildschirme (bis 560 px)
   17. Reduzierte Bewegung
   ========================================================================== */


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

@font-face {
  font-family: "Prompt";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/prompt-latin-300-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Prompt";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/prompt-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Prompt";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/prompt-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Prompt";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/prompt-latin-700-normal.woff2") format("woff2");
}


/* 2. Variablen – Farbnamen wie im Klickdummy
   ========================================================================== */

:root {
  /* Farben */
  --ink: #011e4a;          /* Schrift, Bühne, Lightbox-Leiste */
  --ink-soft: #3d5573;     /* Nebentexte */
  --navy: #003064;         /* Fußzeile */
  --sea: #0071bc;          /* Auswahl, Fokus */
  --sea-dark: #005182;     /* Links */
  --sea-tint: #eaf3fa;     /* gewählte Option */
  --rust: #d5014c;         /* Hauptaktion, Fortschritt */
  --rust-dark: #a80040;
  --gold: #c68a1f;         /* Überzeile, Hinweis-Etikett */
  --paper: #ffffff;
  --parchment: #f9fafb;    /* Seitenhintergrund */
  --band: #f0f2f4;         /* Logoleiste, Bild-Platzhalter */
  --line: #e1e4e8;         /* Rahmen, Trennlinien */
  --muted: #616b70;        /* Hinweise, Bildunterschriften */
  --on-dark: #c7d3e0;      /* Text auf dunklem Grund */

  /* Formen */
  --radius: 2px;
  --shadow-card: 0 20px 20px -10px rgba(74, 74, 74, .18);
  --shadow-bild: 0 10px 20px rgba(0, 0, 0, .25);
  --fokus: 2px solid var(--sea);

  /* Schrift */
  --schrift: "Prompt", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}


/* 3. Grundlagen
   ========================================================================== */

* {
  box-sizing: border-box;
}

body {
  display: flex;               /* hält die Fußzeile bei kurzen Seiten unten */
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--schrift);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--sea-dark);
}

.innen {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px;
}


/* 4. Seitenaufbau: Logoleiste, Kopf, Inhalt, Fußzeile
   ========================================================================== */

/* Logoleiste */
.markenleiste {
  padding: 14px 0;
  background: var(--band);
}

.logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: 40px;
}

/* Kopf (Bühne) */
.kopf {
  padding: 2.6rem 0 2.8rem;
  background: var(--ink);
  color: #fff;
}

.absender {
  margin: 0 0 .6rem;
  color: var(--gold);
  font-weight: 600;
}

.kopf h1 {
  max-width: 20ch;
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
}

/* Inhalt – füllt den Platz zwischen Kopf und Fußzeile */
body > main {
  flex: 1 0 auto;
  width: 100%;
}

main.innen {
  padding-top: 2rem;               /* spezifischer als .innen, sonst greift dessen padding */
}

/* Fußzeile */
.fuss {
  padding: 1.8rem 0 2.4rem;
  background: var(--navy);
}

.fuss p {
  margin: 0;
  color: var(--on-dark);
  font-size: .85rem;
  line-height: 1.6;
}

.fuss a {
  color: #fff;
}

.fuss .fuss-datenschutz {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.fuss-links a {
  white-space: nowrap;
}


/* 5. Karten und Schritte
   ========================================================================== */

.karte {
  margin-bottom: 1.75rem;
  padding: 1.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.karte h2 {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
}

.karte p {
  margin: 0 0 1rem;
}

.block-intro {
  color: var(--ink-soft);
}

/* Kurzer Datenschutzhinweis auf der Startkarte */
.karte .datenschutz {
  margin: 1.5rem 0 0;
  padding: .8rem 1rem;
  background: var(--parchment);
  border-left: 3px solid var(--sea);
  color: var(--muted);
  font-size: .9rem;
}

/* Etikett „Nur, wenn Sie unterrichten“ – nur ohne JavaScript sichtbar,
   mit JavaScript erscheint der Schritt ohnehin nur bei Bedarf */
.karte .bedingung-hinweis {
  display: inline-block;
  margin: -.5rem 0 1rem;
  padding: .2rem .6rem;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold);
  font-size: .85rem;
  font-weight: 600;
}

.js .karte .bedingung-hinweis {
  display: none;
}

/* Mit JavaScript ist immer nur ein Schritt sichtbar */
.js .schritt {
  display: none;
}

.js .schritt.aktiv {
  display: block;
}


/* 6. Fortschritt – wie die Fortschrittsbalken der Sammlungen
   ========================================================================== */

.fortschritt {
  margin-bottom: 1rem;
}

.balken {
  height: 5px;
  overflow: hidden;
  background: var(--line);
  border-radius: 3px;
}

.balken span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--rust);
  transition: width .3s ease;
}

.schritt-text {
  margin: .4rem 0 0;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 400;
  letter-spacing: .05em;
  text-transform: uppercase;
}


/* 7. Fragen: Grundlagen
   ========================================================================== */

.frage {
  min-width: 0;
  margin: 0 0 2.2rem;
  padding: 0;
  border: 0;
}

.frage:last-child {
  margin-bottom: 0;
}

.frage legend,
.frage-titel {
  display: block;
  margin-bottom: .55rem;
  padding: 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}

.karte .hinweis {
  margin: -.25rem 0 .7rem;
  color: var(--muted);
  font-size: .85rem;
}


/* 8. Fragen: Auswahl und Freitext
   ========================================================================== */

.optionen {
  display: grid;
  gap: .4rem;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .6rem .85rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.option:hover {
  border-color: var(--ink);
}

.option:has(input:checked) {
  background: var(--sea-tint);
  border-color: var(--sea);
}

.option:has(input:disabled) {
  opacity: .45;
  cursor: not-allowed;
}

.option:has(input:disabled):hover {
  border-color: var(--line);
}

.option input {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: .32rem;
  accent-color: var(--sea);
}

/* Freitextfeld „Sonstiges“ unter einer Auswahl */
.sonstiges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: .65rem;
  color: var(--ink-soft);
  font-size: .95rem;
}

.sonstiges input {
  flex: 1 1 14rem;
}

/* Eingabefelder */
input[type=text],
textarea {
  width: 100%;
  padding: .6rem .75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

input[type=text]:focus,
textarea:focus {
  border-color: var(--sea);
  outline: 2px solid var(--sea-dark);
  outline-offset: 1px;
}


/* 9. Fragen: Skalen – Optik der Filter-Chips im Portal
   ========================================================================== */

.matrix-zeile {
  padding: .8rem 0;
  border-top: 1px solid var(--line);
}

.matrix-zeile:first-of-type {
  padding-top: .25rem;
  border-top: 0;
}

.karte .matrix-item {
  margin: 0 0 .45rem;
}

.skala {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .65rem;
}

.pol {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.25;
}

.pol-links {
  text-align: right;
}

.punkte {
  display: flex;
  gap: .3rem;
}

.punkt {
  position: relative;
  cursor: pointer;
}

/* Das eigentliche Auswahlfeld liegt unsichtbar über dem Kästchen */
.punkt input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.punkt span {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: .9rem;
  font-weight: 400;
  transition: border-color .15s, background .15s, color .15s;
}

.punkt:hover span {
  border-color: var(--ink);
}

.punkt input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-weight: 600;
}

.punkt input:focus-visible + span {
  outline: var(--fokus);
  outline-offset: 2px;
}


/* 10. Abbildungen mit Vergrößerung
   ========================================================================== */

.abbildung {
  margin: 0 0 1.6rem;
}

.zoom {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-bild);
  cursor: zoom-in;
}

.zoom img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--band);     /* Platzhalter, solange das Bild lädt */
  transition: opacity .15s;
}

.zoom:hover img {
  opacity: .92;
}

.zoom:focus-visible {
  outline: var(--fokus);
  outline-offset: 2px;
}

/* Lupe als Hinweis auf die Vergrößerung */
.zoom-symbol {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  background: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.zoom-symbol::before {             /* Glas */
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  border-radius: 50%;
}

.zoom-symbol::after {              /* Griff */
  content: "";
  position: absolute;
  top: 23px;
  left: 23px;
  width: 8px;
  height: 2px;
  background: #fff;
  transform: rotate(45deg);
  transform-origin: left center;
}

.abbildung figcaption,
.galerie-folie figcaption {
  margin-top: .45rem;
  color: var(--muted);
  font-size: .8rem;
}


/* 11. Bildergalerie
   Ohne JavaScript stehen alle Bilder untereinander. Mit JavaScript liegen alle
   Folien in derselben Rasterzelle übereinander und werden überblendet. Die
   Bühne ist so hoch wie die höchste Folie, deshalb springt beim Blättern nichts.
   ========================================================================== */

.galerie {
  margin: 0 0 2rem;
}

.galerie-folie {
  margin: 0 0 1.25rem;
}

.galerie-aktiv .galerie-buehne {
  display: grid;
}

.galerie-aktiv .galerie-folie {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility 0s linear .35s;
}

.galerie-aktiv .galerie-folie.aktiv {
  opacity: 1;
  visibility: visible;
  transition: opacity .35s ease, visibility 0s;
}

.galerie-nr {
  margin-right: .35rem;
  color: var(--ink);
  font-weight: 600;
}

/* Steuerung: Pfeile links und rechts, Punkte in der Mitte */
.galerie-steuerung {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .75rem;
}

.galerie-steuerung[hidden] {
  display: none;
}

.galerie-knopf {
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.galerie-knopf:hover {
  border-color: var(--ink);
}

.galerie-punkte {
  display: flex;
  flex: 1;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0 .4rem;
  min-width: 0;
}

/* Tippfläche 32 px hoch, sichtbar ist nur der schmale Balken */
.galerie-punkt {
  position: relative;
  flex: 0 1 1.6rem;
  min-width: 10px;
  height: 32px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.galerie-punkt::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: .35rem;
  margin-top: -.175rem;
  background: var(--line);
}

.galerie-punkt[aria-current="true"]::before {
  background: var(--rust);
}

.galerie-knopf:focus-visible,
.galerie-punkt:focus-visible {
  outline: var(--fokus);
  outline-offset: 2px;
}


/* 12. Lightbox
   ========================================================================== */

html.lb-offen {
  overflow: hidden;                /* Seite dahinter scrollt nicht mit */
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;                  /* iOS/Android: sichtbare Höhe ohne Browserleisten */
  max-height: none;
  margin: 0;
  padding: 0;
  background: rgba(1, 30, 74, .96);
  border: 0;
  color: #fff;
}

.lightbox::backdrop {
  background: rgba(1, 30, 74, .96);
}

.lb-rahmen {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.lb-flaeche {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 16px;
  overflow: hidden;
}

.lb-bild {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
  transition: opacity .25s ease;
}

.lb-bild.laedt {
  opacity: 0;                      /* beim Blättern kurz ausblenden */
}

/* Leiste mit Titel und Knöpfen */
.lb-leiste {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 16px calc(.7rem + env(safe-area-inset-bottom, 0px));
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.lb-titel {
  margin: 0;
  color: var(--on-dark);
  font-size: .9rem;
}

.lb-knoepfe {
  display: flex;
  flex: none;
  gap: .4rem;
}

.lb-knopf {
  min-width: 2.6rem;
  height: 2.6rem;
  padding: 0 .8rem;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 0;
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.lb-knopf:hover {
  background: rgba(255, 255, 255, .16);
}

.lb-knopf:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.lb-knopf[hidden] {
  display: none;
}

.lb-zurueck,
.lb-weiter,
.lb-schliessen {
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
}

.lb-schliessen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--rust);
  border-color: var(--rust);
}

.lb-schliessen:hover {
  background: var(--rust-dark);
}


/* 13. Schaltflächen und Navigation – eckig, rot als Hauptaktion
   ========================================================================== */

.navigation {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .75rem;
  margin-bottom: 2.5rem;
}

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .6rem 1.4rem;
  background: var(--rust);
  border: 1px solid transparent;
  border-radius: 0;
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, transform .08s;
}

.knopf:hover {
  background: var(--rust-dark);
}

.knopf:active {
  transform: scale(.97);
}

.knopf:focus-visible {
  outline: var(--fokus);
  outline-offset: 2px;
}

.knopf[hidden] {
  display: none;
}

/* „Zurück“ */
.knopf.zweitrangig {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}

.knopf.zweitrangig:hover {
  background: var(--paper);
  border-color: var(--ink);
}


/* 14. Meldungen und Danke-Seite
   ========================================================================== */

.meldung {
  padding: .9rem 1.1rem;
  background: #fdeef3;
  border: 1px solid var(--rust);
  border-radius: var(--radius);
  color: var(--rust-dark);
  font-weight: 400;
}

.danke h2 {
  font-size: 2rem;
}


/* 15. Hilfsklassen
   .vh – nur für Screenreader sichtbar
   .hp – Honeypot-Feld gegen Bots
   ========================================================================== */

.vh,
.hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}


/* 16. Kleine Bildschirme (bis 560 px)
   ========================================================================== */

@media (max-width: 560px) {

  /* Karten */
  .karte {
    padding: 1.25rem;
  }

  /* Skalen: Punkte in eigener Zeile, Beschriftungen darunter */
  .skala {
    grid-template-columns: 1fr 1fr;
  }

  .punkte {
    grid-row: 1;
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .pol-links {
    text-align: left;
  }

  .pol-rechts {
    text-align: right;
  }

  .punkt span {
    width: 2.15rem;
    height: 2.15rem;
  }

  .frage-matrix .punkt span {
    width: 1.95rem;
    height: 1.95rem;
  }

  /* Abbildungen und Galerie */
  .zoom-symbol {
    right: 6px;
    bottom: 6px;
    transform: scale(.75);
    transform-origin: right bottom;
  }

  .galerie-punkte {
    gap: 0 .25rem;
  }

  /* Lightbox: Titel über den Knöpfen */
  .lb-leiste {
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
  }

  .lb-knoepfe {
    justify-content: flex-end;
  }
}


/* 17. Reduzierte Bewegung
   Wer in den Systemeinstellungen weniger Bewegung wünscht, bekommt keine Übergänge.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
