/* Zahnarztpraxis Dr. med. dent. Karsten Schleußner – statische Website
   Gestaltung: IDPARK | André Quednau
   Schriften: Jost & Instrument Sans (SIL Open Font License 1.1), lokal gehostet */

@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-variable.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

:root {
  --c-base: #f9f8f5;
  --c-peach: #f6decd;
  --c-blue-bg: #dde5f0;
  --c-blue: #8a9ec4;
  --c-blue-dark: #3f5582;   /* Buttons/Fokus: ausreichender Kontrast (WCAG AA) */
  --c-text: #000;
  --c-muted: #3d3d3d;

  --f-body: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --f-head: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --fs-small: 0.9rem;
  --fs-medium: 1.05rem;
  --fs-large: clamp(1.39rem, 1.39rem + ((1vw - 0.2rem) * 0.767), 1.85rem);
  --fs-xlarge: clamp(1.85rem, 1.85rem + ((1vw - 0.2rem) * 1.083), 2.5rem);
  --fs-xxlarge: clamp(2.5rem, 2.5rem + ((1vw - 0.2rem) * 1.283), 3.27rem);

  --sp-10: 1rem;
  --sp-20: min(1.5rem, 2vw);
  --sp-30: max(1.25rem, min(2.5rem, 3vw)); /* mind. 20px Rand auf dem Handy */
  --sp-50: min(6.5rem, 8vw);

  --w-content: 620px;
  --w-text: 900px;
  --w-wide: 1280px;
}

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

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

body {
  margin: 0;
  background: var(--c-base);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: var(--fs-medium);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--f-head);
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}
h2 { font-size: var(--fs-xlarge); }
h3 { font-size: var(--fs-large); }
p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--c-blue-dark); outline-offset: 3px; border-radius: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--c-text); color: var(--c-base); padding: 0.6rem 1rem; border-radius: 4px;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Kopfbereich ---------- */
.site-header__brand {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  padding: var(--sp-30);
  text-align: center;
}
.site-header__logo img { width: 300px; max-width: 70vw; height: auto; }
.site-title {
  font-family: var(--f-body);
  font-size: var(--fs-large);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}
.site-title a { text-decoration: none; }
.site-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; }

