/*
  Ergotherapie Grumbach – Gestaltung der statischen Seite (seit 11/2026).

  Nachgebildet nach dem WordPress-Theme „Spacious“ samt den Anpassungen, die
  dort im Customizer standen (Blau #0085ad, Text #575757, Lato, Seitenbreite
  1268 px). Bewusst ohne Theme-CSS, ohne jQuery und ohne Icon-Schrift: Die
  Seite lädt nur diese Datei, die Schrift und die Bilder – alles vom eigenen
  Server, damit die Content-Security-Policy (deploy/nginx/sicherheit.conf) nichts Fremdes
  zulassen muss.

  Keine style-Attribute im HTML verwenden: Die CSP erlaubt nur Stylesheets
  vom eigenen Server ('self'), Inline-Stile würde der Browser verwerfen.
*/

@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/lato-regular.woff") format("woff"); }
@font-face { font-family: "Lato"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/lato-italic.woff") format("woff"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/lato-bold.woff") format("woff"); }
@font-face { font-family: "Lato"; font-style: italic; font-weight: 700; font-display: swap; src: url("../fonts/lato-bolditalic.woff") format("woff"); }

:root {
  --blau: #0085ad;
  --text: #575757;
  --dunkel: #222222;
  --menue: #444444;
  --rot: #cf2e2e;
  --linie: #eaeaea;
  --fuss: #f8f8f8;
  --breite: 1268px;
}

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

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

body {
  margin: 0;
  padding: 30px 0;
  background: var(--blau);
  color: var(--text);
  font: 400 16px/1.5 "Lato", "Segoe UI", Arial, sans-serif;
}

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

a { color: var(--text); }
a:hover, a:focus-visible { color: var(--blau); }
:focus-visible { outline: 2px solid var(--blau); outline-offset: 2px; }

.sprung {
  position: absolute; left: -9999px; top: 0;
  background: #fff; color: var(--dunkel); padding: 8px 12px; z-index: 10;
}
.sprung:focus { left: 8px; top: 8px; }

.seite {
  max-width: var(--breite);
  margin: 0 auto;
  background: #fff;
}

/* 1268 px Seite − 2 × 25 px Rand = 1218 px Inhalt, wie bei Spacious */
.innen {
  max-width: var(--breite);
  margin: 0 auto;
  padding-left: 25px;
  padding-right: 25px;
}

/* ---------------------------------------------------------------- Kopf */

.kopfzeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 25px;
  padding-top: 15px;
  padding-bottom: 15px;
}

.logo { display: block; line-height: 0; }
.logo img { width: 241px; height: auto; }

.hauptmenue ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 25px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hauptmenue a {
  display: block;
  color: var(--menue);
  line-height: 30px;
  text-decoration: none;
}
.hauptmenue a:hover,
.hauptmenue a:focus-visible,
.hauptmenue a[aria-current="page"],
.hauptmenue a.bereich { color: var(--blau); }

.kopfbild img { display: block; width: 100%; height: auto; }

/* Wechselbild der Startseite: reine CSS-Überblendung, kein Skript.
   Fünf Bilder, je 6 s sichtbar, 30 s je Durchlauf. */
.wechselbild {
  position: relative;
  aspect-ratio: 1400 / 400;
  overflow: hidden;
}
.wechselbild img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: wechsel 30s infinite;
}
.wechselbild img:nth-child(1) { animation-delay: 0s; }
.wechselbild img:nth-child(2) { animation-delay: 6s; }
.wechselbild img:nth-child(3) { animation-delay: 12s; }
.wechselbild img:nth-child(4) { animation-delay: 18s; }
.wechselbild img:nth-child(5) { animation-delay: 24s; }
@keyframes wechsel {
  0%   { opacity: 0; }
  4%   { opacity: 1; }
  20%  { opacity: 1; }
  24%  { opacity: 0; }
  100% { opacity: 0; }
}
/* Das erste Bild steht schon vor dem ersten Durchlauf da. */
.wechselbild img:nth-child(1) { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .wechselbild img { animation: none; }
}

.titelleiste {
  border-top: 1px solid var(--linie);
  border-bottom: 1px solid var(--linie);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .05);
  padding: 20px 0;
}
.titelleiste h1 {
  margin: 0;
  color: var(--dunkel);
  font-size: 22px;
  line-height: 36px;
  font-weight: 400;
}

/* -------------------------------------------------------------- Inhalt */

.inhalt {
  padding-top: 40px;
  padding-bottom: 20px;
}

