/* ==========================================================
   Neurologie am Karmeliterplatz – Gestaltung für alle Seiten
   Farben stehen ganz oben und können hier zentral geändert werden.
   ========================================================== */

:root {
  --papier: #F5F7F7;        /* Hintergrund der Seite */
  --flaeche: #FFFFFF;       /* Hintergrund von Kopf, Fuß, Einstieg */
  --tinte: #17303A;         /* Haupttextfarbe */
  --tinte-leise: #4A5E66;   /* Nebentext */
  --einstieg: #EEF6F6;      /* zarter Türkiston im Einstiegsbereich */
  --spur: #1F8C94;          /* Kasack-Türkis: Messkurve, Markierungen */
  --spur-text: #176D73;     /* dunkleres Türkis für gut lesbare Schrift */
  --fokus: #1D5FD1;         /* Markierung bei Tastaturbedienung */
  --linie: #C9D3D5;         /* Trennlinien */
  --platzhalter: #FFF1B8;   /* Gelb für noch fehlende Angaben */
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

/* Dunkelmodus: greift automatisch, wenn das Gerät dunkel eingestellt ist */
@media (prefers-color-scheme: dark) {
  :root {
    --papier: #10191D; --flaeche: #162329; --tinte: #E6EEF0; --tinte-leise: #A7B7BC;
    --einstieg: #13272C; --spur: #4FC3CB; --spur-text: #6FD0D7; --fokus: #7FA8FF; --linie: #2D4149; --platzhalter: #5A4A12;
    color-scheme: dark;
  }
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; }
body { margin: 0; background: var(--papier); color: var(--tinte); font-family: var(--sans); line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--flaeche); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; }
.huelle { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.ph { background: var(--platzhalter); padding: 0 0.2em; border-radius: 2px; }

/* ---------- Kopfzeile mit Menü ---------- */
.kopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.kopf .huelle { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; padding-top: 1rem; padding-bottom: 1rem; }
.marke { font-family: var(--serif); font-size: 1.15rem; text-decoration: none; }
.menue ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; font-size: 0.95rem; }
.menue a { text-decoration: none; color: var(--tinte-leise); padding: 0.2rem 0; }
.menue a:hover { color: var(--tinte); text-decoration: underline; }
.menue a[aria-current="page"] { color: var(--tinte); border-bottom: 2px solid var(--spur); }
.kopf-tel { font-weight: 600; text-decoration: none; white-space: nowrap; }

/* ---------- Einstieg der Startseite (Zeichnung, Messkurve) ---------- */
.einstieg {
  background: var(--einstieg);
  border-bottom: 1px solid var(--linie);
}
.einstieg .huelle { padding-top: 4rem; }
.einstieg-raster { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end; }
.einstieg h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.05; margin: 0 0 1.25rem; max-width: 14ch; }
.einstieg .wer { font-size: 1.2rem; margin: 0; }
.einstieg .nachfolge { color: var(--tinte-leise); max-width: 38rem; margin: 0.75rem 0 0; }
.zeichnung { display: block; width: clamp(9rem, 22vw, 15.5rem); margin-bottom: calc(-2.5rem - 72px); position: relative; z-index: 1; opacity: 0.88; }
@media (prefers-color-scheme: dark) { .zeichnung { filter: invert(0.9); } }
.kurve { display: block; width: 100%; height: 120px; margin-top: 2.5rem; overflow: visible; }
.kurve path { fill: none; stroke: var(--spur); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
@media (max-width: 40rem) {
  .einstieg-raster { grid-template-columns: 1fr; }
  .zeichnung { width: 8.5rem; justify-self: end; margin-top: -1rem; }
}

/* Drei Kurzinfos unter der Messkurve */
.schnell { background: var(--flaeche); display: grid; align-items: stretch; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); border-top: 1px solid var(--linie); }
.schnell > div { padding: 1.5rem 1.5rem 1.75rem 1.5rem; }
.schnell > div + div { border-left: 1px solid var(--linie); }
@media (max-width: 40rem) { .schnell > div + div { border-left: 0; border-top: 1px solid var(--linie); } }
.schnell h2 { font-size: 0.95rem; font-weight: 600; margin: 0 0 0.4rem; color: var(--tinte-leise); }
.schnell p { margin: 0; }
.schnell .zeiten-kurz { margin: 0 0 0.4rem; display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.9rem; }
.schnell .zeiten-kurz dt { font-weight: 600; }
.schnell .zeiten-kurz dd { margin: 0; }
.schnell .gross { font-size: 1.4rem; font-family: var(--serif); text-decoration: none; }
.schnell .tel-gross { margin-top: 0.5rem; }

/* ---------- Inhaltsabschnitte (alle Seiten) ---------- */
main section { padding: 4rem 0; border-bottom: 1px solid var(--linie); }
main section:last-of-type { border-bottom: 0; }
.abschnitt { display: grid; grid-template-columns: minmax(12rem, 1fr) 2.6fr; gap: 1rem 3rem; }
@media (max-width: 52rem) { .abschnitt { grid-template-columns: 1fr; } }
.abschnitt > h2 { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; line-height: 1.2; margin: 0; }
.text { max-width: 40rem; }
.text p:first-child { margin-top: 0; }
.hinweis { border-left: 3px solid var(--spur); padding: 0.25rem 0 0.25rem 1rem; margin: 2rem 0 0; color: var(--tinte-leise); }
.hinweis strong { color: var(--tinte); }

/* ---------- Fotos (für Team- und Praxisfotos vorbereitet) ----------
   Jedes Foto wird automatisch auf ein einheitliches Format zugeschnitten. */
.foto { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: var(--linie); }
.foto-quer { aspect-ratio: 3 / 2; }

