/* =========================================================
   Orthopädie Langenhorn – vollständig responsives Stylesheet
   Breakpoints:
     bis 480px → Handy (klein)
     bis 700px → Handy (groß)
     bis 1024px → Tablet
     ab 1025px → Desktop
   ========================================================= */

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

:root {
  --primary: #2a6f8a;
  --primary-dark: #1d4f62;
  --primary-light: #4a94b2;
  --accent: #d9534f;
  --text: #222;
  --text-light: #4a5968;
  --muted: #556473;        /* vorher #667786 (Kontrast 4,6:1) – jetzt 6,1:1 auf Weiß */
  --fokus: #1d4f62;
  --hero-start: #1d4f62;   /* Verlauf dunkler: weiße Schrift bleibt überall >5:1 */
  --hero-ende: #2a6f8a;
  --zeilenbreite: none;    /* Fließtext über die volle Breite (auf 72ch setzen, um die Zeilenlänge zu begrenzen) */
  --bg: #f7f9fb;
  --card: #ffffff;
  --border: #e1e6ea;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 8px;
  --max-width: 1100px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  /* Grundschrift wächst mit der Bildschirmbreite: 16 px auf kleinen Handys,
     ~17,5 px auf dem Desktop. rem statt px, damit Browser-Zoom und die
     Schriftgröße aus den Systemeinstellungen respektiert werden. */
  font-size: clamp(1rem, 0.93rem + 0.3vw, 1.125rem);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Sichtbarer Fokus für Tastaturbedienung */
:focus-visible {
  outline: 3px solid var(--fokus);
  outline-offset: 2px;
  border-radius: 3px;
}
header :focus-visible, footer :focus-visible, .aktionsleiste :focus-visible,
.hero :focus-visible, .kontakt-box :focus-visible {
  outline-color: white;
}

/* ===== Header ===== */
header {
  background: var(--primary);
  color: white;
  padding: 1rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
header .brand { min-width: 0; flex: 1 1 auto; }
header nav { flex: 0 0 auto; }

.brand .brand-name {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
}
.brand .brand-name a {
  color: white;
  text-decoration: none;
}
.brand .subtitle {
  display: block;
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 0.15rem;
}

/* Hamburger-Button (nur Mobile sichtbar) */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
  margin: 0 auto;
}
.menu-toggle.offen span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.offen span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.offen span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

header nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
header nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.45rem 0.2rem;   /* größere Klickfläche */
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}
header nav a:hover, header nav a.aktiv {
  border-bottom-color: white;
}

/* ===== Hauptbereich ===== */
main {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1rem;
  flex: 1;
  width: 100%;
}

.hinweis {
  background: #fff8e6;
  border-left: 4px solid var(--accent);
  padding: 1rem 1.2rem;
  margin-bottom: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

article {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

article h1 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
  line-height: 1.25;
  overflow-wrap: break-word;
}
/* Zweitname/Synonym in der Überschrift (z. B. lateinischer Begriff) kleiner und leichter */
article h1 .alt {
  display: block;
  font-size: 0.55em;
  font-weight: 400;
  color: var(--text-light);
  margin-top: 0.35em;
  line-height: 1.35;
}
article h2 {
  color: var(--primary-dark);
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.55rem);
  line-height: 1.3;
}
article h3 {
  margin-top: 1.4rem;
  margin-bottom: 0.5rem;
  font-size: clamp(1.1rem, 1.05rem + 0.3vw, 1.25rem);
  color: var(--primary-dark);
  line-height: 1.35;
}
article h4 {
  margin-top: 1rem;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}
article p {
  margin-bottom: 1rem;
}
/* Lange Zeilen sind schwer zu lesen – Fließtext auf ca. 72 Zeichen begrenzen,
   Tabellen und Bilder dürfen die volle Breite nutzen */
