/* Gemeinsames Aussehen der Seiten *außerhalb* der beiden Anwendungen:
   Startseite, Materialübersicht, Impressum, Datenschutz.

   Warum eine eigene Datei: Diese Seiten sind schlichte Dokumente und brauchen
   nichts von der Anwendungsoberfläche. Vorher standen die Farbwerte doppelt --
   einmal inline in `index.html`, einmal in `lehrkraft/stil.css` -- und liefen
   beim nächsten Anfassen auseinander. */

:root {
  --blau: #16506B;
  --grund: #f4f6f8;
  --flaeche: #ffffff;
  --text: #1b2733;
  --leise: #5a6b7b;
  --linie: #d8dee4;
  --warnung: #a5342f;
  --radius: 14px;
  --schatten: 0 1px 3px rgb(20 40 60 / 10%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #12181e; --flaeche: #1c242c; --text: #e8eef4; --leise: #9fb0c0;
    --linie: #33404c; --blau: #4a9ec4; --warnung: #ef8078;
    --schatten: 0 1px 3px rgb(0 0 0 / 40%);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--grund); color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

/* Gemeinsame Breite von Inhalt und Fußzeile. Das Titelbild läuft darüber
   randlos über den ganzen Bildschirm. */
.bahn { width: min(60rem, 100%); margin-inline: auto; }
.bahn-breit { width: min(76rem, 100%); margin-inline: auto; }

/* ---------- Titelbild ----------
   Randlos über die volle Breite, per `aspect-ratio` unbeschnitten. Eine feste
   Höhe darf hier nicht zurückkommen -- genau daran ist der Ausschnitt früher
   zerschnitten worden. `max-height` deckelt zweifach: 380 px auf sehr breiten
   Bildschirmen, 40 vh in flachen Fenstern. Wo gedeckelt wird, sorgt
   `object-position: center bottom` dafür, dass ausschließlich oben Himmel
   wegfällt -- Kai, Anker, Boje und Segelboot bleiben vollständig. */
.titelbild {
  flex: none; position: relative;
  border-bottom: 1px solid var(--linie); background: var(--flaeche);
}
.titelbild img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 1;
  max-height: min(380px, 40vh); object-fit: cover; object-position: center bottom;
}

/* Logo oben rechts im Bild -- dieselbe Stelle wie im Ausweis der
   Schüleranwendung. Das helle Feld hält die schwarze Brücke lesbar. */
.schullogo-feld {
  position: absolute; top: 1.1rem; right: 1.1rem;
  display: block; padding: 0.45rem 0.6rem;
  background: #fff; border-radius: 10px;
  box-shadow: 0 1px 4px rgb(0 0 0 / 18%);
}
.schullogo-feld img { display: block; width: 150px; height: auto; }
@media (max-width: 26rem) {
  .schullogo-feld { top: 0.6rem; right: 0.6rem; padding: 0.35rem 0.45rem; }
  .schullogo-feld img { width: 116px; }
}

/* ---------- Grundgerüst ---------- */

main { flex: 1 0 auto; padding: clamp(1.75rem, 4vh, 2.75rem) 1.5rem 2.5rem; }

h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.25; margin: 0 0 0.75rem; }
h2 {
  font-size: 1.1rem; line-height: 1.3;
  margin: 2rem 0 0.5rem; padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--linie);
}
h2:first-of-type { margin-top: 1.5rem; }

.lang { color: var(--leise); }
.hinweis { font-size: 0.92rem; color: var(--leise); }
.fehler { color: var(--warnung); font-weight: 600; }

a { color: var(--blau); }

/* ---------- Fußzeile ---------- */

