/* wir-in — Startseite ohne Mandant: Ortsauswahl.
   Eigene Datei statt styles.css: Die PWA lädt diese Seite nie, und diese Seite
   braucht nichts von der PWA. Variablen sind bewusst dieselben, damit beide
   Oberflächen zusammengehören. */

:root {
  --gruen: #2f6b4f;
  --gruen-hell: #e8f2ec;
  --grund: #ffffff;
  --flaeche: #f6f7f5;
  --rand: #dfe3dd;
  --text: #1d2420;
  --text-leise: #5d6b62;
  --radius: 14px;
  --schatten: 0 1px 2px rgb(29 36 32 / 6%), 0 4px 12px rgb(29 36 32 / 5%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --gruen: #7ec4a0;
    --gruen-hell: #1e2b25;
    --grund: #121613;
    --flaeche: #1a201c;
    --rand: #2c352f;
    --text: #e9efea;
    --text-leise: #9aa9a0;
    --schatten: 0 1px 2px rgb(0 0 0 / 40%), 0 4px 12px rgb(0 0 0 / 30%);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--flaeche);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.visuell-versteckt {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  padding: .6rem 1rem;
  background: var(--gruen);
  color: #fff;
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; top: 0; }

main { flex: 1; }

/* --- Kopfleiste --- */

.kopfleiste {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--grund);
  border-bottom: 1px solid var(--rand);
  padding-top: env(safe-area-inset-top);
}
.kopfleiste-inhalt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 64rem;
  margin: 0 auto;
  padding: .7rem 1.25rem;
}
.wortmarke {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--gruen);
}
.kopf-nav a {
  margin-left: 1.25rem;
  color: var(--text-leise);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}
.kopf-nav a:hover { color: var(--gruen); }

/* --- Aufmacher ---
   Zweispaltig ab Tablet, darunter Text über Bild. Die Suche steht im
   Textteil, damit sie auf dem Telefon ohne Scrollen erreichbar bleibt. */

.aufmacher {
  display: grid;
  gap: 2rem;
  align-items: center;
  max-width: 64rem;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 1rem;
}
@media (min-width: 56rem) {
  .aufmacher {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding-top: 3.5rem;
  }
}

h1 {
  margin: 0 0 .75rem;
  font-size: clamp(1.75rem, 5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -.02em;
}

.vorspann {
  margin: 0 0 1.5rem;
  color: var(--text-leise);
  font-size: 1.02rem;
  line-height: 1.6;
}
.vorspann.mitte {
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.aufmacher-bild picture,
.block-bild picture { display: block; }

.aufmacher-bild img,
.block-bild img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--schatten);
}

/* Auf dem Telefon zuerst der Text, dann das Bild — sonst muss man am Bild
   vorbeiscrollen, um überhaupt zur Suche zu kommen. */
@media (max-width: 55.999rem) {
  .aufmacher-bild { order: 2; }
  .aufmacher-text { order: 1; }
}

/* --- Angebot --- */

.angebot {
  max-width: 64rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 0;
  text-align: center;
}
.angebot h2 { margin: 0 0 .75rem; }

h2 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: -.01em;
}

/* --- Bildblöcke --- */

.block {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  max-width: 64rem;
  margin: 0 auto;
  padding: 2.25rem 1.25rem;
}
@media (min-width: 56rem) {
  .block {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem 1.25rem;
  }
  /* Abwechselnde Seiten, damit die Folge nicht wie eine Liste wirkt. */
  .block.umgekehrt .block-bild { order: 2; }
}
.block-text h2 { margin: 0 0 .6rem; }
.block-text p {
  margin: 0;
  color: var(--text-leise);
  line-height: 1.65;
}

/* --- Aufruf --- */

.aufruf {
  max-width: 40rem;
  margin: 1rem auto 0;
  padding: 2.5rem 1.25rem;
  text-align: center;
}
.aufruf h2 { margin: 0 0 .6rem; }
.aufruf p {
  margin: 0 0 1.5rem;
  color: var(--text-leise);
  line-height: 1.6;
}

.knopf {
  display: inline-block;
  padding: .75rem 1.75rem;
  border-radius: 999px;
  background: var(--gruen);
  color: var(--grund);
  font-weight: 600;
  text-decoration: none;
}
.knopf:hover { filter: brightness(1.08); }

