/* =========================================================
   STIL — Komponenten in Seitenreihenfolge.
   Bildgrößen der Komponenten: Abschnitt 15 "Bilder & Medien".
   ========================================================= */

/* =========================
   1. COOKIE-BANNER
========================= */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, 90%);
  background: var(--color-bg);
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px var(--color-shadow);
  z-index: 10000; /* vor dem schwebenden „Termin buchen“ (9999) */
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.cookie-text {
  font-size: 0.9rem;
  margin: 0;
}

.cookie-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

/* Grundform ALLER Buttons der Seite (auch Akkordeon-Header) */
button {
  font-family: var(--font-body);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 12px 22px;
  min-height: 48px;
}

.cookie-btn {
  flex: 1;
  padding: 14px 16px;
  min-height: 48px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--inner-shadow-light);
}

.cookie-btn.accept {
  /* gleicher wabernder Verlauf wie „Termin buchen“ */
  background-image: linear-gradient(90deg,
    var(--brand-blau-text), var(--brand-rosa-text), var(--brand-blau-text));
  background-size: 200% 100%;
  animation: text-wabern var(--brand-wabern-dauer) ease-in-out infinite alternate;
  color: #fff;
}

.cookie-btn.decline {
  background: var(--color-light);
  color: var(--color-text);
}

/* =========================
   2. NAVIGATION
========================= */
.nav {
  position: sticky;
  top: 0;
  background: var(--color-bg);
  padding: 20px 15px 12px 25px;
  z-index: 1000;
  box-shadow: var(--shadow-light);
  transition: box-shadow var(--transition-fast);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: inline-block;
  transform-origin: center;
  will-change: transform;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  10%, 30% { transform: scale(1.08); }
  20%, 40% { transform: scale(1.05); }
}

.logo-inner {
  display: inline-block;
  animation: heartbeat 1.5s infinite;
  transform-origin: center;
}

.logo-form {
  display: block;
  height: 36px;
  width: auto;
  overflow: visible;
}

/* Logo-Farben: Blau und Rosa wabern langsam hin und her */
.logo-stop-a { stop-color: var(--brand-blau); }
.logo-stop-b { stop-color: var(--brand-rosa); }

.logo-fluss {
  animation: logo-wabern var(--brand-wabern-dauer) ease-in-out infinite alternate;
}

/* Verschiebung um genau eine Verlaufslänge: aus Blau→Rosa wird Rosa→Blau */
@keyframes logo-wabern {
  from { transform: translate(0, 0); }
  to   { transform: translate(-368px, -422px); }
}

.menu-btn {
  font-size: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 70%;
  height: 100%;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  padding: 60px 20px;
  transition: right var(--transition-fast);
  z-index: 999;
}

.side-menu.active { right: 0; }

.side-menu a {
  margin-bottom: 20px;
  text-decoration: none;
  color: var(--color-text);
}

/* Desktop-Menü ist mobil aus; responsiv.css blendet es ab 1024px ein */
.nav-menu {
  display: none;
}

.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-bg);
  box-shadow: var(--shadow-light);
  border-radius: var(--radius);
  min-width: 200px;
  padding: 10px 0;
  display: none;
  flex-direction: column;
  z-index: 999;
}

.dropdown-menu a {
  padding: 10px 15px;
  display: block;
  text-decoration: none;
  color: var(--color-text);
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: var(--color-light);
}

.nav-dropdown:hover .dropdown-menu {
  display: flex;
}

/* =========================
   3. SCHWEBENDER TERMIN-KNOPF
========================= */
.cta-fixed {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cta-fixed .cta-btn {
  display: inline-block;
  padding: 12px 22px;
  /* Markenverlauf wie Logo und Überschriften, wabert mit */
  background-image: linear-gradient(90deg,
    var(--brand-blau-text), var(--brand-rosa-text), var(--brand-blau-text));
  background-size: 200% 100%;
  animation: text-wabern var(--brand-wabern-dauer) ease-in-out infinite alternate;
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-light);
  text-decoration: none;
  font-weight: 600;
}

.cta-hidden {
  opacity: 0;
  transform: translateX(-50%) scale(0.95);
  pointer-events: none;
}

