/* medic·lan IT-Services – Stylesheet
   Keine externen Fonts, keine Tracker: Systemschriften für Tempo & DSGVO. */

:root {
  --primary: #1f4e79;          /* Primär: ruhiges Praxis-Blau */
  --accent: #8fb3d9;        /* helles Blau für dunkle Flächen */
  --primary-tint: #eaf1f8;
  --ink: #1f2a30;
  --ink-soft: #4b5a62;
  --grey: #8a959b;
  --line: #dde5e8;
  --bg: #ffffff;
  --bg-alt: #f5f8f9;
  --mo-red: #c70c38;        /* MEDICAL OFFICE Markenfarbe */
  --mo-dark: #242a2d;
  --mo-red-bg: #c70c38;     /* Rot für Flächen (Buttons) – bleibt im Dunkelmodus gleich */
  --mo-tint: #fbe7ec;
  --surface: #ffffff;       /* Karten, Kästen */
  --header-bg: rgba(255,255,255,.92);
  --hero-from: #ffffff;
  --hero-glow: rgba(31,78,121,.10);
  --mo-hero-to: #fbf3f5;
  --btn-bg: #1f4e79;
  --btn-bg-hover: #173b5c;
  --on-btn: #ffffff;
  --input-border: #c6d2da;
  --footer-bg: #13283f;
  --footer-ink: #c9d5e1;
  --footer-line: #2c4560;
  --ok-bg: #e8f5ec; --ok-ink: #1d6b37; --ok-line: #b9dfc5;
  --err-bg: #fdecee; --err-ink: #9b1c2c; --err-line: #f3c1c8;
  color-scheme: light dark;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 40, 50, .06), 0 8px 24px rgba(20, 40, 50, .07);
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 17px; line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary); text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 750; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-soft); }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--primary); margin-bottom: .75rem;
}
.skip { position: absolute; left: -999px; top: 0; background: var(--btn-bg); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1; }
.brand-word { font-size: 1.75rem; font-weight: 650; font-style: italic; letter-spacing: -.02em; color: var(--primary); }
.brand-word .dot { color: var(--grey); padding: 0 1px; }
.brand-word .lan { color: var(--grey); }
.brand-sub { font-size: .72rem; color: var(--grey); font-style: italic; letter-spacing: .04em; margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--ink); font-weight: 550; font-size: .95rem;
  padding: 8px 12px; border-radius: 8px;
}
.nav a:hover { background: var(--bg-alt); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--primary); }
.nav .nav-mo[aria-current="page"] { color: var(--mo-red); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 44px; height: 44px; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { margin: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font-weight: 650; font-size: 1rem; text-decoration: none; border-radius: 10px;
  padding: 12px 20px; border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--btn-bg); color: var(--on-btn); }
.btn-primary:hover { background: var(--btn-bg-hover); color: var(--on-btn); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-mo { background: var(--mo-red-bg); color: #fff; }
.btn-mo:hover { background: #a10a2d; color: #fff; }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 400px at 85% -10%, var(--hero-glow), transparent 60%),
    linear-gradient(180deg, var(--hero-from) 0%, var(--bg-alt) 100%);
  padding: 72px 0 80px; border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 48px; align-items: center; }
.hero h1 .accent { color: var(--primary); }
.hero .lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 36em; margin-bottom: 1.6rem; }
.hero-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  padding: 28px;
}
.hero-card h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.region-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.region-list li { display: flex; gap: 10px; align-items: flex-start; }
.region-list .pin { flex: none; width: 22px; height: 22px; color: var(--primary); margin-top: 2px; }
.region-list .new {
  font-size: .7rem; font-weight: 700; color: #fff; background: var(--primary); border-radius: 99px;
  padding: 1px 8px; margin-left: 6px; vertical-align: 2px;
}
.hero-card hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.hotline { display: grid; gap: 4px; }
.hotline a { font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--ink); }
.hotline a:hover { color: var(--primary); }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card p { color: var(--ink-soft); margin: 0; font-size: .97rem; }
.icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--primary-tint); color: var(--primary);
  display: grid; place-items: center; margin-bottom: 16px;
}
.icon svg { width: 24px; height: 24px; }

/* Split / Über mich */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.portrait { display: flex; gap: 22px; align-items: center; margin-top: 8px; }
.portrait img { width: 96px; height: 96px; border-radius: 50%; }
.checklist { list-style: none; padding: 0; margin: 0 0 1.4em; display: grid; gap: 10px; }
.checklist li { padding-left: 32px; position: relative; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f4e79' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat;
}
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.stat strong { display: block; font-size: 2rem; line-height: 1.1; color: var(--primary); font-weight: 750; }
.stat span { color: var(--ink-soft); font-size: .92rem; }

