/* ==========================================================================
   Kleingartenverein Rechenberg e.V. – Gestaltung der Website
   Entwurf A: warmes Papierweiß, Moosgrün, Terracotta-Akzent, gelbes Blatt-Logo
   ========================================================================== */

/* --- Farben und Maße an einer Stelle ------------------------------------ */
:root {
  --papier:        #f6f3ec;
  --papier-dunkel: #ece7db;
  --karte:         #ffffff;
  --text:          #2a2e26;
  --text-weich:    #4b4f45;
  --text-leise:    #6b6a62;
  --text-offen:    #9a978c;   /* für [noch offene Angaben] */
  --gruen:         #4f6b3f;
  --gruen-dunkel:  #3a5030;
  --terracotta:    #b8613a;
  --gelb:          #f2c14e;
  --linie:         #e3ded2;
  --rand:          96px;      /* Seitenabstand auf großen Bildschirmen */
  --breite:        1440px;
}

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

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--text);
  font-family: 'Source Sans 3', 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gruen); text-decoration: none; }
a:hover, a:focus-visible { color: var(--gruen-dunkel); text-decoration: underline; }

/* Tastatur-Bedienung sichtbar machen */
:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 2px; }

h1, h2, h3 { font-family: Lora, Georgia, 'Times New Roman', serif; font-weight: 500; margin: 0; text-wrap: pretty; }
h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.08; }
h2 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.2; }
h3 { font-size: 22px; font-weight: 600; line-height: 1.3; }
p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* „Springe zum Inhalt“ – nur für Tastatur und Screenreader sichtbar */
.sprungmarke {
  position: absolute; left: -9999px; top: 0;
  background: var(--gruen); color: #fff; padding: 12px 20px; z-index: 100;
}
.sprungmarke:focus { left: 0; }

/* --- Wiederkehrende Bausteine -------------------------------------------- */
.bahn { width: 100%; }
.mitte { max-width: var(--breite); margin: 0 auto; padding-inline: var(--rand); }
.abschnitt { padding-block: 56px; }
.abschnitt--schmal { padding-block: 40px; }
.linie-oben { border-top: 1px solid var(--linie); }

.offen { color: var(--text-offen); font-style: italic; }   /* [Angabe folgt] */

.vorspann {
  font-size: 14px; letter-spacing: .12em; font-weight: 600;
  color: var(--terracotta); text-transform: uppercase;
}
.vorspann--leise { color: var(--text-leise); }

.fliess { max-width: 68ch; }
.fliess p { font-size: 18px; line-height: 1.7; color: var(--text-weich); }

