/* ==========================================================================
   Praxis Schnedermann – modernes Design
   Petrolblaue Markenfarbe statt Grün.
   Reines CSS, kein Build-Schritt, keine externen Font-Ladungen (DSGVO).
   ========================================================================== */

:root {
  --petrol: #2F6F77;
  --petrol-dark: #1B4B52;
  --petrol-light: #E1EDEE;
  --teal: #1E8A96;
  --teal-dark: #146570;
  --cream: #F7FAFA;
  --text: #262B2E;
  --text-muted: #5C666B;
  --border: #D8E0E2;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(38, 43, 46, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1100px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --cream: #14191B;
    --text: #E8EEEF;
    --text-muted: #9FADB0;
    --border: #333C3F;
    --petrol-light: #1D2B2D;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 125%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  font-size: 1.2rem;
}

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 2.2em; }
h3 { font-size: 1.15rem; color: var(--petrol-dark); }

/* Links im Fließtext: farbig, fett und unterstrichen, damit sie klar erkennbar sind */
a {
  color: var(--teal-dark);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  transition: color 0.15s ease, text-decoration-color 0.15s ease, background 0.15s ease;
}
a:hover,
a:focus-visible {
  color: var(--teal);
  text-decoration-color: currentColor;
}
a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* dezente Hervorhebung beim Überfahren – nur für Textlinks im Inhalt */
main a:not(.btn):hover,
main a:not(.btn):focus-visible {
  background: var(--petrol-light);
  border-radius: 3px;
}

@media (prefers-color-scheme: dark) {
  a { color: #5CC6D1; }
  a:hover, a:focus-visible { color: #8FDDE4; }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--teal);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  z-index: 1000;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--petrol-dark) !important;
  text-decoration: none !important;
}
.main-nav {
  display: flex;
  gap: 1.6rem;
}
.main-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  text-decoration: none;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.main-nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 1rem;
  }
  .main-nav.is-open { display: flex; }
  .site-header { position: relative; }
}

/* ---------- Layout ---------- */
main { display: block; }
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}
.container--narrow { max-width: 760px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(38,43,46,0.35), rgba(38,43,46,0.65));
}
.hero__inner {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 700px;
  padding: 2rem 1.5rem;
}
.hero__inner h1 { color: #fff; margin: 0 0 0.4em; }
.hero__subtitle {
  font-size: 1.15rem;
  opacity: 0.95;
  margin: 0 0 1.6em;
}

/* ---------- Buttons ---------- */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
}
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 980px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn--primary {
  background: var(--teal);
  color: #fff !important;
}
.btn--primary:hover {
  background: var(--teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(30, 138, 150, 0.3);
}
.btn--secondary {
  background: rgba(255,255,255,0.15);
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.6);
}
.btn--secondary:hover {
  background: rgba(255,255,255,0.28);
  transform: translateY(-2px);
}
.btn--outline {
  background: transparent;
  color: var(--teal-dark) !important;
  border: 1px solid var(--teal);
}
.btn--outline:hover {
  background: var(--petrol-light);
  transform: translateY(-2px);
}

.kontakt-kurz {
  margin: 1.8rem 0;
}
.kontakt-kurz h3 { margin-top: 0; }
.kontakt-kurz p { margin-bottom: 0; }

/* Kontaktliste: Bezeichnung links, Wert rechts – auf dem Handy untereinander */
.kontakt-liste {
  display: grid;
  grid-template-columns: max-content 1fr;
  margin: 1rem 0 0;
}
.kontakt-liste > div {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  column-gap: 1.5rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--border);
}
.kontakt-liste > div:first-child { border-top: none; padding-top: 0; }
.kontakt-liste > div:last-child { padding-bottom: 0; }
.kontakt-liste dt {
  font-weight: 700;
  color: var(--petrol-dark);
}
.kontakt-liste dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 600px) {
  .kontakt-kurz { padding: 1.25rem 1rem; }
  .kontakt-liste { grid-template-columns: 1fr; }
  .kontakt-liste > div { grid-template-columns: 1fr; }
  .kontakt-liste dd { font-size: 0.95rem; }
}

/* ---------- Hinweis-Box ---------- */
.notice {
  background: var(--petrol-light);
  border-left: 4px solid var(--petrol);
  padding: 1.1rem 1.4rem;
  border-radius: 8px;
  margin: 1.8rem 0;
}
.notice strong { color: var(--petrol-dark); }

