/* ============================================================
   v217 · Einheitliches Detailseiten-Hero- und Navigationssystem
   - identische Bühne für Ledger, Process Mining, Process Intelligence,
     Industrie 5.0 sowie die vorhandenen englischen Detailseiten
   - Reihenfolge: Text → Key Visual → Seitennavigation → Weiter-Link
   - keine Navigation mehr zwischen Hero-Text und Emblem
   ============================================================ */

.subpage-keyvisual .hero-emblem-stack {
  overflow: visible;
}

/* Gemeinsame Hero-Bühne */
.i5-doc .subpage-keyvisual > .module-hero {
  position: relative !important;
  box-sizing: border-box !important;
  min-height: 800px !important;
  margin-bottom: 0 !important;
  padding: 72px 0 0 !important;
}

.i5-doc .subpage-keyvisual .detail-hero-content {
  position: relative !important;
  width: min(var(--max), calc(100% - 40px)) !important;
  max-width: var(--max) !important;
  min-height: 728px !important;
  margin: 0 auto !important;
  text-align: center !important;
}

.i5-doc .subpage-keyvisual .detail-hero-content > .module-eyebrow {
  margin: 0 auto 16px !important;
}

.i5-doc .subpage-keyvisual .detail-hero-content > .module-title {
  max-width: 1120px !important;
  margin: 0 auto !important;
  text-wrap: balance;
}

.i5-doc .subpage-keyvisual .detail-hero-content > .module-lead {
  max-width: 900px !important;
  margin: 22px auto 0 !important;
}

/* Das Key Visual sitzt auf allen Detailseiten auf derselben Achse. */
.i5-doc .subpage-keyvisual .module-hero .hero-emblem-stack,
.process-mining-doc .subpage-keyvisual .module-hero .hero-emblem-stack,
.process-intelligence-doc .subpage-keyvisual .module-hero .hero-emblem-stack {
  position: absolute !important;
  z-index: 4 !important;
  top: 305px !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  transform: none !important;
}

/* Seitennavigation bildet den unteren Abschluss des Key Visuals. */
.detail-page-sequence,
.detail-page-sequence--intelligence {
  position: absolute !important;
  z-index: 8 !important;
  top: 652px !important;
  left: 50% !important;
  width: min(900px, calc(100vw - 48px)) !important;
  min-height: 56px !important;
  margin: 0 !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  pointer-events: none;
}

