/*
  Zentrales Stylesheet für die Physiotherapie-Praxis
  Dieses Stylesheet definiert Variablen, Grundlayouts und Komponenten.
  Es folgt einem Mobile-First-Ansatz und nutzt moderne CSS-Funktionen wie
  CSS Custom Properties, Flexbox, Grid und clamp() für flüssige Typografie.
*/

/* Farbpalette und Maße */
:root {
  /* Farbpalette: warmere, einladende Töne */
  --color-primary: #000000;        /* gedecktes Türkis als Grundfarbe */
  --color-accent: #d4a855;         /* warme Koralle für Buttons und Links */
  --color-accent-dark: #b58f45;    /* dunklere Variante der Akzentfarbe */
  --color-background: #fdfbf5;     /* Grundhintergrund */
  --color-light: rgba(255, 255, 255, 0.78);          /* Off-white für helle Bereiche */
  --color-dark: #2f2f2f;           /* Primärer Fließtext */
  --color-muted: #5d5d5d;          /* Sekundärer Text */
  --color-border: #dcdcdc;         /* zarte Linien */
  --border-radius: 8px;
  --max-width: 1200px;

  /* Typografie */
  --font-family-base: 'Google Sans', sans-serif;
  --font-family-heading: 'Google Sans', sans-serif;
}

/* Grundlegende Reset-Styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: #fdfbf5;
}

body {
  margin: 0;
  font-family: var(--font-family-base);
  color: var(--color-dark);
  background: transparent;
  line-height: 1.6;
  position: relative;
  isolation: isolate;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('../img/background.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: -2;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  will-change: transform;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(253, 251, 245, 0.42);
  z-index: -1;
  pointer-events: none;
}


@media (min-width: 1024px) {
  body::before {
    background-image: url('../img/background_landscape.jpg'), url('../img/background.jpg');
    background-position: center center;
    background-size: cover;
  }
}

/* Überschriften */
h1, h2, h3, h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-family: var(--font-family-heading);
  font-weight: 600;
  color: #000000;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--color-dark);
}

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

a:hover,
a:focus {
  text-decoration: underline;
}

/* Utility */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

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

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(249,249,246,0.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  z-index: 1000;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 600;
  font-family: var(--font-family-heading);
  color: var(--color-primary);
}

nav ul {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav a {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  color: var(--color-dark);
  font-weight: 600;
  text-decoration: none;
}

nav a:hover,
nav a:focus {
  background-color: #6c615a;
  color: #ffffff;
  text-decoration: none;
}

nav a.active {
  background-color: #6c615a;
  color: #ffffff;
}

/* Buttons */
.btn {
  background-color: var(--color-accent);
  color: #ffffff !important;
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease;
  display: inline-block;
  border: none;
  cursor: pointer;
}

.btn:hover,
.btn:focus {
  background-color: var(--color-accent-dark);
  text-decoration: none;
}

/* Accordion Styles
   ---------------------------------------------------------------------------
   Für längere Beschreibungen einzelner Therapieformen wird ein Akkordeon
   genutzt. Die Header lassen sich anklicken und öffnen oder schließen den
   jeweiligen Abschnitt. Ein Plus-Symbol kennzeichnet geschlossene Elemente
   und rotiert beim Öffnen. */
.accordion {
  margin-top: 2rem;
}

.accordion-item {
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  overflow: hidden;

  /* sorgt dafür, dass beim Ankern genügend Abstand unter dem fixen Header bleibt */
  scroll-margin-top: 80px;
}

.accordion-header {
  /* WICHTIGER FIX:
     Text ist bei dir direkt im Header (kein span) und das Plus kommt via ::after.
     Daher rechts Platz reservieren und Umbruch direkt hier erlauben. */
  display: block;
  position: relative;
  width: 100%;
  padding: 1rem 2.8rem 1rem 1rem; /* rechts Platz für das Plus */
  background-color: var(--color-light);
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-family-heading);
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.accordion-header::after {
  content: '+';
  position: absolute;
  right: 1rem;
  top: 1rem;               /* statt 50% mittig: besser bei mehrzeiligen Titeln */
  transform: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-accent);
  transition: transform 0.2s ease;
}

.accordion-item.open .accordion-header::after {
  transform: rotate(45deg);
}

.accordion-body {
  padding: 1rem;
  display: none;
  background-color: rgba(253, 251, 245, 0.9);
  border-top: 1px solid var(--color-border);
}

.accordion-item.open .accordion-body {
  display: block;
}

/* Mehr-erfahren Links in Kacheln */
.more-link {
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: underline;
  display: inline-block;
  margin-top: 0.5rem;
}

.more-link:hover,
.more-link:focus {
  color: var(--color-accent-dark);
}

/* Liste für Mein Anspruch */
.list-features {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem 1.5rem;
}

.list-features li {
  position: relative;
  padding-left: 1.2rem;
}

.list-features li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-accent);
}