/* MO-Teaser auf Startseite */
.mo-teaser {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 40px; box-shadow: var(--shadow);
  border-top: 4px solid var(--mo-red-bg);
}
.mo-teaser .eyebrow { color: var(--mo-red); }

/* Fernwartung-Band */

/* ---------- MEDICAL OFFICE Seite ---------- */
.mo-hero {
  padding: 64px 0 72px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--hero-from) 0%, var(--mo-hero-to) 100%);
}
.mo-hero .eyebrow { color: var(--mo-red); }
.mo-hero h1 .accent { color: var(--mo-red); }
.mo-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.mo-logo-box { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); }
.mo-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: -36px; position: relative; }
.mo-stats .stat { box-shadow: var(--shadow); }
.mo-stats .stat strong { color: var(--mo-red); }
.mo .icon { background: var(--mo-tint); color: var(--mo-red); }
.mo .checklist li::before {
  background-color: var(--mo-tint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c70c38' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
}
.mo .eyebrow { color: var(--mo-red); }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.feature h3 { display: flex; align-items: center; gap: 12px; font-size: 1.25rem; margin-bottom: 14px; }
.feature h3 .icon { margin: 0; width: 40px; height: 40px; }
.feature .checklist { margin: 0; font-size: .97rem; }
.ki-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ki-card {
  background: var(--mo-dark); color: #fff; border-radius: var(--radius); padding: 28px; position: relative; overflow: hidden;
}
.ki-card::after {
  content: ""; position: absolute; right: -42px; top: -42px; width: 84px; height: 84px;
  background: var(--mo-red); opacity: .9; transform: rotate(45deg); border-radius: 12px;
}
.ki-card h3 { position: relative; z-index: 1; font-size: 1.3rem; }
.ki-card .tag { position: relative; z-index: 1; display: inline-block; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: #ff9fb5; font-weight: 700; margin-bottom: 8px; }
.ki-card p { color: #c9d1d4; margin: 0; font-size: .97rem; position: relative; z-index: 1; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.steps li::before {
  counter-increment: step; content: counter(step); display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%; background: var(--mo-red-bg); color: #fff; font-weight: 700; margin-bottom: 12px;
}
.steps p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.note { font-size: .85rem; color: var(--grey); margin-top: 18px; }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.contact-card.highlight { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.contact-card h3 { margin-bottom: 4px; }
.contact-card .role { color: var(--grey); font-size: .9rem; margin-bottom: 16px; }
.contact-line { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.contact-line svg { width: 18px; height: 18px; color: var(--primary); flex: none; }
.contact-line a { color: var(--ink); text-decoration: none; font-weight: 600; }
.contact-line a:hover { color: var(--primary); }
address { font-style: normal; }

/* ---------- Rechtstexte ---------- */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.4rem; margin-top: 2em; }
.legal h3 { margin-top: 1.5em; }
.legal ul { padding-left: 1.2em; }

/* ---------- Page header (Unterseiten) ---------- */
.page-head { padding: 56px 0 40px; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.page-head p { color: var(--ink-soft); font-size: 1.1rem; max-width: 40em; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); padding: 56px 0 28px; margin-top: 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin: 0 0 12px; }
.site-footer a { color: var(--footer-ink); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer .brand-word { font-size: 1.6rem; color: #fff; }
.site-footer .brand-word .dot, .site-footer .brand-word .lan { color: #a9bdd1; }
.footer-bottom { border-top: 1px solid var(--footer-line); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .split, .mo-hero-grid, .mo-teaser { grid-template-columns: 1fr; }
  .cards, .ki-grid, .contact-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mo-stats { margin-top: 24px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .nav-toggle { display: grid; }
  .nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--surface);
    flex-direction: column; align-items: stretch; padding: 8px 16px 16px; border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0,0,0,.06);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav .btn { margin-top: 8px; }
  .hero { padding: 48px 0 56px; }
  .section { padding: 60px 0; }
  .cards, .ki-grid, .contact-grid, .feature-grid, .steps, .stat-row, .mo-stats { grid-template-columns: 1fr; }
  .mo-teaser { padding: 26px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer { display: none; } }

/* ---------- Ergänzungen v2 ---------- */
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; color: var(--ink);
}
.pill svg { width: 16px; height: 16px; color: var(--mo-red); }
.mo-stats { grid-template-columns: repeat(4, 1fr); }
.audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.audience .card h3 { color: var(--mo-dark); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip { font-size: .85rem; padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); }
.ti-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ti-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.ti-item strong { display: block; color: var(--mo-red); font-size: 1.05rem; margin-bottom: 4px; }
.ti-item p { margin: 0; font-size: .92rem; color: var(--ink-soft); }
.ti-item .badge { display: inline-block; font-size: .7rem; font-weight: 700; background: var(--mo-tint); color: var(--mo-red); border-radius: 99px; padding: 1px 8px; margin-left: 4px; vertical-align: 2px; }
.ki-card .facts { position: relative; z-index: 1; list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; font-size: .9rem; color: #e6ebee; }
.ki-card .facts li::before { content: "– "; color: #ff9fb5; }
.ki-grid.two { grid-template-columns: repeat(2, 1fr); }
.footnote { font-size: .8rem; color: var(--grey); margin-top: 6px; }

/* Kontaktformular */
.contact-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--grey); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--input-border); border-radius: 10px; padding: 11px 12px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--ink-soft); }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--primary); }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { display: none; border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; font-weight: 600; }
.form-status.ok { display: block; background: var(--ok-bg); color: var(--ok-ink); border: 1px solid var(--ok-line); }
.form-status.err { display: block; background: var(--err-bg); color: var(--err-ink); border: 1px solid var(--err-line); }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.form-actions small { color: var(--grey); }
.btn[disabled] { opacity: .6; cursor: wait; }
.side-stack { display: grid; gap: 20px; }

@media (max-width: 960px) {
  .mo-stats, .ti-grid { grid-template-columns: 1fr 1fr; }
  .audience, .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .ti-grid, .ki-grid.two, .form-grid { grid-template-columns: 1fr; }
  .mo-stats { grid-template-columns: 1fr 1fr; }
  .form-card { padding: 22px; }
}
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--on-btn); }
.nav a.btn-primary:hover { background: var(--btn-bg-hover); }

