/* Praxis Dr. Martin Kleinschmidt — ruhig & klassisch
   Farben: gedecktes Grün, warmes Beige, Anthrazit-Text. */

:root {
  --bg:        #f7f4ec;   /* warmes Creme */
  --surface:   #ffffff;
  --text:      #2b2b28;   /* Anthrazit */
  --muted:     #5f6660;
  --green:     #4a5d4e;   /* gedecktes Grün */
  --green-dk:  #3a4a3e;
  --green-lt:  #6b7d63;
  --beige:     #e9e3d4;
  --line:      #d8d2c4;
  --maxw:      1100px;
  --serif:     Georgia, "Times New Roman", "Iowan Old Style", serif;
  --sans:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}

a { color: var(--green); }
a:hover { color: var(--green-dk); }

/* ---------- Navigation ---------- */
.topbar {
  background: var(--green-dk);
  border-bottom: 3px solid var(--green-lt);
}
.mainnav { max-width: var(--maxw); margin: 0 auto; }
.navlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}
.navlist > li {
  flex: 1 1 0;
  position: relative;
  display: flex; /* damit der Button die volle Höhe füllt */
  border-left: 1px solid rgba(255,255,255,.12);
}
.navlist > li:first-child { border-left: 0; }

.navbtn {
  flex: 1;
  display: flex;
  align-items: center;      /* Text vertikal mittig */
  justify-content: center;  /* Text horizontal mittig */
  text-align: center;
  padding: 14px 12px;
  background: transparent;
  border: 0;
  color: #f2efe6;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}
.navbtn:hover,
.has-sub:hover > .navbtn,
.has-sub:focus-within > .navbtn,
.has-sub.open > .navbtn {
  background: var(--green);
  color: #fff;
}
.navbtn.is-active {
  background: var(--green);
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--beige);
}

.submenu {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 22rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  display: none;
  z-index: 20;
}
.has-sub:hover > .submenu,
.has-sub:focus-within > .submenu,
.has-sub.open > .submenu { display: block; }

.submenu a {
  display: block;
  padding: 9px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: .98rem;
}
.submenu a:hover { background: var(--beige); }

/* ---------- Startseite: Titel über dem Bild ---------- */
.hero-caption {
  text-align: center;
  color: #2b2b28;
  text-shadow: 0 1px 10px rgba(255,255,255,.55);
}
.hero-caption h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 4.4vw, 3rem);
  margin: 0;
  letter-spacing: .01em;
}
.hero-caption p {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  margin: .2em 0 0;
}