footer {
  flex: none;
  padding: 1.25rem 1.5rem 2rem;
  border-top: 1px solid var(--linie);
  color: var(--leise); font-size: 0.85rem; line-height: 1.6;
}
footer p { margin: 0; }
.fuss-reihe {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: baseline; gap: 0.5rem 1.5rem;
}
.fuss-verweise { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* ---------- Startseite: die beiden Eingänge ---------- */

.eingaenge { display: grid; gap: 1rem; margin-top: 1.75rem; }
@media (min-width: 34rem) { .eingaenge { grid-template-columns: 1fr 1fr; } }

a.eingang {
  display: block; background: var(--flaeche); color: inherit; text-decoration: none;
  border: 1px solid var(--linie); border-left: 6px solid var(--blau);
  border-radius: var(--radius);
  padding: 1.6rem 1.75rem;
  box-shadow: var(--schatten);
  transition: box-shadow 0.15s, transform 0.15s;
}
a.eingang strong { display: block; font-size: 1.3rem; line-height: 1.25; margin-bottom: 0.3rem; }
a.eingang span { display: block; color: var(--leise); font-size: 1.02rem; }
a.eingang:hover { box-shadow: 0 4px 14px rgb(20 40 60 / 16%); transform: translateY(-2px); }
a.eingang:focus-visible { outline: 3px solid var(--blau); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  a.eingang { transition: none; }
  a.eingang:hover { transform: none; }
}

/* Dritter, leiserer Weg unter den beiden Eingängen. */
a.eingang-leise {
  display: block; margin-top: 1rem; padding: 0.9rem 1.1rem;
  color: inherit; text-decoration: none; font-size: 0.98rem;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px;
}
a.eingang-leise strong { font-weight: 600; }
a.eingang-leise em { font-style: normal; color: var(--leise); }
a.eingang-leise::after { content: "→"; float: right; color: var(--leise); }
a.eingang-leise:hover { border-color: var(--blau); }
a.eingang-leise:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }

/* ---------- Materialübersicht ---------- */

.vorlagen { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 40rem) { .vorlagen { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .vorlagen { grid-template-columns: repeat(4, 1fr); } }

.vorlage {
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--radius); box-shadow: var(--schatten);
  overflow: hidden;
}
.vorlage:hover { border-color: var(--blau); }
.vorlage:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }
.vorlage-bild {
  display: block; width: 100%; height: auto;
  border-bottom: 1px solid var(--linie); background: var(--grund);
}
.vorlage-text { padding: 0.7rem 0.9rem; border-top: 4px solid var(--farbe, var(--linie)); }
.vorlage-name { display: block; font-weight: 600; }
.vorlage-zusatz { display: block; font-size: 0.85rem; color: var(--leise); }

/* ---------- Impressum und Datenschutz ---------- */

.rechtstext { max-width: 46rem; }
.rechtstext p { margin: 0 0 0.9rem; }
.rechtstext ul { margin: 0 0 0.9rem; padding-left: 1.2rem; }
.rechtstext li { margin-bottom: 0.4rem; }
.rechtstext dl { margin: 0 0 0.9rem; }
.rechtstext dt { font-weight: 600; margin-top: 0.6rem; }
.rechtstext dd { margin: 0; }

/* Was die Schule noch eintragen muss -- bewusst auffällig, damit es nicht
   versehentlich so online geht. */
.offen {
  padding: 0.1rem 0.4rem; border-radius: 5px;
  background: rgb(165 52 47 / 12%); color: var(--warnung);
  font-weight: 600; font-size: 0.92em;
}

/* Hinweis mit rotem Streifen -- gleiche Form wie `.warnfeld` in der
   Lehrkraft-Anwendung, damit dieselbe Aussage überall gleich aussieht. */
.entwurf,
.warnfeld {
  margin: 1.5rem 0 0; padding: 0.85rem 1rem;
  background: var(--flaeche); border-left: 4px solid var(--warnung);
  border-radius: 10px; box-shadow: var(--schatten);
  font-size: 0.95rem; line-height: 1.5;
}
.entwurf { margin: 0 0 1.5rem; }

.zurueck { display: inline-block; margin-bottom: 1.25rem; }
