/* =========================================================
   Kardiologie Hamburg — Stylesheet
   Design-Grundlage: design-konzept.md
   ========================================================= */

/* ---------- Fonts (selbst gehostet, siehe TECHNIK-CHECKLISTE.md) ---------- */
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/Montserrat-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/Montserrat-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/Montserrat-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Raleway";
  src: url("../assets/fonts/Raleway-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Raleway";
  src: url("../assets/fonts/Raleway-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Raleway";
  src: url("../assets/fonts/Raleway-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design Tokens ---------- */
:root {
  /* Farben — Salbei-Petrol (Revision 2, siehe design-konzept.md Abschnitt 3) */
  --color-primary: #3f6259;
  --color-primary-light: #4d7368;
  --color-primary-deep: #1e2b26;
  --color-accent: #325049;
  --color-accent-dark: #263e38;
  --color-accent-soft: #4d7368;
  --color-blush: #e4ede9;
  --color-blush-2: #eff3ec;
  --color-bg: #f7faf8;
  --color-surface: #ffffff;
  --color-text: #1e2b26;
  --color-text-muted: #5c6d67;
  --color-success: #7fa894;
  --color-error: #b4523a;
  --color-border: rgba(30, 43, 38, 0.12);

  /* Bildplatzhalter (kein eigenes Fotomaterial) */
  --color-placeholder-1: #dbe3df;
  --color-placeholder-2: #c9d5cf;

  /* Typografie */
  --font-heading: "Montserrat", "Segoe UI", sans-serif;
  --font-body: "Raleway", "Segoe UI", sans-serif;

  /* Spacing (8px Basis) */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Radien */
  --radius-pill: 100px;
  --radius-card: 28px;
  --radius-card-sm: 16px;
  --radius-image: 32px;
  --radius-field: 16px;

  /* Sonstiges */
  --shadow-card: 0 8px 24px rgba(30, 43, 38, 0.08);
  --shadow-btn: 0 4px 14px rgba(50, 80, 73, 0.22);
  --max-width: 1200px;
  --max-width-text: 680px;
}

@media (min-width: 768px) {
  :root {
    --space-2xl: 6rem;
  }
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Sanftes Scrollen für alle Anker-Sprünge (z.B. "Termin vereinbaren" zum
   Formular, "Unsere Leistungen"/FAQ auf der Startseite) statt hartem Jump. */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

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

a:hover {
  text-decoration: underline;
}

ul,
ol {
  padding-left: 1.2em;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
  font-weight: 500;
}

/* Überschreibt das body-weite overflow-wrap:break-word gezielt NUR für
   einzelne Überschriften, die das opt-in per Klasse bekommen (z.B. die
   FAQ-Titel "Häufige Fragen zu Herzrhythmusstörungen") — bei langen
   zusammengesetzten Wörtern darf der Zeilenumbruch dort nie mitten im Wort
   landen (einzelner Buchstabe auf einer eigenen Zeile), nur an Wortgrenzen.
   Bewusst NICHT global auf h1/h2/h3/h4: an mehreren Stellen (Hero-H1,
   Karten-Überschriften wie "Kooperationsdiagnostik") sitzen lange Wörter in
   schmalen Spalten, wo genau dieses Verbot zu echtem horizontalem Overflow
   führt, weil das Wort dann nicht mehr schrumpfen darf. */
.heading-no-orphan {
  overflow-wrap: normal;
  word-break: normal;
}

h1 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.65rem;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 var(--space-sm);
}

@media (min-width: 640px) {
  body {
    font-size: 18px;
  }
  h1 {
    font-size: 2.75rem;
  }
  h2 {
    font-size: 2rem;
  }
  h3 {
    font-size: 1.4rem;
  }
}

@media (min-width: 1024px) {
  h1 {
    font-size: 3.2rem;
  }
  h2 {
    font-size: 2.15rem;
  }
}

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-sm);
}

@media (min-width: 640px) {
  .container {
    padding-inline: var(--space-md);
  }
}

@media (min-width: 1024px) {
  .container {
    padding-inline: 1.25rem;
  }
}

@media (min-width: 1360px) {
  .container {
    padding-inline: 2.5rem;
  }
}

.text-col {
  max-width: var(--max-width-text);
}

/* ---------- Dekorative Hintergrundformen (Herz/EKG-Welle/Ringe) ----------
   .decor-visual ist ein eigenständiges Element direkt im <section>
   (Geschwister von .container, NICHT darin verschachtelt). Dadurch bleibt
   der Text (.decor-text, hart auf max-width-text begrenzt) strukturell
   getrennt von der Grafik — eine Überlappung ist unmöglich — und die
   Grafik kann trotzdem bis zur ECHTEN Seitenkante bluten ("im Anschnitt"),
   unabhängig von der Container-Breite oder der Zentrierung des Containers
   auf breiten Bildschirmen (> 1200px). Da .section eine position:relative-
   Sektion ist und selbst keine seitliche Innenabstände hat (nur .container
   darin hat welche), landet right:0 immer exakt auf der echten Viewport-
   Kante.
   Nur ab 1100px, weil darunter nicht genug Raum neben der 680px-Textspalte
   für eine sinnvolle, nicht gequetschte Grafik bleibt (unter dieser Breite
   wird die Grafik komplett ausgeblendet statt in den Text hineingequetscht). */
.decor-section {
  position: relative;
}
.decor-text {
  max-width: var(--max-width-text);
}
.decor-visual {
  display: none;
}

@media (min-width: 1100px) {
  .decor-visual {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: clamp(300px, 32vw, 460px);
    overflow: hidden;
    pointer-events: none;
  }
  /* Herz/Ringe sind jetzt textgroß und werden zu 1/4 bzw. zur Hälfte über
     den Rand hinaus angeschnitten — die Box braucht daher etwas mehr
     Breite, damit sie den sichtbaren Anteil der Form nicht zusätzlich von
     links kappt. Das Herz zeigt 3/4 seiner Fläche (viel breiterer
     sichtbarer Anteil als die Ringe mit nur der Hälfte) und braucht daher
     die größere Box. */
  .decor-visual--rings {
    width: clamp(320px, 38vw, 480px);
  }
  .decor-visual--heart {
    width: clamp(340px, 42vw, 570px);
  }
}

.decor-visual::after {
  content: "";
  position: absolute;
  background-color: var(--color-primary);
  opacity: 0.1;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  pointer-events: none;
}

/* Herz/Ringe: quadratische Form. Die Höhe ist die kleinere aus (a) fast der
   vollen Höhe der Box (= Höhe der jeweiligen Section = individuell so hoch
   wie der Text) und (b) einer an die Viewport-Breite gekoppelten Obergrenze.
   (b) verhindert, dass die Form bei knapper Breite (ab 1100px) so groß
   würde, dass ihr sichtbarer, angeschnittener Teil in den Text hineinragt —
   bei mehr Breite greift automatisch (a) und die Form wird so hoch wie der
   Text. Die Verschiebung per transform:translate(X%, -50%) nutzt Prozent-
   werte relativ zur EIGENEN Boxgröße (nicht zum Elternelement) — so bleibt
   exakt der gewünschte Anteil der Form über den Seitenrand hinaus im
   Anschnitt, unabhängig von der Bildschirmbreite. */
.decor-visual--heart::after,
.decor-visual--rings::after {
  top: 50%;
  right: 0;
  width: auto;
  aspect-ratio: 1 / 1;
}

/* Nur die Kontur (stroke, fill="none") — kein gefülltes Symbol.
   3/4 der Form bleiben sichtbar, 1/4 wird am Rand angeschnitten. */
.decor-visual--heart::after {
  height: min(84%, calc(133vw - 1030px));
  transform: translate(25%, -50%);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 33.5c0 0-15-10.2-15-19.8C5 8.2 9 4.7 13.4 4.7c3.7 0 5.7 2.4 6.6 4.9 0.9-2.5 2.9-4.9 6.6-4.9C31 4.7 35 8.2 35 13.7c0 9.6-15 19.8-15 19.8z' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 33.5c0 0-15-10.2-15-19.8C5 8.2 9 4.7 13.4 4.7c3.7 0 5.7 2.4 6.6 4.9 0.9-2.5 2.9-4.9 6.6-4.9C31 4.7 35 8.2 35 13.7c0 9.6-15 19.8-15 19.8z' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E");
}

/* EKG-Welle: mask-size 100% 100% statt "contain" — die Ausschläge werden
   auf die volle Höhe ihrer Box gestreckt, statt sich (wegen des breiten
   400x200-viewBox-Seitenverhältnisses) nur mittig zusammenzuziehen. So
   reichen die Spitzen so hoch wie der danebenstehende Text. */
.decor-visual--pulse::after {
  top: 0;
  bottom: 0;
  left: -20px;
  right: -20px;
  width: auto;
  height: auto;
  transform: none;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 200'%3E%3Cpath d='M0 100 L50 100 L65 90 L80 10 L95 190 L110 100 L160 100 L230 100 L245 90 L260 10 L275 190 L290 100 L400 100' fill='none' stroke='black' stroke-width='8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 200'%3E%3Cpath d='M0 100 L50 100 L65 90 L80 10 L95 190 L110 100 L160 100 L230 100 L245 90 L260 10 L275 190 L290 100 L400 100' fill='none' stroke='black' stroke-width='8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.decor-visual--rings::after {
  height: min(84%, calc(200vw - 1540px));
  transform: translate(50%, -50%);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='5' fill='none' stroke='black' stroke-width='1.6'/%3E%3Ccircle cx='20' cy='20' r='11' fill='none' stroke='black' stroke-width='1.4'/%3E%3Ccircle cx='20' cy='20' r='17' fill='none' stroke='black' stroke-width='1.2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='5' fill='none' stroke='black' stroke-width='1.6'/%3E%3Ccircle cx='20' cy='20' r='11' fill='none' stroke='black' stroke-width='1.4'/%3E%3Ccircle cx='20' cy='20' r='17' fill='none' stroke='black' stroke-width='1.2'/%3E%3C/svg%3E");
}

section {
  padding-block: var(--space-xl);
}

/* Verhindert, dass der sticky Header eine per Anker angesprungene Section
   (z.B. #kontaktformular, #leistungen, #faq) verdeckt. */
section[id] {
  scroll-margin-top: 100px;
}

@media (min-width: 1024px) {
  section {
    padding-block: var(--space-2xl);
  }
}

.section-bg-surface {
  background: var(--color-surface);
}

.section-bg-primary {
  background: var(--color-primary);
  color: #fff;
}

.section-bg-primary h2,
.section-bg-primary h3 {
  color: #fff;
}

.section-bg-blush {
  background: var(--color-blush);
}

.section-bg-blush-2 {
  background: var(--color-blush-2);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.section-head {
  max-width: var(--max-width-text);
  margin-bottom: var(--space-lg);
}

.section-bg-primary .eyebrow {
  /* accent-soft (#4d7368) auf primary (#3f6259) fiel unter WCAG AA (1.3:1) —
     blush hat auf dunklem Grund ausreichend Kontrast (5.7:1). */
  color: var(--color-blush);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
  background: var(--color-accent-dark);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}
.btn-outline-light:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.btn-sm {
  padding: 0.6rem 1.3rem;
  font-size: 0.85rem;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
  gap: var(--space-sm);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-primary);
  flex-shrink: 0;
}
.logo:hover {
  text-decoration: none;
}
.logo svg {
  flex-shrink: 0;
}
.logo-mark {
  display: block;
  flex-shrink: 0;
  height: 52px;
  width: auto;
}

.footer-logo .logo-mark {
  height: 76px;
}

.main-nav {
  display: none;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 1360px) {
  .main-nav ul {
    gap: var(--space-md);
  }
}

.main-nav a {
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}
.main-nav a:hover {
  color: var(--color-accent);
  text-decoration: none;
}
.main-nav a.is-active {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
}

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

/* Auf Mobile/kleinem Tablet ersetzt der Hamburger den Header-CTA (der Button
   steht bereits im mobile-nav-Menü) — sonst kollidieren Logo, Button und
   Toggle auf schmalen Viewports. */
.header-actions > .btn {
  display: none;
}

@media (min-width: 640px) {
  .header-actions > .btn {
    display: inline-flex;
  }
}

/* Enger Korridor 1024–1359px: volle Nav + CTA gleichzeitig sichtbar,
   also Nav kompakter setzen statt CTA zu verstecken. */
@media (min-width: 1024px) and (max-width: 1359px) {
  .main-nav ul {
    gap: 0.75rem;
  }
  .main-nav a {
    font-size: 0.85rem;
  }
  .header-actions {
    gap: 0.6rem;
  }
  .btn-sm {
    padding: 0.55rem 1.1rem;
    font-size: 0.8rem;
  }
}

@media (min-width: 1360px) {
  .header-actions {
    gap: var(--space-md);
  }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--color-primary);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle svg {
  width: 20px;
  height: 20px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: var(--space-sm);
}
.mobile-nav.is-open {
  display: flex;
}
.mobile-nav a:not(.btn) {
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 500;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-card-sm);
}
.mobile-nav a:not(.btn):hover {
  background: var(--color-blush);
  text-decoration: none;
}
.mobile-nav a.is-active:not(.btn) {
  background: var(--color-blush);
  color: var(--color-accent);
  font-weight: 600;
}
.mobile-nav .btn {
  margin-top: 0.5rem;
  align-self: flex-start;
}
@media (min-width: 1024px) {
  .main-nav {
    display: block;
  }
  .nav-toggle {
    display: none;
  }
  .mobile-nav {
    display: none !important;
  }
}

/* ---------- Floating Action Buttons (seitlich, ersetzen Telefonnummer im Header) ---------- */
.floating-actions {
  position: fixed;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.floating-actions a {
  display: flex;
  align-items: center;
  height: 48px;
  width: 48px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-dark);
  color: #fff;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  white-space: nowrap;
  /* Jeder Button wächst für sich (align-items: flex-end oben verhindert,
     dass Geschwister-Buttons durch Flex-Stretch mitwachsen). */
  transition: width 0.15s ease, background-color 0.15s ease;
}

.floating-actions a:hover,
.floating-actions a:focus-visible {
  background: var(--color-primary);
  text-decoration: none;
}

.fab-tel:hover,
.fab-tel:focus-visible {
  width: 210px;
}
.fab-mail:hover,
.fab-mail:focus-visible {
  width: 340px;
}
.fab-mail .fab-label {
  font-size: 0.78rem;
}
.fab-termin:hover,
.fab-termin:focus-visible {
  width: 210px;
}

.floating-actions .fab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.floating-actions .fab-icon svg {
  width: 20px;
  height: 20px;
}

.floating-actions .fab-label {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.88rem;
  padding-right: 1.1rem;
}

@media (max-width: 640px) {
  .floating-actions {
    right: 0.9rem;
    top: auto;
    bottom: 1rem;
    transform: none;
  }
  .floating-actions a:hover,
  .floating-actions a:focus-visible {
    width: 48px;
  }
  .floating-actions .fab-label {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: var(--space-xl) var(--space-lg);
}

@media (min-width: 1024px) {
  .hero {
    padding-block: var(--space-2xl) var(--space-xl);
  }
}

.hero-grid {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

.hero-grid > * {
  min-width: 0;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-xl);
  }
}

.hero h1 {
  margin-bottom: var(--space-sm);
}

.hero-lede {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 52ch;
  margin-bottom: var(--space-md);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ---------- Fotos (KI-generiert) ----------
   Nutzt dieselben Seitenverhältnis-/Formklassen wie die früheren Platzhalter
   (.hero-image/.image-blob/.image-standard/.image-square/.map-placeholder),
   jetzt direkt auf dem <img> statt auf einem umschließenden div. */
.photo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-image);
}