article p, article li, article dd, article blockquote,
.hinweis, .rohfassung-hinweis, .ll-hinweis, .hinweis-info {
  max-width: var(--zeilenbreite);
}
article a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
article a:hover { color: var(--primary-dark); }
article ul, article ol {
  margin: 0 0 1rem 1.5rem;
}
article li { margin-bottom: 0.4rem; }
article img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem 0;
  display: block;
}
article figure { margin: 1.5rem 0; }
article figcaption {
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
}
article strong { color: var(--text); }
article blockquote {
  border-left: 4px solid var(--primary-light);
  padding: 0.5rem 0 0.5rem 1rem;
  margin: 1rem 0;
  color: var(--text-light);
  font-style: italic;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* WordPress Columns werden flex */
.wp-block-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
}
.wp-block-column {
  flex: 1 1 280px;
  min-width: 0;
}

/* Tabellen */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.97rem;
  overflow-x: auto;
  display: block;
  -webkit-overflow-scrolling: touch;
}
table thead, table tbody, table tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}
th, td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  overflow-wrap: anywhere;
  vertical-align: top;
  line-height: 1.5;
}
th { background: #f0f4f7; font-weight: 600; }
tr:nth-child(even) td { background: #fafcfd; }

/* Teaser-Kacheln */
.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.kachel {
  background: var(--card);
  padding: 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none !important;
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  display: block;
}
.kachel:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.kachel-hervorgehoben {
  background: linear-gradient(135deg, var(--hero-start) 0%, var(--hero-ende) 100%);
  color: white;
  border-color: var(--primary-dark);
}
.kachel-hervorgehoben h3 { color: white; }
.kachel-hervorgehoben p { color: rgba(255,255,255,0.92); }
.kachel-hervorgehoben:hover {
  background: linear-gradient(135deg, #1d4f62 0%, #2a6f8a 100%);
  box-shadow: 0 6px 16px rgba(42,111,138,0.35);
  border-color: var(--primary);
}
.kachel h3 {
  color: var(--primary);
  margin: 0 0 0.4rem 0;
  font-size: 1.15rem;
}
.kachel p {
  color: var(--text-light);
  font-size: 0.97rem;
  margin: 0;
  line-height: 1.5;
}

/* Startseiten-Hero */
.hero {
  background: linear-gradient(135deg, var(--hero-start) 0%, var(--hero-ende) 100%);
  color: white;
  padding: 3rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.hero h1 {
  color: white;
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.5rem);
  margin-bottom: 0.8rem;
  line-height: 1.2;
}
.hero p {
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  max-width: 36em;
  margin: 0 auto;
}

/* Kontakt-Box */
.kontakt-box {
  background: var(--primary);
  color: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
  text-align: center;
}
.kontakt-box h2 { color: white; margin-top: 0; }
.kontakt-box a { color: white; }
.kontakt-box .tel {
  font-size: 1.5rem;
  font-weight: 600;
  display: inline-block;
  margin-top: 0.5rem;
}

/* ===== Footer (mehrspaltig) ===== */
footer {
  background: var(--primary-dark);
  color: white;
  padding: 2.5rem 1rem 1.5rem;
  font-size: 0.95rem;
  margin-top: 3rem;
}
footer a {
  color: #cde4ee;
  text-decoration: none;
}
footer a:hover { color: white; text-decoration: underline; }
footer .footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 2rem 1.5rem;
  margin-bottom: 2rem;
}
.footer-col h4 {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  letter-spacing: 0.02em;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col li {
  margin-bottom: 0.45rem;
  line-height: 1.4;
}
.footer-col li a {
  font-size: 0.95rem;
  display: inline-block;
  padding: 0.1rem 0;   /* etwas größere Tippfläche */
}

.footer-unten {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.95rem;
}
.footer-adresse { line-height: 1.6; }
.footer-rechtliches a { margin: 0 0.3rem; }

/* ===== Buttons (Hero / Kontakt) ===== */
.hero-aktionen {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.4rem;
}
.button {
  display: inline-block;
  background: white;
  color: var(--primary-dark);
  padding: 0.75rem 1.4rem;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }
.button.sekundaer {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.6);
}
.hero .hero-info {
  margin-top: 1.2rem;
  font-size: 1rem;
}

/* ===== Mobile Aktionsleiste (Anrufen / Termin / Anfahrt) =====
   Wird nur auf kleinen Bildschirmen eingeblendet, siehe Breakpoint 900px */
.aktionsleiste {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 900;
  background: var(--primary-dark);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
  padding-bottom: env(safe-area-inset-bottom);
}
.aktionsleiste a {
  flex: 1;
  color: white;
  text-decoration: none;
  text-align: center;
  padding: 0.65rem 0.3rem;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.2;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.aktionsleiste a:last-child { border-right: none; }
.aktionsleiste a span {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 0.15rem;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */

/* Tablet (bis 1024px) */
@media (max-width: 1024px) {
  header .container { padding: 0 0.5rem; }
  header nav ul { gap: 0.9rem; }
  header nav a { font-size: 0.95rem; }
}

/* Unter 900px: Hamburger-Menü aktivieren */
@media (max-width: 900px) {
  .aktionsleiste { display: flex; }
  body { padding-bottom: 4.2rem; }
  .menu-toggle { display: flex; }
  header nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }
  header nav.offen {
    max-height: 500px;
  }
  header nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    align-items: stretch;
  }
  header nav li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  header nav li:last-child { border-bottom: none; }
  header nav a {
    display: block;
    padding: 0.9rem 1.5rem;
    border-bottom: none;
  }
  header nav a:hover, header nav a.aktiv {
    background: rgba(255,255,255,0.08);
    border: none;
  }
}

/* Tablet Hochformat & großes Handy (bis 700px) */
@media (max-width: 700px) {
  main { margin: 1rem auto; padding: 0 0.8rem; }
  article { padding: 1.3rem; }
  .brand .brand-name { font-size: 1.05rem; }
  .brand .subtitle { font-size: 0.8rem; }
  .hero { padding: 2rem 1rem; }
  .wp-block-columns { flex-direction: column; gap: 0.5rem; }
  .kacheln { grid-template-columns: 1fr; }
}

/* Footer-Anpassung für mittelgroße Displays */
@media (max-width: 700px) {
  .footer-cols { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  .footer-unten { flex-direction: column; text-align: center; }
}

/* Handy klein (bis 480px) */
@media (max-width: 480px) {
  header { padding: 0.8rem; }
  main { margin: 0.7rem auto; padding: 0 0.6rem; }
  article { padding: 1rem; border-radius: 6px; }
  article h2 { margin-top: 1.5rem; }
  .brand .brand-name { font-size: 1rem; }
  .brand .subtitle { font-size: 0.75rem; }
  .hinweis { padding: 0.8rem 1rem; }
  .hero { padding: 1.5rem 0.8rem; }
  table { font-size: 0.92rem; }
  th, td { padding: 0.5rem 0.55rem; }
  .kontakt-box .tel { font-size: 1.3rem; }
  footer { padding: 1.8rem 0.8rem 1rem; }
  .footer-cols { grid-template-columns: 1fr; gap: 1.2rem; }
}

/* Sehr kleine Handys (bis 360px) */
@media (max-width: 360px) {
  .brand .brand-name { font-size: 0.95rem; }
  .brand .subtitle { display: none; }
}

/* Krankheitsbilder-Seite */
.toc {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.4rem;
  margin: 1rem 0 2rem 0;
  padding: 1rem 1.2rem;
  background: #f0f4f7;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 0.4rem 0.6rem;
  color: var(--primary);
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.97rem;
}
.toc a:hover { background: white; }

dl.krankheiten {
  margin: 1rem 0 2rem 0;
  padding: 0;
}
dl.krankheiten dt {
  font-weight: 600;
  font-size: 1.02rem;
  margin-top: 1rem;
  color: var(--primary-dark);
  line-height: 1.4;
}
dl.krankheiten dt a {
  color: var(--primary);
  text-decoration: none;
}
dl.krankheiten dt a:hover { text-decoration: underline; }
dl.krankheiten dt a.wiki-ref {
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--muted);
  margin-left: 0.5rem;
}
dl.krankheiten dt a.wiki-ref::after { content: ''; }
dl.krankheiten dt .alt {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
}
dl.krankheiten dd {
  margin: 0.2rem 0 0.6rem 0;
  color: var(--text-light);
  line-height: 1.55;
  font-size: 0.97rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
}

.hinweis-info {
  background: #eef5f8;
  border-left: 3px solid var(--primary);
  padding: 0.8rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.97rem;
  border-radius: 4px;
}

/* Suchfeld auf der Krankheitsbilder-Seite */
.suche-box {
  margin: 1.5rem 0 2rem 0;
  position: sticky;
  top: 70px;
  z-index: 50;
  background: var(--bg);
  padding: 0.5rem 0;
}
.suche-box input[type="search"] {
  width: 100%;
  padding: 0.8rem 1.1rem;
  font-size: 1.05rem;
  border: 2px solid var(--primary-light);
  border-radius: 30px;
  background: white;
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  outline: none;
}
.suche-box input[type="search"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(42,111,138,0.15);
}
#such-info {
  padding: 0.4rem 0.9rem 0;
  font-size: 0.92rem;
  color: var(--muted);
  min-height: 1.2em;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Volltext-Suchergebnisse */
#volltext-treffer h2 {
  color: var(--primary);
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
}
#volltext-treffer .treffer-zahl {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
#volltext-treffer .keine-treffer {
  padding: 2rem;
  background: #f5f8fa;
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
}
.treffer-liste {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.treffer-karte {
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  transition: box-shadow 0.15s;
}
.treffer-karte:hover {
  box-shadow: var(--shadow-md);
}
.treffer-karte h3 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
  color: var(--primary);
}
.treffer-karte h3 a {
  color: var(--primary);
  text-decoration: none;
}
.treffer-karte h3 a:hover {
  text-decoration: underline;
}
.treffer-alt {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.88rem;
  font-style: italic;
}
.treffer-kat {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.15rem 0.6rem;
  border-radius: 12px;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}