/* --- Fragen --- */

.fragen {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}
.fragen > h2 {
  margin: 0 0 1.25rem;
  text-align: center;
}

.fragen details {
  border-bottom: 1px solid var(--rand);
}
.fragen summary {
  padding: .95rem 2rem .95rem 0;
  position: relative;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.fragen summary::-webkit-details-marker { display: none; }
.fragen summary::after {
  content: "+";
  position: absolute;
  right: .35rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gruen);
  font-size: 1.3rem;
  line-height: 1;
}
.fragen details[open] summary::after { content: "\2013"; }
.fragen summary:focus-visible {
  outline: 2px solid var(--gruen);
  outline-offset: 2px;
}
.fragen details p {
  margin: 0 0 1.1rem;
  color: var(--text-leise);
  line-height: 1.65;
}
.fragen details a { color: var(--gruen); font-weight: 600; }

.beispiel {
  padding: .1rem .35rem;
  border-radius: 5px;
  background: var(--gruen-hell);
  color: var(--gruen);
  font-size: .92em;
  word-break: break-all;
}

/* --- Suchfeld --- */

.suchfeld {
  position: relative;
  display: flex;
  align-items: center;
}

.lupe, .leeren svg {
  width: 20px; height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.lupe {
  position: absolute;
  left: .9rem;
  color: var(--text-leise);
  pointer-events: none;
}

#suche {
  width: 100%;
  /* 16px Mindestgröße: Darunter zoomt iOS beim Fokussieren die Seite. */
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: var(--grund);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: .85rem 2.75rem;
  box-shadow: var(--schatten);
  appearance: none;
}
#suche:focus {
  outline: 2px solid var(--gruen);
  outline-offset: 1px;
  border-color: transparent;
}
/* Das eigene Kreuz reicht; das von WebKit säße daneben. */
#suche::-webkit-search-cancel-button { display: none; }

.leeren {
  position: absolute;
  right: .55rem;
  display: grid;
  place-items: center;
  width: 2rem; height: 2rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-leise);
  cursor: pointer;
}
.leeren:hover { background: var(--flaeche); color: var(--text); }

.hinweis {
  margin: .6rem .25rem 0;
  font-size: .85rem;
  color: var(--text-leise);
}

.status {
  margin: 1.25rem .25rem .5rem;
  font-size: .9rem;
  color: var(--text-leise);
  min-height: 1.4em;
}

/* --- Trefferliste --- */

.treffer {
  list-style: none;
  margin: .5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.treffer a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1rem;
  background: var(--grund);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--schatten);
  /* Fingerkuppe statt Mauszeiger: mindestens 44px hoch. */
  min-height: 44px;
}
.treffer a:hover { border-color: var(--gruen); }
.treffer a:focus-visible {
  outline: 2px solid var(--gruen);
  outline-offset: 1px;
}
.treffer li[aria-selected="true"] a {
  border-color: var(--gruen);
  background: var(--gruen-hell);
}

.ort { font-weight: 600; }
.ort mark {
  background: var(--gruen-hell);
  color: inherit;
  border-radius: 3px;
  padding: 0 .1em;
}
.wo {
  display: block;
  font-size: .85rem;
  color: var(--text-leise);
}
.pfeil {
  margin-left: auto;
  flex: none;
  width: 18px; height: 18px;
  fill: none;
  stroke: var(--text-leise);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.fuss {
  border-top: 1px solid var(--rand);
  padding: 1.25rem 1rem;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
}
.fuss p {
  max-width: 64rem;
  margin: 0 auto;
  font-size: .8rem;
  color: var(--text-leise);
}
.fuss a { color: inherit; }

/* Pflichtangaben im Fuß. Etwas kräftiger als der Quellenhinweis darüber —
   Impressum und Datenschutz müssen auffindbar sein, nicht versteckt. */
.fuss-recht {
  max-width: 64rem;
  margin: 0.9rem auto 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rand);
}
.fuss-recht a {
  margin-right: 1.1rem;
  color: var(--gruen);
  font-weight: 600;
  white-space: nowrap;
}
