/* ==================================================================== */
/* Leistungs-Unterseiten                                                */
/* Wird nur geladen, wenn die Seite $hat_leistung_css setzt.            */
/* Alles unter .leistung gescoped - greift nie in die Startseite.       */
/* Vorbild fuer die Lesetypografie: .rechtstext in style.css.           */
/* ==================================================================== */

/* ── Container ── */
.leistung {
  max-width: 65rem;
  margin-inline: auto;
  padding-inline: var(--space-4);
  padding-block: var(--space-8);
}

/* Lange Komposita umbrechen statt abschneiden (WCAG 1.4.10 Reflow) */
.leistung h1,
.leistung h2,
.leistung h3,
.leistung p,
.leistung li {
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* ── Typografie ── */
.leistung h1 {
  margin-top: 0;
  margin-bottom: var(--space-3);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
}

.leistung h2 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
  color: var(--color-text);
  font-weight: 700;
  font-size: var(--fs-xl);
  line-height: 1.2;
}

.leistung h3 {
  margin-top: var(--space-4);
  margin-bottom: var(--space-1);
  color: var(--color-text);
  font-weight: 700;
  font-size: var(--fs-lg);
}

.leistung p {
  margin-top: 0;
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

/* Fliesstext-Listen einruecken (Navigationslisten weiter unten ausgenommen) */
.leistung ul,
.leistung ol {
  margin-top: 0;
  margin-bottom: var(--space-3);
  padding-left: var(--space-4);
}

.leistung li {
  margin-bottom: var(--space-1);
}

/* Inline-Links im Fliesstext */
.leistung a {
  color: var(--color-accent);
}

/* ── Hinweis-Banner (nur auf der englischen Seite sichtbar) ── */
.leistung__hinweis {
  margin-bottom: var(--space-4);
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg-soft);
  border-radius: var(--radius);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

/* ── Breadcrumb ── */
.leistung__breadcrumb {
  margin-bottom: var(--space-4);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.leistung__breadcrumb-liste {
  /* Navigationsliste: Einrueckung der Fliesstext-Regel zuruecknehmen */
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.leistung__breadcrumb-liste li {
  margin-bottom: 0;
}

.leistung__breadcrumb-liste li + li::before {
  content: "/";
  margin-right: var(--space-1);
  color: var(--color-text-muted);
}

.leistung__breadcrumb-liste a {
  color: var(--color-text-muted);
  text-decoration: underline;
}

.leistung__breadcrumb-liste a:hover {
  color: var(--color-accent);
}

/* Aktueller Punkt traegt aria-current und bleibt bewusst ohne Link */
.leistung__breadcrumb-liste [aria-current="page"] {
  color: var(--color-text);
}

/* ── Seiten-Hero: kompakt, kein Vollbild ── */
.leistung-hero {
  padding-block: var(--space-8) var(--space-6);
  text-align: left;
}

.leistung-hero__eyebrow {
  margin: 0 0 var(--space-2);
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 800;
  font-size: var(--fs-lg);
  color: var(--color-accent);
}

/* Die H1 uebernimmt .leistung h1; hier nur der Abstand zur Subline. */
.leistung-hero__subline {
  max-width: 48rem;
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--fs-lg);
}

/* ── Kurzantwort: zitierfaehiger Schluesselblock ── */
.leistung__kurzantwort {
  margin-block: var(--space-6);
  padding-left: var(--space-3);
  border-left: 4px solid var(--color-accent);
}

.leistung__kurzantwort h2 {
  margin-top: 0;
}

.leistung__kurzantwort p {
  margin-bottom: 0;
  font-size: var(--fs-lg);
  line-height: 1.6;
}

/* ── Einzelleistungen ── */
.leistung__einzel {
  margin-bottom: var(--space-4);
}

/* ── Prozess-Liste ── */
.leistung__prozess li {
  margin-bottom: var(--space-2);
}

.leistung__prozess strong {
  color: var(--color-accent);
}

/* ── Diskretionsblock ── */
.leistung__diskretion {
  margin-block: var(--space-6);
  padding: var(--space-4);
  background: var(--color-bg-soft);
  border-radius: var(--radius);
}

/* Innerhalb des Kastens kein zusaetzlicher Aussenabstand der Ueberschrift */
.leistung__diskretion h2 {
  margin-top: 0;
}

.leistung__diskretion p:last-child {
  margin-bottom: 0;
}

/* ── FAQ ── */
/* Akkordeon-Zeile mit Trennlinie unten.
   Abstand laeuft jetzt ueber den Container statt ueber die h3. */
.leistung__faq-item {
  border-bottom: 1px solid var(--color-bg-soft);
}

/* summary: nativen Marker weg (list-style + WebKit-Altbestand),
   Fragetext links, eigener Marker rechts. */
.leistung__faq-frage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2) 0;
  cursor: pointer;
  list-style: none;
}

.leistung__faq-frage::-webkit-details-marker {
  display: none;
}

/* Die generische .leistung h3 bringt margin-top mit - im summary stoert das. */
.leistung__faq-frage h3 {
  margin: 0;
}

.leistung__faq-frage:hover h3 {
  color: var(--color-accent);
}

/* Das globale *:focus-visible greift; hier nur der Versatz, damit der Ring
   bei entferntem list-style sauber um die ganze Zeile laeuft. */
.leistung__faq-frage:focus-visible {
  outline-offset: -3px;
}

/* Marker: Chevron aus zwei Rahmenkanten, zu bleibt er nach unten gerichtet. */
.leistung__faq-frage::after {
  content: "";
  flex: 0 0 auto;
  width: .6em;
  height: .6em;
  margin-right: .25em;
  border-right: 3px solid var(--color-accent);
  border-bottom: 3px solid var(--color-accent);
  transform: translateY(-.15em) rotate(45deg);
  transition: transform 150ms ease;
}

.leistung__faq-item[open] .leistung__faq-frage::after {
  transform: translateY(.1em) rotate(225deg);
}

.leistung__faq-antwort {
  padding: 0 0 var(--space-3);
}

.leistung__faq-antwort p:last-child {
  margin-bottom: 0;
}

/* ── CTAs: Design-Sprache der bestehenden Buttons, moderate Groesse ── */
.leistung-hero__cta,
.leistung__cta-final a {
  display: inline-block;
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-4);
  min-height: 44px;
  font-weight: 800;
  font-size: var(--fs-lg);
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none;
}

/* Hero-CTA: Rahmen-Variante wie .pitch__cta */
.leistung-hero__cta {
  background: var(--color-bg);
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  transition: color .3s ease, border-color .3s ease;
}

.leistung-hero__cta:hover,
.leistung-hero__cta:focus-visible {
  color: #fff;
  border-color: #fff;
}

/* Abschluss-CTA: gefuellte Variante wie .fehler404__link */
.leistung__cta-final a {
  background: var(--color-accent);
  color: var(--color-bg);
  transition: opacity .3s ease;
}

.leistung__cta-final a:hover,
.leistung__cta-final a:focus-visible {
  opacity: .85;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .leistung-hero__cta,
  .leistung__cta-final a,
  .leistung__faq-frage::after {
    transition: none;
  }
}

/* ── Schmale Screens ── */
@media (max-width: 600px) {
  .leistung {
    padding-inline: var(--space-2);
    padding-block: var(--space-6);
  }

  .leistung-hero {
    padding-block: var(--space-4);
  }

  .leistung-hero__cta,
  .leistung__cta-final a {
    display: block;
    text-align: center;
  }
}