.treffer-sektion {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-light);
  margin-top: 0.4rem;
}
.treffer-sektion strong {
  color: var(--primary-dark);
}
.treffer-sektion mark {
  background: #fff6a6;
  padding: 0 2px;
  border-radius: 2px;
  color: var(--text);
}
.treffer-mehr {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.3rem;
  font-style: italic;
}

/* Krankheitsbild-Detailseiten */
.brotkrumen {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.brotkrumen a {
  color: var(--primary);
  text-decoration: none;
}
.brotkrumen a:hover { text-decoration: underline; }

.kategorie-tag {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
}

.rohfassung-hinweis {
  background: #fff8e6;
  border-left: 4px solid #d9a342;
  padding: 0.8rem 1rem;
  margin-bottom: 2rem;
  font-size: 0.97rem;
  border-radius: 4px;
  color: #6b4a15;
  line-height: 1.55;
}

article.krankheitsbild h2 {
  margin-top: 2.2rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--primary-light);
}
article.krankheitsbild h3 {
  margin-top: 1.6rem;
  color: var(--primary);
}

figure.klinisches-bild {
  max-width: 500px;
  margin: 1.5rem auto;
  background: #f5f8fa;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
figure.klinisches-bild img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 0;
}
figure.klinisches-bild figcaption {
  font-size: 0.92rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 0.6rem;
  line-height: 1.45;
}
.bild-quelle {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  margin-top: 0.3rem;
}
.bild-quelle a { color: var(--muted); }

