/* ============================================================
   Ordination Dr. Andreas Spary – Stylesheet
   Keine externen Schriften/Dienste (DSGVO-konform, alles lokal)
   ============================================================ */

:root {
  --brand:       #0b5b73;
  --brand-dark:  #084457;
  --brand-light: #17869f;
  --brand-soft:  #e8f2f6;
  --ink:         #15242f;
  --ink-soft:    #4c5c68;
  --line:        #dde6ec;
  --bg:          #ffffff;
  --bg-soft:     #f5f9fb;
  --focus:       #b4531a;

  --wrap: 1120px;
  --radius: 16px;
  --shadow-s: 0 1px 2px rgba(21, 36, 47, .06), 0 2px 8px rgba(21, 36, 47, .05);
  --shadow-m: 0 4px 12px rgba(21, 36, 47, .07), 0 14px 34px rgba(21, 36, 47, .07);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: clamp(1rem, .97rem + .18vw, 1.09rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3 { hyphens: auto; line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3.15rem); }
h2 { font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2.1rem); }
h3 { font-size: 1.12rem; font-weight: 640; }
p  { margin: 0 0 1em; }
p:last-child, ul:last-child { margin-bottom: 0; }

a { color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-dark); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

img { max-width: 100%; height: auto; display: block; }
address { font-style: normal; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.15rem, 4vw, 2rem); }

.skip-link {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -120%);
  background: var(--brand-dark); color: #fff; padding: .75rem 1.25rem;
  border-radius: 0 0 10px 10px; z-index: 100; text-decoration: none; font-weight: 600;
}
.skip-link:focus { transform: translate(-50%, 0); color: #fff; }

/* ---------------- Kopfbereich ---------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 1rem 1.5rem;
  flex-wrap: wrap; padding-block: .8rem;
}

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; margin-right: auto; }
.brand:hover { color: inherit; }
.brand-mark {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 11px;
  background: linear-gradient(140deg, var(--brand-light), var(--brand-dark));
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 1.02rem; letter-spacing: .01em;
}
.brand-name  { font-weight: 660; font-size: 1.06rem; line-height: 1.25; letter-spacing: -.01em; }
.brand-claim { font-size: .8rem; color: var(--ink-soft); line-height: 1.3; }

.site-nav ul { display: flex; flex-wrap: wrap; gap: .35rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-block; padding: .35rem 0; font-size: 1rem; font-weight: 550;
  color: var(--ink-soft); text-decoration: none; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--brand); border-bottom-color: var(--brand-light); }
.site-nav a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .78rem 1.35rem; border-radius: 999px;
  font-weight: 620; font-size: .98rem; text-decoration: none;
  border: 1.5px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
}
.btn svg { width: 1.1em; height: 1.1em; flex: 0 0 auto; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--brand-dark); background: #fff; }
.btn-ghost:hover { border-color: var(--brand-light); color: var(--brand-dark); background: var(--brand-soft); }
.btn-sm { padding: .55rem 1.05rem; font-size: .92rem; }

/* ---------------- Abschnitte ---------------- */

main { flex: 1 0 auto; }
section { scroll-margin-top: 96px; }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-head p { color: var(--ink-soft); margin-bottom: 0; }

.eyebrow {
  display: block; text-transform: uppercase; letter-spacing: .13em;
  font-size: .82rem; font-weight: 700; color: var(--brand); margin-bottom: .6rem;
}

/* ---------------- Startbereich ---------------- */

.hero { padding-block: clamp(2.5rem, 6vw, 4.75rem); background:
        radial-gradient(1100px 420px at 12% -10%, var(--brand-soft), transparent 65%); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }

.hero h1 { margin-bottom: .35em; }
.hero-sub { font-size: clamp(1.05rem, 1rem + .35vw, 1.24rem); color: var(--ink-soft); max-width: 34rem; }

.badges { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.6rem; padding: 0; list-style: none; }
.badge {
  display: inline-flex; align-items: flex-start; gap: .45rem;
  background: var(--brand-soft); color: var(--brand-dark);
  border: 1px solid #cfe3ea; border-radius: 999px;
  padding: .35rem .9rem; font-size: .95rem; font-weight: 600;
}
.badge::before { content: ""; width: 7px; height: 7px; margin-top: .56em; flex: 0 0 auto;
  border-radius: 50%; background: var(--brand-light); }

.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; }

