dialog[open] {
  box-sizing: border-box;
  width: min(40rem, calc(100vw - 4rem));
  max-width: calc(100vw - 4rem);
}

dialog[open] > .flex {
  flex-wrap: wrap;
}

dialog[open] > p {
  width: 100%;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
}

@media (max-width: 639px) {
  dialog[open] {
    top: 2rem;
    left: 50%;
    right: auto;
    width: calc(100vw - 4rem);
    max-width: calc(100vw - 4rem);
    margin: 0;
    transform: translateX(-50%);
  }

  dialog[open] > .flex > button {
    width: 100%;
    justify-content: center;
  }
}

/* Selbst gehostete Schriften (ersetzt Google Fonts) */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(/physioampark/static/fonts/open-sans-latin-var.woff2) format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/physioampark/static/fonts/poppins-latin-300.woff2) format("woff2");
}

/* Leistungskarten als echte Links mit <img> statt Hintergrundbild */
.pap-card {
  color: inherit;
  text-decoration: none;
}

.pap-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.pap-card-shade {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.9));
}

:where(.pap-btn-link) {
  display: inline-block;
  text-align: center;
}

/* Inhaltsbausteine */
.pap-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4d7c0f;
  margin-bottom: 0.25rem;
}

.pap-link {
  font-weight: 600;
  color: #4d7c0f;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pap-link:hover {
  color: #3f6212;
}

.pap-list,
.pap-steps {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
}

.pap-list {
  list-style: disc;
}

.pap-steps {
  list-style: decimal;
}

.pap-list li,
.pap-steps li {
  margin-top: 0.375rem;
}

.pap-faq {
  margin-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
}

.pap-faq details {
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 0;
}

.pap-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: #111827;
}

.pap-faq details p {
  margin-top: 0.5rem;
}

.pap-related {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.pap-note {
  margin-top: 2rem;
  padding: 1rem;
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
  border-radius: 0.375rem;
}

.pap-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.pap-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  background: #65a30d;
  color: #f9fafb;
  font-weight: 600;
  transition: background-color 150ms;
}

.pap-button:hover {
  background: #4d7c0f;
}

/* Häufige Beschwerden */
.pap-concerns {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.pap-concern {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  transition: border-color 150ms;
}

.pap-concern:hover {
  border-color: #65a30d;
}

.pap-concern strong {
  color: #111827;
}

.pap-concern span {
  font-size: 0.875rem;
  color: #4b5563;
}

/* Hero-Bild als <img> statt CSS-Hintergrund (Alt-Text, WebP) */
.hero-image.pap-hero {
  position: relative;
  overflow: hidden;
  background-image: none;
}

.pap-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.pap-hero-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.pap-hero > :not(.pap-hero-img):not(.pap-hero-shade) {
  position: relative;
}

/* Auf einen Blick */
.pap-facts {
  margin-top: 1rem;
  display: grid;
  gap: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}

.pap-fact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.125rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid #e5e7eb;
}

.pap-fact:first-child {
  border-top: 0;
}

.pap-fact dt {
  font-weight: 600;
  color: #111827;
}

.pap-fact dd {
  margin: 0;
  color: #374151;
}

@media (min-width: 768px) {
  .pap-fact {
    grid-template-columns: 11rem 1fr;
    gap: 1rem;
  }
}

#auf-einen-blick,
#beschwerden,
#patienteninformationen {
  scroll-margin-top: 6rem;
}