.weiterfuehrende-links {
  margin: 2.5rem 0 1rem;
  padding: 1.2rem;
  background: #f5f8fa;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* XL-Krankheitsbild-Seiten */
article.krankheitsbild.xl aside.inhaltsverzeichnis {
  background: #f5f8fa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1rem 0 2rem;
  font-size: 0.97rem;
}
article.krankheitsbild.xl aside.inhaltsverzeichnis h3 {
  color: var(--primary-dark);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}
article.krankheitsbild.xl aside.inhaltsverzeichnis ol {
  margin: 0;
  padding-left: 1.2rem;
}
article.krankheitsbild.xl aside.inhaltsverzeichnis a {
  color: var(--primary);
  text-decoration: none;
}
article.krankheitsbild.xl aside.inhaltsverzeichnis a:hover {
  text-decoration: underline;
}

.ll-hinweis {
  background: #fff8e6;
  border-left: 4px solid #d9a342;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  border-radius: 4px;
  color: #6b4a15;
  line-height: 1.55;
}
.ll-hinweis a {
  color: #6b4a15;
  text-decoration: underline;
}

ul.leitlinien-liste {
  list-style: none;
  margin: 0;
  padding: 0;
}
ul.leitlinien-liste li {
  background: #eef5f8;
  border-left: 4px solid var(--primary);
  padding: 0.7rem 1rem;
  margin-bottom: 0.6rem;
  border-radius: 4px;
  font-size: 0.97rem;
  line-height: 1.55;
}
ul.leitlinien-liste .ll-meta {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: normal;
}

ol.literatur-liste {
  padding-left: 1.3rem;
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-light);
  line-height: 1.6;
}
ol.literatur-liste li {
  margin-bottom: 0.5rem;
}
.weiterfuehrende-links h3 {
  margin-top: 0;
  font-size: 1rem;
  color: var(--primary);
}
.weiterfuehrende-links ul {
  margin: 0;
  padding-left: 1.2rem;
}
.weiterfuehrende-links li {
  margin-bottom: 0.3rem;
}