/* ---------- Image placeholders (kein eigenes Fotomaterial) ---------- */
.img-placeholder {
  position: relative;
  width: 100%;
  border-radius: var(--radius-image);
  background: linear-gradient(135deg, var(--color-placeholder-1), var(--color-placeholder-2));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--color-text-muted);
}
.img-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35), transparent 55%);
}
.img-placeholder svg {
  width: 25%;
  min-width: 40px;
  max-width: 90px;
  height: auto;
  opacity: 0.55;
  position: relative;
  z-index: 1;
}
.img-placeholder .placeholder-label {
  position: absolute;
  bottom: var(--space-sm);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.75);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  z-index: 1;
  white-space: nowrap;
}

/* Kennzeichnung für spätere KI-generierte Bilder — steht UNTER dem Bild,
   nicht wie .placeholder-label darüber (der Platzhalter-Hinweis verschwindet
   sobald echte Bilder eingesetzt werden, die KI-Kennzeichnung bleibt). */
.image-block {
  min-width: 0;
}
.image-caption {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
}

.hero-image {
  aspect-ratio: 4 / 3;
  border-radius: 45% 55% 60% 40% / 50% 45% 55% 50%;
}

.hero-image svg {
  width: 22%;
}

.image-blob {
  border-radius: 45% 55% 60% 40% / 50% 45% 55% 50%;
}