.detail-page-nav {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 176px;
  min-height: 48px;
  padding: 8px 0;
  color: rgba(218, 210, 189, 0.62);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.25;
  transition: color 180ms ease, transform 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.detail-page-nav--previous {
  justify-content: flex-start;
  text-align: left;
}

.detail-page-nav--next {
  justify-content: flex-end;
  text-align: right;
}

/* Einheitliche Leserichtung: ← vorherige Seite | nächste Seite → */
.detail-page-nav--previous .detail-page-nav__arrow { order: 1; }
.detail-page-nav--previous .detail-page-nav__label { order: 2; }
.detail-page-nav--next .detail-page-nav__label { order: 1; }
.detail-page-nav--next .detail-page-nav__arrow { order: 2; }

.detail-page-nav__arrow {
  flex: 0 0 auto;
  color: rgba(198, 177, 116, 0.76);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.52rem;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0;
}

.detail-page-nav__label {
  display: block;
  max-width: 190px;
}

/* Geführter Erkenntnissprung: sichtbar, aber klar nachgeordnet. */
html body .ledger-doc .ledger-flow-nav--hero,
html body .process-mining-doc .pm-flow-nav--hero {
  position: absolute !important;
  z-index: 9 !important;
  top: 716px !important;
  left: 50% !important;
  right: auto !important;
  width: min(720px, calc(100% - 48px)) !important;
  max-width: 720px !important;
  margin: 0 !important;
  transform: translateX(-50%) !important;
  text-align: center !important;
}

html body .ledger-doc .ledger-flow-nav--hero .ledger-flow-link,
html body .process-mining-doc .pm-flow-nav--hero .pm-flow-link {
  display: inline-flex !important;
  width: auto !important;
  justify-content: center !important;
}

html body .ledger-doc .ledger-flow-nav--hero .ledger-flow-label,
html body .process-mining-doc .pm-flow-nav--hero .pm-flow-label {
  color: rgba(245, 243, 238, 0.29) !important;
}

@media (hover: hover) and (pointer: fine) {
  .detail-page-nav:hover { color: rgba(245, 241, 230, 0.94); }
  .detail-page-nav--previous:hover { transform: translateX(-4px); }
  .detail-page-nav--next:hover { transform: translateX(4px); }
}

.detail-page-nav:focus-visible {
  color: #f5f1e6;
  outline: 1px solid rgba(198, 177, 116, 0.82);
  outline-offset: 5px;
}

@media (max-width: 860px) {
  .i5-doc .subpage-keyvisual > .module-hero {
    min-height: 920px !important;
    padding: 50px 0 0 !important;
  }

  .i5-doc .subpage-keyvisual .detail-hero-content {
    width: min(100% - 28px, var(--max)) !important;
    min-height: 870px !important;
  }

  .i5-doc .subpage-keyvisual .detail-hero-content > .module-lead {
    margin-top: 20px !important;
  }

  .i5-doc .subpage-keyvisual .module-hero .hero-emblem-stack,
  .process-mining-doc .subpage-keyvisual .module-hero .hero-emblem-stack,
  .process-intelligence-doc .subpage-keyvisual .module-hero .hero-emblem-stack {
    top: 410px !important;
  }

  .detail-page-sequence,
  .detail-page-sequence--intelligence {
    top: 728px !important;
    width: calc(100% - 28px) !important;
    min-height: 62px !important;
    align-items: flex-start !important;
  }

  .detail-page-nav {
    box-sizing: border-box;
    width: 46%;
    min-width: 0;
    min-height: 56px;
    gap: 7px;
    padding: 8px 0;
    font-size: 0.54rem;
    letter-spacing: 0.11em;
    line-height: 1.3;
  }

  .detail-page-nav__arrow { font-size: 1.3rem; }
  .detail-page-nav__label {
    max-width: 132px;
    overflow-wrap: normal;
    word-break: normal;
    -webkit-hyphens: none;
    hyphens: none;
  }

  html body .ledger-doc .ledger-flow-nav--hero,
  html body .process-mining-doc .pm-flow-nav--hero {
    top: 810px !important;
    left: 14px !important;
    right: 14px !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
    text-align: left !important;
  }

  html body .ledger-doc .ledger-flow-nav--hero .ledger-flow-link,
  html body .process-mining-doc .pm-flow-nav--hero .pm-flow-link {
    display: flex !important;
    width: 100% !important;
    justify-content: space-between !important;
  }
}

@media (max-width: 480px) {
  .i5-doc .subpage-keyvisual > .module-hero {
    min-height: 930px !important;
    padding-top: 46px !important;
  }

  .detail-page-sequence,
  .detail-page-sequence--intelligence {
    top: 724px !important;
    width: calc(100% - 22px) !important;
  }

  .detail-page-nav {
    font-size: 0.49rem;
    letter-spacing: 0.085em;
  }

  .detail-page-nav__label { max-width: 116px; }

  html body .ledger-doc .ledger-flow-nav--hero,
  html body .process-mining-doc .pm-flow-nav--hero {
    top: 807px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .detail-page-nav { transition: none; }
}

/* Ledger carried a more specific legacy mobile rule. Keep the shared v217
   position authoritative without changing the component itself. */
html[lang="de"] body .ledger-doc .detail-home-hero .ledger-flow-nav--hero {
  top: 716px !important;
}
@media (max-width: 860px) {
  html[lang="de"] body .ledger-doc .detail-home-hero .ledger-flow-nav--hero {
    top: 810px !important;
  }
}
@media (max-width: 480px) {
  html[lang="de"] body .ledger-doc .detail-home-hero .ledger-flow-nav--hero {
    top: 807px !important;
  }
}