/* ===== Print-Styles ===== */
@media print {
  header, footer, nav, .aktionsleiste { display: none; }
  main { margin: 0; }
  article { border: none; box-shadow: none; padding: 0; }
  a { color: black; text-decoration: none; }
  body { font-size: 11pt; line-height: 1.5; }
  article p, article li { max-width: none; }
}

/* Keine Animation für Nutzer, die das deaktiviert haben */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Anfahrtskarte (statisches Bild statt Google-Maps-iframe) ===== */
figure.karte { margin: 1.5rem 0; }
figure.karte img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-md); display: block; }
figure.karte figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.4rem; }
.routen-links .klein { font-size: 0.9rem; color: var(--muted); }

/* ===== Sprechzeiten-Tabellen (Öffnungszeiten) ===== */
table.sprechzeiten tr > :first-child { width: 9rem; }
table.sprechzeiten th[scope="row"] {
  background: #f0f4f7;
  font-weight: 600;
  color: var(--primary-dark);
}
table.sprechzeiten a strong { color: var(--primary-dark); }
@media (max-width: 480px) {
  table.sprechzeiten tr > :first-child { width: 6.5rem; }
}

/* =========================================================
   STARTSEITE – Aufbau nach dem Muster moderner Praxisseiten:
   Hero-Foto → Sprechzeiten/Telefon → Vorstellung → Leistungen → Team → Anfahrt
   ========================================================= */

/* Kopfmenü: Termin-Button rechts im Menü */
header nav li.nav-cta a {
  background: white;
  color: var(--primary-dark);
  border-radius: 30px;
  padding: 0.4rem 0.9rem;
  font-weight: 600;
  border-bottom: none;
}
header nav li.nav-cta a:hover { background: #e6f0f5; border-bottom: none; }

/* Abschnitte als Karten (gleiche Optik wie <article> auf den Unterseiten) */
.abschnitt {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.abschnitt h2 {
  color: var(--primary);
  font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  line-height: 1.25;
  margin-bottom: 0.4rem;
}
.abschnitt h3 {
  color: var(--primary-dark);
  font-size: clamp(1.1rem, 1.05rem + 0.3vw, 1.25rem);
  margin: 1.6rem 0 0.8rem;
}
.abschnitt p { margin-bottom: 1rem; max-width: var(--zeilenbreite); }
.abschnitt a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.abschnitt a.button, .abschnitt .kachel, .abschnitt .team-karte, .abschnitt .telefon-karte { text-decoration: none; }
.abschnitt .kachel-hervorgehoben, .abschnitt .kachel-hervorgehoben h3 { color: white; }
.abschnitt .kachel-hervorgehoben p { color: rgba(255,255,255,0.92); }
.abschnitt-unter { color: var(--text-light); margin-bottom: 1.4rem !important; }
.zentriert { text-align: center; margin-left: auto; margin-right: auto; }
.abschnitt .kacheln { margin-top: 0; }

/* Zweispaltig: Text links, Bild rechts – auf dem Handy untereinander */
.zweispaltig {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: center;
}
.zweispaltig figure { margin: 0; }
.zweispaltig figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
  box-shadow: var(--shadow-md);
}
.zweispaltig figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; text-align: center; }