/* ---------- Fußzeile ---------- */
.fuss { background: var(--flaeche); border-top: 1px solid var(--linie); font-size: 0.95rem; color: var(--tinte-leise); }
.fuss .huelle { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; padding-top: 2rem; padding-bottom: 2rem; }
.fuss p { margin: 0; }
.fuss nav a { margin-right: 1.25rem; }

/* ---------- Kopfbereich der Unterseiten ---------- */
.seitenkopf { background: var(--einstieg); border-bottom: 1px solid var(--linie); }
.seitenkopf .huelle { padding-top: 3rem; padding-bottom: 2.5rem; }
.seitenkopf h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.1; margin: 0 0 0.75rem; }
.seitenkopf p { margin: 0; max-width: 40rem; color: var(--tinte-leise); }

/* ---------- Leistungen: Kacheln mit Symbol ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.erklaerung, #uebersicht { scroll-margin-top: 1rem; }
.kacheln { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: 0.9rem; }
.kachel {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; height: 100%;
  padding: 1.1rem 1.1rem 1.2rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 6px;
  text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.kachel:hover { border-color: var(--spur); box-shadow: 0 2px 10px rgba(23, 48, 58, 0.08); }
.kachel-titel { font-weight: 600; line-height: 1.3; hyphens: manual; overflow-wrap: break-word; max-width: 100%; }
.kachel-zusatz { font-size: 0.85rem; color: var(--tinte-leise); line-height: 1.3; hyphens: manual; }
.symbol { width: 3.1rem; height: 3.1rem; padding: 0.6rem; margin-bottom: 0.3rem; border-radius: 50%; background: var(--einstieg); color: var(--spur);
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.symbol.klein { display: block; margin-bottom: 0.75rem; }
.untertitel { display: block; font-family: var(--sans); font-size: 0.95rem; color: var(--tinte-leise); margin-top: 0.35rem; }
.erklaerung:target { background: var(--flaeche); }
.nach-oben { font-size: 0.95rem; margin-top: 1.25rem; }
@media (max-width: 40rem) {
  .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .kachel { padding: 0.85rem 0.7rem 0.95rem; }
  .kachel-titel { font-size: 0.9rem; }
  .kachel-zusatz { font-size: 0.8rem; }
}

/* ---------- Über uns: Lebenslauf als Tabelle ---------- */
.vita { width: 100%; border-collapse: collapse; table-layout: fixed; }
.vita th, .vita td { text-align: left; vertical-align: top; padding: 0.8rem 0; border-top: 1px solid var(--linie); }
.vita tr:last-child th, .vita tr:last-child td { border-bottom: 1px solid var(--linie); }
.vita th { width: 11.5rem; padding-right: 1.25rem; color: var(--spur); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vita-kurz th { width: 7rem; color: var(--tinte); }
.vita .detail { display: block; margin-top: 0.2rem; color: var(--tinte-leise); font-size: 0.95rem; }
@media (max-width: 40rem) {
  .vita, .vita tbody, .vita tr, .vita th, .vita td { display: block; width: auto; }
  .vita th { border-top: 1px solid var(--linie); padding-bottom: 0.15rem; }
  .vita td { border-top: 0; padding-top: 0; }
  .vita tr:last-child th { border-bottom: 0; }
}
.person-foto { max-width: 14rem; margin-top: 1rem; }
.nach-tabelle { margin-top: 1.25rem; }

/* ---------- Kontaktformular ---------- */
:root { --knopf: #176E75; }
@media (prefers-color-scheme: dark) { :root { --knopf: #4FC3CB; } }
.formular { margin-top: 2rem; display: grid; gap: 1.25rem; max-width: 36rem; }
.feld { display: grid; gap: 0.35rem; }
.feld-paar { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 40rem) { .feld-paar { grid-template-columns: 1fr; } }
.feld label { font-weight: 600; font-size: 0.95rem; }
.pflicht { color: var(--spur); }
.formular input[type="text"], .formular input[type="tel"], .formular input[type="email"], .formular input[type="date"],
.formular select, .formular textarea {
  width: 100%; font: inherit; color: var(--tinte); background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: 4px; padding: 0.6rem 0.75rem; min-height: 2.9rem;
}
.formular textarea { resize: vertical; }
.formular input:focus, .formular select:focus, .formular textarea:focus { border-color: var(--spur); outline: 2px solid var(--spur); outline-offset: 0; }
.feld-check { grid-template-columns: auto 1fr; align-items: start; gap: 0.75rem; }
.feld-check input { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; accent-color: var(--spur); }
.feld-check label { font-weight: 400; }
.falle { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.spamschutz { --altcha-max-width: 100%; --altcha-border-radius: 4px; --altcha-color-border: var(--linie); --altcha-color-base: var(--flaeche); --altcha-color-text: var(--tinte); --altcha-color-border-focus: var(--spur); }
.knopf { justify-self: start; font: inherit; font-weight: 600; color: #fff; background: var(--knopf); border: 0; border-radius: 4px; padding: 0.75rem 1.5rem; cursor: pointer; }
.knopf:hover { filter: brightness(1.1); }
@media (prefers-color-scheme: dark) { .knopf { color: #10191D; } }
.feld-hinweis { font-size: 0.9rem; color: var(--tinte-leise); margin: 0; }
.spamschutz input[type="checkbox"] { accent-color: var(--spur); }

/* ---------- Impressum und Datenschutz ---------- */
.recht { max-width: 44rem; }
.recht h2 { font-size: 1.1rem; margin: 2.25rem 0 0.5rem; }
.recht h2:first-child { margin-top: 0; }
.recht p { margin: 0 0 0.9rem; }
.stand { margin-top: 2rem; color: var(--tinte-leise); }
