/* =====================================================================
   Gestaltung für die Webseite der GGS Berg-Mark-Straße
   VOICE:  herzlich und klar – Eltern finden schnell, was sie suchen
   IDEA:   „Alle unter einem Dach“ – das Dach aus dem Logo als Formelement
   PICTURE: das Schullogo groß auf der Startseite, kleine Dächer als Seitenmarken
   COLOUR: Dachblau, Europagrün und die bunten Farben der Kinderkette
   LAYOUT: Inhalt links, Kalender immer rechts am Rand; auf dem Handy untereinander

   Farben ändern: einfach die Werte unten bei :root anpassen.
   ===================================================================== */

:root {
  --dach: #04378a;        /* Blau aus dem Logo */
  --dach-dunkel: #022a6b;
  --dach-hell: #e9eff9;
  --gruen: #3d8f24;       /* Europa-Grün */
  --orange: #e06a00;
  --rot: #c8102e;
  --hellblau: #0d7fbb;
  --lila: #6e2376;
  --gelb: #f5c400;
  --ink: #15213a;
  --muted: #4b586d;
  --line: #dce3ed;
  --soft: #f4f7fb;
  --bg: #ffffff;
  --farbe: var(--dach);   /* Farbe der aktuellen Seite, wird je Seite gesetzt */
  --rund: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", Quicksand, Comfortaa, Manjari, "Arial Rounded MT", "Arial Rounded MT Bold", Calibri, source-sans-pro, sans-serif;
  --text: Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", source-sans-pro, sans-serif;
  color-scheme: light;
}

/* Jede Seite hat eine eigene Farbe aus der Kinderkette */
.s-start     { --farbe: var(--dach); }
.s-schule    { --farbe: var(--gelb); }
.s-team      { --farbe: var(--rot); }
.s-aktuelles { --farbe: var(--hellblau); }
.s-kalender  { --farbe: var(--gruen); }
.s-downloads { --farbe: var(--lila); }
.s-kontakt   { --farbe: var(--dach); }

* { box-sizing: border-box; min-width: 0; }
html { scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--text);
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--dach); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--rund); color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(32px, 4.6vw, 48px); line-height: 1.08; margin: 0 0 14px; }
h2 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.15; margin: 0 0 14px; }
h3 { font-size: 19px; line-height: 1.3; margin: 0 0 4px; }
p { margin: 0 0 14px; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 20;
  background: var(--gelb); color: var(--ink); padding: 10px 16px; font-weight: 700;
}
.skip:focus { left: 16px; }

.wrap { max-width: 1240px; margin-inline: auto; padding-inline: max(4vw, 16px); }