/* h1 nur auf der Startseite (dort gibt es keine Titelleiste) – sieht aus wie h2 */
.inhalt h1,
.inhalt h2 {
  margin: 0 0 18px;
  color: var(--dunkel);
  font-size: 22px;
  line-height: 28px;
  font-weight: 400;
}
.inhalt h2:not(:first-child) { margin-top: 12px; }

.inhalt p { margin: 0 0 24px; }

.inhalt ul { margin: 0 0 24px; padding-left: 1.3em; }
.inhalt li { margin-bottom: 4px; }
.inhalt li::marker { color: var(--blau); }

.inhalt a { text-decoration: underline; }

.hervor { color: var(--rot); }

.spalten {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}
.spalte { flex: 1 1 0; min-width: 0; }
.spalte.breit { flex: 2 1 0; }
.spalte.schmal { flex: 1 1 0; }

.bild { margin: 0 0 24px; }
.bild img { display: block; }
.bild.mitte img { margin: 0 auto; }
.portrait img { width: 312px; }

/* Rechtstexte: Zwischenüberschriften kleiner als die Seitenteile */
.inhalt h3 {
  margin: 24px 0 12px;
  color: var(--dunkel);
  font-size: 18px;
  line-height: 26px;
  font-weight: 700;
}

/* ------------------------------------------------------------- Galerie */

.galerie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.inhalt .galerie { padding-left: 0; }
.galerie li { margin: 0; }
.galerie li::marker { content: none; }
.galerie a { display: block; line-height: 0; }
.galerie img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: opacity .2s;
}
.galerie a:hover img { opacity: .85; }

.leuchtkasten {
  width: min(96vw, 1600px);
  max-height: 96vh;
  padding: 0;
  border: 0;
  background: #000;
}
.leuchtkasten::backdrop { background: rgba(0, 0, 0, .85); }
.leuchtkasten img {
  display: block;
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
}
.leuchtkasten .leiste {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  color: #fff;
}
.leuchtkasten button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}
.leuchtkasten button:hover, .leuchtkasten button:focus-visible { color: var(--blau); }

/* ----------------------------------------------------------- Formulare */

.formular { max-width: 760px; }
.formular fieldset { margin: 0 0 20px; padding: 0; border: 0; }
.formular legend { padding: 0; }
.formular legend, .formular .feldname {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}
.formular .feld { margin: 0 0 20px; }
.formular .zweispaltig {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.formular .zweispaltig label { display: block; }
.formular .hinweis { display: block; font-size: 14px; color: #777; margin-top: 2px; }
.formular .pflicht { color: var(--rot); }

.formular input[type="text"],
.formular input[type="email"],
.formular input[type="tel"],
.formular input[type="number"],
.formular textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 2px;
  background: #fff;
  color: var(--dunkel);
  font: inherit;
}
.formular textarea { min-height: 140px; resize: vertical; }
.formular input:focus, .formular textarea:focus { border-color: var(--blau); outline: none; box-shadow: 0 0 0 2px rgba(0, 133, 173, .25); }

.formular .wahl { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.formular .wahl label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
.formular .einwilligung label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.formular .einwilligung input { margin-top: 5px; }

/* Honigtopf: für Menschen unsichtbar, für einfache Bots ein normales Feld.
   Nicht display:none – manche Bots überspringen genau solche Felder. */
.formular .hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.knopf {
  display: inline-block;
  padding: 10px 22px;
  border: 0;
  border-radius: 2px;
  background: var(--blau);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.knopf:hover, .knopf:focus-visible { background: #006c8c; color: #fff; }

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

.fuss {
  border-top: 1px solid var(--linie);
  background: var(--fuss);
  padding: 10px 0;
  font-size: 12px;
  color: #666;
}
.fuss nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 18px; }
.fuss a { color: #666; text-decoration: none; }
.fuss a:hover, .fuss a:focus-visible { color: var(--blau); }

/* -------------------------------------------------------------- Handy */

@media (max-width: 1300px) {
  body { padding: 0; }
}

@media (max-width: 768px) {
  .innen { padding-left: 16px; padding-right: 16px; }
  .kopfzeile { justify-content: center; }
  .logo img { width: 180px; }
  .hauptmenue ul { justify-content: center; gap: 0 18px; }
  .spalten { flex-direction: column; gap: 0; }
  .spalte, .spalte.breit, .spalte.schmal { flex: none; width: 100%; }
  .portrait img { width: 260px; }
  .formular .zweispaltig { grid-template-columns: 1fr; }
  .fuss nav { justify-content: center; }
  .inhalt { padding-top: 28px; }
}

@media print {
  body { background: #fff; padding: 0; }
  .hauptmenue, .wechselbild, .kopfbild, .fuss { display: none; }
}
