/* Praxis für Neurologie & Neuromodulation — shared styles */

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*) { animation: none !important; } }

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

:root {
  --bg: #fafaf8;
  --text: #1a1a1a;
  --muted: #5f5f5f;
  --border: rgba(0,0,0,0.12);
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f;
    --text: #f0f0f0;
    --muted: #b8b8b8;
    --border: rgba(255,255,255,0.12);
  }
  .logo, .nav-toggle img { filter: invert(1); }
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  transform: translateY(-160%);
  padding: 10px 14px;
  border: 2px solid var(--text);
  border-radius: 3px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus { transform: translateY(0); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- header / nav ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  width: 100%;
  max-width: 720px;
  padding: 14px 24px 12px;
  border-bottom: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  border-bottom: none;
}

.brand img { height: 40px; width: auto; }

.brand-name {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

nav.main {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: 0.04em;
}

nav.main a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

nav.main a:hover { color: var(--text); }
nav.main a[aria-current="page"] { color: var(--text); border-bottom-color: var(--text); }
nav.main a.nav-em { font-style: italic; }

.lang-switch {
  font-size: 11px;
  color: var(--muted);
  border: 0.5px solid var(--border);
  border-radius: 3px;
  padding: 4px 10px;
  text-decoration: none;
  letter-spacing: 0.05em;
}

.lang-switch:hover { color: var(--text); }

/* ---------- mobile menu: the logo image acts as the toggle ---------- */

.nav-toggle {
  display: none;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  order: -1;
  line-height: 0;
  border-radius: 6px;
}
.nav-toggle img { height: 40px; width: auto; display: block; }
.nav-toggle[aria-expanded="true"] { outline: 2px solid var(--text); outline-offset: 3px; }

/* ---------- main ---------- */

main {
  width: 100%;
  max-width: 720px;
  padding: 32px 24px 64px;
  flex: 1;
}

.rule { width: 32px; height: 2px; background: var(--text); margin-bottom: 20px; }

h1 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 6vw, 38px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 40px;
}

.practice-meta {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.045em;
  line-height: 1.5;
  margin: 16px 0 8px;
}

h2 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 400;
  margin: 44px 0 12px;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 24px 0 6px;
}

p, li { font-size: 15px; line-height: 1.75; margin-bottom: 10px; }

ul { padding-left: 20px; }

a { color: var(--text); text-decoration: none; border-bottom: 0.5px solid var(--border); overflow-wrap: anywhere; }
a:hover { border-bottom-color: var(--text); }

.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---------- components ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.card {
  border: 0.5px solid var(--border);
  border-radius: 2px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color 0.15s;
}

.card:hover { border-color: var(--text); }

.card h3 { margin: 0 0 6px; font-family: var(--font-serif); font-weight: 400; font-size: 16px; }
.card p { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.6; }

.cta {
  display: inline-block;
  border: 1px solid var(--text);
  border-radius: 2px;
  padding: 10px 22px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text);
  margin: 8px 12px 8px 0;
}

.cta:hover { background: var(--text); color: var(--bg); }

.cta.primary { background: var(--text); color: var(--bg); }
.cta.primary:hover { opacity: 0.85; }

.appointment-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 8px;
}

.appointment-actions .cta {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin: 0;
  text-align: center;
}

.appointment-note {
  margin: 10px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.booking-block { margin-top: 32px; }

/* ---------- unobtrusive desktop booking shortcut ---------- */

.doctolib-widget {
  position: fixed;
  top: 200px;
  right: 0;
  z-index: 45;
  display: block;
  padding: 5px;
  border-radius: 4px 0 0 4px;
  background: #00264c;
  box-shadow: 1px 2px 4px rgba(0,0,0,0.2);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.doctolib-widget > span { display: block; margin: 3px 0; letter-spacing: 0.02em; }

.doctolib-widget a {
  display: block;
  margin-top: 5px;
  padding: 7px 8px;
  border: 0;
  border-radius: 3px;
  background: #fff;
  color: #00264c;
  font-size: 14px;
  text-decoration: none;
}

.doctolib-widget a:hover { background: #eef4fa; }

@media (max-width: 900px) {
  .doctolib-widget { display: none; }
}

.info-box {
  border: 0.5px solid var(--border);
  border-radius: 2px;
  padding: 20px 24px;
  margin: 24px 0;
}

.info-row { display: flex; align-items: baseline; gap: 12px; font-size: 13px; margin-bottom: 8px; }
.info-row > span { min-width: 0; overflow-wrap: anywhere; }

.info-label {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-width: 72px;
  flex-shrink: 0;
}

/* ---------- home deck (NYT-style swipe cards on mobile) ---------- */

.deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 24px 0; }
.deck.deck--flow { display: block; margin: 0; }
.deck.deck--flow .deckcard { display: block; }
.deckcard-more { display: none; }
.deck-dots { display: none; }

@media (max-width: 600px) {
  .deck.deck-on {
    display: block;
    position: relative;
    min-height: 200px;
    margin: 20px -24px 10px;
    overflow: hidden;
    touch-action: pan-y;
  }
  .deck.deck-on .deckcard {
    position: absolute;
    top: 0;
    left: 50%;
    width: 76vw;
    max-width: 340px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 26px 24px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
    overflow: hidden;
  }
  .deck.deck-on .deckcard::before {
    content: "";
    display: block;
    width: 36px;
    height: 2px;
    background: var(--text);
  }
  .deck.deck-on .deckcard h3,
  .deck.deck-on .deckcard h2 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 23px;
    line-height: 1.18;
    letter-spacing: -0.01em;
    margin: 0;
    text-align: left;
  }
  .deck.deck-on .deckcard p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
    text-align: left;
  }
  .deck.deck-on .deckcard .deckcard-more {
    display: inline-block;
    margin-top: auto;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    border-bottom: 1px solid var(--text);
    padding-bottom: 2px;
  }
  .deck.deck-on .deckcard:not(.is-active) { opacity: 0.4; }

  .deck-dots { display: flex; justify-content: center; gap: 2px; margin: 0 0 24px; }
  .deck-dots button { position: relative; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; padding: 0; cursor: pointer; }
  .deck-dots button::before { content: ""; position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--border); transform: translate(-50%, -50%); transition: background 0.2s, transform 0.2s; }
  .deck-dots button.active::before { background: var(--text); transform: translate(-50%, -50%) scale(1.3); }
}

