:root {
  --bg: #fdf7f7;
  --bg-soft: #f4efec;
  --text: #3c3935;
  --text-strong: #2a2825;
  --brand: #ad9f93;
  --brand-dark: #8f7f70;
  --ink: #45423b;
  --line: #d8cbc1;
  --ok: #3d7a57;
  --bg-grad-1: #efe4de;
  --bg-grad-2: #f2e7df;
  --header-bg: rgb(255 255 255 / 85%);
  --header-border: var(--line);
  --header-link: var(--ink);
  --header-link-hover: var(--ink);
  --header-link-hover-border: transparent;
  --brand-subtext-color: #5b544d;
  --btn-secondary-bg: transparent;
  --btn-secondary-color: var(--ink);
  --btn-secondary-border: var(--brand);
  --btn-secondary-hover: #f1e7e0;
  --hero-card-start: #fffaf9;
  --hero-card-end: #f6ece6;
  --times-dash: #d4c8bf;
  --highlight-bg: #fff9f7;
  --highlight-border: var(--brand);
  --surface: #fff;
  --table-head-bg: #f6ebe3;
  --table-row-border: #eee1d8;
  --note-color: #5f5a54;
  --input-border: #cabbae;
  --input-bg: #fffcfa;
  --focus-border: var(--brand-dark);
  --focus-outline: rgb(173 159 147 / 25%);
  --footer-bg: #fff8f4;
  --doctor-caption: #4a443e;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 0%, var(--bg-grad-1) 0%, transparent 38%),
    radial-gradient(circle at 90% 100%, var(--bg-grad-2) 0%, transparent 34%),
    var(--bg);
  line-height: 1.55;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--text-strong);
}

h1,
h2 {
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0.01em;
}

a {
  color: inherit;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(6px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
}

#kontakt,
#sprechzeiten {
  scroll-margin-top: 120px;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.brand-block {
  display: grid;
  line-height: 1.2;
}

.brand-logo {
  width: 152px;
  height: auto;
  object-fit: contain;
  align-self: center;
}

.brand-text {
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 800;
  font-size: calc(0.95rem + 3pt);
  color: #736d66;
}

.brand-details {
  margin-top: 0.55rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.22rem;
}

.brand-subtext {
  font-size: 1rem;
  color: var(--brand-subtext-color);
  font-weight: 600;
  white-space: nowrap;
}

.brand-contact-row {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  white-space: nowrap;
}

.brand-contact-link {
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.brand-separator {
  font-size: 1.05em;
  font-weight: 800;
  line-height: 1;
  display: inline-block;
  margin-inline: 10px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.main-nav {
  display: flex;
  gap: 1rem;
}

.main-nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--header-link);
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.main-nav a:hover {
  color: var(--header-link-hover);
  border-color: var(--header-link-hover-border);
}

.theme-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--header-link);
}

.theme-picker select {
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: #2f2a22;
  font: inherit;
}

.hero {
  padding: 4.8rem 0 3rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  margin-bottom: 0.9rem;
}

.intro {
  max-width: 56ch;
}

.cta-row {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand);
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  text-decoration: none;
  font-weight: 700;
  transition: 180ms ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-color);
  border-color: var(--btn-secondary-border);
}

.btn-secondary:hover {
  background: var(--btn-secondary-hover);
}

.status {
  margin-top: 1rem;
}

#open-status {
  color: var(--ok);
}

.emergency-link-row {
  margin: 0.75rem 0 0;
}

.emergency-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.5rem 1.35rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: #c93b35;
  border: 1px solid color-mix(in srgb, #b32f29 80%, #fff 20%);
  box-shadow: 0 8px 18px rgb(91 35 30 / 18%);
}

.emergency-link:hover,
.emergency-link:focus-visible {
  background: #b7332e;
  color: #fff;
}

.hero-card {
  background: linear-gradient(180deg, var(--hero-card-start), var(--hero-card-end));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 12px 35px rgb(83 69 60 / 10%);
  animation: rise 0.65s ease both;
}

@keyframes rise {
  from {
    transform: translateY(12px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.times-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.times-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--times-dash);
  font-size: 0.95rem;
}

.times-list li:last-child {
  border-bottom: 0;
}

.section {
  padding: 3.4rem 0;
}

.section-alt {
  background: var(--bg-soft);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.7rem;
}

.profile-copy .profile-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--brand-dark);
}

.profile-card {
  margin-top: 0.9rem;
}

.profile-lead {
  margin-top: 0;
  font-weight: 400;
}

.profile-list {
  margin: 0.4rem 0 0.8rem;
  padding-left: 1.1rem;
}

.profile-list li {
  margin-bottom: 0.25rem;
}

.highlight {
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--highlight-border);
  background: var(--highlight-bg);
}

.profile-side {
  display: grid;
  gap: 1rem;
}

.doctor-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}

.doctor-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.doctor-card figcaption {
  padding: 0.8rem 1rem;
  font-size: 0.92rem;
  color: var(--doctor-caption);
}

.highlight ul {
  margin: 0;
  padding-left: 1.15rem;
}

