/* ═══ MedKompass · Styles für die Rechtsseiten (Impressum, Datenschutz) ═══
   Bewusst schlank gehalten und konsistent zur Startseite. */

:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --blue:   #163A5F;
  --teal:   #147D8A;
  --ink:    #0C1B2A;
  --muted:  #4A6070;
  --subtle: #8A9BAB;
  --bg:     #FFFFFF;
  --bg-soft:#F6F8FA;
  --border: #E2E8EF;
  --card:   #FFFFFF;
  --heading:#163A5F;
  --nav-bg: rgba(255,255,255,.97);
  --shadow: 0 1px 3px rgba(12,27,42,.05), 0 8px 24px rgba(12,27,42,.06);
}
:root[data-theme="dark"] {
  --teal:   #2FA7B4;
  --ink:    #E6EDF3;
  --muted:  #9FB2C2;
  --subtle: #6E8397;
  --bg:     #0E1C2A;
  --bg-soft:#142838;
  --border: #263B4F;
  --card:   #17293A;
  --heading:#D8E5F2;
  --nav-bg: rgba(14,28,42,.95);
  --shadow: 0 1px 3px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background-color .3s ease, color .3s ease;
}

/* ── Kopfzeile ──────────────────────────────────────── */
.lp-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: .7rem clamp(1.25rem, 4vw, 3rem);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.lp-logo img { height: 42px; width: auto; display: block; }
:root[data-theme="dark"] .lp-logo img { filter: brightness(0) invert(1); }
.lp-actions { display: flex; align-items: center; gap: 1rem; }
/* Markanter Zurück-Button in der Kopfzeile */
.lp-back {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--teal); text-decoration: none; font-size: .9rem; font-weight: 700;
  padding: .5rem .95rem;
  border: 1.5px solid var(--teal); border-radius: 8px;
  transition: background .2s, color .2s;
}
.lp-back:hover { background: var(--teal); color: #fff; }

.theme-toggle {
  flex-shrink: 0; width: 40px; height: 40px;
  display: grid; place-items: center;
  background: transparent; border: 1.5px solid var(--border);
  border-radius: 8px; color: var(--heading); cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.theme-toggle:hover { border-color: var(--teal); color: var(--teal); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ── Rechtstext-Inhalt ──────────────────────────────── */
.lp-main { flex: 1 0 auto; width: 100%; max-width: 820px; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 4vw, 2rem) 4rem; }
.lp-main h1 { color: var(--heading); font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.3rem); letter-spacing: -.02em; margin-bottom: 1.5rem; }
.lp-main h1::after { content: ""; display: block; width: 100%; height: 3px; margin-top: .5rem; border-radius: 2px; background: linear-gradient(90deg, var(--heading), var(--teal)); }
.lp-body { font-size: .875rem; line-height: 1.7; color: var(--muted); }
.lp-body h3 { color: var(--heading); font-size: .97rem; margin: 1.7rem 0 .45rem; }
.lp-body h3:first-of-type { margin-top: 0; }
.lp-body p, .lp-body ul { margin-bottom: .8rem; }
.lp-body ul { padding-left: 1.25rem; }
.lp-body li { margin-bottom: .25rem; }
.lp-body address { font-style: normal; }
.lp-body a { color: var(--teal); font-weight: 600; text-decoration: none; }
.lp-body a:hover { text-decoration: underline; }
.legal-note {
  background: var(--bg-soft); border-left: 3px solid var(--teal);
  padding: .85rem 1.05rem; border-radius: 0 8px 8px 0; margin-bottom: 1.5rem;
  font-size: .8rem; line-height: 1.6; color: var(--ink);
}
.ph { background: rgba(230,168,0,.24); color: inherit; padding: 0 .28em; border-radius: 3px; font-weight: 600; }
/* Kleine Quellen-/Versionszeile am Ende der Rechtstexte */
.legal-source { margin-top: 2.5rem; font-size: .74rem; color: var(--subtle); }

/* Zusätzlicher, klarer Zurück-Button am Ende des Textes */
.lp-back-bottom {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 2.5rem; padding: .7rem 1.4rem;
  background: var(--blue); color: #fff; text-decoration: none;
  border-radius: 8px; font-weight: 600; font-size: .9rem;
  transition: background .2s, transform .15s;
}
.lp-back-bottom:hover { background: #0f2a44; transform: translateY(-1px); }
/* Dark Mode: beide Zurück-Buttons weiß */
:root[data-theme="dark"] .lp-back { border-color: #FFFFFF; color: #FFFFFF; }
:root[data-theme="dark"] .lp-back:hover { background: #FFFFFF; color: #0C1B2A; }
:root[data-theme="dark"] .lp-back-bottom { background: #FFFFFF; color: #0C1B2A; }
:root[data-theme="dark"] .lp-back-bottom:hover { background: #E4ECF4; }

/* ── Footer (wie Startseite) ────────────────────────── */
footer { background: #0C1D2E; color: rgba(255,255,255,.6); padding: 3.5rem clamp(1.25rem, 4vw, 2rem) 2rem; border-top: 1px solid rgba(255,255,255,.06); flex-shrink: 0; }
:root[data-theme="dark"] footer { background: #081321; border-top-color: rgba(255,255,255,.08); }
.foot-top { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.25rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.foot-logo { display: inline-block; }
.foot-logo-img { display: block; width: 300px; max-width: 62vw; height: auto; filter: brightness(0) invert(1); }
.foot-col h4 { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: 1.1rem; font-weight: 700; }
.foot-col nav { display: flex; flex-direction: column; gap: .65rem; }
.foot-col a { font-size: .875rem; color: rgba(255,255,255,.62); text-decoration: none; transition: color .2s, padding-left .2s; }
.foot-col a:hover { color: #fff; padding-left: .2rem; }
.foot-bottom { max-width: 1120px; margin: 1.5rem auto 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
.foot-copy { font-size: .78rem; color: rgba(255,255,255,.35); }

@media (max-width: 768px) {
  .foot-top { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .foot-brand { display: flex; justify-content: center; }
  .foot-col nav { align-items: center; }
  .foot-bottom { flex-direction: column-reverse; text-align: center; gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto; } }