/* Original-Logo medic·lan (Bilddatei, Originalfarben) */
.brand-logo { height: 58px; width: auto; }
.footer-logo { display: inline-block; }
.footer-logo img { height: 64px; width: auto; }
@media (max-width: 760px) { .brand-logo { height: 50px; } }

/* Menü: MEDICAL OFFICE immer rot, aktive Seiten im Logo-Türkis */
:root { --logo-teal: #44d9e8; }
.nav a.nav-mo { color: var(--mo-red); }
.nav a[aria-current="page"]:not(.nav-mo),
.nav a[aria-current="true"]:not(.nav-mo) { color: var(--logo-teal); }

/* Digitale Helfer: helle, neutrale Karten statt dunkler Kästen */
.ki-card { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ki-card::after { right: -34px; top: -34px; width: 68px; height: 68px; background: var(--mo-tint); opacity: 1; border-radius: 10px; }
.ki-card .tag { color: var(--mo-red); }
.ki-card h3 { color: var(--mo-dark); }
.ki-card p { color: var(--ink-soft); }
.ki-card .facts { color: var(--ink); border-top: 1px solid var(--line); padding-top: 14px; }
.ki-card .facts li::before { color: var(--mo-red); }

/* Telefonnummern hervorheben */
.phone-list { display: grid; gap: 10px; }
.phone-list > div { display: grid; gap: 1px; }
.phone-list .muted { font-size: .85rem; }
.phone-list a { font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; letter-spacing: .01em; }
.phone-list a:hover { color: var(--primary); }
.contact-line a[href^="tel:"] { font-weight: 800; font-size: 1.08rem; }
.field .hint { display: block; margin-top: 6px; font-size: .82rem; color: var(--grey); }

/* Startseite: Vertrieb fett oben, Hotline normal darunter */
.phone-list .muted { font-size: 1rem; font-weight: 600; }
.phone-list a { font-weight: 500; font-size: 1.15rem; }
.phone-list a.tel-main { font-weight: 800; font-size: 1.25rem; }

/* Zeilenumbrüche */
.nw { white-space: nowrap; }
h1, h2, h3, .lead, .section-head p { text-wrap: balance; }
p, li, .stat span, .chip { text-wrap: pretty; }
.brand-logo + *, .footer-logo { white-space: normal; }
.nav a, .btn, .stat strong, .pill { white-space: nowrap; }
.stat span, .card p, .ti-item p, .feature li, .ki-card .facts li { text-wrap: balance; }

/* Menü schon ab Tablet-Breite als Aufklappmenü */
@media (max-width: 900px) {
  .nav-toggle { display: grid; }
  .nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--surface);
    flex-direction: column; align-items: stretch; padding: 8px 16px 16px; border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0,0,0,.06);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav .btn { margin-top: 8px; }
}
@media (max-width: 760px) {
  h2 { font-size: clamp(1.4rem, 6.2vw, 1.7rem); }
  .stat strong { font-size: 1.7rem; }
}
.stat > span { display: block; }
.lead { text-wrap: pretty; }
@media (max-width: 420px) { .mo-stats { grid-template-columns: 1fr; } }
.stat > span { text-wrap: balance; }
.card p, .feature li, .ki-card .facts li { text-wrap: pretty; }
.btn-ghost-mo, .btn-ghost-mo:hover { color: var(--mo-red); }
.btn-ghost-mo:hover { border-color: var(--mo-red); }