/* ---------- Cards (News, Team) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-4px); }

@media (prefers-color-scheme: dark) {
  .card { background: #24271F; }
}

/* Foto in einer News-Karte: randlos oben, einheitliche Höhe */
.news-foto {
  display: block;
  width: calc(100% + 3rem);
  max-width: none;
  margin: -1.5rem -1.5rem 1rem;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

/* Urlaubshinweis: hervorgehoben, damit er sofort auffällt */
.urlaub-card {
  border-left: 5px solid var(--petrol);
  background: var(--petrol-light);
}
.urlaub-card h3 {
  margin-top: 0;
  font-size: 1.35rem;
}
.urlaub-card p { margin: 0.6em 0 0; }
.urlaub-card strong { color: var(--petrol-dark); }

@media (prefers-color-scheme: dark) {
  .urlaub-card h3, .urlaub-card strong { color: #8FDDE4; }
}

.badge {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 980px;
  margin-bottom: 0.6rem;
}

/* ---------- Team ---------- */
.team-photo {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 1.5rem 0 2.5rem;
  display: block;
}
/* ---------- Unsere Praxis ---------- */
.praxis-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0.5rem 0 1rem;
  display: block;
}
.praxis-photo + h2 { margin-top: 1.6em; }

.team-card {
  text-align: center;
}
.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  object-fit: cover;
  display: block;
}
.team-card h3 { margin: 0.3em 0 0.1em; color: var(--text); }
.team-card p { color: var(--text-muted); margin: 0; }

/* ---------- Öffnungszeiten-Tabelle ---------- */
.table-scroll {
  max-width: 640px;
  margin: 1.5rem auto;
  overflow-x: auto;
}
table.oeffnungszeiten {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
table.oeffnungszeiten th,
table.oeffnungszeiten td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.oeffnungszeiten th {
  background: var(--petrol);
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.oeffnungszeiten tbody tr:nth-child(even) { background: var(--petrol-light); }
table.oeffnungszeiten tr:last-child td { border-bottom: none; }
.geschlossen { color: var(--text-muted); font-style: italic; }

/* ---------- Kontakt ---------- */
.kontakt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 2rem;
  margin: 2rem 0;
}
.kontakt-grid .card {
  padding: 2rem 2.2rem;
}
.kontakt-grid .card:hover { transform: none; }
.kontakt-grid .card h3 {
  margin-top: 0;
  font-size: 1.35rem;
}
.kontakt-grid .card > p:last-child { margin-bottom: 0; }

/* Notfall-Karte über die volle Breite, Tabellen nebeneinander */
.kontakt-notfall { grid-column: 1 / -1; }
.notfall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 0 2.5rem;
  margin: 1.5rem 0;
}
.notfall-grid .table-scroll {
  max-width: none;
  margin: 0.75rem 0 1.5rem;
}
.kontakt-grid table.oeffnungszeiten td:first-child { white-space: nowrap; }

/* Handy: weniger Innenabstand, Tabellen passen ohne seitliches Scrollen */
@media (max-width: 600px) {
  .kontakt-grid { gap: 1.25rem; }
  .kontakt-grid .card { padding: 1.25rem 1rem; }
  .kontakt-grid .card h3 { font-size: 1.2rem; }
  .kontakt-grid table.oeffnungszeiten td:first-child { white-space: normal; }
}

/* Handy: alle Öffnungszeiten-Tabellen (Startseite + Kontakt) ohne seitliches Scrollen */
@media (max-width: 600px) {
  .container { padding-inline: 1rem; }
  .table-scroll { overflow-x: visible; }
  table.oeffnungszeiten {
    font-size: 0.85rem;
    table-layout: fixed;
  }
  table.oeffnungszeiten th,
  table.oeffnungszeiten td {
    padding: 0.55rem 0.5rem;
    overflow-wrap: anywhere;
    hyphens: auto;
  }
  table.oeffnungszeiten th {
    font-size: 0.7rem;
    letter-spacing: 0.02em;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--petrol-dark);
  color: #F3F5EF;
  margin-top: 3rem;
}
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-footer a { color: #F3F5EF; }
.site-footer__links {
  display: flex;
  gap: 1.2rem;
}

/* ---------- Legal pages ---------- */
.container--narrow h3 { margin-top: 1.6em; }