.image-standard {
  aspect-ratio: 4 / 3;
}

.image-wide {
  aspect-ratio: 16 / 9;
}

.image-square {
  aspect-ratio: 1 / 1;
}

/* ---------- Icon Badge ---------- */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-blush);
  color: var(--color-primary);
  flex-shrink: 0;
  margin-bottom: var(--space-sm);
}
.icon-badge svg {
  width: 26px;
  height: 26px;
}
.icon-badge.is-accent {
  /* War zuvor accent-soft-Hintergrund mit primary-Icon (Kontrast 1.3:1) —
     zwei zu ähnliche Dunkelgrüntöne. Jetzt wie Standard-Badge hell/dunkel. */
  background: var(--color-blush);
  color: var(--color-accent-dark);
}
.section-bg-primary .icon-badge {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* ---------- Cards / Grid ---------- */
.grid {
  display: grid;
  gap: var(--space-md);
}

.grid > * {
  min-width: 0;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  padding: var(--space-md) var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s ease;
}
/* Flex-Kinder bekommen sonst automatisch min-width:auto und verweigern das
   Umbrechen langer, zusammengesetzter Wörter (z. B. "Kooperationsdiagnostik"). */
.card > * {
  min-width: 0;
  max-width: 100%;
}
.card:hover {
  box-shadow: 0 14px 32px rgba(30, 43, 38, 0.12);
}

.card-dark {
  background: var(--color-primary);
  color: #fff;
}
.card-dark h3 {
  color: #fff;
}
.card-dark p {
  color: rgba(255, 255, 255, 0.88);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-accent);
}
/* Verlinkung sitzt immer am unteren Kartenrand, unabhängig von
   unterschiedlich langen Überschriften/Texten in der Karte daneben. */