/* Hero mit Foto */
.hero-foto {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.5rem;
  background: var(--primary-dark);
}
.hero-foto img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.hero-karte {
  position: absolute;
  left: 2rem;
  bottom: 2rem;
  max-width: 34rem;
  background: rgba(255,255,255,0.96);
  padding: 1.6rem 1.8rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.hero-karte h1 {
  color: var(--primary-dark);
  font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.3rem);
  line-height: 1.2;
  margin-bottom: 0.6rem;
}
.hero-karte p { color: var(--text); margin-bottom: 0.8rem; }
.hero-karte .hero-aktionen { justify-content: flex-start; margin-top: 1rem; }
.hero-karte .button { background: var(--primary); color: white; }
.hero-karte .button:hover { background: var(--primary-dark); }
.hero-karte .button.sekundaer { background: white; color: var(--primary-dark); border: 2px solid var(--primary); }
.button.primaer { background: var(--primary); color: white; }
.button.primaer:hover { background: var(--primary-dark); }

/* Sprechzeiten-Übersicht auf der Startseite */
table.uebersicht { margin-top: 0.5rem; }
table.uebersicht td strong { color: var(--primary-dark); }

/* Telefon-Karten */
.telefon-raster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.8rem;
  margin: 0.5rem 0 1.4rem;
}
.telefon-karte {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: #eef5f8;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  text-decoration: none !important;
  color: var(--text);
  transition: box-shadow 0.15s, transform 0.15s;
}
.telefon-karte:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.telefon-karte .tk-titel { font-size: 0.92rem; color: var(--text-light); line-height: 1.35; }
.telefon-karte .tk-nummer { font-size: 1.25rem; font-weight: 700; color: var(--primary-dark); white-space: nowrap; }

/* Team-Karten */
.team-raster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}
.team-karte {
  display: block;
  text-align: center;
  background: #f5f8fa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.2rem;
  text-decoration: none !important;
  color: var(--text);
  transition: box-shadow 0.15s, transform 0.15s;
}
.team-karte:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.team-karte img, .team-karte .avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  display: block;
  box-shadow: var(--shadow-sm);
}
.team-karte .avatar {
  background: var(--primary);
  color: white;
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 150px;
  letter-spacing: 0.05em;
}
.team-karte h3 { margin: 0 0 0.4rem; font-size: 1.15rem; color: var(--primary-dark); }
.team-karte p { color: var(--text-light); font-size: 0.97rem; margin-bottom: 0.8rem; line-height: 1.45; }
.team-karte .mehr { color: var(--primary); font-weight: 600; }

/* Startseite auf Tablet/Handy */
@media (max-width: 900px) {
  .hero-karte {
    position: static;
    max-width: none;
    border-radius: 0;
    box-shadow: none;
    background: white;
  }
  .hero-foto img { aspect-ratio: 16 / 10; }
  .zweispaltig { grid-template-columns: 1fr; gap: 1.2rem; }
  .abschnitt { padding: 1.3rem; }
}
@media (max-width: 480px) {
  .abschnitt { padding: 1rem; }
  .hero-karte { padding: 1.2rem 1rem; }
  .hero-karte .hero-aktionen .button { width: 100%; text-align: center; }
}

/* =========================================================
   VOLLBREITE MIT SEITENLEISTEN
   Kopf, Inhalt und Fuß nutzen die ganze Bildschirmbreite.
   <main> ist ein Raster: Seitenleiste links | Inhalt | Seitenleiste rechts.
   Breiten der Seitenleisten: --sl-breite (unten anpassbar).
   ========================================================= */