.hero-figure { margin: 0; }
.hero-figure { text-align: center; }
.hero-figure img {
  width: auto; max-width: 100%; height: auto;
  max-height: min(62vh, 620px); margin-inline: auto;
  border-radius: var(--radius); box-shadow: var(--shadow-m);
}
figcaption { font-size: .95rem; color: var(--ink-soft); margin-top: .7rem; text-align: center; }

/* ---------------- Hinweisband ---------------- */

.notice-band { background: var(--brand-dark); color: #eaf4f8; }
.notice-band .wrap {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem;
  padding-block: 1.05rem;
}
.notice-band p { margin: 0; font-weight: 550; }
.notice-band .band-note {
  font-weight: 600; font-size: .96rem;
  padding: .2rem .8rem; border-radius: 999px;
  background: rgba(255, 255, 255, .12);
}
.notice-band a { color: #fff; font-weight: 650; }

/* ---------------- Karten / Leistungen ---------------- */

.card-grid { display: grid; gap: 1.15rem; align-items: stretch; grid-template-columns: repeat(auto-fit, minmax(min(285px, 100%), 1fr)); }

.card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.45rem; box-shadow: var(--shadow-s);
}
.card h3 { display: flex; align-items: flex-start; gap: .65rem; margin-bottom: .4rem; }
.card .icon {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px;
  background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-top: -.15rem;
}
.card .icon svg { width: 19px; height: 19px; }
.card p { color: var(--ink-soft); font-size: 1rem; margin-bottom: 0; }
.card-wide { grid-column: 1 / -1; }

.tick-list { list-style: none; margin: .2rem 0 0; padding: 0; columns: 2; column-gap: 2rem; }
.tick-list li { break-inside: avoid; padding-left: 1.5rem; position: relative; margin-bottom: .35rem; color: var(--ink-soft); font-size: 1rem; }
.tick-list li::before {
  content: ""; position: absolute; left: .1rem; top: .58em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--brand-light);
}
@media (max-width: 560px) { .tick-list { columns: 1; } }

/* ---------------- Ordinationszeiten ---------------- */

.hours-grid {
  display: grid; gap: clamp(1.25rem, 3vw, 1.75rem); align-items: stretch;
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
}
@media (min-width: 800px) { .hours-grid { grid-template-columns: 1fr 1fr; } }

/* Ab Tablet beginnen alle Kacheltexte auf derselben Höhe */
@media (min-width: 760px) {
  .card h3 { min-height: 2.7em; }
  .card-wide h3 { min-height: 0; }
  .info-box h3 { min-height: 1.6em; }
}

.info-grid {
  display: grid; gap: 1rem; align-items: stretch;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .info-grid { grid-template-columns: 1fr 1fr; } }
.info-grid .info-box + .info-box { margin-top: 0; }

.hours {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-s);
}
.hours caption { text-align: left; padding: 1.1rem 1.35rem .6rem; }
.hours-title { display: block; font-weight: 660; font-size: 1.08rem; color: var(--ink); }
.hours-sub   { display: block; font-size: .93rem; color: var(--ink-soft); margin-top: .1rem; }

/* Telefonzeiten farblich leicht abheben */
.hours-phone { border-color: #cfe3ea; }
.hours-phone caption { background: var(--brand-soft); }
.hours-phone .hours-title { color: var(--brand-dark); }
.hours th, .hours td { padding: .9rem 1.35rem; text-align: left; border-top: 1px solid var(--line); }
.hours th { font-weight: 560; color: var(--ink); width: 45%; }
.hours td { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.hours tr:first-child th, .hours tr:first-child td { border-top: 1px solid var(--line); }
.hours .closed { color: #5c6b76; }

.info-box {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand-light);
  border-radius: 12px; padding: 1.25rem 1.4rem; box-shadow: var(--shadow-s);
}
.info-box + .info-box { margin-top: 1rem; }
.info-box h3 { margin-bottom: .35rem; }
.info-box p { color: var(--ink-soft); font-size: 1rem; }

/* ---------------- Kontakt ---------------- */

.contact-grid { display: grid; gap: clamp(1.5rem, 4vw, 2.5rem); align-items: start; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 1.15rem; }
.contact-list li { display: flex; gap: .9rem; align-items: flex-start; }
.contact-list .icon {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand); display: grid; place-items: center;
}
.contact-list .icon svg { width: 20px; height: 20px; }
.contact-list dt, .contact-label { font-size: .82rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-soft); font-weight: 700; }
.contact-value { font-size: 1.05rem; font-weight: 560; }
.contact-value a { text-decoration: none; }
.contact-value a:hover { text-decoration: underline; }
.contact-note { font-size: .95rem; color: var(--ink-soft); }