.card-link:last-child {
  margin-top: auto;
}
.card-dark .card-link {
  color: var(--color-blush);
}
.card-dark .card-link:hover {
  color: #fff;
}

/* ---------- USP / Feature list ---------- */
.usp-list {
  display: grid;
  gap: var(--space-md);
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 640px) {
  .usp-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.usp-item {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.usp-item .icon-badge {
  width: 44px;
  height: 44px;
  margin-bottom: 0;
}
.usp-item .icon-badge svg {
  width: 20px;
  height: 20px;
}

.usp-item h2,
.usp-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}
.usp-item p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Wave divider ---------- */
.wave-divider {
  display: block;
  width: 100%;
  height: auto;
  line-height: 0;
}
.wave-divider svg {
  display: block;
  width: 100%;
  height: 48px;
}

/* ---------- FAQ (native details/summary) ---------- */
.faq-list {
  display: grid;
  gap: var(--space-sm);
  max-width: var(--max-width-text);
}

.faq-item {
  background: var(--color-surface);
  border-radius: var(--radius-card-sm);
  padding: 0.25rem var(--space-md);
  box-shadow: var(--shadow-card);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-primary);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-blush);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.faq-item summary .faq-icon svg {
  width: 14px;
  height: 14px;
  color: var(--color-accent-dark);
}
.faq-item[open] summary .faq-icon {
  transform: rotate(45deg);
}

