:root {
  --gruen-dunkel: #2f4a35;
  --gruen: #4f7a55;
  --gruen-hell: #e8efe6;
  --sand: #f7f4ee;
  --text: #222a24;
  --text-leise: #5b6660;
  --linie: #d9ddd5;
  --weiss: #fff;
  --radius: 6px;
  --breite: 72rem;
  --schrift: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --schrift-titel: Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--schrift); font-size: 1.0625rem; line-height: 1.6; color: var(--text); background: var(--sand); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gruen-dunkel); text-underline-offset: 2px; }
a:hover { color: var(--gruen); }
h1, h2, h3 { font-family: var(--schrift-titel); font-weight: normal; line-height: 1.2; color: var(--gruen-dunkel); }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 .5em; }
h2 { font-size: 1.6rem; margin: 2em 0 .6em; }

.wrap { max-width: var(--breite); margin: 0 auto; padding: 0 1rem; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--weiss); padding: .5rem 1rem; z-index: 10; }

/* Kopf */
.kopf { background: var(--gruen-dunkel); color: var(--weiss); }
.kopf .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; flex-wrap: wrap; }
.logo { color: var(--weiss); text-decoration: none; font-family: var(--schrift-titel); font-size: 1.35rem; }
.logo span { display: block; font-family: var(--schrift); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.logo:hover { color: var(--weiss); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.nav a, .nav summary { display: block; color: var(--weiss); text-decoration: none; padding: .5rem .75rem; border-radius: var(--radius); cursor: pointer; }
.nav a:hover, .nav summary:hover, .nav a[aria-current='page'] { background: rgba(255,255,255,.14); color: var(--weiss); }
.nav details { position: relative; }
.nav summary { list-style: none; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after { content: ' ▾'; font-size: .8em; }
.nav details ul { position: absolute; top: 100%; left: 0; z-index: 5; flex-direction: column; min-width: 15rem; background: var(--gruen-dunkel); padding: .4rem; border-radius: var(--radius); box-shadow: 0 6px 18px rgba(0,0,0,.2); }
@media (max-width: 40rem) {
  .nav { width: 100%; padding-bottom: .5rem; }
  .nav details ul { position: static; box-shadow: none; padding-left: 1rem; }
}

/* Banner */
.banner { background: var(--gruen) center/cover no-repeat; color: var(--weiss); }
.banner .wrap { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.banner h1 { color: var(--weiss); text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.banner p { max-width: 40rem; margin: 0; font-size: 1.15rem; text-shadow: 0 1px 6px rgba(0,0,0,.35); }

main { padding: 2.5rem 0 4rem; }
.text { max-width: 46rem; }

/* Karten auf der Startseite */
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.25rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.karte { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.karte a { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.karte .bild { aspect-ratio: 4 / 3; background: var(--gruen-hell); object-fit: cover; width: 100%; }
.karte .inhalt { padding: 1rem 1.1rem 1.2rem; }
.karte h3 { margin: 0 0 .3rem; font-size: 1.3rem; }
.karte p { margin: 0; color: var(--text-leise); font-size: .95rem; }
.karte a:hover h3 { text-decoration: underline; }

.hinweis { background: var(--gruen-hell); border-left: 4px solid var(--gruen); padding: 1rem 1.25rem; border-radius: var(--radius); margin: 1.5rem 0; }
.hinweis p { margin: .25rem 0; }

/* Galerie */
.galerie-kopf { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.knopf { display: inline-block; background: var(--gruen-dunkel); color: var(--weiss); text-decoration: none; padding: .6rem 1rem; border-radius: var(--radius); font-size: .95rem; border: 0; cursor: pointer; font-family: inherit; }
.knopf:hover { background: var(--gruen); color: var(--weiss); }
.knopf.leise { background: transparent; color: var(--gruen-dunkel); border: 1px solid var(--gruen-dunkel); }
.knopf.leise:hover { background: var(--gruen-hell); color: var(--gruen-dunkel); }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; list-style: none; margin: 1rem 0 0; padding: 0; }
.motiv { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.motiv button { all: unset; cursor: zoom-in; display: block; }
.motiv button:focus-visible { outline: 3px solid var(--gruen); outline-offset: -3px; }
.motiv img, .motiv .platzhalter { aspect-ratio: 1; width: 100%; object-fit: contain; background: var(--weiss); }
.platzhalter { display: grid; place-items: center; color: var(--text-leise); font-size: .85rem; background: var(--gruen-hell) !important; padding: 1rem; text-align: center; }
.motiv .info { padding: .7rem .8rem .9rem; font-size: .9rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; border-top: 1px solid var(--linie); }
.motiv .info strong { font-weight: 600; line-height: 1.35; }
.motiv .aktionen { margin-top: auto; display: flex; gap: .8rem; flex-wrap: wrap; font-size: .85rem; }
.motiv .masse { color: var(--text-leise); font-size: .8rem; }

dialog.leuchtkasten { border: 0; padding: 0; max-width: min(92vw, 70rem); background: var(--weiss); border-radius: var(--radius); }
dialog.leuchtkasten::backdrop { background: rgba(20, 30, 22, .85); }
dialog.leuchtkasten img { max-height: 78vh; width: auto; margin: 0 auto; }
dialog.leuchtkasten .leiste { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 1rem; flex-wrap: wrap; }

/* Formular */
form.kontakt { display: grid; gap: 1rem; max-width: 36rem; }
form.kontakt label { display: grid; gap: .3rem; font-weight: 600; font-size: .95rem; }
form.kontakt input, form.kontakt textarea { font: inherit; padding: .6rem .7rem; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--weiss); }
form.kontakt textarea { min-height: 10rem; resize: vertical; }
form.kontakt .check { display: flex; gap: .6rem; align-items: start; font-weight: normal; }
form.kontakt .check input { margin-top: .35rem; }
.honig { position: absolute; left: -9999px; }
.meldung { padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.meldung.ok { background: var(--gruen-hell); border-left: 4px solid var(--gruen); }
.meldung.fehler { background: #fbeaea; border-left: 4px solid #a33; }

/* Fuß */
.fuss { background: var(--weiss); border-top: 1px solid var(--linie); font-size: .9rem; color: var(--text-leise); }
.fuss .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.fuss ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* Bildarchiv */
.knopf.hell { background: var(--weiss); color: var(--gruen-dunkel); text-shadow: none; }
.knopf.hell:hover { background: var(--gruen-hell); color: var(--gruen-dunkel); }
.pfad { font-size: .9rem; color: var(--text-leise); margin-bottom: .5rem; }
.themen { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin: 1.5rem 0 1rem; }
.gruppe { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem 1.2rem; }
.gruppe h2 { font-size: 1.25rem; margin: 0 0 .5rem; }
.gruppe ul { list-style: none; margin: 0; padding: 0; }
.gruppe li { display: flex; justify-content: space-between; gap: .5rem; padding: .2rem 0; border-bottom: 1px dotted var(--linie); }
.gruppe li:last-child { border-bottom: 0; }
.reiter { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.reiter a { display: block; padding: .35rem .8rem; border: 1px solid var(--linie); border-radius: 999px; text-decoration: none; background: var(--weiss); font-size: .9rem; }
.reiter a[aria-current='page'] { background: var(--gruen-dunkel); color: var(--weiss); border-color: var(--gruen-dunkel); }
.raster { grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); }
.motiv img { aspect-ratio: 1; width: 100%; object-fit: contain; padding: .5rem; background: var(--weiss); }
.motiv .info { font-size: .85rem; }
.hinweis ol { padding-left: 1.2rem; }
.hinweis li { margin: .4rem 0; }
form.suche { display: grid; gap: .4rem; max-width: 36rem; margin-bottom: 1rem; }
form.suche label { font-weight: 600; }
form.suche input { font: inherit; font-size: 1.1rem; padding: .7rem .8rem; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--weiss); }
dialog.leuchtkasten img { min-height: 30vh; background: var(--gruen-hell); }

/* Verwaltung */
.tabelle { overflow-x: auto; margin-top: 1rem; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); }
.tabelle table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabelle th, .tabelle td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle th { background: var(--gruen-hell); font-weight: 600; }
.tabelle tr.gesperrt td { color: var(--text-leise); background: #faf7f2; }
.aktionen-zeile form { display: flex; gap: .3rem; flex-wrap: wrap; }
.knopf.klein { padding: .25rem .5rem; font-size: .8rem; }
details.gruppe summary { cursor: pointer; }
[hidden] { display: none !important; }