/* ---------- team carousel ---------- */

.team-carousel {
  position: relative;
  margin: 8px 0 40px;
}

.team-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 2px;
}

.team-chip {
  flex: 0 0 auto;
  width: 168px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border: 0.5px solid var(--border);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  text-align: center;
  color: var(--text);
  font-family: var(--font-sans);
  transition: border-color 0.15s, background 0.15s;
}

.team-chip:hover { border-color: var(--text); }

.team-chip.active {
  border-color: var(--text);
  background: rgba(0,0,0,0.03);
}

@media (prefers-color-scheme: dark) {
  .team-chip.active { background: rgba(255,255,255,0.06); }
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 22px;
  background: var(--text);
  color: var(--bg);
  flex-shrink: 0;
}

.chip-name { font-size: 12px; font-weight: 600; line-height: 1.25; }
.chip-role { font-size: 10px; color: var(--muted); line-height: 1.25; }

.team-arrow {
  position: absolute;
  top: 34px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.team-arrow.prev { left: -6px; }
.team-arrow.next { right: -6px; }
.team-arrow:hover { border-color: var(--text); }

.member-panel.hidden { display: none; }
.member-panel { scroll-margin-top: 100px; }

/* ---------- photos ---------- */

.photo { margin: 20px 0 8px; }
.photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  border: 0.5px solid var(--border);
  border-radius: 3px;
  filter: grayscale(1);
}
.photo figcaption { font-size: 11px; color: var(--muted); margin-top: 6px; }
.page-next {
  display: block;
  text-align: center;
  margin-top: 40px;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: none;
}
.page-next { transition: color 0.15s; }
.page-next:hover { color: var(--text); }
.page-next.page-next--active { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.page-next.page-next--active span { animation: none; }
.page-next span { display: inline-block; margin-left: 4px; animation: page-nudge 1.6s ease-in-out infinite; }
@keyframes page-nudge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .page-next span { animation: none; } }

/* ---------- references ---------- */

sup.ref { font-size: 0.62em; color: var(--muted); }
sup.ref a { border-bottom: none; color: var(--muted); padding: 0 1px; text-decoration: none; }
sup.ref a:hover { color: var(--text); }

.card-map {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.card:hover .card-map { color: var(--text); }

.sources {
  margin-top: 44px;
  border-top: 0.5px solid var(--border);
  padding-top: 16px;
}
.sources h2 {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.sources ol { padding-left: 20px; }
.sources li { font-size: 11px; color: var(--muted); line-height: 1.6; margin-bottom: 5px; overflow-wrap: anywhere; }
.sources li a { color: var(--muted); border-bottom: 0.5px solid var(--border); }
.sources li a:hover { color: var(--text); }

/* ---------- footer ---------- */

footer {
  width: 100%;
  max-width: 720px;
  padding: 28px 24px 40px;
  border-top: 0.5px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

footer a { color: var(--muted); border-bottom: 0.5px solid var(--border); }
footer a:hover { color: var(--text); }

/* ---------- responsive ---------- */

@media (max-width: 600px) {
  /* sticky bar stays on scroll; the logo image is the menu toggle */
  header { padding: 16px 16px 12px; align-items: center; gap: 10px; }
  .nav-toggle { display: block; }
  .brand .logo { display: none; }
  .brand-name { font-size: 11.5px; }
  .lang-switch { padding-inline: 8px; }

  nav.main {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    margin-top: 10px;
    border-top: 0.5px solid var(--border);
  }
  header.nav-open nav.main { display: flex; }
  nav.main a { padding: 12px 2px; border-bottom: 0.5px solid var(--border); }
  nav.main a[aria-current="page"] { border-bottom-color: var(--border); font-weight: 600; }

  main { padding-bottom: 48px; }
  footer { padding-bottom: 40px; }

  .appointment-actions { grid-template-columns: 1fr; }

}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
