/* Privatpraxis für Orthopädie Dr. med. Mario Bernsdorf – Stylesheet */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #faf6f1;
  --surface: #ffffff;
  --sand: #f1e7dc;
  --ink: #2a211b;
  --muted: #6a5e55;
  --line: #e4d6c7;
  --brand: #4a2610;
  --brand-2: #924400;
  --accent: #b0651f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(42, 30, 20, .05), 0 8px 28px rgba(42, 30, 20, .07);
  --wrap: 1180px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 100px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word; /* lange Wörter brechen notfalls um statt überzulaufen */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-2); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 450;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--brand);
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 400; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.08rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1.1em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9rem;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--sand { background: var(--sand); }
.section--dark { background: var(--brand); color: #f3e8de; }
.section--dark h2, .section--dark h3 { color: #fff; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* ---------- Header ---------- */
.topbar { background: var(--brand); color: #ead9c9; font-size: .86rem; }
.topbar .wrap { display: flex; gap: 24px; justify-content: flex-end; align-items: center; min-height: 38px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar .status { margin-right: auto; display: inline-flex; align-items: center; gap: 8px; color: #fff; }
.topbar .status[hidden] { display: none; }
.topbar .status i { width: 8px; height: 8px; border-radius: 50%; background: #b9a290; flex: none; }
.topbar .status.is-open i { background: #5fd27a; box-shadow: 0 0 0 3px rgba(95, 210, 122, .22); animation: pulse 2.4s ease-in-out infinite; }
.topbar .status strong { font-weight: 600; }
.topbar .status span { color: #ead9c9; }
.topbar .status span::before { content: "·"; margin: 0 6px 0 2px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(95, 210, 122, 0); } }

.header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
}
/* Weichzeichner auf eigener Ebene: direkt am Kopf würde er in Safari das Handy-Menü einsperren */
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(247, 244, 238, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 24px; }
.brand { display: flex; flex-shrink: 0; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand img { width: 46px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-family: var(--serif); font-size: 1.12rem; color: var(--brand); }
.brand-sub { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; align-items: center; gap: 4px; }
.nav a {
  display: block; padding: 10px 14px; border-radius: 8px;
  text-decoration: none; color: var(--ink); font-size: .95rem; font-weight: 500;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand); background: var(--sand); }
.nav .has-sub { position: relative; }
.nav .sub {
  position: absolute; top: 100%; left: 0; min-width: 230px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nav .has-sub:hover .sub, .nav .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.nav .sub a { font-weight: 400; }
.nav .cta a { background: var(--brand); color: #fff; margin-left: 8px; }
.nav .cta a:hover { background: var(--brand-2); color: #fff; }
.nav-close, .nav .nav-contact { display: none; }

.menu-btn {
  display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
  width: 46px; height: 46px; cursor: pointer; color: var(--brand);
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  display: block; width: 20px; height: 2px; background: currentColor; margin: 0 auto; position: relative;
  transition: transform .2s ease, background .2s ease;
}
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .menu-btn { display: block; }
  /* Menü als Schublade von rechts über die ganze Höhe, links schaut die abgedunkelte Seite durch */
  .nav {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 2; width: min(320px, calc(100vw - 56px));
    background: var(--bg); border-left: 1px solid var(--line); box-shadow: -12px 0 32px rgba(46, 26, 13, .18);
    padding: 48px 20px 12px; overflow-y: auto; overscroll-behavior: contain;
    visibility: hidden; transform: translateX(100%);
    transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .32s;
  }
  .menu-open .nav { visibility: visible; transform: none; transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
  .header::after {
    content: ""; position: fixed; inset: 0; z-index: 1; background: rgba(46, 26, 13, .38);
    opacity: 0; pointer-events: none; transition: opacity .32s ease;
  }
  .menu-open .header::after { opacity: 1; pointer-events: auto; }
  .nav-close {
    display: block; position: absolute; top: 8px; right: 10px; width: 40px; height: 40px;
    background: none; border: 0; cursor: pointer; color: var(--brand);
  }
  .nav-close::before, .nav-close::after {
    content: ""; position: absolute; left: 10px; top: 19px; width: 20px; height: 2px; background: currentColor; transform: rotate(45deg);
  }
  .nav-close::after { transform: rotate(-45deg); }
  .nav > ul:not(.nav-contact) > li + li:not(.cta) { border-top: 1px solid var(--line); }
  .nav .sub li { border: 0; }
  .menu-open { overflow: hidden; }
  .nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav > ul { gap: 0; }
  .nav a { padding: 8px 12px; font-size: 1.02rem; }
  .nav .sub { position: static; min-width: 0; opacity: 1; visibility: visible; transform: none; border: 0; box-shadow: none; padding: 0 0 4px 16px; background: none; }
  .nav .sub a { padding: 5px 12px; font-size: .95rem; }
  .nav .cta a { margin: 10px 0 0; padding: 12px 8px; text-align: center; white-space: nowrap; }
  .nav .nav-contact { display: block; margin-top: 14px; padding: 10px 12px 0; border-top: 1px solid var(--line); font-size: .95rem; }
  .nav .nav-contact li { padding: 3px 0; align-items: flex-start; line-height: 1.45; }
  .nav .nav-contact .icon { margin-top: 1px; }
  .nav .nav-contact a, .nav .nav-contact a:hover { display: inline; padding: 0; background: none; font-size: inherit; font-weight: 400; color: var(--ink); }
  .topbar .hide-sm { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(78vh, 720px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(46, 24, 8, .86) 0%, rgba(46, 24, 8, .55) 45%, rgba(46, 24, 8, .05) 80%),
              linear-gradient(0deg, rgba(46, 24, 8, .5) 0%, transparent 40%);
}
.hero .wrap { position: relative; z-index: 1; padding-top: 80px; padding-bottom: clamp(48px, 8vw, 96px); }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .eyebrow { color: #f0c79a; }
.hero p { font-size: 1.15rem; max-width: 46ch; color: #f3e9e0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* Bewegung im Kopfbereich der Startseite: Text blendet ein */
.hero .wrap > * { animation: hero-in .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero .wrap > :nth-child(2) { animation-delay: .12s; }
.hero .wrap > :nth-child(3) { animation-delay: .24s; }
.hero .wrap > :nth-child(4) { animation-delay: .36s; }
@keyframes hero-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  text-decoration: none; border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s;
}
.btn--light { background: #fff; color: var(--brand); }
.btn--light:hover { background: var(--sand); color: var(--brand); }
.btn--ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn--dark { background: var(--brand); color: #fff; }
.btn--dark:hover { background: var(--brand-2); color: #fff; }

/* Seitenkopf für Unterseiten */
.page-head { position: relative; color: #fff; overflow: hidden; background: var(--brand); }
.page-head img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.page-head .wrap { position: relative; padding-top: clamp(56px, 9vw, 110px); padding-bottom: clamp(44px, 6vw, 72px); }
.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head p { color: #efe2d6; max-width: 90ch; font-size: 1.1rem; margin: 0; }
.crumbs { font-size: .85rem; color: #dcc6b3; margin-bottom: 18px; }
.crumbs a { color: #fff; }
.box-geraet { margin-bottom: 2em; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.box-geraet img { width: 240px; border-radius: 10px; }
@media (max-width: 640px) { .box-geraet img { width: 100%; } }
.nur-handy { display: none; }
/* Tablet/Desktop: Kopfbereich auf allen Unterseiten gleich hoch (Höhe des längsten Kopfs), Text unten */
@media (min-width: 641px) {
  .page-head { display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(320px, 210px + 13vw, 372px); }
}
/* Handy: Kopfbereich ohne Einleitungstext, auf allen Unterseiten gleich hoch */
@media (max-width: 640px) {
  .page-head .wrap { min-height: 210px; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 32px; padding-bottom: 32px; }
  .page-head p { display: none; }
  .page-head h1 { font-size: clamp(1.8rem, 8vw, 2.2rem); margin-bottom: 0; text-wrap: balance; }
  .crumbs { margin-bottom: 10px; }
  .nur-handy { display: block; }
}

/* ---------- Layouts ---------- */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split--top { align-items: start; }
.split--even { grid-template-columns: 1fr 1fr; align-items: stretch; }
.split--even > .box { display: flex; flex-direction: column; }
.box-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: auto; }
.box-row p { margin: 0; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 860px) { .split, .split--even { grid-template-columns: 1fr; } }

.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child, .prose .eyebrow + h2 { margin-top: 0; }
.prose .eyebrow { display: block; margin-bottom: .5rem; }
.prose ul:not(.tags) { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--accent); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.content-grid aside { position: sticky; top: 104px; display: grid; gap: 20px; }
@media (max-width: 960px) { .content-grid { grid-template-columns: 1fr; } .content-grid aside { position: static; } }

/* Karten */
.cards { --cols: 3; --gap: 22px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.cards > * { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); }
@media (max-width: 960px) { .cards { --cols: 2; } }
@media (max-width: 620px) { .cards { --cols: 1; } }
.card {
  display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(42,30,20,.06), 0 16px 40px rgba(42,30,20,.12); color: var(--ink); }
.card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: .4em; }
.card-body p { color: var(--muted); font-size: .97rem; margin-bottom: 1em; }
.card-more { margin-top: auto; font-weight: 600; font-size: .92rem; color: var(--brand-2); }
.card-more::after { content: " →"; }

.box { background: var(--surface); border-radius: var(--radius); padding: 26px 26px 22px; box-shadow: var(--shadow); }
.box h3 { margin-bottom: .7em; }
.box--dark { background: var(--brand); color: #f3e8de; }
.box--dark h2, .box--dark h3 { color: #fff; }
.box--dark a { color: #fff; }
.box--dark a.btn--light, .section--dark a.btn--light { color: var(--brand); }

/* Listen in Spalten (Verfahren) */
/* Zeitungsspalten: jedes Kästchen so hoch wie sein Text, keine leeren Flächen; schmal automatisch eine Spalte */
.tags { list-style: none; padding: 0; margin: 0 0 1.4em; columns: 2 280px; column-gap: 10px; }
.tags li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px 10px 38px; position: relative; font-size: .96rem; line-height: 1.45;
  margin: 0 0 10px; break-inside: avoid; hyphens: auto; -webkit-hyphens: auto;
}
.tags li::before {
  content: ""; position: absolute; left: 14px; top: 15px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); opacity: .8;
}

/* Öffnungszeiten */
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.hours th { color: var(--muted); }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.box--dark .hours th { color: #d6bfab; }
.box--dark .hours th, .box--dark .hours td { border-color: rgba(255,255,255,.16); }
.hours tr.today th, .hours tr.today td { font-weight: 600; color: inherit; }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 6px 0; display: flex; align-items: center; gap: 12px; }
.contact-list .icon {
  flex: none; width: 20px; height: 20px; color: var(--accent);
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.box--dark .contact-list .icon, .footer .contact-list .icon { color: #d6bfab; }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gallery figure { margin: 0; }
.gallery button { all: unset; display: block; cursor: zoom-in; border-radius: 12px; overflow: hidden; width: 100%; }
.gallery button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .4s ease; }
.gallery button:hover img { transform: scale(1.04); }
.gallery--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .gallery--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gallery--strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery--strip figure:nth-child(n+5) { grid-column: span 2; }
.gallery--strip figure:nth-child(n+5) img { aspect-ratio: 2 / 1; }
@media (max-width: 760px) {
  .gallery--strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery--strip figcaption { overflow-wrap: anywhere; hyphens: auto; }
  .gallery--strip figure:nth-child(n+5) { grid-column: auto; }
  .gallery--strip figure:nth-child(n+5) img { aspect-ratio: 4 / 3; }
}
.gallery figcaption { font-size: .9rem; color: var(--muted); padding-top: 8px; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(30, 18, 9, .9); }
.lightbox img { max-width: 94vw; max-height: 84vh; border-radius: 10px; }
.lightbox p { color: #fff; text-align: center; margin: 12px 0 0; }
.lightbox .close {
  position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; cursor: pointer;
}

/* Zitat */
.quote {
  font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.7rem); line-height: 1.45; font-weight: 350;
  color: var(--brand); border-left: 3px solid var(--accent); padding: 4px 0 4px 26px; margin: 0 0 1.5em;
}
.section--dark .quote { color: #fff; }
.quote cite { display: block; font-family: var(--sans); font-style: normal; font-size: .95rem; color: var(--muted); margin-top: 12px; }
.section--dark .quote cite { color: #d6bfab; }

/* Team */
.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
@media (max-width: 860px) { .team { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .team { grid-template-columns: 1fr; } }
.person { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.person img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.person div { padding: 22px 24px 26px; }
.person h3 { margin-bottom: .2em; }
.person .role { color: var(--accent); font-weight: 600; font-size: .9rem; margin-bottom: .8em; }
.person p:last-child { color: var(--muted); font-size: .96rem; margin: 0; }

/* Akkordeon */
.faq details { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 12px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 56px 18px 22px; position: relative;
  font-family: var(--serif); font-size: 1.15rem; color: var(--brand);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-family: var(--sans); font-size: 1.5rem; color: var(--accent); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details > div { padding: 0 22px 8px; }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.facts li { background: var(--surface); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow); }
.facts strong { display: block; font-family: var(--serif); font-weight: 450; font-size: 1.9rem; color: var(--brand); line-height: 1.1; }
.facts span { color: var(--muted); font-size: .92rem; }
.facts-text { margin: 1.4em 0 0; }
.facts-more { margin: 1.4em 0 0; font-weight: 600; }
.facts-more a::after { content: " →"; }

/* CTA-Band */
.cta-band { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.cta-band > div { flex: 1 1 420px; }
.cta-tel { flex: none; }
.cta-band h2 { margin: 0 0 .25em; }
.cta-band p { margin: 0; color: #dcc6b3; text-wrap: balance; max-width: 54ch; }
.cta-tel { display: grid; gap: 2px; text-decoration: none; color: #fff; text-align: right; }
.cta-tel small { font-size: .85rem; color: #dcc6b3; letter-spacing: .02em; }
.cta-tel strong {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.1; white-space: nowrap;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .4s ease, color .2s;
}
.section--dark a.cta-tel:hover { color: #f0c79a; }
.cta-tel:hover strong { background-size: 100% 1px; }
@media (max-width: 720px) { .cta-tel { text-align: left; } }

/* Karte: braune OpenStreetMap-Karte, wird erst nach Klick interaktiv (Leaflet) */
.map { position: relative; height: 400px; overflow: hidden; background: var(--sand); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.map-preview { position: absolute; inset: 0; z-index: 0; isolation: isolate; background: url("../img/karte-praxis-weimar.jpg") center / 2111px auto no-repeat; }
.map-live { position: absolute; inset: 0; z-index: 0; background: var(--sand); font: inherit; }
/* Braun-Einfärbung: gleiche Farbschicht über Vorschau und Live-Karte */
.map-preview::before, .map-preview::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
/* Live-Karte: Farbschicht nur über den Kacheln, damit die Markierung unberührt bleibt */
.map-live .leaflet-tile-pane::before, .map-live .leaflet-tile-pane::after {
  content: ""; position: absolute; left: -10000px; top: -10000px; width: 20000px; height: 20000px; pointer-events: none;
}
/* 1. Farbton komplett durch ein zartes Braun ersetzen (einfarbige Karte), 2. hell und pastellig aufhellen */
.map-preview::before, .map-live .leaflet-tile-pane::before { z-index: 1000; background: #9a7b66; mix-blend-mode: color; }
.map-preview::after, .map-live .leaflet-tile-pane::after { z-index: 1001; background: #faf6f1; opacity: .38; }
.map-pin {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: 26px; height: 26px; margin: -26px 0 0 -13px;
  background: var(--brand); border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  box-shadow: 0 6px 14px rgba(46, 24, 8, .35);
}
.map-pin::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
.map-marker { background: none; border: 0; }
.map-marker .map-pin { left: 0; top: 0; }
.map-consent {
  position: absolute; z-index: 3; left: max(24px, calc((100% - var(--wrap)) / 2 + 24px)); top: 50%; transform: translateY(-50%); width: min(380px, calc(100% - 32px));
  display: grid; justify-items: center; gap: 10px; text-align: center; padding: 20px 22px 16px;
  background: rgba(255, 255, 255, .94); border-radius: var(--radius); box-shadow: var(--shadow);
}
.map-consent strong { font-family: var(--serif); font-weight: 450; color: var(--brand); font-size: 1.1rem; }
.map-consent p { color: var(--muted); font-size: .82rem; margin: 0; }
.map-consent [hidden] { display: none; }
.map-credit { position: absolute; z-index: 3; right: 8px; bottom: 6px; font-size: .7rem; color: var(--muted); background: rgba(255,255,255,.8); padding: 1px 6px; border-radius: 4px; }
.map-credit a { color: inherit; }
.map.is-live .map-preview, .map.is-live > .map-pin, .map.is-live .map-consent { display: none; }
.map .leaflet-bar a { color: var(--brand); }

/* Rechtstexte */
.legal ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.legal li { margin-bottom: .35em; }
.legal li::marker { color: var(--accent); }
.legal > h2:first-child { margin-top: 0; }
.legal h2 { font-size: 1.45rem; margin-top: 1.8em; }
.legal h3 { font-size: 1.1rem; font-family: var(--sans); font-weight: 600; margin-top: 1.4em; color: var(--ink); }
.legal p, .legal li { font-size: .97rem; }
.legal { overflow-wrap: break-word; }
.legal-row a { white-space: nowrap; }
.legal-row { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 8px 40px; padding: 26px 0; border-top: 1px solid var(--line); }
.legal-row:first-child { border-top: 0; padding-top: 0; }
.legal-row h2 { font-size: 1.2rem; margin: 0; }
.legal-row p { margin: 0 0 .7em; }
.legal-row p:last-child { margin-bottom: 0; }
.legal-stand { color: var(--muted); font-size: .9rem; margin-top: 28px; }
@media (max-width: 760px) { .legal-row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { background: #2e1a0d; color: #d4c1b1; font-size: .95rem; }
.footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-top: 64px; padding-bottom: 40px; }
.footer h3 { color: #fff; font-size: 1.1rem; }
.footer a { color: #f3e8de; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { padding: 3px 0; }
.footer .hours th { color: #bfa691; }
.footer .hours th, .footer .hours td { border-color: rgba(255,255,255,.1); padding: 6px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 24px; grid-template-columns: none; font-size: .86rem; }
.footer-bottom nav { display: flex; gap: 20px; }
@media (max-width: 860px) { .footer .wrap { grid-template-columns: 1fr; } }

/* Einblenden beim Scrollen */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .gallery img, .nav, .header::after { transition: none; }
}
@media print {
  .topbar, .header, .footer, .hero-actions { display: none; }
  body { background: #fff; }
}

/* Kleine Bildschirme */
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .header .wrap { min-height: 68px; }
  .brand { gap: 10px; }
  .brand img { width: 36px; }
  .brand-text { white-space: nowrap; }
  .brand-name { font-size: 1rem; }
  .brand-sub { font-size: .6rem; letter-spacing: .08em; }
  .menu-btn { width: 42px; height: 42px; }
  .nav .cta a { font-size: .95rem; }
  .facts { gap: 8px; }
  .facts li { padding: 12px 12px; }
  .facts span { font-size: .82rem; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
  .box { padding: 22px 20px 18px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* Sehr schmale Handys: Schriftzug darf den Menü-Knopf nicht berühren */
@media (max-width: 360px) {
  .brand img { width: 32px; }
  .brand-name { font-size: .92rem; }
  .brand-sub { font-size: .55rem; letter-spacing: .06em; }
}

/* Karte auf dem Handy: Hinweis unten, Markierung bleibt frei */
@media (max-width: 720px) {
  .map { height: 480px; }
  .map-consent { left: 16px; right: 16px; width: auto; top: auto; bottom: 16px; transform: none; padding: 16px 18px 14px; }
  .map-credit { bottom: auto; top: 6px; }
  .map > .map-pin { top: 140px; }
  .map-preview { background-position: center calc(140px - 277px); }
}
