/* ==========================================================================
   CMD Tübingen – Stylesheet
   --------------------------------------------------------------------------
   Aufbau:
   1. Design-Tokens (Farben, Schrift, Abstände)  <- hier Farben ändern
   2. Grundlagen (Reset, Typografie)
   3. Layout-Bausteine (Container, Sektionen, Grid)
   4. Header & Navigation
   5. Komponenten (Buttons, Karten, Listen, Ablauf, Akkordeon, Selbsttest)
   6. Footer
   7. Responsive Anpassungen
   ========================================================================== */

/* ==========================================================================
   1. DESIGN-TOKENS  –  zentrale Stellschrauben
   ========================================================================== */
:root {
  /* Farben – übernommen von dr-vdg.de (Praxis-Farbwelt) */
  --grau:        #5d5856;  /* Hauptfarbe: Überschriften, Header, Buttons */
  --grau-dunkel: #46423f;  /* Hover-Zustände, Footer */
  --grau-hell:   #f3f3f3;  /* zarte Flächen */
  --taupe:       #84736c;  /* Akzentfarbe: Linien, Hervorhebungen (Logo-Ton) */
  --taupe-hell:  #a99c95;  /* zweiter Akzent */
  --taupe-zart:  #f1ece9;  /* Akzentflächen */
  --text:        #333333;  /* Fließtext */
  --text-leise:  #7d736e;  /* Sekundärtext */
  --weiss:       #ffffff;
  --sand:        #f8f6f5;  /* warmer Abschnitts-Hintergrund */
  --linie:       #e3dedb;

  /* Schrift – DIN Next LT Pro, wie in der Praxis-Corporate-Identity.
     Die Schriftdateien liegen in assets/schriften/ (siehe LIESMICH.md).
     Fehlen sie, greift automatisch die Ersatzschrift. */
  --schrift-titel: "DIN Next LT Pro Light", "DIN Next Pro Light", "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  --schrift-text:  "DIN Next LT Pro Light", "DIN Next Pro Light", "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  --schrift-kraft: "DIN Next LT Pro Medium", "DIN Next Pro Medium", "Avenir Next Medium", "Segoe UI", Helvetica, Arial, sans-serif;

  /* Maße */
  --breite:      1160px;
  --radius:      4px;
  --schatten:    0 10px 30px rgba(93, 88, 86, .08);
}

/* ==========================================================================
   1b. SCHRIFTEN  –  Dateien nach assets/schriften/ legen
   ========================================================================== */
@font-face {
  font-family: "DIN Next LT Pro Light";
  src: url("schriften/Linotype-DIN-Next-LT-Pro-Light.woff2") format("woff2"),
       url("schriften/Linotype-DIN-Next-LT-Pro-Light.woff") format("woff");
  font-weight: 300 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DIN Next LT Pro Medium";
  src: url("schriften/Linotype-DIN-Next-LT-Pro-Medium.woff2") format("woff2"),
       url("schriften/Linotype-DIN-Next-LT-Pro-Medium.woff") format("woff");
  font-weight: 500 600; font-style: normal; font-display: swap;
}

/* ==========================================================================
   2. GRUNDLAGEN
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--schrift-text);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background: var(--weiss);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--schrift-kraft);
  color: var(--grau);
  line-height: 1.25;
  font-weight: 500;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
h4 { font-size: 1.08rem; }

p  { margin: 0 0 1.1em; }
a  { color: var(--grau); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--taupe); }
img { max-width: 100%; height: auto; display: block; }
strong { font-weight: 600; }

/* Kleiner Vorspann über einer Überschrift */
.kicker {
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--taupe);
  font-weight: 600;
  margin-bottom: .8em;
}

.lead { font-size: 1.15rem; color: var(--text-leise); }

/* ==========================================================================
   3. LAYOUT
   ========================================================================== */
.container { width: 100%; max-width: var(--breite); margin: 0 auto; padding: 0 24px; }
.container--schmal { max-width: 820px; }

