/* ===== FONTS (self-hosted, GDPR-safe) ===== */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/newsreader-i400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/newsreader-i400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/newsreader-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/newsreader-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/sourcesans3-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/sourcesans3-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/sourcesans3-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/sourcesans3-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== DESIGN TOKENS ===== */
:root {
  --sage: #5A6F63;
  --sage-dark: #4E6157;
  --moss: #809183;
  --accent: #B97B5A;        /* muted terracotta */
  --accent-dark: #A96A49;
  --bg: #F8F6F2;            /* warm linen */
  --surface: #FFFFFF;
  --section: #E6E1D9;       /* stone */
  --mist: #EEF0EC;
  --pebble: #CFC7BC;
  --border: #D8D2CA;
  --text: #35393D;          /* slate charcoal */
  --text-soft: #6D756E;     /* olive grey */

  --heading: 'Newsreader', Georgia, 'Times New Roman', serif;
  --body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 14px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(53, 57, 61, 0.04), 0 1px 3px rgba(53, 57, 61, 0.05);
  --shadow-md: 0 6px 22px rgba(53, 57, 61, 0.07), 0 2px 6px rgba(53, 57, 61, 0.05);
  --shadow-lg: 0 20px 56px rgba(53, 57, 61, 0.14);
  --transition: 0.22s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::-webkit-scrollbar { width: 10px; }
body::-webkit-scrollbar-track { background: var(--bg); }
body::-webkit-scrollbar-thumb { background: var(--pebble); border-radius: 5px; }
body::-webkit-scrollbar-thumb:hover { background: var(--moss); }

::selection { background: rgba(128, 145, 131, 0.28); }

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:focus-visible,
.map-btn:focus-visible,
.phone-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== HEADER (airy linen) ===== */
.header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 4.5rem 1.5rem 3.25rem;
}

.header-label {
  font-family: var(--body);
  font-size: clamp(0.68rem, 1.4vw, 0.8rem);
  color: var(--text-soft);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.doctor-name {
  font-family: var(--heading);
  font-size: clamp(2.1rem, 5vw, 3.25rem);
  color: var(--sage);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.14;
}

.doctor-name a { color: inherit; }

.header-divider {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin: 1.35rem auto;
}

.header-details {
  font-family: var(--body);
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  color: var(--text-soft);
  font-weight: 400;
}

.header-details-mobile {
  display: none;
}

.header-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  vertical-align: middle;
  margin: 0 0.6rem;
  opacity: 0.85;
}

.opening-info {
  display: none;
}

.header-phone {
  margin-top: 1.6rem;
}

.phone-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--sage);
  font-family: var(--body);
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.phone-chip:hover {
  border-color: var(--accent);
  color: var(--sage-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.phone-chip .chip-icon {
  color: var(--accent);
  font-size: 1.05rem;
  line-height: 1;
}

/* ===== MAIN LAYOUT ===== */
.main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  align-items: start;
}

/* ===== CARDS ===== */
.section, .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  animation: fadeInUp 0.5s ease-out both;
}

.section:nth-child(1), .card:nth-child(1) { animation-delay: 0.05s; }
.section:nth-child(2), .card:nth-child(2) { animation-delay: 0.12s; }
.section:nth-child(3), .card:nth-child(3) { animation-delay: 0.19s; }
.section:nth-child(4), .card:nth-child(4) { animation-delay: 0.26s; }

.section:hover, .card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--pebble);
  transform: translateY(-2px);
}

.section-header, .card-header {
  padding: 1.85rem 1.85rem 0;
}

.section-title {
  font-family: var(--heading);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--sage);
  text-align: center;
  letter-spacing: -0.005em;
  margin-bottom: 0.85rem;
}

.section-divider {
  width: 40px;
  height: 2px;
  background: var(--accent);
  border: none;
  margin: 0 auto;
}

.section-body, .card-body {
  padding: 1.85rem;
}

/* ===== SUB-SECTIONS (impressum / datenschutz) ===== */
.sub-section { margin-bottom: 1.85rem; }
.sub-section:last-child { margin-bottom: 0; }

.sub-title {
  font-family: var(--heading);
  font-size: 1.18rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.65rem;
  color: var(--text);
}