/* =========================
   4. HERO
========================= */
.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-inner {
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

h1 span, h2 span {
  display: block;
  font-size: 0.5em;
  font-weight: 500;
  color: var(--color-muted);
}

/* „Berlin Prenzlauer Berg“: etwas kleiner, Medium */
h1 span {
  font-size: 0.42em;
}

/* Überschrift in Markenfarben wie auf der Visitenkarte, gleiche Wabern-Bewegung wie das Logo */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h1,
  h1 span {
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
    color: transparent;
    background-image: linear-gradient(90deg,
      var(--brand-blau-text), var(--brand-rosa-text), var(--brand-blau-text));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: text-wabern var(--brand-wabern-dauer) ease-in-out infinite alternate;
  }

  /* Untertitel: eigener, ruhigerer Verlauf (Blau → Violett), versetzt zum h1 */
  h1 span {
    background-image: linear-gradient(90deg,
      var(--brand-blau-text), #7a6fb0, var(--brand-blau-text));
    animation-delay: calc(var(--brand-wabern-dauer) / -2);
  }

  /* h2 behält seinen weißen Kasten: Verlauf nur in der Schrift, Weiß als zweite Ebene dahinter */
  h2:not(.footer-title) {
    color: transparent;
    background-image:
      linear-gradient(90deg, var(--brand-blau-text), var(--brand-rosa-text), var(--brand-blau-text)),
      linear-gradient(var(--color-bg), var(--color-bg));
    background-size: 200% 100%, 100% 100%;
    -webkit-background-clip: text, padding-box;
    background-clip: text, padding-box;
    animation: h2-wabern var(--brand-wabern-dauer) ease-in-out infinite alternate;
  }

  /* Untertitel im h2 (z. B. „ca. 60 min“) nimmt den Verlauf vom h2 */
  h2:not(.footer-title) span {
    color: transparent;
  }
}

@keyframes h2-wabern {
  from { background-position: 0% 50%, 0 0; }
  to   { background-position: 100% 50%, 0 0; }
}

@keyframes text-wabern {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}

/* Wer weniger Bewegung eingestellt hat, bekommt die Farben stehend */
@media (prefers-reduced-motion: reduce) {
  .logo-inner,
  .logo-fluss,
  h1,
  h1 span,
  h2,
  .cta-fixed .cta-btn,
  .cookie-btn.accept {
    animation: none;
  }
}

/* =========================
   5. BUTTONS & ZERTIFIKATE
========================= */
.cta-buttons,
.certificates {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.cta-btn,
.certificate {
  display: inline-block;
  background: var(--color-box);
  color: var(--color-heading);
  padding: 8px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  box-shadow: var(--inner-shadow-light);
}

/* Kürzel (B.Sc./M.Sc.) sehen aus wie die anderen Badges, Langform im Tooltip */
abbr.certificate { cursor: help; }

/* =========================
   6. PROFIL
========================= */
/* In allen Breiten gleiche Reihenfolge: Bild, Logo + Name, Text, Qualifikationen */
.profile {
  text-align: center;
  padding: 20px 0;
}

.profile-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 900px;
  margin: 0 auto;
}

.profile-image-wrapper {
  width: calc(100% - 2rem);
  max-width: 420px;
  padding: 16px;
}

.profile-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 16px;
}

.profile-logo {
  width: 80px;
  height: auto;
  flex-shrink: 0;
}

/* Text und Qualifikationen etwas breiter als vorher */
.profile .sprechblase,
.profile .certificates {
  width: calc(100% - 2rem);
  max-width: 900px;
}

.profile .sprechblase {
  text-align: left;
  padding: 1.5rem;
}

.profile .sprechblase p {
  max-width: none;
}

.profile .certificates {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 1rem;
}

/* =========================
   7. LEISTUNGEN & AKKORDEON
   (Akkordeon wird auch von Finanzierung, FAQ und Tinnitus genutzt)
========================= */
#leistungen {
  text-align: center;
  margin-top: 120px;
}

.spine {
  text-align: var(--text-align);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@keyframes float-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.05); }
}

.spine-image img {
  animation: float-breathe 7s ease-in-out infinite;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 10px;
}

.accordion-header {
  width: 100%;
  display: block;
  text-align: left;
  padding: 10px 16px;
  background: var(--color-bg);
  color: var(--color-heading);
  font-family: var(--font-body);
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-light);
  transition: var(--transition-fast), color var(--transition-fast);
}

.accordion-content {
  text-align: left;
  width: 100%;
  overflow: hidden;
  max-height: 0;
  transition: all var(--transition-fast);
  border-radius: var(--radius);
  background: var(--color-bg);
  box-shadow: var(--shadow-light);
  padding: 0 16px;
}

.accordion-item.active .accordion-content {
  max-height: 1000px;
  padding: 20px 30px;
}