/* ---------- Slider ---------- */
.slider { position: relative; overflow: hidden; background: #ddd; }
.slider__track { position: relative; height: 400px; margin: 0; padding: 0; list-style: none; }
.slider__slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 1s ease, visibility 0s linear 1s;
}
.slider__slide.is-active { opacity: 1; visibility: visible; transition: opacity 1s ease, visibility 0s; }
.slider__slide picture, .slider__slide img { width: 100%; height: 100%; }
.slider__slide img { object-fit: cover; }
.slider__toggle {
  position: absolute; right: 12px; bottom: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); color: #fff; cursor: pointer;
}
.slider__toggle:hover { background: rgba(0, 0, 0, 0.75); }
.slider__toggle:focus-visible { outline-color: #fff; box-shadow: 0 0 0 5px var(--c-blue-dark); }
.slider__toggle svg { width: 18px; height: 18px; fill: currentColor; }
.slider__toggle .icon-play { display: none; }
.slider.is-paused .slider__toggle .icon-play { display: block; }
.slider.is-paused .slider__toggle .icon-pause { display: none; }

@media (max-width: 767px) {
  .slider__track { height: auto; aspect-ratio: 4 / 3; }
}

/* ---------- Abschnitte ---------- */
.section { padding: var(--sp-30); }
.section--base  { background: var(--c-base); }
.section--peach { background: var(--c-peach); }
.section--blue  { background: var(--c-blue-bg); }

.section__head { display: flex; flex-direction: column; align-items: center; text-align: center; }
.section__icon { width: 40px; height: auto; margin: var(--sp-10) 0; }
.section__inner { margin-inline: auto; }
.section__inner--text { max-width: var(--w-text); text-align: center; }
.section__inner--content { max-width: var(--w-content); }
.section__inner--wide { max-width: var(--w-wide); padding-inline: var(--sp-30); }
.spacer-s { height: 18px; }
.spacer-m { height: 45px; }

.checklist { list-style: "\2713"; margin: 0 auto; padding-left: 16px; width: fit-content; max-width: 100%; }
.checklist li { padding-left: 0.67em; }

/* Kontakt-Raster */
.grid {
  display: grid;
  grid-template-columns: 5fr 7fr 5fr;
  column-gap: clamp(2rem, 7vw, 90px);
  row-gap: 2.5rem;
}
.grid + .grid { margin-top: 2.5rem; }
.grid h3 { margin-bottom: 1.2rem; }
.box-news { background: var(--c-peach); padding: var(--sp-10); align-self: start; }
.box-news h3 { margin-bottom: 0.6rem; }
.box-news ul { margin: 0; padding-left: 1.1em; }
.box-news li + li { margin-top: 0.5em; }
.news-empty { margin: 0; }

.hours { border-collapse: collapse; }
.hours th, .hours td { text-align: left; font-weight: 400; padding: 0 8.4px 0 0; vertical-align: top; }
.hours th { padding-right: 1.5rem; }
.hours td { font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .section__inner--wide { padding-inline: 0; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; row-gap: 2rem; }
  .grid + .grid { margin-top: 2rem; }
}

/* ---------- Karte (2-Klick-Lösung) ---------- */
.map { position: relative; background: var(--c-blue-bg); }
.map__frame { position: relative; aspect-ratio: 16 / 9; max-height: 80vh; width: 100%; }
.map__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__consent {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-30);
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.55), rgba(255,255,255,0) 60%),
    repeating-linear-gradient(0deg, rgba(138,158,196,0.18) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(138,158,196,0.18) 0 1px, transparent 1px 48px),
    var(--c-blue-bg);
}
.map__card {
  max-width: 34rem; background: var(--c-base); padding: 1.5rem 1.75rem; border-radius: 6px;
  box-shadow: 0 2px 18px rgba(30, 45, 80, 0.12); text-align: center;
}
.map__card h2 { font-size: var(--fs-large); margin-bottom: 0.8rem; }
.map__card p { font-size: var(--fs-small); color: var(--c-muted); }
.map__actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; justify-content: center; align-items: center; margin-top: 1rem; }
@media (max-width: 600px) {
  .map__frame { aspect-ratio: auto; min-height: 420px; }
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  background: var(--c-blue-dark); color: #fff;
  font-family: var(--f-head); font-size: var(--fs-medium); line-height: 1.2;
  padding: 0.75rem 1.5rem; border: 0; border-radius: 100px;
  text-decoration: none; cursor: pointer;
}
.button:hover { background: #000; text-decoration: none; }

/* ---------- Unterseiten (Impressum/Datenschutz) ---------- */
.page { padding: var(--sp-50) var(--sp-30); }
.page h1 { font-size: var(--fs-xxlarge); line-height: 1.15; text-align: center; margin-bottom: var(--sp-50); }
.page .section__inner--content h2 { font-size: var(--fs-large); margin: 2rem 0 0.8rem; }
.page .section__inner--content h3 { font-size: var(--fs-medium); font-family: var(--f-body); font-weight: 600; margin: 1.4rem 0 0.4rem; }
.page__back { margin-top: 3rem; }
.page p, .page li { overflow-wrap: anywhere; }

/* ---------- Fuß ---------- */
.site-footer { padding: var(--sp-30); }
.site-footer__inner {
  max-width: var(--w-wide); margin-inline: auto;
  display: grid; grid-template-columns: 3fr 2fr 5fr; gap: 2rem;
}
.site-footer__logo img { width: 120px; height: auto; margin-bottom: 1rem; }
.site-footer h2 { font-family: var(--f-body); font-size: var(--fs-medium); font-weight: 600; margin-bottom: 0.6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: var(--fs-small); }
.site-footer li + li { margin-top: 0.2rem; }
.site-footer nav a { display: inline-block; padding: 0.2rem 0; min-height: 24px; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover, .site-footer nav a[aria-current="page"] { text-decoration: underline; }
@media (max-width: 600px) {
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__spacer { display: none; }
}

@media print {
  .slider, .map, .skip-link, .slider__toggle { display: none !important; }
  body { background: #fff; }
}
