/* Boy-Lornsen-Schule – Farben und Schrift aus dem bisherigen Auftritt
   (extension/boylornsendesign): Blau #46679c, Dunkelblau #2d4265,
   Terrakotta #c38a7c, Schrift Lato. */

@font-face { font-family: "Lato"; src: url("fonts/LatoLatin-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Lato"; src: url("fonts/LatoLatin-Italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Lato"; src: url("fonts/LatoLatin-Bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --blau: #46679c;
  --dunkel: #2d4265;
  --terrakotta: #b46d5c; /* #c38a7c ist auf Weiß zu blass für Text */
  --hell: #f4f2ec;
  --text: #2b2b2b;
  --grau: #6b6b66;
  --linie: #dbdbd4;
  --breite: 970px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.0625rem/1.65 "Lato", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blau); text-underline-offset: 0.15em; }
a:hover { color: var(--dunkel); }
:focus-visible { outline: 3px solid var(--terrakotta); outline-offset: 2px; }

.rahmen { max-width: var(--breite); margin: 0 auto; padding: 0 16px; }

.springen { position: absolute; left: -999px; }
.springen:focus { left: 16px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }

/* Kopf */
.kopf-innen { padding-top: 28px; padding-bottom: 20px; position: relative; }
.logo { display: inline-flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--grau); }
.logo img { width: min(486px, 100%); }
.logo span { font-size: 0.95rem; letter-spacing: 0.02em; }

/* Nis Puk hängt wie im alten Auftritt links am Seil über Kopf und Menü und
   schaukelt, wenn man mit der Maus drüberfährt. Auf dem Telefon ist kein Platz. */
.puk { display: none; }
@media (min-width: 768px) {
  .kopf-innen { text-align: center; padding-top: 34px; padding-bottom: 26px; }
  .logo { align-items: center; }
  .logo span { font-size: 1.05rem; color: var(--text); }
  .puk {
    display: block; position: absolute; top: -10px; left: 0; z-index: 20;
    width: 154px; height: 240px;
    transform-origin: 50% -40px;
  }
  .puk:hover { animation: schaukeln 2s linear; }
}
@keyframes schaukeln {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-12deg); }
  50% { transform: rotate(0deg); }
  75% { transform: rotate(12deg); }
  100% { transform: rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  .puk:hover { animation: none; }
}

/* Menü: auf dem Telefon aufklappbar, ab Tablet immer offen */
.menue { background: var(--blau); }
.menue-knopf {
  display: none; background: none; border: 0; cursor: pointer; color: #fff; font: inherit; font-weight: 700;
  padding: 12px 0; align-items: center; gap: 10px;
}
.menue-knopf::before { content: "☰"; font-size: 1.2rem; }
.js .menue-knopf { display: flex; }
.js .menue-knopf[aria-expanded="false"] + ul { display: none; }
.menue ul { list-style: none; margin: 0; padding: 0 0 8px; }
.menue a { color: #fff; text-decoration: none; display: block; padding: 10px 0; }
.menue a:hover, .menue a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; }
.menue li li a { padding-left: 16px; font-size: 0.95rem; opacity: 0.92; }

@media (min-width: 768px) {
  .js .menue-knopf { display: none; }
  /* rechtsbündig wie im alten Auftritt — links hängt Nis Puk */
  .menue #menue-liste, .js .menue-knopf[aria-expanded="false"] + #menue-liste { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0; padding: 0 0 0 120px; font-size: 1rem; }
  #menue-liste > li { position: relative; }
  #menue-liste > li > a { padding: 14px 12px; }
  #menue-liste > li:last-child > a { padding-right: 0; }
  /* Untermenüs der rechten Punkte nach links aufklappen, sonst laufen sie aus dem Bild */
  #menue-liste > li:nth-last-child(-n+3) > ul { left: auto; right: 0; }
  .menue li ul {
    display: none; position: absolute; left: 0; top: 100%; min-width: 260px;
    background: var(--dunkel); padding: 6px 0; z-index: 5; box-shadow: 0 6px 18px rgb(0 0 0 / 0.18);
  }
  .menue li li a { padding: 8px 16px; }
  .menue li:hover > ul, .menue li:focus-within > ul { display: block; }
}
/* Inhalt */
main { padding-top: 32px; padding-bottom: 56px; min-height: 50vh; }
h1, h2, h3 { color: var(--dunkel); line-height: 1.25; }
h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 0 0 0.6em; }
h2 { font-size: 1.35rem; margin: 1.8em 0 0.6em; }
h3 { font-size: 1.1rem; margin: 0.6em 0 0.3em; }
.text { max-width: 720px; }
.text table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: 0.95rem; display: block; overflow-x: auto; }
.text th, .text td { border-bottom: 1px solid var(--linie); padding: 8px 10px; text-align: left; vertical-align: top; }
.text th { color: var(--dunkel); background: var(--hell); }

.titelbild { margin: 0 0 32px; }
.titelbild img { width: 100%; max-height: 420px; object-fit: cover; }
.beitragsbild { margin: 0 0 1.5em; }
.pfad { font-size: 0.9rem; color: var(--grau); margin: 0 0 12px; }
.datum { color: var(--terrakotta); font-weight: 700; margin: -0.6em 0 1.2em; }

.knopf {
  display: inline-block; background: var(--blau); color: #fff; text-decoration: none;
  padding: 10px 18px; border-radius: 4px; font-weight: 700; margin-top: 24px;
}
.knopf:hover { background: var(--dunkel); color: #fff; }

/* Kacheln für Beiträge */
.aktuell { margin-top: 48px; }
.kacheln { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); margin-top: 16px; }
.kachel { background: var(--hell); border-radius: 6px; overflow: hidden; }
.kachel > a { text-decoration: none; color: inherit; display: block; }
.kachel img, .kachel-leer { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--linie); }
.kachel h3 { padding: 0 16px; color: var(--blau); }
.kachel > a:hover h3 { text-decoration: underline; }
.kachel p { padding: 0 16px 16px; margin: 0; font-size: 0.95rem; color: var(--grau); }

/* Unterseiten, Galerie, Downloads */
.unterseiten ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0 0; }
.unterseiten a { display: block; border: 1px solid var(--blau); border-radius: 4px; padding: 8px 14px; text-decoration: none; font-weight: 700; }
.unterseiten a:hover { background: var(--blau); color: #fff; }

.galerie { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.galerie img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.galerie span { display: block; font-size: 0.9rem; color: var(--grau); margin-top: 4px; }

.dateien { padding-left: 1.2em; }

/* Fuß */
.fuss { background: var(--dunkel); color: #e8ebf2; font-size: 0.95rem; }
.fuss a { color: #fff; }
.fuss h2 { color: #fff; font-size: 1rem; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.fuss-innen { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); padding-top: 32px; padding-bottom: 32px; }
.fuss p { margin: 0 0 8px; overflow-wrap: anywhere; }