/* =================================================================== Dunkelmodus */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #8cbcf0;          /* Text-Blau, auf Dunkel gut lesbar */
    --accent: #8fb3d9;
    --primary-tint: #1b2c3d;
    --ink: #e4e9ed;
    --ink-soft: #aab6be;
    --grey: #8b979e;
    --line: #2b3640;
    --bg: #0f151a;
    --bg-alt: #141c22;
    --mo-red: #ff6b88;           /* MO-Rot als Text: aufgehellt für Lesbarkeit */
    --mo-dark: #e4e9ed;
    --mo-tint: #3a1820;
    --surface: #182128;
    --header-bg: rgba(15,21,26,.92);
    --hero-from: #0f151a;
    --hero-glow: rgba(140,188,240,.10);
    --mo-hero-to: #1c1418;
    --btn-bg: #2d6cad;
    --btn-bg-hover: #3a7cc0;
    --input-border: #3a4752;
    --footer-bg: #0b1117;
    --footer-ink: #b9c6d2;
    --footer-line: #23303b;
    --ok-bg: #12301d; --ok-ink: #8fdcaa; --ok-line: #1f5233;
    --err-bg: #3a141b; --err-ink: #ffb3c0; --err-line: #6b2533;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  }
  .checklist li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238cbcf0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
  }
  .mo .checklist li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff6b88' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
  }
  /* MEDICAL-OFFICE-Logos brauchen hellen Grund (dunkles "OFFICE") */
  .mo-logo-box img, .mo-teaser > img { background: #fff; border-radius: 12px; padding: 10px 14px; }
  .nav-toggle { background: var(--surface); }
  .form-status.err[role="note"] { background: var(--err-bg); }
}

/* === Dunkle Kopfzeile wie Fußzeile === */
.site-header { background: var(--footer-bg); border-bottom-color: rgba(255,255,255,.12); backdrop-filter: none; }
.site-header .brand-logo { content: url("../img/medic-lan-logo-dark.png"); }
.site-header .nav-toggle { background: none; color: #fff; border-color: rgba(255,255,255,.3); }
.site-header .header-inner { height: 84px; }
.site-header .brand-logo { height: 70px; }
@media (max-width: 900px) {
  .site-header .header-inner { height: 76px; }
  .site-header .brand-logo { height: 62px; }
  .site-header .nav { top: 76px; }
}
/* Nur Desktop: das Aufklappmenü (bis 900px) bleibt hell mit dunkler Schrift */
@media (min-width: 901px) {
  .site-header .nav a { color: var(--footer-ink); }
  .site-header .nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
  .site-header .nav a[aria-current="page"]:not(.nav-mo),
  .site-header .nav a[aria-current="true"]:not(.nav-mo) { color: var(--logo-teal); }
  .site-header .nav a.nav-mo,
  .site-header .nav a.nav-mo:hover,
  .site-header .nav a.nav-mo[aria-current="page"] { color: #ff8fa6; }
  .site-header .nav a.btn-primary { background: var(--footer-ink); color: #13283f; padding: 4px 10px; font-size: .88rem; gap: 6px; border-width: 1px; border-radius: 7px; }
  .site-header .nav a.btn-primary:hover { background: #fff; color: #13283f; }
}


/* === abgerundete Ecken an Kopf- und Fußzeile === */
/* Kopfzeile: eckiger Hintergrund in Seitenfarbe, darauf die abgerundete dunkle Fläche.
   So verdecken die Ecken beim Scrollen den Inhalt (z. B. die Seitenlinien). */
.site-header { background: var(--bg); border-bottom-color: transparent; }
.site-header::before {
  content: ""; position: absolute; inset: 0 0 -1px 0; z-index: -1;
  background: var(--footer-bg); border-radius: 20px 20px 0 0;
}
.site-footer { border-radius: 0 0 20px 20px; }

/* === Fußzeile mit weniger Abstand === */
.site-footer { padding-top: 28px; }
.footer-grid p:last-child { margin-bottom: 0; }
.footer-bottom { margin-top: 20px; }

/* === schmale Linien links und rechts zwischen Kopf- und Fußzeile === */
main { border-left: 1px solid var(--footer-bg); border-right: 1px solid var(--footer-bg); }