section { padding: 76px 0; }
.sektion--sand   { background: var(--sand); }
.sektion--grau { background: var(--grau); color: #e6e1de; }
.sektion--grau h2, .sektion--grau h3 { color: var(--weiss); }
.sektion--grau a { color: var(--weiss); }

.grid { display: grid; gap: 26px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.zentriert { text-align: center; }
.zentriert .kicker { text-align: center; }
.sektion-kopf { max-width: 720px; margin: 0 auto 46px; text-align: center; }

/* ==========================================================================
   4. HEADER & NAVIGATION
   ========================================================================== */
.topbar {
  background: var(--grau-dunkel);
  color: #ddd6d2;
  font-size: .85rem;
}
.topbar .container { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.topbar a { color: #ddd6d2; text-decoration: none; }
.topbar a:hover { color: var(--weiss); }

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linie);
}
.header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 14px; padding-bottom: 14px; }

.logo { display: flex; flex-direction: column; text-decoration: none; line-height: 1.15; }
.logo__name { font-family: var(--schrift-kraft); font-size: 1.35rem; color: var(--grau); font-weight: 600; }
.logo__zusatz { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-leise); }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a { text-decoration: none; font-size: .97rem; color: var(--text); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--taupe); }

/* Mobile-Menü-Schalter */
.nav-schalter {
  display: none; background: none; border: 0; cursor: pointer;
  font-size: 1.6rem; line-height: 1; color: var(--grau); padding: 4px 8px;
}

/* ==========================================================================
   5. KOMPONENTEN
   ========================================================================== */

/* --- Buttons --- */
.btn {
  display: inline-block; padding: 14px 28px; border-radius: 2px;
  font-size: .95rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; border: 2px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.btn--haupt { background: var(--taupe); color: var(--weiss); }
.btn--haupt:hover { background: var(--grau); color: var(--weiss); }
.btn--rand { border-color: var(--grau); color: var(--grau); }
.btn--rand:hover { background: var(--grau); color: var(--weiss); }
.btn--hell { border-color: rgba(255,255,255,.6); color: var(--weiss); }
.btn--hell:hover { background: var(--weiss); color: var(--grau); }
.btn-reihe { display: flex; flex-wrap: wrap; gap: 14px; }

/* --- Hero --- */
.hero { background: linear-gradient(180deg, var(--taupe-zart), var(--weiss)); padding: 70px 0 80px; }
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.hero__bild img { border-radius: var(--radius); box-shadow: var(--schatten); }
.hero__motto {
  margin-top: 26px; padding-left: 18px; border-left: 3px solid var(--taupe);
  font-family: var(--schrift-titel); font-size: 1.1rem; color: var(--grau); font-style: italic;
}

/* --- Karten --- */
.karte {
  background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--schatten);
}
.karte h3 { margin-bottom: .4em; }
.karte p:last-child { margin-bottom: 0; }
.karte__link { display: inline-block; margin-top: 10px; font-weight: 600; text-decoration: none; }
.karte__link::after { content: " →"; }

a.karte { text-decoration: none; color: inherit; display: block; transition: transform .2s, box-shadow .2s; }
a.karte:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(93,88,86,.16); }

/* --- Symbol über einer Karte --- */
/* Icons in den Karten (Gestaltung: Victor, Praxis-Taupe #84736c).
   Die Bilddateien heißen assets/bilder/icon-*.png und sind 128x128 Pixel
   gross, damit sie auch auf hochaufloesenden Displays scharf bleiben. */
.symbol {
  display: block;
  width: 52px; height: 52px;
  margin-bottom: 18px;
}

/* --- Häkchen-Liste --- */
.liste { list-style: none; padding: 0; margin: 0; }
.liste li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.liste li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--taupe); font-weight: 700;
}
.liste--zwei { columns: 2; column-gap: 40px; }
.liste--zwei li { break-inside: avoid; }