.sub-section p,
.sub-section address {
  font-size: 1rem;
  line-height: 1.7;
  font-style: normal;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.sub-section p:last-child,
.sub-section address:last-child { margin-bottom: 0; }

.section-link {
  color: var(--sage);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  font-weight: 600;
  font-size: 0.95rem;
}
.section-link:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* ===== FOOTER ===== */
.footer {
  background: var(--text);
  border-top: 2px solid var(--sage);
  color: var(--bg);
  font-family: var(--body);
  padding: 3.5rem 1.5rem;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  list-style: none;
  margin-bottom: 1.85rem;
}

.footer-nav a {
  display: inline-block;
  padding: 0.5rem 1.05rem;
  border: 1px solid rgba(248, 246, 242, 0.18);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(248, 246, 242, 0.82);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.footer-nav a:hover {
  border-color: var(--accent);
  background: rgba(248, 246, 242, 0.04);
  color: var(--bg);
}

.footer-links-title {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  text-align: center;
  color: rgba(248, 246, 242, 0.45);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
  list-style: none;
}

.footer-links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(248, 246, 242, 0.62);
  text-decoration: underline;
  text-decoration-color: rgba(248, 246, 242, 0.15);
  text-underline-offset: 3px;
  transition: color var(--transition), text-decoration-color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.footer-links .prefix {
  color: rgba(248, 246, 242, 0.4);
  font-size: 0.85rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .grid { gap: 1.85rem; }
}

@media (max-width: 600px) {
  .header { padding: 2.75rem 1.25rem 2.25rem; }
  .header-details-full { display: none; }
  .header-details-mobile { display: block; }
  .opening-info {
    display: block;
    font-family: var(--body);
    text-align: center;
    list-style: none;
    color: var(--text-soft);
    margin-top: 1.25rem;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.9;
  }
  .grid { grid-template-columns: 1fr; }
  .main { padding: 2.75rem 1.25rem; }
  .modal-content iframe { height: 320px; }
}

@media (min-width: 601px) {
  .header-details-mobile { display: none; }
}

/* ===== SLIDESHOW ===== */
.slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-top: 1.25rem;
}

.slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: slideshow 16s infinite;
}

.slideshow img:nth-child(1) { animation-delay: 0s; }
.slideshow img:nth-child(2) { animation-delay: 4s; }
.slideshow img:nth-child(3) { animation-delay: 8s; }
.slideshow img:nth-child(4) { animation-delay: 12s; }

/* offset the Leistungen carousel so it never crossfades in sync with Willkommen */
#leistungen .slideshow img:nth-child(1) { animation-delay: -2s; }
#leistungen .slideshow img:nth-child(2) { animation-delay: 2s; }
#leistungen .slideshow img:nth-child(3) { animation-delay: 6s; }
#leistungen .slideshow img:nth-child(4) { animation-delay: 10s; }

@keyframes slideshow {
  0%   { opacity: 0; }
  9%   { opacity: 1; }
  25%  { opacity: 1; }
  34%  { opacity: 0; }
  100% { opacity: 0; }
}

/* ===== QUOTE ===== */
.quote-block {
  margin-top: 1.5rem;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  background: var(--mist);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--heading);
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.65;
  color: var(--text);
}

/* ===== LEISTUNGEN ===== */
.service-list {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.service-item {
  padding: 0.9rem 1.1rem;
  background: var(--mist);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  color: var(--text);
  transition: background var(--transition), border-color var(--transition);
}

.service-item:hover {
  background: var(--section);
  border-color: var(--pebble);
}

/* ===== VITA ===== */
.vita-image {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-top: 1.25rem;
}

.vita-intro {
  font-size: 1rem;
  line-height: 1.7;
  padding: 1.25rem;
  background: var(--mist);
  border-radius: var(--radius-sm);
  margin-top: 1.25rem;
  color: var(--text);
}

.vita-timeline {
  margin-top: 1rem;
  padding-left: 0;
  list-style: none;
}

.vita-timeline li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.4rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  border-left: 2px solid var(--border);
}

.vita-timeline li::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 0.95rem;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

/* ===== KONTAKT ===== */
.contact-block {
  text-align: center;
  padding: 1.35rem;
  background: var(--mist);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background var(--transition), border-color var(--transition);
}

.contact-block:hover {
  background: var(--section);
  border-color: var(--pebble);
}

.contact-block + .contact-block {
  margin-top: 1rem;
}

.contact-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  border-radius: 50%;
  font-size: 1.05rem;
}

.contact-block p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
}

.contact-block .label {
  font-weight: 600;
  color: var(--text);
}

.contact-block address a { color: var(--sage); }
.contact-block address a:hover { color: var(--accent); }

.contact-address {
  font-style: normal;
}

.map-btn {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.75rem 1.75rem;
  background: var(--sage);
  color: var(--bg);
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.map-btn:hover {
  background: var(--sage-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ===== MAP MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(53, 57, 61, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.modal-overlay:target {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  width: min(90vw, 640px);
  max-height: 80vh;
  position: relative;
  transform: scale(0.97);
  transition: transform var(--transition);
}

.modal-overlay:target .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 2.1rem;
  height: 2.1rem;
  background: var(--sage);
  color: var(--bg);
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  text-decoration: none;
  line-height: 1;
  transition: background var(--transition);
}

.modal-close:hover {
  background: var(--sage-dark);
}

.modal-content iframe {
  width: 100%;
  height: 450px;
  border: 0;
  display: block;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .slideshow img { opacity: 0; }
  .slideshow img:first-child { opacity: 1; }
}