.services-swap {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  grid-template-rows: repeat(4, minmax(78px, auto));
  gap: 0.8rem 1rem;
  align-items: stretch;
}

.service-card {
  position: relative;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgb(38 31 26 / 8%);
  transition: box-shadow 220ms ease, border-color 220ms ease;
}

.service-card[data-slot="0"] {
  grid-column: 1;
  grid-row: 1 / span 4;
}

.service-card[data-slot="1"] {
  grid-column: 2;
  grid-row: 1;
}

.service-card[data-slot="2"] {
  grid-column: 2;
  grid-row: 2;
}

.service-card[data-slot="3"] {
  grid-column: 2;
  grid-row: 3;
}

.service-card[data-slot="4"] {
  grid-column: 2;
  grid-row: 4;
}

.service-card.is-active {
  box-shadow: 0 18px 34px rgb(38 31 26 / 18%);
  border-color: color-mix(in srgb, var(--brand) 56%, var(--line) 44%);
}

.service-card.is-open {
  box-shadow: 0 24px 40px rgb(38 31 26 / 22%);
}

.service-card.is-compact {
  padding: 0.85rem 0.9rem;
  box-shadow: 0 6px 16px rgb(38 31 26 / 10%);
  cursor: pointer;
}

.service-card.is-compact:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line) 55%);
}

.service-card.is-compact .service-toggle {
  font-size: 1rem;
}

.service-card h3 {
  margin: 0;
}

.service-toggle {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text-strong);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.service-toggle:focus-visible {
  outline: 2px solid var(--focus-outline);
  outline-offset: 4px;
}

.service-panel {
  margin-top: 0.7rem;
  max-height: min(40vh, 260px);
  overflow-y: auto;
  padding-right: 0.35rem;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--brand-dark) 45%, #fff 55%) transparent;
}

.service-panel::-webkit-scrollbar {
  width: 8px;
}

.service-panel::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--brand-dark) 45%, #fff 55%);
  border-radius: 999px;
}

.service-panel p:first-child {
  margin-top: 0;
}

.service-panel p:last-child {
  margin-bottom: 0;
}

.carousel-hint {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--note-color);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.image-carousel {
  position: relative;
  margin-top: 1rem;
  min-height: clamp(240px, 34vw, 360px);
  isolation: isolate;
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(42%, 360px);
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgb(38 31 26 / 16%);
  background: var(--surface);
  transition:
    transform 520ms cubic-bezier(0.22, 0.8, 0.22, 1),
    opacity 520ms ease,
    box-shadow 520ms ease,
    filter 520ms ease;
  cursor: zoom-in;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-slide.is-left {
  transform: translate(-118%, -48%) scale(0.84);
  z-index: 1;
  opacity: 0.92;
  filter: saturate(0.92);
}

.carousel-slide.is-center {
  transform: translate(-50%, -52%) scale(1);
  z-index: 3;
  opacity: 1;
  box-shadow: 0 22px 42px rgb(38 31 26 / 24%);
}

.carousel-slide.is-right {
  transform: translate(18%, -48%) scale(0.84);
  z-index: 1;
  opacity: 0.92;
  filter: saturate(0.92);
}

.carousel-slide.is-hidden {
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.carousel-empty {
  margin: 0;
  padding: 1.15rem 1.25rem;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--note-color);
}

.carousel-dots {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  background: color-mix(in srgb, var(--line) 78%, var(--text) 22%);
  transition: transform 180ms ease, background 180ms ease;
}

.carousel-dot.is-active {
  background: var(--brand-dark);
  transform: scale(1.18);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgb(17 16 14 / 72%);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-inner {
  position: relative;
  width: min(96vw, 1300px);
  height: min(92vh, 900px);
  display: grid;
  place-items: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgb(255 255 255 / 22%);
  box-shadow: 0 16px 50px rgb(0 0 0 / 45%);
  background: #fff;
}

.lightbox-close {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  width: 2.3rem;
  height: 2.3rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  color: #1f1d19;
  background: #fff;
  box-shadow: 0 8px 22px rgb(0 0 0 / 28%);
}

.emergency-inner {
  width: min(98vw, 1100px);
  height: min(94vh, 1200px);
  align-items: stretch;
}

.emergency-sheet {
  width: 100%;
  height: 100%;
  overflow: auto;
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-soft) 82%, #fff 18%);
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--brand) 22%);
  padding: 1.1rem;
  color: var(--text);
}

.emergency-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.emergency-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 1rem;
}

.emergency-card h3 {
  margin-bottom: 0.8rem;
}

.emergency-card ul,
.emergency-more ul {
  margin: 0;
  padding-left: 1rem;
}

.emergency-card li,
.emergency-more li {
  margin: 0.5rem 0;
}