.faq-item p {
  padding-bottom: var(--space-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* ---------- Forms ---------- */
.form-field {
  margin-bottom: var(--space-sm);
}

.form-field label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-field);
  border: 1.5px solid var(--color-border);
  background: rgba(228, 237, 233, 0.4);
  color: var(--color-text);
}

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  border-color: var(--color-primary);
  background: #fff;
  outline: 2.5px solid var(--color-accent);
  outline-offset: 1px;
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
}

.form-grid {
  display: grid;
  gap: 0 var(--space-sm);
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid .form-field-full {
    grid-column: 1 / -1;
  }
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: var(--color-blush);
  border-radius: var(--radius-card-sm);
  padding: var(--space-sm) var(--space-md);
  margin-top: var(--space-sm);
}

.form-note strong {
  color: var(--color-primary);
}

/* ---------- Info blocks (Adresse, Öffnungszeiten) ---------- */
.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-sm);
}
.info-list li {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}
.info-list .icon-badge {
  width: 44px;
  height: 44px;
  margin-bottom: 0;
}
.info-list .icon-badge svg {
  width: 20px;
  height: 20px;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.hours-table td {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--color-border);
}
.hours-table td:last-child {
  text-align: right;
  color: var(--color-text-muted);
}

/* ---------- Breadcrumb ---------- */
/* ---------- Team ---------- */
.team-grid {
  display: grid;
  gap: var(--space-md);
}
@media (min-width: 640px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.team-card {
  text-align: center;
}
.team-card .img-placeholder,
.team-card .photo {
  margin-bottom: var(--space-sm);
}
.team-card h3 {
  margin-bottom: 0.1rem;
  font-size: 1.05rem;
}
.team-card .role {
  color: var(--color-accent);
  font-size: 0.88rem;
  font-weight: 500;
}

/* ---------- Quote block ---------- */
.quote-block {
  border-left: 4px solid var(--color-accent);
  padding-left: var(--space-md);
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--color-primary);
  font-style: normal;
  max-width: var(--max-width-text);
}
.quote-block cite {
  display: block;
  margin-top: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-style: normal;
}