:root {
  --sl-breite: clamp(230px, 18vw, 320px);
  --sl-hintergrund: #eef3f6;
}
header .container,
footer .footer-inner { max-width: none; }
header { padding: 0.8rem 1.25rem; }
footer { padding-left: 1.5rem; padding-right: 1.5rem; }

main {
  max-width: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: var(--sl-breite) minmax(0, 1fr) var(--sl-breite);
  gap: 0;
  align-items: start;
}
main > article, main > .inhalt {
  min-width: 0;
  margin: 1.25rem 1.25rem;
}
main > article { max-width: none; }
.inhalt .abschnitt, .inhalt .hero-foto { margin-left: 0; margin-right: 0; }

/* Seitenleisten: volle Höhe, laufen beim Scrollen mit */
.seitenleiste {
  background: var(--sl-hintergrund);
  border-right: 1px solid var(--border);
  padding: 1.25rem 1.1rem;
  align-self: stretch;
  min-height: 100%;
  font-size: 0.95rem;
}
.seitenleiste.rechts { border-right: none; border-left: 1px solid var(--border); }
.seitenleiste .sl-innen { position: sticky; top: 5.5rem; }
.sl-block {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.sl-block h2 {
  font-size: 1.05rem;
  color: var(--primary-dark);
  margin: 0 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--primary-light);
}
.sl-block p { margin: 0 0 0.7rem; line-height: 1.5; }
.sl-block p:last-child { margin-bottom: 0; }
.sl-block a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.sl-block a.button { text-decoration: none; display: block; text-align: center; margin: 0.6rem 0; padding: 0.65rem 1rem; }
.sl-block .sl-tel { font-size: 1.2rem; font-weight: 700; color: var(--primary-dark); text-decoration: none; white-space: nowrap; }
.sl-block .sl-tel:hover { text-decoration: underline; }
.sl-block .sl-klein { color: var(--text-light); font-size: 0.9rem; }
.sl-block ul { list-style: none; margin: 0; padding: 0; }
.sl-block li { padding: 0.35rem 0; border-bottom: 1px solid var(--border); }
.sl-block li:last-child { border-bottom: none; }
.sl-block img { width: 100%; height: auto; border-radius: 6px; display: block; margin-bottom: 0.6rem; }
.sl-block .sl-tage { font-size: 1.05rem; font-weight: 700; color: var(--primary-dark); }

/* Ab 1100 px abwärts: eine Spalte, Seitenleisten unter dem Inhalt */
@media (max-width: 1100px) {
  main { grid-template-columns: 1fr; }
  main > article, main > .inhalt { margin: 1rem 1rem 0; }
  .seitenleiste, .seitenleiste.rechts {
    border: none;
    border-top: 1px solid var(--border);
    padding: 1rem;
    min-height: 0;
  }
  .seitenleiste.links { order: 2; }
  .seitenleiste.rechts { order: 3; }
  .seitenleiste .sl-innen { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
  .sl-block { margin-bottom: 0; }
}
@media (max-width: 700px) {
  main > article, main > .inhalt { margin: 0.8rem 0.8rem 0; }
  header { padding: 0.8rem 1rem; }
}
@media print { .seitenleiste { display: none; } main { display: block; } }

/* Einleitungsabsatz auf Leistungsseiten */
.einleitung { font-size: 1.08em; color: var(--text-light); line-height: 1.6; }

/* 3D-Grafik am Artikelanfang */
figure.krankheitsgrafik { margin: 1rem 0 1.8rem; }
figure.krankheitsgrafik img { width: 100%; height: auto; display: block; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); margin: 0; }
figure.krankheitsgrafik figcaption { font-size: 0.92rem; color: var(--muted); margin-top: 0.5rem; }

