/* ==========================================================================
   PVmedo – Gestaltung (eine Datei für alle Seiten)
   Für Laien: Diese Datei bitte nur ändern, wenn man weiß, was man tut.
   Die Farben stehen ganz oben unter ":root" – dort kann man sie tauschen.
   ========================================================================== */

:root {
  --papier: #f6f2ea;        /* Hintergrund der Seite */
  --papier-dunkel: #ece6da; /* Flächen, Kacheln */
  --tinte: #1e241f;         /* Text */
  --tinte-weich: #4c544d;   /* Nebentext, Bildunterschriften */
  --moos: #2e4a3a;          /* Hauptfarbe: Links, Buttons, Überschriften-Akzent */
  --moos-tief: #1f3328;     /* Hover, Fußzeile */
  --nessel: #7a9a3e;        /* Akzent: Linien, Marker, Zitatstrich */
  --nessel-schrift: #4a5f21;/* dunklere Variante für kleine Schrift (Kontrast) */
  --sonne: #c9922f;         /* nur dünne Akzentlinien und Rand der Platzhalter */
  --linie: #d9d1c3;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --abstand: clamp(3rem, 8vw, 6rem);
}

/* ---------- Grundlagen ---------- */

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

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--moos); text-decoration: underline; text-underline-offset: .15em; }
a:hover { color: var(--moos-tief); }

:focus-visible { outline: 3px solid var(--moos); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.2;
  color: var(--moos);
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 500; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); font-weight: 600; color: var(--tinte); }

sub { line-height: 0; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: .4em; }

/* Kicker: kleine Vorüberschrift über einem Abschnitt */
.kicker {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--nessel-schrift);
  margin: 0 0 .8rem;
  font-weight: 600;
}

/* ---------- Zum Inhalt springen (nur bei Tastaturbedienung sichtbar) ---------- */

.sprunglink {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--moos);
  color: var(--papier);
  padding: .6rem 1rem;
  font-family: var(--sans);
  z-index: 10;
}
.sprunglink:focus { left: 0; color: var(--papier); }

/* ---------- Kopfzeile und Navigation ---------- */

.kopf { border-bottom: 1px solid var(--linie); background: var(--papier); }

.inhalt { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 1.25rem; }

.kopf-innen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-height: 4.2rem;
  position: relative;
}

.wortmarke {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--moos);
  text-decoration: none;
}
.wortmarke:hover { color: var(--moos-tief); }
.wortmarke .o { color: var(--nessel); }

/* Menü-Schalter für Handys (ohne JavaScript, über ein unsichtbares Ankreuzfeld) */
.menue-schalter {
  position: absolute;
  right: 1.25rem;
  top: 1rem;
  width: 5.5rem;
  height: 2.4rem;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.menue-knopf {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--moos);
  padding: .5rem .2rem;
}
.balken, .balken::before, .balken::after {
  display: block;
  width: 1.4rem;
  height: 2px;
  background: var(--moos);
  position: relative;
  content: "";
}
.balken::before { position: absolute; top: -6px; }
.balken::after { position: absolute; top: 6px; }
.menue-schalter:focus-visible + .menue-knopf { outline: 3px solid var(--moos); outline-offset: 2px; }

.hauptmenue { display: none; flex-basis: 100%; padding-bottom: .8rem; }
.menue-schalter:checked ~ .hauptmenue { display: block; }
.hauptmenue ul { list-style: none; margin: 0; padding: 0; }
.hauptmenue li { margin: 0; border-top: 1px solid var(--linie); }
.hauptmenue a {
  display: block;
  padding: .75rem 0;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--tinte);
  text-decoration: none;
}
.hauptmenue a:hover { color: var(--moos); }
.hauptmenue a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--nessel);
  text-decoration-thickness: 2px;
  text-underline-offset: .4em;
}

@media (min-width: 860px) {
  .menue-schalter, .menue-knopf { display: none; }
  .hauptmenue { display: block; flex-basis: auto; padding-bottom: 0; }
  .hauptmenue ul { display: flex; gap: 2rem; }
  .hauptmenue li { border-top: 0; }
  .hauptmenue a { padding: .4rem 0; font-size: .98rem; }
}

/* ---------- Abschnitte und Spalten ---------- */

main { display: block; }

.abschnitt { padding-block: 0 var(--abstand); }
.abschnitt.flaeche { background: var(--papier-dunkel); padding-block: var(--abstand); margin-bottom: var(--abstand); }

.spalte { max-width: 68ch; }
.spalte-mitte { max-width: 68ch; margin-inline: auto; }

.seitenkopf { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 4vw, 2.5rem); }
.einleitung { font-size: 1.25rem; color: var(--tinte-weich); max-width: 60ch; }
.seitenkopf .einleitung { margin-bottom: 0; }

/* ---------- Hero (Startseite) ---------- */

.hero { padding-block: clamp(2.5rem, 7vw, 5rem) var(--abstand); }
.hero-raster { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: center; }
.hero-raster > * { min-width: 0; }
.hero h1 { margin-bottom: .4em; }
.hero .einleitung { color: var(--tinte); max-width: 36ch; }
@media (min-width: 860px) {
  .hero-raster { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 3.5rem; }
}

