/* =====================================================================
   Pestalozzischule Neukirchen-Vluyn, gemeinsames Stylesheet
   Design-System für alle Seiten (Start, Impressum, Datenschutz,
   Schulteam, Termine). Farben WCAG-geprüft (Kontraste ≥ 4.5:1).
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --gruen: #7db928;        /* helles Grün für Akzente */
  --gruen-dunkel: #43690f; /* Text auf Weiß, WCAG-konform */
  --gruen-mittel: #6cb33f;
  --gruen-balken: #477714; /* Kopf-/Kontakt-Balken, weiße Schrift WCAG-konform */
  --blau: #2e7ab6;
  --blau-dunkel: #256298;
  --gelb: #f6c400;
  --orange: #f7941e;
  --rot: #e23b2e;
  --text: #33383d;
  --text-hell: #5f6a72;
  --flaeche: #ffffff;
  --grau: #f1f3f5;
  --footer-blau: #235a8f;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.65;
  background: #eef1f3;
  /* Sticky Footer: Inhalt füllt die Höhe, Footer bleibt unten */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Inhaltsbereich wächst und drückt den Footer nach unten */
.wrap, .page { width: 100%; flex: 1 0 auto; }
.footer-band, .footer { flex-shrink: 0; }

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

/* ---------- Kopfbalken (grün) ---------- */
.topbar { background: var(--gruen-balken); color: #ffffff; }
.topbar .inner {
  max-width: 1040px; margin: 0 auto; padding: 7px 20px;
  display: flex; flex-wrap: wrap; justify-content: flex-end;
  gap: 8px 22px; font-size: 0.85rem;
}
.topbar a { color: #ffffff; text-decoration: none; font-weight: 600; }
.topbar a:hover { text-decoration: underline; }
.topbar span { display: inline-flex; align-items: center; gap: 7px; }
.topbar svg { width: 15px; height: 15px; }

/* ---------- Logo-Zeile ---------- */
.brandbar { background: #ffffff; border-bottom: 1px solid #e6e9ec; }
.brandbar .inner {
  max-width: 1040px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.logo { display: inline-flex; line-height: 0; }
.logo img { height: 60px; width: auto; display: block; }
.logo:focus-visible { outline: 3px solid var(--blau); outline-offset: 3px; border-radius: 4px; }

/* ---------- Hamburger-Navigation (ohne JS, natives <details>) ---------- */
.nav { position: relative; flex: 0 0 auto; }
.nav summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid #dfe4e8; border-radius: 8px; background: #ffffff;
  color: var(--gruen-balken); font-weight: 700; font-size: 0.95rem; white-space: nowrap;
}
.nav summary::-webkit-details-marker { display: none; }
.nav summary::marker { content: ""; }
.nav summary:hover { background: var(--grau); }
.nav summary:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }
.nav summary svg { width: 22px; height: 22px; }
.nav[open] summary { background: var(--grau); border-color: #cfd6dc; }
.nav-panel {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 260px;
  background: #ffffff; border: 1px solid #eceff2; border-radius: 10px;
  box-shadow: 0 8px 26px rgba(40,60,80,0.16); padding: 8px; z-index: 60;
}
.nav-panel a {
  display: block; padding: 10px 14px; border-radius: 7px; color: var(--text);
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.nav-panel a:hover { background: var(--grau); color: var(--blau-dunkel); }
.nav-panel a:focus-visible { outline: 3px solid var(--blau); outline-offset: -2px; }
/* Externe-Ziel-Hinweis (öffnet in neuem Tab) */
.nav-panel a.ext::after,
.menu-body a.ext::after { content: " \2197"; color: var(--text-hell); font-weight: 400; }

/* ---------- Menü-Box in der Sidebar ---------- */
.menu-head {
  background: var(--gruen-balken); color: #ffffff; font-family: Georgia, serif;
  font-style: italic; font-size: 1.25rem; text-align: right; padding: 12px 18px;
}
.menu-body { padding: 8px 12px 12px; }
.menu-body a {
  display: block; padding: 9px 10px; border-top: 1px solid #eef1f3; border-radius: 6px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.menu-body a:first-child { border-top: 0; }
.menu-body a:hover { background: var(--grau); color: var(--blau-dunkel); }
.menu-body a:focus-visible { outline: 3px solid var(--blau); outline-offset: -2px; }

/* ---------- Layout ---------- */
.wrap {
  max-width: 1040px; margin: 0 auto; padding: 26px 20px 40px;
  display: grid; grid-template-columns: 1fr 320px; gap: 26px; align-items: start;
}
/* Einspaltige Inhaltsseiten (Impressum, Datenschutz, Schulteam, Termine) */
.page { max-width: 900px; margin: 26px auto 44px; padding: 0 20px; }

.panel {
  background: var(--flaeche); border-radius: 10px;
  box-shadow: 0 2px 10px rgba(40,60,80,0.07); overflow: hidden;
}

/* Gelber Titelbalken (dunkle Schrift, WCAG-konform) */
.hero-title, .panel-head {
  background: var(--gelb); color: #33383d; text-align: center;
  font-family: Georgia, "Times New Roman", serif; font-style: italic;
  font-size: clamp(1.3rem, 3.5vw, 1.8rem); font-weight: 700; padding: 16px 18px;
  margin: 0;
}
.panel-head { text-align: left; padding: 16px 24px; }
.hero-body { padding: 30px 30px 34px; }

/* Kopfbild der Startseite. Sitzt zwischen gelbem Balken und Textbereich und
   nutzt die volle Breite der Box; die Rundung uebernimmt .panel per overflow.
   Ausgeliefert wird es als AVIF (55 KB), ersatzweise WebP (113 KB), zuletzt
   JPEG (160 KB). Der Browser nimmt das erste Format, das er beherrscht. */
.hero-pic { display: block; }
.hero-img { display: block; width: 100%; height: auto; }

.willkommen {
  background: var(--blau); color: #ffffff; text-align: center; font-style: italic;
  font-size: 1.12rem; padding: 16px 20px; border-radius: 8px; margin: 0 0 26px;
}

/* Titelblock der Startseite. Badge, Claim und Baustellentext wurden am
   12.08.2026 entfernt, ihre Regeln damit ebenfalls. */
.status { text-align: center; }
.status h1 {
  font-size: clamp(1.5rem, 4.5vw, 2rem); margin: 4px 0 0;
  color: var(--blau-dunkel); line-height: 1.2;
}

.info { margin-top: 30px; padding-top: 24px; border-top: 1px solid #edf0f2; text-align: left; }
.info h2 { font-size: 1.15rem; color: var(--gruen-dunkel); margin: 0 0 10px; }
.info p { color: var(--text-hell); font-size: 0.98rem; }
.info ul { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.info li { background: var(--grau); border-radius: 6px; padding: 6px 12px; font-size: 0.9rem; color: var(--text); font-weight: 600; }

/* ---------- Sidebar / Kontakt (Home) ---------- */
.sidebar { display: grid; gap: 18px; }
.kontakt-head {
  background: var(--gruen-balken); color: #ffffff; font-family: Georgia, serif;
  font-style: italic; font-size: 1.25rem; text-align: right; padding: 12px 18px;
}
.kontakt-body { padding: 6px 20px 18px; }
.kblock { padding: 14px 0; border-top: 1px solid #eef1f3; }
.kblock:first-child { border-top: 0; }
.kblock h3 { margin: 0 0 4px; font-size: 1.05rem; color: var(--text); }
.kblock .name { font-weight: 700; font-size: 0.94rem; }
.kblock .row { font-size: 0.92rem; color: var(--text-hell); }
.kblock a { text-decoration: none; word-break: break-word; }
.kblock a:hover { text-decoration: underline; }
.kblock .hint { display: block; font-size: 0.82rem; color: #6b747b; margin-top: 3px; }

/* ---------- Inhaltsseiten (Impressum/Datenschutz/Termine) ---------- */
.content { padding: 26px 30px 34px; }
.content h1 { font-size: clamp(1.4rem, 4vw, 1.9rem); color: var(--blau-dunkel); margin: 0 0 14px; }
.content h2 { color: var(--gruen-dunkel); font-size: 1.15rem; margin: 26px 0 8px; }
.content h2:first-of-type { margin-top: 0; }
.content p { margin: 0 0 12px; }
.content ul { margin: 0 0 12px; padding-left: 20px; }
.content li { margin: 3px 0; }
.content .adr { color: var(--text); }
.content .adr strong { color: var(--text); }
.hinweis { background: #fff8e1; border: 1px solid #f4d772; border-radius: 8px; padding: 12px 16px; font-size: 0.9rem; color: #7a5b00; margin: 0 0 26px; }
.hinweis strong { color: #6a4e00; }
.platz { color: #8a5300; background: #fff3d6; padding: 0 4px; border-radius: 3px; }
.back { display: inline-block; margin-top: 24px; font-weight: 600; text-decoration: none; }
.back:hover { text-decoration: underline; }

/* ---------- Schulteam ---------- */
.team-photo { width: 100%; height: auto; display: block; }
.team-photo-cap { padding: 10px 24px; font-size: 0.85rem; color: var(--text-hell); background: var(--grau); }
.team-section { padding: 4px 30px 8px; }
.team-section h2 { color: var(--gruen-dunkel); font-size: 1.2rem; margin: 24px 0 10px; }
.team-table { width: 100%; border-collapse: collapse; margin: 0 0 6px; font-size: 0.95rem; }
.team-table caption { text-align: left; }
.team-table th { text-align: left; font-size: 0.78rem; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-hell); padding: 6px 10px; border-bottom: 2px solid #e6eaee; }
.team-table td { padding: 8px 10px; border-bottom: 1px solid #eef1f3; vertical-align: top; }
.team-table td.klasse { font-weight: 700; color: var(--gruen-dunkel); white-space: nowrap; width: 3.5rem; }
.team-table td.name { font-weight: 600; }
.team-table a { color: var(--blau); text-decoration: none; word-break: break-word; }
.team-table a:hover { text-decoration: underline; }
.team-note { padding: 8px 30px 24px; font-size: 0.86rem; color: var(--text-hell); }

/* ---------- Termine ---------- */
.dl-card {
  display: flex; align-items: center; gap: 16px; margin: 20px 0 8px; padding: 18px 20px;
  border: 1px solid #e6eaee; border-radius: 10px; background: #fafbfc; text-decoration: none; color: var(--text);
}
.dl-card:hover { background: var(--grau); border-color: #d7dde2; }
.dl-card:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }
.dl-icon { flex: 0 0 auto; width: 44px; height: 44px; color: var(--rot); }
.dl-text b { display: block; font-size: 1.02rem; color: var(--blau-dunkel); }
.dl-text span { font-size: 0.88rem; color: var(--text-hell); }
.callout {
  margin: 22px 0 4px; padding: 16px 18px; border-left: 4px solid var(--gruen-mittel);
  background: #f3f8ec; border-radius: 0 8px 8px 0;
}
.callout a { font-weight: 700; color: var(--blau-dunkel); }

/* ---------- Hilfsklassen (statt Inline-Styles, für strikte CSP) ---------- */
.footer .col strong { color: #ffffff; }
.team-intro { margin: 14px 0 0; }
.muted { font-weight: 400; color: var(--text-hell); }
.team-section.last { padding-bottom: 26px; }

/* ---------- 404-Seite ---------- */
.err { text-align: center; padding: 30px 24px 36px; }
.err-code {
  font-family: "Comic Sans MS", "Chalkboard SE", "Segoe UI", sans-serif;
  font-weight: 800; font-size: clamp(4rem, 16vw, 7rem); line-height: 1;
  margin: 6px 0 4px; letter-spacing: 4px;
}
.err-code .a { color: var(--rot); }
.err-code .b { color: var(--gruen-mittel); }
.err-code .c { color: var(--blau); }
.err h1 { font-size: clamp(1.4rem, 4vw, 1.9rem); color: var(--blau-dunkel); margin: 0 0 10px; }
.err p { color: var(--text-hell); max-width: 520px; margin: 0 auto 6px; }
.err-links { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.err-links a { display: inline-block; padding: 10px 18px; border-radius: 8px; background: var(--grau); color: var(--blau-dunkel); text-decoration: none; font-weight: 700; }
.err-links a:hover { background: #e4e8ec; }
.err-links a:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }

/* ---------- Footer ---------- */
.footer-band { background: #eef1f3; line-height: 0; }
.footer-band img { display: block; width: 100%; height: auto; max-height: 216px; object-fit: cover; object-position: center bottom; }
.footer { background: var(--footer-blau); color: #e8f1f8; }
.footer .inner {
  max-width: 1040px; margin: 0 auto; padding: 30px 20px 18px;
  display: flex; flex-wrap: wrap; gap: 22px 60px; align-items: flex-start;
}
.footer .smiley { width: 66px; height: 66px; flex: 0 0 auto; background: var(--gelb); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.footer h2 { margin: 0 0 8px; color: #ffffff; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }
.footer .col p, .footer .col a { margin: 2px 0; color: #d5e6f2; font-size: 0.9rem; text-decoration: none; display: block; }
.footer .col a:hover { text-decoration: underline; }
.footer .col a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.footer .copy {
  max-width: 1040px; margin: 0 auto; padding: 14px 20px 24px;
  border-top: 1px solid rgba(255,255,255,0.15); font-size: 0.82rem; color: #c6dbee;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .wrap { grid-template-columns: 1fr; }
  .kontakt-head { text-align: center; }
  .hero-body { padding: 24px 20px 28px; }
}
@media (max-width: 560px) {
  .content, .team-section { padding-left: 20px; padding-right: 20px; }
  .hero-body { padding: 22px 18px 26px; }
  .logo img { height: 50px; }
  .team-table { font-size: 0.9rem; }
  .team-table th, .team-table td { padding: 7px 6px; }
  /* Footer-Band auf Mobil links/rechts beschneiden (mittiger Ausschnitt) */
  .footer-band img { height: 120px; max-height: none; object-position: center bottom; }
}