/* ===== Fachbegriffe (Oktober 2026) ===== */
a.fachbegriff { color: inherit; text-decoration: underline dotted var(--accent, #1d4f62); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a.fachbegriff:hover, a.fachbegriff:focus { text-decoration-style: solid; color: var(--accent, #1d4f62); }
.buchstaben-nav { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 1rem 0 1.5rem; }
.buchstaben-nav a { display: inline-block; min-width: 2.2rem; padding: 0.3rem 0.5rem; text-align: center; border: 1px solid var(--border, #d5dde3); border-radius: var(--radius, 8px); text-decoration: none; font-weight: 600; }
.buchstaben-nav a:hover { background: var(--accent, #1d4f62); color: #fff; }
dl.fachbegriffe { margin: 0 0 1.5rem; }
dl.fachbegriffe dt { font-weight: 700; margin-top: 1.1rem; scroll-margin-top: 6rem; }
dl.fachbegriffe dt:target { background: #fff6d6; outline: 3px solid #f0c75e; border-radius: 4px; padding: 0.15rem 0.4rem; }
dl.fachbegriffe dd { margin: 0.25rem 0 0; }

/* ===== Bilder aus dem Editor: Breite, Ausrichtung, Bilderreihen (Oktober 2026) ===== */
/* Breite steht als style="width:NN%" am Bild bzw. am <figure>; das Bild füllt sein <figure> dann aus */
:is(article, .inhalt) figure[style*="width"] > img,
:is(article, .inhalt) .bildreihe img { width: 100%; max-width: 100%; margin: 0; }
/* Ausrichtung: links/rechts = Text fließt am Bild vorbei, mitte = zentriert */
:is(article, .inhalt) .bild-links  { float: left;  margin: 0.3rem 1.5rem 1rem 0; }
:is(article, .inhalt) .bild-rechts { float: right; margin: 0.3rem 0 1rem 1.5rem; }
:is(article, .inhalt) .bild-mitte  { display: block; margin-left: auto; margin-right: auto; }
:is(article, .inhalt) h2, :is(article, .inhalt) h3, :is(article, .inhalt) .bildreihe { clear: both; }
/* Bilderreihe: mehrere Bilder nebeneinander, gleich breit – oder mit eigener Breite */
:is(article, .inhalt) .bildreihe { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; margin: 1.5rem 0; }
:is(article, .inhalt) .bildreihe > figure, :is(article, .inhalt) .bildreihe > img { flex: 1 1 0; min-width: 0; margin: 0; }
:is(article, .inhalt) .bildreihe > [style*="width"] { flex: 0 0 auto; }
:is(article, .inhalt) .bildreihe figcaption { margin-top: 0.4rem; font-size: 0.9rem; }
@media (max-width: 600px) {
  /* Handy: kein Textumfluss mehr, Bilderreihen mit höchstens zwei Bildern pro Zeile */
  :is(article, .inhalt) .bild-links, :is(article, .inhalt) .bild-rechts { float: none; margin: 1rem 0; width: 100% !important; }
  :is(article, .inhalt) .bildreihe { gap: 0.6rem; }
  :is(article, .inhalt) .bildreihe > * { flex: 1 1 calc(50% - 0.3rem); width: auto !important; }
}

/* ===== Praxis-Blöcke der Startseite unter dem Text aller Unterseiten (werkzeuge/praxisbloecke.py) ===== */
main > .praxisbloecke { grid-column: 2; min-width: 0; margin: 0.5rem 1.25rem 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
/* Feste Spalten, damit die Blöcke als zweite Zeile unter den Text rutschen und die Seitenleisten neben beidem stehen */
main > .seitenleiste.links { grid-column: 1; grid-row: 1 / span 2; }
main > article, main > .inhalt { grid-column: 2; grid-row: 1; }
main > .praxisbloecke { grid-row: 2; }
main > .seitenleiste.rechts { grid-column: 3; grid-row: 1 / span 2; }
.praxisbloecke .abschnitt { margin-left: 0; margin-right: 0; }
.praxisbloecke .abschnitt:last-child { margin-bottom: 0; }
@media (max-width: 1100px) {
  main > .seitenleiste.links, main > .seitenleiste.rechts, main > article, main > .inhalt, main > .praxisbloecke { grid-column: auto; grid-row: auto; }
  main > .praxisbloecke { margin: 0.5rem 1rem 1rem; }
}
@media (max-width: 700px) {
  main > .praxisbloecke { margin: 0.5rem 0.8rem 1rem; }
}
@media print { .praxisbloecke { display: none; } }