/* --- Ablauf / Schritte --- */
.schritte { list-style: none; counter-reset: schritt; padding: 0; margin: 0; }
.schritte li {
  counter-increment: schritt; position: relative;
  padding: 0 0 30px 66px; border-left: 2px solid var(--linie); margin-left: 22px;
}
.schritte li:last-child { border-left-color: transparent; padding-bottom: 0; }
.schritte li::before {
  content: counter(schritt); position: absolute; left: -23px; top: -4px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--grau); color: var(--weiss);
  display: flex; align-items: center; justify-content: center;
  font-weight: 500; font-family: var(--schrift-kraft);
}
.schritte h3 { margin-bottom: .2em; }

/* --- Akkordeon (FAQ) --- */
.faq { border-top: 1px solid var(--linie); }
.faq details { border-bottom: 1px solid var(--linie); padding: 6px 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 40px 16px 0; position: relative;
  font-family: var(--schrift-titel); font-size: 1.12rem; color: var(--grau); font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 8px; top: 12px;
  font-size: 1.6rem; color: var(--taupe); font-family: var(--schrift-text);
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 40px 18px 0; color: var(--text-leise); }

/* --- Hinweisbox --- */
.hinweis {
  background: var(--taupe-zart); border-left: 4px solid var(--grau);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 22px 26px; font-size: .97rem;
}
.hinweis--gold { background: var(--taupe-zart); border-left-color: var(--taupe); }

/* --- Zitat --- */
.zitat {
  font-family: var(--schrift-kraft); font-size: 1.35rem; line-height: 1.5;
  color: var(--grau); border-left: 3px solid var(--taupe); padding-left: 24px; margin: 0;
}
.zitat footer { font-family: var(--schrift-text); font-size: .92rem; color: var(--text-leise); margin-top: 14px; }

/* --- Selbsttest --- */
.test-frage {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--linie);
}
.test-frage input { width: 22px; height: 22px; accent-color: var(--grau); margin-top: 3px; flex: none; }
.test-frage label { cursor: pointer; }
.test-ergebnis {
  margin-top: 26px; padding: 26px; border-radius: var(--radius);
  background: var(--taupe-zart); display: none;
}
.test-ergebnis.sichtbar { display: block; }

/* --- Kontaktzeile / Öffnungszeiten --- */
.zeiten { width: 100%; border-collapse: collapse; }
.zeiten th, .zeiten td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--linie); font-weight: 400; }
.zeiten th { color: var(--text-leise); font-weight: 500; }

.kontaktzeile { list-style: none; padding: 0; margin: 0 0 24px; }
.kontaktzeile li { margin-bottom: 10px; }

/* --- Abschluss-CTA --- */
.cta-band { background: var(--grau); color: #e6e1de; text-align: center; }
.cta-band h2 { color: var(--weiss); }

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.footer { background: var(--grau-dunkel); color: #c9c2be; padding: 60px 0 28px; font-size: .95rem; }
.footer h4 { color: var(--weiss); margin-bottom: .8em; }
.footer a { color: #c9c2be; text-decoration: none; }
.footer a:hover { color: var(--weiss); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer__unten {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; font-size: .87rem;
}

/* ==========================================================================
   7. RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .hero .container { grid-template-columns: 1fr; }
  .hero__bild { order: -1; }
}

@media (max-width: 700px) {
  body { font-size: 17px; }
  section { padding: 54px 0; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .liste--zwei { columns: 1; }
  .topbar .container { flex-direction: column; gap: 4px; text-align: center; }

  .nav-schalter { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--weiss); border-bottom: 1px solid var(--linie); padding: 10px 24px 22px;
  }
  .nav.offen { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--linie); }
  .nav .btn { margin-top: 14px; text-align: center; border-bottom: 0; }
}

/* Druck- und Bewegungsreduktion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a.karte:hover { transform: none; }
}