.emergency-card-red {
  border: 2px solid color-mix(in srgb, #d93b3b 70%, var(--brand) 30%);
}

.emergency-card-blue {
  border: 2px solid color-mix(in srgb, #4f84df 72%, var(--brand) 28%);
}

.emergency-call {
  display: inline-flex;
  margin-top: 0.9rem;
  padding: 0.62rem 1rem;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.emergency-call-red {
  background: color-mix(in srgb, #e3302f 78%, var(--brand-dark) 22%);
}

.emergency-call-blue {
  background: color-mix(in srgb, #4780df 76%, var(--brand-dark) 24%);
}

.emergency-more {
  margin-top: 1rem;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 75%, var(--brand) 25%);
  padding: 1rem;
}

.emergency-more h3 {
  margin-bottom: 0.3rem;
}

.emergency-note {
  margin: 0 0 0.8rem;
  font-size: 0.92rem;
  color: var(--note-color);
  font-style: italic;
}

.emergency-more li {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, #fff 24%);
  padding-bottom: 0.5rem;
}

.emergency-more li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--table-row-border);
}

th {
  background: var(--table-head-bg);
}

.contact-grid {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: 1.2fr 1fr;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.contact-list li {
  margin-bottom: 0.45rem;
}

.note {
  font-size: 0.9rem;
  color: var(--note-color);
}

.form-card {
  display: grid;
  gap: 0.55rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

input,
textarea {
  width: 100%;
  padding: 0.68rem 0.72rem;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  font: inherit;
  background: var(--input-bg);
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--focus-border);
  outline: 2px solid var(--focus-outline);
}

.map-box {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  min-height: 320px;
}

.map-box iframe {
  width: 100%;
  min-height: 320px;
  border: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.1rem 0;
}

.footer-copy {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.footer-theme-picker {
  margin-left: auto;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  text-decoration: none;
}

.mobile-quick-nav {
  position: fixed;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 112px;
  padding: 0.6rem 0.45rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: 1px solid color-mix(in srgb, var(--brand-dark) 72%, #fff 28%);
  box-shadow: 0 12px 24px rgb(24 31 29 / 26%);
  backdrop-filter: blur(5px);
}

.mobile-quick-link {
  text-decoration: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-align: center;
  min-height: 72px;
  border-radius: 10px;
  padding: 0.35rem 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  transition: background 140ms ease, transform 140ms ease;
}

.mobile-quick-link:active,
.mobile-quick-link:focus-visible {
  background: rgb(255 255 255 / 14%);
  outline: none;
  transform: translateY(-1px);
}

.mobile-quick-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 1.1rem;
  line-height: 1;
  background: rgb(255 255 255 / 12%);
}

.mobile-quick-shift {
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  border-radius: 8px;
  padding: 0.2rem 0;
  cursor: pointer;
}

.mobile-quick-shift:active,
.mobile-quick-shift:focus-visible {
  background: rgb(255 255 255 / 16%);
  outline: none;
}

.mobile-quick-nav.is-docked-top {
  top: 0.75rem;
  bottom: auto;
  transform: none;
}

.mobile-quick-nav.is-docked-bottom {
  top: auto;
  bottom: 0.75rem;
  transform: none;
}

@media (max-width: 960px) {
  .hero-grid,
  .profile-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .services-swap {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .service-card[data-slot="0"],
  .service-card[data-slot="1"],
  .service-card[data-slot="2"],
  .service-card[data-slot="3"],
  .service-card[data-slot="4"] {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 680px) {
  .emergency-top-grid {
    grid-template-columns: 1fr;
  }

  .emergency-sheet {
    padding: 0.8rem;
  }

  #kontakt,
  #sprechzeiten {
    scroll-margin-top: 140px;
  }

  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.55rem 0;
  }

  .brand {
    width: 100%;
    min-width: 0;
    align-items: flex-start;
    gap: 0.55rem;
  }

  .brand-block {
    min-width: 0;
    width: 100%;
  }

  .main-nav {
    display: none;
  }

  .header-tools {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }

  .theme-picker span {
    display: none;
  }

  .theme-picker {
    max-width: 100%;
  }

  .theme-picker select {
    max-width: 100%;
    width: min(100%, 220px);
  }

  .mobile-quick-nav {
    right: 0.4rem;
    width: 98px;
  }

  .mobile-quick-link {
    min-height: 68px;
    font-size: 0.68rem;
  }

  .services-swap {
    gap: 0.7rem;
  }

  .image-carousel {
    min-height: 260px;
  }

  .carousel-slide {
    width: min(62%, 260px);
  }

  .carousel-slide.is-left {
    transform: translate(-124%, -49%) scale(0.82);
  }

  .carousel-slide.is-center {
    transform: translate(-50%, -52%) scale(1);
  }

  .carousel-slide.is-right {
    transform: translate(24%, -49%) scale(0.82);
  }

  .brand-text {
    font-size: calc(0.85rem + 3pt);
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .brand-details {
    margin-top: 0.35rem;
    max-width: 100%;
  }

  .brand-subtext {
    font-size: 0.86rem;
    white-space: normal;
    line-height: 1.25;
  }

  .brand-contact-row {
    display: flex;
    flex-wrap: wrap;
    white-space: normal;
    line-height: 1.25;
  }

  .brand-contact-link {
    font-size: 0.8rem;
  }

  .brand-separator {
    margin-inline: 8px;
  }

  .brand-logo {
    width: 96px;
    height: auto;
  }

  .hero {
    padding-top: 3.2rem;
  }

  .footer-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-theme-picker {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-card {
    transition: none;
  }
}