/* ---------- Map placeholder ---------- */
.map-placeholder {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-image);
}

@media (min-width: 900px) {
  .map-placeholder {
    aspect-ratio: 21 / 9;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  /* Bewusst dunkler als section-bg-primary (CTA-Bänder), damit der Footer
     sich sichtbar absetzt, wenn eine dunkle CTA-Sektion direkt darüber liegt. */
  background: var(--color-primary-deep);
  color: rgba(255, 255, 255, 0.85);
  padding-block: var(--space-xl) var(--space-md);
}

.footer-grid {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: var(--space-sm);
}
.footer-logo:hover {
  text-decoration: none;
}

.footer-col h3 {
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.78);
}
.footer-col a:hover {
  color: var(--color-blush);
}

.footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-md);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

@media (min-width: 768px) {
  .footer-disclaimer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}
.footer-legal-links a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
}

.footer-legal-links button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
  font-family: var(--font-body);
  cursor: pointer;
  padding: 0;
}
.footer-legal-links button:hover {
  color: var(--color-blush);
}

.footer-demo-note {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-card-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: var(--space-md);
}
.footer-demo-note strong {
  color: #fff;
}

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
}
.cta-band h2 {
  margin-bottom: var(--space-xs);
}
.cta-band p {
  color: var(--color-text-muted);
  max-width: 55ch;
  margin-inline: auto;
  margin-bottom: var(--space-md);
}
.section-bg-primary .cta-band p {
  color: rgba(255, 255, 255, 0.8);
}
.cta-band .hero-actions {
  justify-content: center;
}

/* ---------- Legal pages ---------- */
.legal-content h2 {
  margin-top: var(--space-lg);
  font-size: 1.3rem;
}
.legal-content h2:first-child {
  margin-top: 0;
}
.legal-content p,
.legal-content li {
  color: var(--color-text-muted);
}
.legal-content a {
  color: var(--color-accent);
}
.legal-notice {
  background: var(--color-blush);
  border-radius: var(--radius-card-sm);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}