/* --- Kopfzeile ----------------------------------------------------------- */
.kopf { border-bottom: 1px solid var(--linie); background: var(--papier); }
.kopf__innen {
  display: flex; flex-wrap: wrap; gap: 18px 32px;
  align-items: center; justify-content: space-between;
  padding-block: 22px;
}
.marke { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.marke:hover { text-decoration: none; }
.marke__zeichen { display: block; flex-shrink: 0; }
.marke__zeichen img { height: 50px; width: auto; }
.marke__name { font-family: Lora, Georgia, serif; font-weight: 600; font-size: 20px; line-height: 1.15; }
.marke__ort  { font-size: 13px; color: var(--text-leise); letter-spacing: .04em; }

.menue { display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 16px; font-weight: 600; }
.menue a { color: var(--text-leise); padding-block: 4px; }
.menue a:hover { color: var(--gruen); }
.menue a[aria-current="page"] { color: var(--text); border-bottom: 2px solid var(--gruen); }

/* --- Schaltflächen ------------------------------------------------------- */
.knopf {
  display: inline-block; background: var(--gruen); color: #fff;
  padding: 14px 24px; border-radius: 3px; font-weight: 600; font-size: 16px;
  border: 2px solid var(--gruen); cursor: pointer;
}
.knopf:hover, .knopf:focus-visible { background: var(--gruen-dunkel); border-color: var(--gruen-dunkel); color: #fff; text-decoration: none; }
.knopf--leer { background: transparent; color: var(--gruen); }
.knopf--leer:hover { background: var(--gruen); color: #fff; }
.knopf-reihe { display: flex; flex-wrap: wrap; gap: 14px; }

/* --- Startseite: Aufmacher ----------------------------------------------- */
/* Die Zeichnung liegt quer und bekommt die volle Breite; der Text steht darunter. */
.aufmacher { padding-block: 48px 56px; }
.aufmacher__zeichnung { width: 100%; max-width: 900px; height: auto;
  display: block; margin: 44px auto 0; }
.aufmacher__kopf { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.aufmacher__text { display: flex; flex-direction: column; gap: 22px; }
.aufmacher__text p:not(.vorspann) { font-size: 20px; line-height: 1.55;
  color: var(--text-weich); max-width: 520px; margin: 0; }

/* --- Raster -------------------------------------------------------------- */
.raster { display: grid; gap: 32px; }
.raster--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raster--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.raster--seite { grid-template-columns: 1fr 2fr; gap: 64px; }

.karte {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--karte); border: 1px solid var(--linie); border-radius: 4px; padding: 28px;
}
.karte p { font-size: 16px; line-height: 1.55; color: var(--text-weich); margin: 0; }
.karte__weiter { font-weight: 600; margin-top: auto; }

/* --- Listen: Termine, Vorstand, Downloads -------------------------------- */
.liste { display: flex; flex-direction: column; border-top: 1px solid var(--linie); }
.liste__zeile {
  display: grid; grid-template-columns: 210px 1fr; gap: 24px;
  padding-block: 18px; border-bottom: 1px solid var(--linie); align-items: baseline;
}
.liste__wann { font-weight: 600; color: var(--gruen); }
.liste__zeit { display: block; font-weight: 400; font-size: 15px; color: var(--text-leise); }
.liste__was strong { display: block; font-size: 18px; }
.liste__was span { font-size: 16px; color: var(--text-weich); }

.personen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.person { background: var(--karte); border: 1px solid var(--linie); border-radius: 4px; padding: 22px 24px; }
.person__amt  { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--terracotta); font-weight: 600; }
.person__name { font-family: Lora, Georgia, serif; font-size: 21px; font-weight: 600; margin-top: 4px; }

.dokumente { display: flex; flex-direction: column; gap: 2px; }
.dokument {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px; background: var(--karte); border: 1px solid var(--linie);
}
.dokument:hover { border-color: var(--gruen); text-decoration: none; }
.dokument__name { font-weight: 600; color: var(--text); }
.dokument__info { font-size: 15px; color: var(--text-leise); }

/* --- Bildergalerie ------------------------------------------------------- */
.galerie { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.galerie figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.galerie img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; background: var(--papier-dunkel); }
.galerie figcaption { font-size: 15px; color: var(--text-leise); }

/* --- Hinweiskasten ------------------------------------------------------- */
.hinweis {
  background: var(--karte); border: 1px solid var(--linie);
  border-left: 4px solid var(--gelb); padding: 22px 26px; border-radius: 3px;
}
.hinweis h3 { margin-bottom: 8px; }
.hinweis p { font-size: 16px; color: var(--text-weich); }

/* --- Formular ------------------------------------------------------------ */
.formular { display: flex; flex-direction: column; gap: 20px; max-width: 620px; }
.feld { display: flex; flex-direction: column; gap: 6px; }
.feld label { font-weight: 600; font-size: 16px; }
.feld .erklaerung { font-size: 15px; color: var(--text-leise); font-weight: 400; }
.feld input, .feld textarea {
  font: inherit; font-size: 17px; color: var(--text);
  padding: 12px 14px; border: 1px solid #c9c3b4; border-radius: 3px; background: #fff;
  width: 100%; min-height: 48px;
}
.feld textarea { min-height: 170px; resize: vertical; }
.feld input:focus, .feld textarea:focus { border-color: var(--gruen); outline: 2px solid var(--gruen); outline-offset: 0; }
.honig { position: absolute; left: -9999px; }   /* Spam-Falle, für Menschen unsichtbar */

.meldung { padding: 18px 22px; border-radius: 3px; font-size: 17px; }
.meldung--gut     { background: #e7f0e2; border: 1px solid var(--gruen); }
.meldung--schlecht{ background: #f7e7e1; border: 1px solid var(--terracotta); }

/* --- Fußzeile ------------------------------------------------------------ */
.fuss { background: var(--papier-dunkel); font-size: 15px; color: var(--text-leise); }
.fuss__innen {
  display: flex; flex-wrap: wrap; gap: 24px 48px;
  justify-content: space-between; align-items: flex-start; padding-block: 36px 44px;
}
.fuss a { color: var(--text-leise); }
.fuss__marke { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.fuss__zeichen { display: block; flex-shrink: 0; }
.fuss__zeichen img { height: 28px; width: auto; }
.fuss__rechts { display: flex; flex-wrap: wrap; gap: 24px; }

/* ==========================================================================
   Kleinere Bildschirme
   ========================================================================== */
@media (max-width: 1100px) {
  :root { --rand: 40px; }
  .aufmacher { gap: 40px; }
  .aufmacher__bild { height: 420px; }
}

@media (max-width: 820px) {
  :root { --rand: 24px; }
  body { font-size: 17px; }
  .abschnitt { padding-block: 40px; }
  .kopf__innen { padding-block: 18px; }
  .menue { gap: 6px 20px; font-size: 15px; width: 100%; }
  .aufmacher { padding-block: 24px 36px; }
  .aufmacher__zeichnung { margin: 28px auto 0; }
  .aufmacher__kopf { grid-template-columns: 1fr; gap: 24px; }
  .aufmacher__text p:not(.vorspann) { font-size: 18px; }
  .raster--2, .raster--3, .raster--seite { grid-template-columns: 1fr; gap: 24px; }
  .galerie { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .personen { grid-template-columns: 1fr; }
  .liste__zeile { grid-template-columns: 1fr; gap: 4px; }
  .fuss__innen { flex-direction: column; }
}

@media (max-width: 480px) {
  .galerie { grid-template-columns: 1fr; }
  .marke__name { font-size: 17px; }
  .marke__zeichen img { height: 40px; }
  .knopf { width: 100%; text-align: center; }
}

/* --- Drucken ------------------------------------------------------------- */
@media print {
  .kopf, .fuss, .knopf-reihe { display: none; }
  body { background: #fff; font-size: 12pt; }
  a { color: #000; text-decoration: underline; }
}

/* --- Efeuranke als Randschmuck -------------------------------------------
   Rein dekorativ. Füllt den freien Rand auf breiten Bildschirmen und
   verschwindet, sobald der Platz knapp wird.                              */
.mit-ranke { position: relative; }
.ranke {
  position: absolute; top: 0; right: -24px; bottom: 0;
  width: 190px; overflow: hidden; pointer-events: none;
  opacity: .75;
}
.ranke svg { display: block; width: 190px; height: auto; }
.ranke--links { right: auto; left: -24px; transform: scaleX(-1); }

/* Inhalt macht der Ranke Platz, damit nichts überdeckt wird.
   Über den Innenabstand, damit die Lesebreite der Texte erhalten bleibt. */
@media (min-width: 1251px) {
  .mit-ranke { padding-right: calc(var(--rand) + 215px); }
}
@media (max-width: 1250px) { .ranke { display: none; } }


/* --- Termine: vergangene blass, nächster hervorgehoben ------------------- */
.liste__zeile--vorbei { opacity: .42; }
.naechster {
  background: var(--karte); border: 1px solid var(--linie);
  border-left: 5px solid var(--gruen); border-radius: 3px;
  padding: 24px 28px; max-width: 68ch; margin-bottom: 36px;
}
.naechster__label { font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--terracotta); font-weight: 600; }
.naechster__wann { font-family: Lora, Georgia, serif; font-size: 28px; font-weight: 600;
  margin: 6px 0 2px; }
.naechster__was  { font-size: 19px; font-weight: 600; }
.naechster__wo   { font-size: 16px; color: var(--text-weich); margin-top: 4px; }

/* --- Deutlicher Hinweis (z.B. Aufnahmestopp) ---------------------------- */
.hinweis--wichtig { border-left-color: var(--terracotta); border-left-width: 5px; }