/* Infobox
   ---------------------------------------------------------------------------
   Zur Hervorhebung wichtiger Hinweise und Links wird eine Info-Box mit
   abgesetztem Rand verwendet. */
.info-box {
  background-color: var(--color-light);
  border-left: 4px solid var(--color-primary);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin: 1.5rem 0;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background-color: #6c615a;
  border-radius: 3px;
  margin: 3px auto;
}

/* Main offset due to fixed header */
main {
  padding-top: 60px;
}

/* Hero */
.hero {
  position: relative;
  min-height: 420px;
  background-color: var(--color-light);
  background-image: url('../img/praxis/hero.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(249,249,246,0.78);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--color-muted);
}

/* Sections */
section {
  padding: 3rem 0;
}

section .container > p:last-child {
  margin-bottom: 0;
}

/* Cards Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: var(--color-light);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,0.03);
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-content p {
  color: var(--color-muted);
}

.card-content .btn {
  margin-top: auto;
}

/*
 * Typografie-Verbesserungen
 *
 * Lange Überschriften und Card-Titel dürfen nicht abgeschnitten werden.
 * Wichtig: Keine Umbrüche mitten im Wort (wie bei overflow-wrap:anywhere),
 * sondern nur dann umbrechen, wenn es wirklich nötig ist.
 */
h1,
h2,
h3 {
  overflow-wrap: break-word; /* bricht nur, wenn nötig */
  word-break: normal;
  hyphens: auto;
}
/* Card-Layout verfeinern: Einheitliche Titel- und Textbereiche */
.card-content h3 {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  min-height: 3.2em; /* ungefähr zwei Zeilen */
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.card-content p {
  min-height: 6em;   /* sorgt für eine ähnlich hohe Textfläche */
  line-height: 1.45;
  margin-bottom: 1rem;
}

/* Kartenbilder für konsistente Ausschnitte */
.card img {
  object-fit: cover;
  object-position: center;
}

/* Content blocks */
.feature-list {
  display: grid;
  gap: 0.75rem;
  padding-left: 1.2rem;
}

.feature-list li {
  margin-bottom: 0.25rem;
}

/* Info cards / boxes */
.info-box {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 1rem 1.1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

/* CTA blocks */
.cta-box {
  background-color: #fff;
  border-left: 4px solid var(--color-accent);
  border-radius: var(--border-radius);
  padding: 1.2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

/* Forms */
form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

form input,
form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  margin-bottom: 0.75rem;
  font: inherit;
  background: #fff;
}

form textarea {
  min-height: 110px;
  resize: vertical;
}

/* Contact page layout helpers (replacing inline styles) */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.contact-col {
  flex: 1 1 300px;
}

.map-wrap {
  width: 100%;
  position: relative;
  padding-bottom: 56.25%;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  background: #fff;
  margin-top: 1rem;
}

.map-wrap iframe {
  border: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.contact-form button {
  margin-top: 1rem;
}

/* Footer */
footer {
  background-color: #6c615a;
  color: #ffffff;
  padding: 2rem 0;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

footer h4 {
  color: #ffffff;
  margin-bottom: 0.5rem;
}

footer p,
footer li,
footer a {
  color: rgba(255,255,255,0.95);
  font-size: 0.95rem;
}

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

footer li {
  margin-bottom: 0.35rem;
}

footer a:hover,
footer a:focus {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.18);
  margin-top: 1.5rem;
  padding-top: 1rem;
  font-size: 0.9rem;
}
/*neu heilmassage*/
.detail-section {
  padding: 3.5rem 0;
  background: #f7f6f3;
  border-top: 1px solid #e8e3da;
}

.detail-card {
  width: 100%;
  margin: 0;
  background: #ffffff;
  border: 1px solid #e7dfd2;
  border-radius: 18px;
  padding: 2.2rem 2.2rem 2rem 2.2rem;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
}

.detail-card + .detail-card {
  margin-top: 2rem;
}

.detail-section h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e9dfd0;
}

.detail-section h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.7rem;
}

.detail-section p {
  line-height: 1.75;
}

.detail-section ul {
  margin: 0.6rem 0 1.2rem 1.2rem;
  padding: 0;
}

.detail-section li {
  margin-bottom: 0.45rem;
  line-height: 1.65;
}

.detail-section .info-box {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  background: #faf7f2;
  border: 1px solid #e4dacb;
  border-left: 4px solid #d98669;
  border-radius: 10px;
}

.detail-anchor-offset {
  scroll-margin-top: 110px;
}

/* Buttons in den Karten einheitlich */
.card .btn {
  display: inline-block;
}

/* Mehr Luft zwischen Kartenbereich und den Detailsektionen */
.section-light + .detail-section {
  padding-top: 5rem;
}

/* Mobile Feinschliff */
@media (max-width: 768px) {
  .detail-section {
    padding: 3.2rem 0;
  }

  .detail-card {
    width: 100%;
    padding: 1.35rem 1.15rem 1.25rem 1.15rem;
    border-radius: 14px;
  }

  .detail-section h2 {
    font-size: 1.45rem;
  }

  .detail-section h3 {
    font-size: 1.08rem;
  }
}

/*ende neu heilmasseage */
/* Media Queries */
@media (max-width: 768px) {

  body::before {
    background-position: center top;
  }

  header {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .nav-toggle {
    display: flex;
  }

  nav ul {
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(249,249,246,0.98);
    border-top: 1px solid var(--color-border);
    padding: 0.5rem 1rem 1rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.06);
  }

  nav ul.show {
    display: flex;
  }

  nav a {
    border-radius: 6px;
    margin: 0.15rem 0;
  }

  nav a.btn {
    text-align: center;
    margin-top: 0.35rem;
  }

  .hero {
    min-height: 360px;
    background-position: center;
  }

  .hero-content p {
    font-size: 1rem;
  }

  section {
    padding: 2.3rem 0;
  }

  .contact-grid {
    flex-direction: column;
    gap: 1.25rem;
  }

  .contact-col {
    flex: 1 1 auto;
  }

  .map-wrap {
    padding-bottom: 70%;
  }

  .card-content h3 {
    min-height: auto;
  }

  .card-content p {
    min-height: auto;
  }

  /* Mobile-Akkordeon: noch etwas kompakter und sauberer */
  .accordion-header {
    padding: 0.95rem 2.6rem 0.95rem 0.95rem;
    line-height: 1.3;
  }

  .accordion-header::after {
    right: 0.9rem;
    top: 0.9rem;
    font-size: 1.35rem;
  }
}

/* ===== Mobile Header Fix (Ausrichtung + Abstand unter fixed Header) ===== */
@media (max-width: 768px) {
  header {
    height: 74px;
  }

  .nav-container {
    min-height: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
  }

  .nav-logo {
    display: flex;
    align-items: center;
    margin: 0;
    line-height: 1.1;
  }

  .nav-toggle {
    position: static !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    gap: 5px;
    flex-shrink: 0;
    align-self: center;
  }

  .nav-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    margin: 0;
    border-radius: 2px;
  }

  nav ul {
    top: 74px;
  }

  main {
    padding-top: 74px;
  }

  .hero {
    margin-top: 0;
    min-height: 340px;
    padding-top: 2.25rem;
    padding-bottom: 2rem;
    display: flex;
    align-items: center;
  }

  .hero-content {
    width: 100%;
    padding: 0 1rem;
    text-align: center;
  }

  .hero-content h1 {
    font-size: clamp(1.8rem, 6vw, 2.3rem);
    line-height: 1.12;
    margin-bottom: 0.5rem;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }

  .hero-content p {
    max-width: 30ch;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.35;
  }
}

/* ===== Tablet / iPad Portrait Header Fix ===== */
@media (max-width: 1024px) {
  header {
    min-height: 78px;
  }

  .nav-container {
    min-height: 78px;
    height: auto;
    padding: 0 16px;
    gap: 14px;
  }

  .nav-logo {
    display: block;
    font-size: clamp(1.05rem, 2.2vw, 1.55rem);
    line-height: 1.08;
    max-width: calc(100% - 64px);
    flex: 1 1 auto;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    gap: 5px;
    flex: 0 0 44px;
  }

  .nav-toggle span {
    width: 28px;
    height: 3px;
    margin: 0;
    border-radius: 2px;
  }

  nav {
    margin-left: auto;
  }

  nav ul {
    position: absolute;
    top: 78px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(249,249,246,0.98);
    border-top: 1px solid var(--color-border);
    padding: 0.6rem 1rem 1rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.06);
  }

  nav ul.show {
    display: flex;
  }

  nav a {
    border-radius: 6px;
    margin: 0.15rem 0;
  }

  nav a.btn {
    text-align: center;
    margin-top: 0.35rem;
  }

  main {
    padding-top: 78px;
  }
}


/* ===== Startseite Karten: 2-spaltig auf Tablets, höhere Bilder ===== */
@media (min-width: 769px) and (max-width: 1199px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card img {
    height: 255px;
  }
}

@media (min-width: 1200px) {
  .card img {
    height: 180px;
  }
}


/* Page-specific hero images */
.page-physiotherapie .hero {
  background-image: url('../img/hero/hero-physiotherapie-v2.jpg?v=20260401a');
  background-position: center 32%;
}

.page-heilmassage .hero {
  background-image: url('../img/hero/hero-heilmassage-v2.jpg?v=20260401a');
  background-position: center 22%;
}

.page-gesichtslesen .hero {
  background-image: url('../img/hero/hero-gesichtslesen-v2.jpg?v=20260401a');
  background-position: right center;
}

.page-gesichtslesen .hero::before {
  background: rgba(249,249,246,0.68);
}

.page-unterrichten .hero {
  background-image: url('../img/hero/hero-unterrichten-v2.jpg?v=20260401a');
  background-position: center 42%;
}