.knopfreihe { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* ---------- Buttons ---------- */

.knopf {
  display: inline-block;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.3;
  padding: .75rem 1.4rem;
  border-radius: 4px;
  background: var(--moos);
  color: var(--papier);
  border: 2px solid var(--moos);
  text-decoration: none;
}
.knopf:hover { background: var(--moos-tief); border-color: var(--moos-tief); color: var(--papier); }
.knopf-zweit { background: transparent; color: var(--moos); }
.knopf-zweit:hover { background: var(--moos); color: var(--papier); border-color: var(--moos); }

/* ---------- Bilder ---------- */

figure { margin: 0; }
figure img, img.bild {
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
figcaption {
  font-family: var(--sans);
  font-size: .85rem;
  line-height: 1.45;
  color: var(--tinte-weich);
  margin-top: .6rem;
  max-width: 68ch;
}
.bild-mitte { margin-inline: auto; width: fit-content; max-width: 100%; }
.figur-abstand { margin-block: 2rem; }
/* Zwischenüberschrift nach Bild/Bildpaar: genug Luft nach oben */
figure + h3, .bildpaar + .spalte, .bildpaar + h3 { margin-top: 2rem; }
.bildpaar + .spalte > h3:first-child { margin-top: 0; }

/* Bild und Text nebeneinander, abwechselnd links/rechts */
.bildpaar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: center; }
.bildpaar > * { min-width: 0; }
@media (min-width: 860px) {
  .bildpaar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5rem; }
  .bildpaar.umgekehrt figure { order: -1; }
}

.bildreihe { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; margin-top: 2rem; }
.bildreihe > * { min-width: 0; }
@media (min-width: 760px) {
  .bildreihe { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
/* Bildreihe: alle Bilder gleich hoch (4:3), zugeschnitten statt verzerrt */
.bildreihe img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center; }

/* ---------- Kacheln ---------- */

.kacheln { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; margin-top: 2rem; }
.kacheln > * { min-width: 0; }
@media (min-width: 760px) { .kacheln { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.kachel {
  background: var(--papier-dunkel);
  border-top: 2px solid var(--nessel);
  border-radius: 0 0 6px 6px;
  padding: 1.5rem 1.5rem 1.2rem;
}
.kachel h3 { margin-bottom: .5em; color: var(--moos); }
.kachel p:last-child { margin-bottom: 0; }

/* ---------- Zitate ---------- */

.zitat {
  margin: 2rem 0;
  padding: .2rem 0 .2rem 1.5rem;
  border-left: 3px solid var(--nessel);
  max-width: 68ch;
}
.zitat p {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.3vw, 1.5rem);
  line-height: 1.5;
  margin-bottom: .8rem;
}
.zitat footer { font-family: var(--sans); font-size: .9rem; color: var(--tinte-weich); }
.zitat cite { font-style: normal; font-weight: 600; }

/* ---------- Hinweise, Angaben, Legende ---------- */

.hinweis {
  background: var(--papier-dunkel);
  border-left: 3px solid var(--nessel);
  padding: 1rem 1.3rem;
  max-width: 68ch;
  font-size: 1rem;
  margin-block: 1.5rem;
}
.hinweis p:last-child { margin-bottom: 0; }
.flaeche .hinweis { background: var(--papier); }

.angaben { max-width: 68ch; padding-left: 1.2rem; }
.angaben li::marker { color: var(--nessel); }

.legende { max-width: 68ch; margin: 1.5rem 0; }
.legende dt { font-family: var(--sans); font-weight: 600; font-size: .95rem; margin-top: 1rem; color: var(--moos); }
.legende dd { margin: .15rem 0 0; }

.trennlinie { border: 0; border-top: 1px solid var(--sonne); width: 4rem; margin: 2rem 0; }

/* Platzhalter: hier muss noch etwas eingetragen werden */
.platzhalter {
  background: #fbe9a0;
  color: var(--tinte);
  border: 1px dashed var(--sonne);
  padding: .05em .35em;
  border-radius: 3px;
  font-family: var(--sans);
  font-size: .92em;
}
.platzhalter-bild {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 18rem;
  padding: 1rem;
  background: #fbe9a0;
  border: 1px dashed var(--sonne);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: .95rem;
}

/* Rechtstexte */
.rechtstext { max-width: 68ch; }
.rechtstext h2 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); margin-top: 2rem; }
.rechtstext h2:first-child { margin-top: 0; }

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

.fuss {
  background: var(--moos-tief);
  color: var(--papier);
  padding-block: 2.5rem;
  font-family: var(--sans);
  font-size: .95rem;
}
.fuss-innen { display: flex; flex-wrap: wrap; gap: 1rem 3rem; justify-content: space-between; align-items: baseline; }
.fuss .wortmarke { color: var(--papier); font-size: 1.4rem; }
.fuss .wortmarke .o { color: #a9c46a; }
.fuss p { margin: .3rem 0 0; color: #d9d1c3; }
.fuss ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; }
.fuss li { margin: 0; }
.fuss a { color: var(--papier); }
.fuss a:hover { color: #ffffff; }
.fuss :focus-visible { outline-color: var(--papier); }

/* ---------- Drucken ---------- */

@media print {
  .kopf, .sprunglink, .knopfreihe { display: none; }
  body { background: #fff; font-size: 11pt; }
  .abschnitt { padding-block: 0 1.2rem; }
  .fuss { background: #fff; color: #000; padding-block: 1rem; }
  .fuss .wortmarke, .fuss p, .fuss a { color: #000; }
  a { color: #000; }
  img { break-inside: avoid; }
}