.spine a {
  color: var(--color-link);
  text-decoration: underline;
}

/* =========================
   8. BEWERTUNGEN
========================= */
.reviews {
  text-align: var(--text-align);
  margin-top: 120px;
}

.reviews-container {
  position: relative;
  overflow: hidden;
}

.reviews-grid {
  display: flex;
  gap: 20px;
  transition: transform 0.8s cubic-bezier(0.22,1,0.36,1);
  padding: 20px;
  align-items: flex-start;
}

.review {
  flex: 0 0 auto;
  background: var(--color-bg);
  box-shadow: var(--shadow-light);
  border-radius: 12px;
  padding: 15px 20px;
  max-width: 95%;
  word-wrap: break-word;
}

.stars { color: var(--color-star); }

.prev, .next {
  box-shadow: var(--shadow-light);
  background-color: var(--color-bg);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 20%;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(5px);
  color: var(--color-dark);
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.prev { left: 5px; }
.next { right: 5px; }

/* =========================
   9. TERMIN BUCHEN
========================= */
/* Von oben nach unten: Schädel, Überschrift, Erklärung mit Doctolib, Buchung */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cta > .anatomie-video {
  width: calc(100% - 2rem);
  max-width: 400px; /* Video ist 800 px groß: bis 400 px bleibt es auch auf Retina scharf */
}

/* Erklärungsblock: breiter und flacher */
.cta-description {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: calc(100% - 2rem);
  max-width: 900px;
  padding: 1rem 1.25rem;
}

.cta-description h3 {
  box-shadow: none;
  padding: 0;
  margin: 0;
  font-size: 1rem;
}

.cta-description a {
  flex: 0 0 auto;
  width: 160px;
}

.cta > #booking-container {
  width: calc(100% - 2rem);
  max-width: 900px;
}

#booking-container {
  display: block;
  height: auto;        /* allow container height to grow with content */
  overflow: visible;  /* ensure embedded content isn't clipped */
}

#booking-container p {
  padding: 30px 15px;
  text-align: center;
  margin: 0 auto;
}

/* =========================
   10. ABLAUF
   (.step/.box/.arrow auch auf Tinnitus- und Stimmforschungs-Seite)
========================= */
.ablauf-container {
  text-align: center;
  padding: 2rem 1rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.box {
  max-width: 500px;
  width: 90%;
  background: var(--color-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px;
  border-radius: 10px;
  box-shadow: var(--inner-shadow-light);
  text-align: left;
}

.arrow {
  font-size: 2rem;
  color: var(--color-dark);
  opacity: 0.6;
}

/* =========================
   11. WISSENSCHAFTLICHE PROJEKTE
========================= */
.science-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.science-grid {
  padding: 15px;
}

.science-box {
  background: var(--color-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px;
  border-radius: 10px;
  box-shadow: var(--inner-shadow-light);
  text-align: left;
  margin-top: 40px;
  position: relative;
}

.science-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.science-header .btn {
  width: 60px;
  height: 60px;
}

.science-header .btn img {
  width: 100%;
  height: auto;
}

/* =========================
   12. ANFAHRT
========================= */
.finance {
  text-align: var(--text-align);
}

.location {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
}

.location iframe {
  width: 100%;
  height: 350px;
  border: 0;
}

/* =========================
   13. FOOTER
========================= */
.site-footer {
  color: var(--color-text);
  font-family: var(--font-body);
  padding: 2rem 0;
  margin-top: var(--abschnitt-abstand);
}

/* Footer als Box wie die anderen Karten; ab Tablet drei Spalten */
.footer-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 1rem;
  padding: 2rem 1.5rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-light);
}

.footer-title {
  font-family: var(--font-heading);
  font-size: var(--h3-size);
  font-weight: var(--h3-weight);
  color: var(--color-heading);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-footer a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.site-footer a:hover {
  color: var(--color-heading);
  text-decoration: underline;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer ul li {
  margin-bottom: 0.5rem;
}

.footer-address {
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-box);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--inner-shadow-light);
}

.footer-contact a {
  display: block;
  margin-top: 0.4rem;
}

.footer-bottom {
  margin-top: 3rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text);
  opacity: 0.7;
}

.socials {
  display: flex;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 6px;
}

.social-btn:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
}