.legal-notice p {
  margin: 0;
  color: var(--color-primary);
}

/* ---------- Cookie Modal ---------- */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 1000;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -8px 24px rgba(30, 43, 38, 0.12);
  padding: var(--space-md);
  display: none;
}
.cookie-banner.is-visible {
  display: block;
}
.cookie-banner-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 0;
}
.cookie-banner h2 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}
.cookie-banner p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}
.cookie-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.6rem;
  min-width: 0;
}

@media (max-width: 639px) {
  .cookie-actions {
    flex-direction: column;
  }
  .cookie-actions .btn {
    width: 100%;
  }
}

@media (min-width: 900px) {
  .cookie-banner-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .cookie-banner-inner .cookie-text {
    flex: 1;
  }
}

.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 43, 38, 0.55);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
}
.cookie-modal-overlay.is-visible {
  display: flex;
}
.cookie-modal {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: var(--space-lg);
}
.cookie-modal h2 {
  font-size: 1.3rem;
}
.cookie-category {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-sm);
}
.cookie-category:first-of-type {
  border-top: none;
}
.cookie-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}
.cookie-category-head strong {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-size: 0.98rem;
}
.cookie-category p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0.3rem 0 0;
}

/* Toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch .slider {
  position: absolute;
  inset: 0;
  background: var(--color-border);
  border-radius: 100px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.switch .slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.switch input:checked + .slider {
  background: var(--color-accent);
}
.switch input:checked + .slider::before {
  transform: translateX(18px);
}
.switch input:focus-visible + .slider {
  outline: 2.5px solid var(--color-accent);
  outline-offset: 2px;
}
.switch input:disabled + .slider {
  background: var(--color-primary-light);
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-modal-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.6rem;
  margin-top: var(--space-md);
  min-width: 0;
}

@media (max-width: 767px) {
  .cookie-modal-actions {
    flex-direction: column;
    flex-wrap: wrap;
  }
  .cookie-modal-actions .btn {
    width: 100%;
  }
}

/* ---------- Utilities ---------- */
.mt-0 {
  margin-top: 0;
}
.text-center {
  text-align: center;
}
.center-col {
  margin-inline: auto;
  text-align: center;
}
.sr-only {
  position: absolute;
  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: -999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 0 0 var(--radius-card-sm) 0;
  z-index: 2000;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Barrierefreiheit: sichtbare Fokus-Zustände ----------
   Ohne dies sind Buttons/Links für Tastatur- und Screenreader-Nutzer beim
   Tabben unsichtbar — Pflicht für WCAG 2.4.7 (Focus Visible). Wir nutzen
   :focus-visible, damit Maus-Klicks keinen Ring auslösen, Tab-Fokus aber
   immer sichtbar ist. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2.5px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Auf dunklem Grund (Header ist hell, aber Footer/CTA/Cards sind dunkel)
   braucht der Ring genug Kontrast zum Hintergrund. */
.section-bg-primary a:focus-visible,
.section-bg-primary button:focus-visible,
.card-dark a:focus-visible,
.site-footer a:focus-visible,
.site-footer button:focus-visible,
.floating-actions a:focus-visible {
  outline-color: #fff;
}

/* Der Fokusring soll die Pill-Form von Buttons nicht eckig durchbrechen. */
.btn:focus-visible {
  border-radius: var(--radius-pill);
}
.floating-actions a:focus-visible {
  border-radius: var(--radius-pill);
}

/* Inhaltliche Links im Fließtext ausschließlich über Farbe zu kennzeichnen,
   reicht laut WCAG 1.4.1 nicht aus — zusätzliche Unterstreichung als
   nicht-farbliches Unterscheidungsmerkmal. Navigation, Buttons und
   Card-/Footer-Links sind bereits durch Position/Form erkennbar und bleiben
   bewusst ohne Unterstreichung, um nicht wie Fließtext-Links zu wirken. */
.text-col a,
.legal-content a,
.form-note a,
.quote-block a,
p a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.text-col a:hover,
.legal-content a:hover,
.form-note a:hover,
.quote-block a:hover,
p a:hover {
  text-decoration-thickness: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.001ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