/* ---------- Aktuelles (im Hero, direkt unter dem Untertitel) ---------- */
.hero-caption .hero-aktuelles {
  display: inline-block;
  margin: 1em auto 0;
  max-width: min(92%, 640px);
  padding: 9px 20px;
  background: var(--green);
  color: #fff;
  border-radius: 12px;
  font-family: var(--sans);
  font-size: clamp(.95rem, 1.9vw, 1.12rem);
  line-height: 1.4;
  text-shadow: none;
  box-shadow: 0 3px 14px rgba(0,0,0,.22);
}
.hero-aktuelles .ha-label { font-weight: 700; margin-right: .4em; }
.hero-aktuelles a { color: #fff; text-decoration: underline; }

/* ---------- Variante: Startseite mit fixiertem Hintergrundbild ---------- */
body.start { background: transparent; }
.bg-fixed {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("img/hero.jpg") center 38% / cover no-repeat;
  transform: scaleX(-1); /* gespiegelt: Schilf/Bambus nach rechts, wo weniger Text steht */
}
.start-hero {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  padding: 34px 20px 18px;
}
.start-flow {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  align-items: start;
}
.start-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
/* Text liegt direkt auf dem Bild — nur ein zarter Schimmer (kein Schleier) */
.start-flow { text-shadow: 0 1px 3px rgba(255, 255, 255, .85), 0 0 2px rgba(255, 255, 255, .7); }
@media (max-width: 760px) {
  .start-hero { padding: 24px 16px 14px; }
  .start-flow { grid-template-columns: 1fr; padding: 0 16px 44px; gap: 20px; }
  .start-panel { padding: 22px 20px; }
}

/* ---------- Unterseiten ---------- */
.page { max-width: var(--maxw); margin: 0 auto; }
.content {
  padding: 40px 24px 56px;
  max-width: 760px;
}
.content h1 {
  font-family: var(--serif);
  color: var(--green-dk);
  font-size: 1.9rem;
  margin: 0 0 .6em;
}
.content h2 {
  font-family: var(--serif);
  color: var(--green-dk);
  font-size: 1.4rem;
  margin: 1.6em 0 .5em;
}
.content h3 {
  font-family: var(--serif);
  color: var(--green);
  font-size: 1.12rem;
  margin: 1.4em 0 .3em;
}
.content p { margin: 0 0 1em; }
.content ul, .content ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.content li { margin-bottom: .35em; }

.topic { scroll-margin-top: 16px; }
.topic + .topic {
  margin-top: 2.4em;
  padding-top: 2em;
  border-top: 1px solid var(--line);
}

/* Team */
.team-member {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.team-member + .team-member {
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.portrait {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #e3e0d4;
}
.team-text h2 { margin-top: 0; }
.team-text .role { color: var(--muted); font-style: italic; margin-top: -.4em; }
.cv { list-style: none; padding-left: 0; }
.cv li {
  padding-left: 1.1em;
  position: relative;
  margin-bottom: .5em;
}
.cv li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--green-lt);
}

/* Gerenderte Editor-Inhalte (Startseite-Infos & Unterseiten) */
.rich > *:first-child { margin-top: 0; }
.rich h2 { font-family: var(--serif); color: var(--green-dk); font-size: 1.4rem; margin: 1.5em 0 .5em; }
.rich h3 { font-family: var(--serif); color: var(--green); font-size: 1.12rem; margin: 1.3em 0 .3em; }
.rich p { margin: 0 0 1em; }
.rich ul, .rich ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.rich li { margin-bottom: .35em; }
.rich blockquote {
  margin: 0 0 1em;
  padding-left: 1em;
  border-left: 3px solid var(--line);
  color: var(--muted);
}
.rich > div { margin: 0 0 1em; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.sitefooter {
  background: var(--green-dk);
  color: #d9e0d3;
  text-align: center;
  padding: 18px 24px;
  font-size: .9rem;
}
.sitefooter a { color: #eef2e9; }

/* ---------- Mobil ---------- */
@media (max-width: 760px) {
  .navlist { flex-direction: column; }
  .navlist > li { display: block; flex: 1 1 auto; border-left: 0; border-top: 1px solid rgba(255,255,255,.12); }
  .navlist > li:first-child { border-top: 0; }
  .navbtn { padding: 14px 16px; font-size: 1rem; justify-content: flex-start; text-align: left; }
  .submenu {
    position: static;
    box-shadow: none;
    border: 0;
    width: auto;
    max-width: none;
    background: rgba(255,255,255,.06);
  }
  .submenu a { color: #eef2e9; }
  .submenu a:hover { background: rgba(255,255,255,.12); }
  .content { padding: 28px 18px 40px; }
  .team-member { grid-template-columns: 1fr; gap: 18px; }
  .team-photo { max-width: 200px; }
}

/* ---------- Bearbeitungsseite ---------- */
body.admin { background: #eee9dd; }
.admin-wrap { max-width: 820px; margin: 0 auto; padding: 32px 20px 64px; }
.admin h1 { font-family: var(--serif); color: var(--green-dk); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 24px;
  margin: 18px 0;
}
.card.pw { background: #faf7ef; }
.card label { display: block; font-weight: 600; margin-bottom: 16px; }
.card label small { font-weight: 400; color: var(--muted); }
.card textarea,
.card input[type=password],
.card input[type=text] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}
.card textarea { resize: vertical; line-height: 1.5; }
.card > button,
.team-actions button {
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: 5px;
  padding: 11px 22px;
  font: inherit;
  cursor: pointer;
}
.card > button:hover,
.team-actions button:hover { background: var(--green-dk); }
.hint { color: var(--muted); font-size: .9rem; }
.muted { color: var(--muted); }

/* Editor (Trix) */
trix-editor.trix {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  min-height: 8rem;
  padding: 8px 12px;
  margin-bottom: 16px;
  font-family: var(--sans);
}
trix-editor.trix:empty::before { color: var(--muted); }
trix-toolbar .trix-button-group--file-tools { display: none; } /* kein Datei-Upload im Editor */
.rich-label { display: block; font-weight: 600; margin: 16px 0 4px; }
.rich-label small { font-weight: 400; color: var(--muted); }

/* Team-Verwaltung */
.member {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin: 0 0 18px;
  background: #faf7ef;
}
.member-top { display: flex; gap: 16px; align-items: flex-start; }
.member-main { flex: 1; }
.member-main label { font-weight: 600; margin-bottom: 10px; }
.member .thumb {
  width: 72px; height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #e3e0d4;
  flex: 0 0 auto;
}
.member-checks { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.member-checks .inline { font-weight: 400; margin: 0; }
.member-checks .inline input { width: auto; display: inline; margin-right: 6px; }
.member-checks .danger { color: #7a2b22; }
.team-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.team-actions button.secondary { background: #7d8a73; }
.team-actions button.secondary:hover { background: var(--green); }
.team-upload {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.team-upload .thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #e3e0d4;
  flex: 0 0 auto;
}
.team-upload-fields { display: flex; flex-direction: column; gap: 4px; }
.team-upload-fields .inline { font-weight: 400; margin: 0; }
.team-upload-fields .inline input { width: auto; display: inline; margin-right: 6px; }
.toolbar { font-size: .95rem; }
.note { padding: 12px 16px; border-radius: 6px; font-weight: 600; }
.note.ok  { background: #e2efdd; color: #2f5226; border: 1px solid #b9d6ac; }
.note.err { background: #f6e2df; color: #7a2b22; border: 1px solid #e4b4ac; }
