/* Logopädie: Schwerpunkte & Detail-Popups · ausschließlich auf logopaedie.html geladen. */
.card-grid--therapies {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.therapy-card {
  min-height: 228px;
  padding: 29px 29px 27px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.therapy-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 13px 35px rgba(42, 28, 41, .075);
  border-color: #dccbda;
}


.therapy-card h3 {
  font-size: clamp(1.3rem, 1.75vw, 1.55rem);
  line-height: 1.26;
  hyphens: auto;
  overflow-wrap: break-word;
}

.therapy-card p {
  font-size: .94rem;
  line-height: 1.64;
}

.therapy-card__action,
.therapy-card .therapy-card__action {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  margin-top: auto;
  padding: 20px 0 1px;
  background: none;
  color: var(--brand);
  font-family: var(--font-body);
  font-size: .86rem;
  font-weight: 750;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: color .2s, gap .2s, border-color .2s;
}

.therapy-card__action:hover {
  color: var(--brand-deep);
  border-color: currentColor;
  gap: 16px;
}

body.therapy-dialog-open {
  overflow: hidden;
}

.therapy-dialog {
  width: min(784px, calc(100% - 36px));
  max-width: 784px;
  max-height: min(840px, calc(100dvh - 40px));
  padding: 0;
  border: 1px solid #eee5ec;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 28px 100px rgba(22, 13, 25, .28);
  overflow: hidden;
  overscroll-behavior: contain;
}

.therapy-dialog::backdrop {
  background: rgba(31, 24, 35, .70);
  backdrop-filter: blur(4px);
}

.therapy-dialog__shell {
  display: flex;
  flex-direction: column;
  max-height: min(840px, calc(100dvh - 40px));
  overflow: hidden;
}

.therapy-dialog__header {
  flex: 0 0 auto;
  position: relative;
  padding: 32px 70px 27px 39px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(115deg, #fdfafc 0%, #f8f1f7 100%);
}

.therapy-dialog__header .eyebrow {
  font-size: .67rem;
  letter-spacing: .16em;
}

.therapy-dialog__header h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.55rem);
  line-height: 1.12;
  margin: 14px 0 10px;
  max-width: 640px;
  hyphens: auto;
  overflow-wrap: break-word;
}

.therapy-dialog__lead {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--brand-deep);
  font-weight: 720;
}

.therapy-dialog__close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid #e7d6e4;
  background: #fff;
  color: var(--ink);
  border-radius: 50%;
  font-family: var(--font-body);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1;
  transition: background .2s, color .2s;
}

.therapy-dialog__close:hover {
  background: var(--brand);
  color: #fff;
}

.therapy-dialog__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 31px 39px 35px;
  font-size: .98rem;
  line-height: 1.73;
  scrollbar-color: #c8a5c2 transparent;
}

.therapy-dialog__body > p {
  max-width: 665px;
}

.therapy-dialog__body > p + p {
  margin-top: 12px;
}

.therapy-dialog__body h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.45;
  margin: 27px 0 13px;
}

.therapy-dialog__list {
  display: grid;
  gap: 9px;
}

.therapy-dialog__list li {
  border-left: 3px solid #d6afd0;
  background: #faf7fa;
  padding: 13px 16px;
  border-radius: 0 4px 4px 0;
  line-height: 1.63;
}

.therapy-dialog__list strong,
.therapy-dialog__outro strong {
  color: var(--ink);
  font-weight: 780;
}

.therapy-dialog__related {
  color: #715669;
  font-style: italic;
}

.therapy-dialog__note {
  padding: 11px 14px;
  margin-top: 21px;
  color: #5d5160;
  background: #f1f7fa;
  border-left: 3px solid var(--blue);
  border-radius: 0 4px 4px 0;
  font-size: .92rem;
}

.therapy-dialog__outro {
  margin-top: 20px;
  padding: 15px 18px;
  background: #f6f0ec;
  border-radius: 4px;
}

.therapy-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}

.therapy-dialog__actions .btn {
  min-height: 46px;
}

@media (max-width: 980px) {
  .card-grid--therapies {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .card-grid--therapies {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  /* Verhindert überbreite Grid-Kinder auf sehr schmalen Displays. */
  .page-hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-hero__grid > * {
    min-width: 0;
  }

  .therapy-card {
    min-height: 0;
    padding: 25px;
  }

  .therapy-dialog {
    width: calc(100% - 22px);
    max-height: calc(100dvh - 22px);
    border-radius: 6px;
  }

  .therapy-dialog__shell {
    max-height: calc(100dvh - 22px);
  }

  .therapy-dialog__header {
    padding: 22px 55px 21px 22px;
  }

  .therapy-dialog__header h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin: 12px 0 8px;
  }

  .therapy-dialog__header .eyebrow {
    font-size: .61rem;
  }

  .therapy-dialog__header .eyebrow::before {
    width: 18px;
  }

  .therapy-dialog__close {
    top: 15px;
    right: 12px;
    width: 36px;
    height: 36px;
  }

  .therapy-dialog__body {
    padding: 21px 22px 26px;
    font-size: .93rem;
    line-height: 1.65;
  }

  .therapy-dialog__body h3 {
    margin-top: 24px;
  }

  .therapy-dialog__actions .btn {
    white-space: normal;
  }
}

@media (max-width: 390px) {
  .therapy-dialog__actions {
    flex-direction: column;
  }
  .therapy-dialog__actions .btn {
    width: 100%;
  }
}