/* ---------- Entwurfs-Hinweis und Platzhalter (vor dem Online-Gang entfernen) ---------- */
.hinweis { background: #fff3bf; border-bottom: 1px solid #e3c34a; font-size: 15px; padding: 8px 0; }
.ph { background: #fff3bf; box-shadow: inset 0 0 0 1px #d9b52a; border-radius: 4px; padding: 0 .25em; }
.beispiel { font-size: 14px; color: var(--muted); margin: -6px 0 14px; }

/* ---------- Kopfbereich ---------- */
.kopf { background: var(--bg); border-bottom: 1px solid var(--line); }
.kopf .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 28px; padding-block: 12px;
}
.marke { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.marke img { width: 84px; flex: none; }
.marke b { display: block; font-family: var(--rund); font-size: 19px; line-height: 1.2; }
.marke span { display: block; font-size: 15px; color: var(--muted); }

.menue ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.menue a {
  display: block; padding: 10px 12px 8px; min-height: 44px;
  font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none;
  border-bottom: 4px solid transparent; border-radius: 6px 6px 0 0;
}
.menue a:hover { background: var(--soft); border-bottom-color: var(--line); }
.menue a[aria-current="page"] { border-bottom-color: var(--farbe); color: var(--ink); }

/* Kinderkette: dünnes buntes Band unter dem Kopf */
.kette { display: flex; height: 6px; }
.kette i { flex: 1; }
.kette i:nth-child(1) { background: var(--lila); }
.kette i:nth-child(2) { background: var(--orange); }
.kette i:nth-child(3) { background: var(--gelb); }
.kette i:nth-child(4) { background: var(--rot); }
.kette i:nth-child(5) { background: var(--gruen); }
.kette i:nth-child(6) { background: var(--hellblau); }
.kette i:nth-child(7) { background: var(--dach); }

/* ---------- Seitenaufbau: Inhalt + Kalender am Rand ---------- */
.raster {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(28px, 4vw, 48px);
  align-items: start;
}
.rand { position: sticky; top: 16px; }
.inhalt > section + section { margin-top: clamp(36px, 5vw, 56px); }

@media (max-width: 960px) {
  .raster { grid-template-columns: minmax(0, 1fr); }
  .rand { position: static; }
}

/* ---------- Startseite ---------- */
.willkommen {
  background: var(--dach-hell);
  border-radius: 20px;
  padding: clamp(20px, 3vw, 36px);
  text-align: center;
}
.willkommen img { width: min(100%, 560px); margin: 0 auto 18px; border-radius: 12px; mix-blend-mode: multiply; }
.willkommen h1 { color: var(--dach); }
.willkommen p { max-width: 38em; margin-inline: auto; font-size: 18px; }

.schnell { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.schnell > li > a {
  display: flex; align-items: center; gap: 14px; height: 100%; min-height: 72px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px;
  color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.25;
}
.schnell > li > a:hover { border-color: var(--c); background: var(--soft); }
.schnell small { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.symbol {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--c, var(--dach)); display: grid; place-items: center;
}
.symbol svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Seitentitel mit kleinem Dach ---------- */
.seitenkopf { padding-bottom: 8px; }
.seitenkopf h1 { display: flex; align-items: center; gap: 14px; }
.seitenkopf h1::before {
  content: ""; flex: none; width: 40px; height: 26px; background: var(--farbe);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.seitenkopf p { font-size: 18px; color: var(--muted); max-width: 40em; }

.seitennav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 8px 0 28px; }
.seitennav a {
  flex: none; padding: 8px 16px; border-radius: 999px; background: var(--soft);
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px;
}
.seitennav a:hover { background: var(--dach-hell); }

/* ---------- Texte ---------- */
.text { max-width: 70ch; }
.text h2 { margin-top: 8px; }
.text ul, .text ol { padding-left: 1.3em; margin: 0 0 14px; }
.text li { margin-bottom: 6px; }
.text section { scroll-margin-top: 16px; }
.inhalt section h2 { scroll-margin-top: 16px; }

.leitsaetze { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.leitsaetze li { padding: 16px 18px; background: var(--soft); border-radius: 14px; border-left: 6px solid var(--c); }
.leitsaetze b { display: block; font-family: var(--rund); font-size: 19px; }

/* ---------- Meldungen ---------- */
.meldung { padding-block: 18px; border-top: 1px solid var(--line); }
.meldung:last-of-type { border-bottom: 1px solid var(--line); }
.meldung time { display: block; font-size: 15px; font-weight: 700; color: var(--hellblau); }
.meldung p { margin: 6px 0 0; max-width: 68ch; }
.mehr { display: inline-block; margin-top: 14px; font-weight: 700; }

/* ---------- Personen / Tabellen ---------- */
.personen { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 28px; }
.person { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; }
.person b { display: block; font-family: var(--rund); font-size: 18px; }
.person span { display: block; color: var(--muted); font-size: 15px; }

table { border-collapse: collapse; width: 100%; margin-bottom: 24px; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
th { font-size: 15px; color: var(--muted); font-weight: 700; }
td.zeit { white-space: nowrap; }

/* ---------- Downloads ---------- */
.dateien { list-style: none; padding: 0; margin: 0 0 28px; }
.dateien li { border-top: 1px solid var(--line); }
.dateien li:last-child { border-bottom: 1px solid var(--line); }
.dateien a {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center;
  padding: 14px 4px; text-decoration: none; color: var(--ink);
}
.dateien a:hover { background: var(--soft); }
.dateien .typ {
  grid-row: span 2; width: 46px; height: 46px; border-radius: 10px; background: var(--lila); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 800;
}
.dateien b { color: var(--dach); text-decoration: underline; text-underline-offset: 3px; }
.dateien span { font-size: 15px; color: var(--muted); }

/* ---------- Kästen ---------- */
.kasten { background: var(--soft); border-radius: 16px; padding: 20px 22px; margin-bottom: 24px; }
.kasten.wichtig { background: #fdf1e4; border-left: 6px solid var(--orange); }
.kasten > :last-child { margin-bottom: 0; }
.gross { font-size: 22px; font-family: var(--rund); font-weight: 700; }

.schritte { list-style: none; counter-reset: s; padding: 0; margin: 0 0 24px; }
.schritte li { counter-increment: s; position: relative; padding: 4px 0 18px 54px; }
.schritte li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%;
  background: var(--farbe); color: #fff; display: grid; place-items: center; font-weight: 800;
}

/* ---------- Kalender ---------- */
.kalender { border: 1px solid var(--line); border-radius: 18px; padding: 18px; background: var(--bg); }
.kalender > h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.kalender > h2::before { content: ""; width: 28px; height: 18px; background: var(--gruen); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.kal-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.kal-titel { font-family: var(--rund); font-weight: 700; font-size: 18px; margin: 0; }
.kal-kopf button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg);
  font-size: 22px; line-height: 1; color: var(--dach); cursor: pointer;
}
.kal-kopf button:hover { background: var(--soft); }
.kal-tabelle { table-layout: fixed; margin: 0; }
.kal-tabelle th { text-align: center; padding: 4px 0; border: 0; font-size: 13px; }
.kal-tabelle td { text-align: center; padding: 2px; border: 0; height: 40px; font-size: 15px; }
.kal-tabelle td span, .kal-tabelle td button {
  display: grid; place-items: center; width: 100%; height: 38px; border-radius: 10px; position: relative;
  font: inherit; color: inherit; border: 0; background: none;
}
.kal-tabelle td.we { color: var(--muted); }
.kal-tabelle td.ferien span, .kal-tabelle td.ferien button { background: #e6f3e0; }
.kal-tabelle td.frei span, .kal-tabelle td.frei button { background: #fdf1e4; }
.kal-tabelle td button { cursor: pointer; font-weight: 800; color: var(--dach); }
.kal-tabelle td button::after {
  content: ""; position: absolute; bottom: 4px; left: 50%; width: 6px; height: 6px; margin-left: -3px;
  border-radius: 50%; background: var(--rot);
}
.kal-tabelle td.nurferien button::after { display: none; }
.kal-tabelle td button:hover { box-shadow: inset 0 0 0 2px var(--line); }
.kal-tabelle td button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--dach); }
.kal-tabelle td.heute span, .kal-tabelle td.heute button { background: var(--dach); color: #fff; }
.kal-tabelle td.heute button::after { background: #fff; }
.kal-legende { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); margin: 8px 0 4px; }
.kal-legende i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.kal-detail:not(:empty) { background: var(--soft); border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.kal-detail b { display: block; font-family: var(--rund); }
.kal-detail ul { margin: 4px 0 0; padding-left: 1.1em; }
.kal-naechste { margin-top: 16px; }
.kal-naechste h3 { font-size: 17px; margin-bottom: 6px; }

.terminliste { list-style: none; margin: 0; padding: 0; }
.terminliste li { display: grid; grid-template-columns: 6.2em minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.4; }
.terminliste time { font-weight: 800; color: var(--dach); white-space: nowrap; font-variant-numeric: tabular-nums; }
.terminliste .art-ferien time { color: var(--gruen); }
.terminliste .art-frei time { color: var(--orange); }
.terminliste small { display: block; color: var(--muted); font-size: 14px; }
.monat { font-family: var(--rund); font-size: 20px; margin: 26px 0 6px; }
.alle-termine { display: inline-block; margin-top: 12px; font-weight: 700; }

/* ---------- Fußbereich ---------- */
.fuss { background: var(--dach); color: #fff; margin-top: clamp(32px, 5vw, 64px); }
.fuss .dachlinie { display: block; width: 100%; height: 28px; background: var(--bg); clip-path: polygon(0 0, 100% 0, 100% 0, 50% 100%, 0 0); }
.fuss .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 26px; padding-block: 30px 36px; }
.fuss h2 { color: #fff; font-size: 18px; margin: 0 0 8px; }
.fuss p, .fuss ul { margin: 0; font-size: 16px; }
.fuss ul { list-style: none; padding: 0; }
.fuss li { margin: 4px 0; }
.fuss a { color: #fff; }
.fuss .ph { color: var(--ink); }
.fuss .unten { border-top: 1px solid rgba(255, 255, 255, .2); padding-block: 14px; font-size: 14px; display: block; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .marke img { width: 64px; }
  .marke b { font-size: 17px; }
  .menue a { padding: 8px 10px 6px; font-size: 15px; }
  .willkommen p { font-size: 17px; }
}

@media print {
  .hinweis, .menue, .kette, .rand, .fuss .dachlinie { display: none; }
  .raster { display: block; }
}

/* schmalere Datumsspalte im Kalender am Rand */
.rand .terminliste li { grid-template-columns: 4.4em minmax(0, 1fr); }
.rand .terminliste time { white-space: normal; }
.s-ganztag { --farbe: var(--orange); }
.person a { color: var(--dach); }

/* ---------- Klassen mit Klassentieren (Team-Seite) ---------- */
.klassen { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.klasse { display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; border: 1px solid var(--line); border-radius: 16px; }
.klasse svg { width: 64px; height: 64px; flex: none; }
.klasse b { display: block; font-family: var(--rund); font-size: 18px; line-height: 1.2; }
.klasse span span { display: block; font-size: 15px; color: var(--muted); line-height: 1.35; }
.klasse span span:first-of-type { color: var(--ink); font-weight: 700; }
.text .klassen, .text .dateien, .text .leitsaetze, .text .schritte { padding-left: 0; }
.kal-tabelle td.nurregel button { font-weight: 600; }
.kal-tabelle td.nurregel button::after { background: #d99a00; }
.kal-regel { font-size: 14px; color: var(--muted); margin: 10px 0 0; padding-left: 18px; position: relative; }
.kal-regel::before { content: ""; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: #d99a00; }
.regelliste { margin: 0 0 8px; padding-left: 1.2em; }
/* Fotos der Klassenleitungen: Datei fotos/klasse-1a.jpg usw. – erscheint automatisch */
.klasse .bild { position: relative; flex: none; width: 72px; height: 72px; }
.klasse .bild svg { width: 72px; height: 72px; display: block; }
.klasse .foto { position: absolute; inset: 0; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; opacity: 0; }
.klasse .mit-foto .foto { opacity: 1; }
.klasse .mit-foto svg { position: absolute; right: -8px; bottom: -6px; width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 3px var(--bg); }

/* ---------- Startbild „Alle unter einem Dach“ ---------- */
.willkommen .hausbild { width: min(100%, 760px); mix-blend-mode: normal; border-radius: 14px; }

/* ---------- Meldungen mit „Weiterlesen“ ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.meldung h3 a { color: inherit; text-decoration: none; }
.meldung h3 a:hover { text-decoration: underline; }
.weiter { display: inline-block; margin-top: 8px; font-weight: 700; }
.meldung.mit-bild { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 18px; align-items: start; }
.vorschau img { width: 140px; height: 105px; object-fit: cover; object-position: center 40%; border-radius: 10px; }
@media (max-width: 600px) {
  .meldung.mit-bild { grid-template-columns: minmax(0, 1fr) 88px; gap: 12px; }
  .vorschau img { width: 88px; height: 88px; }
}
.zurueck { font-weight: 700; margin: 0 0 8px; }
.artikel .seitenkopf time { display: block; font-weight: 700; color: var(--hellblau); margin-bottom: 6px; }
.artikel .seitenkopf h1 { font-size: clamp(28px, 4vw, 40px); }
.artikel > p { font-size: 18px; }
.artikelbild { margin: 24px 0; }
.artikelbild img { width: auto; max-width: 100%; max-height: 640px; border-radius: 14px; }
.artikelbild figcaption { font-size: 15px; color: var(--muted); margin-top: 8px; }

/* ---------- Kind krankmelden (Startseite und Kontakt) ---------- */
.schnell .krank { grid-column: 1 / -1; }
.kachel {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  padding: 14px 16px; border: 1px solid #f1c9cf; border-left: 6px solid var(--rot);
  border-radius: 14px; background: #fff6f7;
}
.krank-text { flex: 1 1 240px; font-weight: 700; font-size: 18px; line-height: 1.3; }
.krank-text small { display: block; font-weight: 400; font-size: 15px; color: var(--muted); margin-top: 2px; }
.aktionen { display: flex; flex-wrap: wrap; gap: 8px; }
.knopf {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: 999px;
  background: var(--rot); color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.knopf:hover { background: #a50d25; color: #fff; }
.knopf.hell { background: #fff; color: var(--rot); box-shadow: inset 0 0 0 2px var(--rot); }
.knopf.hell:hover { background: #fde8eb; color: #a50d25; }
.kasten .aktionen { margin: 4px 0 14px; }
@media (max-width: 600px) { .aktionen, .knopf { width: 100%; } .knopf { justify-content: center; } }
.video { display: block; width: 100%; max-width: 848px; height: auto; aspect-ratio: 848 / 480; border-radius: 14px; background: #000; }

/* ---------- Ganztag-Seite (Inhalte aus dem Redaktionsbereich) ---------- */
.ogs .ogs-bereich { margin-top: 40px; scroll-margin-top: 16px; }
.ogs .ogs-bereich.kasten { margin-top: 8px; }
.ogs .ogs-bereich h3 { margin-top: 22px; }
.ogs-bilder { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 16px 0; }
.ogs-bilder figure { margin: 0; }
.ogs-bilder img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.ogs-bilder figcaption { font-size: 14px; color: var(--muted); margin-top: 4px; }
.aktualisiert { margin-top: 40px; font-size: 14px; color: var(--muted); }
.ogs .seitennav { flex-wrap: wrap; overflow: visible; }
.willkommen .hausbild-rahmen { position: relative; width: min(100%, 760px); margin: 0 auto 18px; }
.willkommen .hausbild-rahmen .hausbild { display: block; width: 100%; }
.willkommen .ki-hinweis { position: absolute; left: 8px; bottom: 8px; margin: 0; padding: 1px 5px; font-size: 9px; line-height: 1.4; color: #333; background: rgba(255, 255, 255, 0.75); border-radius: 4px; }
.team-intro { background: var(--dach-hell); border-radius: 16px; padding: 20px 24px; margin: 8px 0 32px; }
.team-intro p { font-size: 18px; margin: 0 0 12px; }
.team-intro p:last-child { margin-bottom: 0; }