.contact-figure { text-align: center; margin: 0; }
.contact-figure img {
  width: auto; max-width: 100%; height: auto;
  max-height: min(58vh, 520px); margin-inline: auto;
  border-radius: var(--radius); box-shadow: var(--shadow-m);
}

/* ---------------- Fließtext (Impressum, Datenschutz) ---------------- */

.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.4rem; font-size: clamp(1.3rem, 1.15rem + .6vw, 1.6rem); }
.prose h3 { margin-top: 1.6rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: .35rem; }
.prose dl { display: grid; gap: .2rem .9rem; margin: 0 0 1.25rem; }
@media (min-width: 560px) { .prose dl { grid-template-columns: max-content 1fr; } }
.prose dt { font-weight: 620; }
.prose dd { margin: 0 0 .35rem; color: var(--ink-soft); }
.prose .small { font-size: .96rem; color: var(--ink-soft); }

.todo {
  background: #fff8ec; border: 1px solid #f0d9b0; border-left: 4px solid #d99a2b;
  border-radius: 12px; padding: 1.1rem 1.3rem; margin: 1.5rem 0; font-size: .95rem;
}
.todo strong { color: #8a5a10; }

.page-head { padding-block: clamp(2.5rem, 5vw, 3.75rem) 0; }
.page-head p { color: var(--ink-soft); }

/* ---------------- Fußbereich ---------------- */

.site-footer { background: var(--brand-dark); color: #cfe1e9; margin-top: 0; }
.site-footer .wrap { padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.footer-grid { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.site-footer h2 { color: #fff; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: .8rem; }
.site-footer a { color: #fff; text-decoration-color: rgba(255,255,255,.45); }
.site-footer a:hover { color: #fff; text-decoration-color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer address { font-style: normal; }
.footer-kassen { margin-top: .6rem; font-weight: 600; color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .16); margin-top: 2.25rem; padding-top: 1.25rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between;
  font-size: .95rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom nav ul { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }
.footer-bottom li { margin: 0; }

/* ---------------- Druck ---------------- */

@media print {
  .site-header, .notice-band, .hero-actions, .skip-link, .site-footer nav { display: none !important; }
  body { font-size: 11pt; }
  .card, .hours, .info-box { box-shadow: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}

/* nur für Screenreader sichtbar */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------------- Kopfbereich auf kleinen Bildschirmen ---------------- */
@media (max-width: 720px) {
  html { scroll-padding-top: 118px; }
  .header-inner { padding-block: .6rem; gap: .5rem .75rem; }
  .brand-mark { width: 38px; height: 38px; border-radius: 10px; font-size: .95rem; }
  .brand-name { font-size: 1rem; }
  .site-header .btn-sm { padding: .5rem .9rem; font-size: .88rem; }
  .site-nav { order: 3; width: 100%; border-top: 1px solid var(--line); padding-top: .45rem; }
  .site-nav ul { gap: .2rem 1.15rem; }
  .site-nav a { font-size: .92rem; padding: .15rem 0; }
  section { scroll-margin-top: 118px; }
}

/* Auf schmalen Bildschirmen bleibt der Kopfbereich nicht stehen,
   damit der sichtbare Bereich nicht unnoetig verkleinert wird. */
@media (max-width: 720px) {
  .site-header { position: static; }
  html { scroll-padding-top: 1.5rem; }
  section { scroll-margin-top: 1.5rem; }
}