/* =========================
   14. THI-SELBSTTEST (Tinnitus-Seite)
========================= */
.thi {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.progress {
  height: 12px;
  background: var(--color-light);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.bar {
  height: 100%;
  width: 0;
  background: green;
  transition: width var(--transition-fast), background var(--transition-fast);
}

.thi table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-bg);
  border-radius: var(--radius);
  box-shadow: var(--inner-shadow-light);
}

.thi th, .thi td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-light);
  text-align: left;
}

.thi td:not(:first-child), .thi th:not(:first-child) {
  text-align: center;
}

#result {
  margin-top: 20px;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

.thi-hinweis {
  font-size: 0.85rem;
  opacity: 0.8;
  text-align: center;
  margin: 12px auto;
}

/* Größere Ja/Manchmal/Nein-Felder; die ganze Zelle ist klickbar */
.thi-wahl {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
}

.thi-wahl input {
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  accent-color: var(--brand-blau-text);
  cursor: pointer;
}

.thi-datenschutz {
  max-width: 900px;
  margin: 0 auto 24px;
  text-align: center;
}

/* Grad-Tabelle unter dem Fragebogen */
.thi-grade {
  margin-top: 24px;
}

.thi-grade caption {
  font-weight: 600;
  padding: 8px 0;
}

/* =========================
   15. INTERESSENFORMULAR (Stimm-Studie)
========================= */
.interesse-formular {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.interesse-formular input[type="email"] {
  padding: 12px;
  border: 1px solid var(--color-light);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
}

.interesse-formular .einwilligung {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.85rem;
}

.interesse-formular .einwilligung input {
  margin-top: 3px;
}

/* =========================
   16. BILDER & MEDIEN — komponentenspezifische Größen (mobile Basis)
   Globale img-Basis: grundlagen.css Abschnitt 5.
   Breitenabhängige Größen: responsiv.css.
========================= */
/* Hero-Anatomiebild */
.hero-image img {
  max-height: 340px;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

/* Profilfoto in seiner Karte */
.profile-image-wrapper picture,
.profile-image-wrapper img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 20px;
  object-fit: cover;
}

/* Anatomie-Videos (Skelett und Schädel): randlos in der Karte.
   Gegen dünne dunkle Linien am Rand (vor allem Safari beim Abspielen):
   - Karte in der Hintergrundfarbe der Videobilder (#fcfcfc statt Weiß), kein Farbsprung am Rand
   - eigene Ebene (isolation/translateZ), damit die abgerundete Ecke das Video sauber abschneidet
   - Video 2 % größer als die Karte: Bruchteil-Pixel am Rand liegen außerhalb und werden abgeschnitten
   - Hintergrund des Video-Elements hell statt Schwarz, falls doch ein Spalt entsteht */
.anatomie-video {
  padding: 0;
  overflow: hidden;
  background: #fcfcfc;
  isolation: isolate;
  transform: translateZ(0);
}

.anatomie-video video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: #fcfcfc;
  transform: scale(1.02);
}

/* Skelett (640 px breit): Karte höchstens 320 px breit, sonst wird es pixelig */
.spine-image.anatomie-video {
  width: calc(100% - 2rem);
  max-width: 320px;
  margin-inline: auto;
}
/* =========================
   17. ABSCHNITTSABSTÄNDE, QUELLEN, BOXEN
========================= */
.abschnitt {
  margin-top: var(--abschnitt-abstand);
}

.sources {
  text-align: center;
}

/* Quellen: Liste mit Punkten in einer Box */
.quellen-liste {
  width: calc(100% - 2rem);
  max-width: 900px;
  margin: 1rem auto;
  padding: 1.5rem 1.5rem 1.5rem 2.5rem;
  text-align: left;
  list-style: disc;
  overflow-wrap: anywhere;
}

.quellen-liste li + li {
  margin-top: 0.75rem;
}

/* Text-Boxen untereinander (z. B. „Was ist Tinnitus?“) */
.boxen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 1rem 0;
}

.boxen .box {
  max-width: 700px;
}

/* Tinnitus: großes Bild oben */
.tinnitus-bild {
  width: calc(100% - 2rem);
  max-width: 520px;
}

.spine-image.tinnitus-bild img {
  max-width: 480px;
  animation: none; /* Header-Bild steht still */
}

/* Englische Startseite: Hinweis unter „Reviews“ */
.reviews-hinweis {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.8;
}

/* FAQ: Einleitungstext mittig unter der Überschrift */
.faq-einleitung {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

/* Boxen ohne Pfeile (z. B. „Interdisziplinäre Behandlung“): gleichmäßiger Abstand */
.boxen-abstand {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
