* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--page-background);
  color: var(--page-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

.page-shell {
  width: min(100% - 24px, 1200px);
  margin: 0 auto;
  padding: 20px 0 48px;
}

.hero,
.content-section,
.content-block,
.error-card {
  border: 1px solid #d9e2f0;
  border-radius: 18px;
  background: var(--card-background);
  color: var(--card-text);
  box-shadow: 0 10px 30px rgb(24 32 51 / 8%);
}

.hero {
  display: grid;
  gap: 20px;
  padding: 22px;
  background: linear-gradient(135deg, #ffffff, var(--secondary));
}

.hero-title,
.section-title,
.block-title {
  margin-top: 0;
}

.hero-title {
  margin-bottom: 8px;
  font-size: clamp(1.9rem, 8vw, 3.4rem);
  line-height: 1.05;
}

.hero-subtitle,
.section-subtitle,
.block-subtitle {
  font-weight: 700;
}

.hero-media {
  align-self: center;
}

.content-media {
  width: 100%;
  border-radius: 14px;
}

.content-section {
  margin-top: 20px;
  padding: 18px;
}

.section-header {
  margin-bottom: 16px;
}

.block-grid {
  display: grid;
  gap: 16px;
}

.content-block {
  overflow: hidden;
}

.block-copy {
  padding: 18px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--button-background);
  color: var(--button-text);
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
}

.marquee {
  overflow: hidden;
  border-radius: 10px;
  background: var(--secondary);
  padding: 8px 0;
  white-space: nowrap;
}

.marquee span {
  display: inline-block;
  min-width: 100%;
  padding-left: 100%;
  animation: matrix-marquee var(--marquee-duration, 30s) linear infinite;
}

.marquee-right span {
  padding-right: 100%;
  padding-left: 0;
  animation-name: matrix-marquee-right;
}

.marquee-pause:hover span {
  animation-play-state: paused;
}

.hero-marquee,
.section-marquee,
.block-marquee {
  margin: 12px 0;
}

@keyframes matrix-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

@keyframes matrix-marquee-right {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

.symbol {
  margin-right: 0.3em;
}

.site-footer {
  width: min(100% - 24px, 1200px);
  margin: 0 auto;
  padding: 0 0 32px;
  text-align: center;
}

.footer-description {
  margin: 6px 0 0;
}

.error-card {
  margin-bottom: 20px;
  padding: 16px;
}

@media (min-width: 760px) {
  .page-shell {
    padding-top: 32px;
  }

  .hero {
    grid-template-columns: 0.9fr 1.1fr;
    padding: 32px;
  }

  .hero-media {
    grid-column: 1;
    grid-row: 1;
  }

  .hero-copy {
    grid-column: 2;
    grid-row: 1;
  }

  .block-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ------------------------------------------------------------
   Mobile-Overflow-Schutz für Hero, Lauftexte und lange Inhalte
   ------------------------------------------------------------ */
.hero,
.hero-copy,
.hero-media,
.content-section,
.section-header,
.content-block,
.block-copy {
  min-width: 0;
  max-width: 100%;
}

.hero-copy,
.section-header,
.block-copy {
  overflow-wrap: anywhere;
  word-break: normal;
}

.hero-description,
.hero-subtitle,
.section-description,
.section-subtitle,
.block-description,
.block-subtitle,
.block-body {
  max-width: 100%;
  white-space: normal;
}

.marquee {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.marquee span {
  max-width: none;
  white-space: nowrap;
}

@media (max-width: 759px) {
  .hero {
    overflow: hidden;
  }

  .hero-copy,
  .hero-media {
    width: 100%;
  }
}

/* ------------------------------------------------------------
   Seitennavigation
   ------------------------------------------------------------ */
html {
  scroll-behavior: smooth;
}

.hero,
.content-section,
.special-section,
.site-footer {
  scroll-margin-top: calc(
    var(--navigation-height, 64px) + 20px
  );
}

.site-navigation {
  position: relative;
  z-index: 1000;
  border-bottom: 1px solid #d9e2f0;
  background: rgb(255 255 255 / 94%);
  color: var(--page-text, #182033);
  backdrop-filter: blur(10px);
}

.site-navigation.is-sticky {
  position: sticky;
  top: 0;
}

.navigation-inner {
  display: flex;
  width: min(
    calc(
      100% - var(--page-padding-mobile, 12px)
      - var(--page-padding-mobile, 12px)
    ),
    var(--content-width, 1200px)
  );
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 auto;
}

.site-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.7rem;
  color: var(--page-text, #182033);
  font-weight: 800;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.site-brand-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  object-fit: cover;
}

.site-brand-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.navigation-toggle {
  display: inline-flex;
  position: relative;
  z-index: 1002;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9e2f0;
  border-radius: var(--button-radius, 14px);
  background: var(--button-background, #3b82f6);
  color: var(--button-text, #ffffff);
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.navigation-toggle-close {
  display: none;
}

.navigation-toggle[aria-expanded="true"] .navigation-toggle-open {
  display: none;
}

.navigation-toggle[aria-expanded="true"] .navigation-toggle-close {
  display: inline;
}

.navigation-panel,
.navigation-panel[aria-hidden="true"] {
  display: none;
}

.navigation-panel.is-open,
.navigation-panel.is-open[aria-hidden="false"] {
  display: flex;
  position: fixed;
  z-index: 1001;
  top: var(--navigation-height, 64px);
  right: 0;
  bottom: 0;
  left: 0;
  min-width: 0;
  max-height: calc(
    100vh - var(--navigation-height, 64px)
  );
  max-height: calc(
    100svh - var(--navigation-height, 64px)
  );
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding:
    18px
    max(18px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  background-color: var(--page-background, #f7f9fc);
  background-image: var(--page-background-image, none);
  background-size: var(--page-background-size, cover);
  background-position: var(--page-background-position, center);
  background-repeat: var(--page-background-repeat, no-repeat);
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.navigation-link {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  border: 1px solid #d9e2f0;
  border-radius: var(--button-radius, 14px);
  background: var(--card-background, #ffffff);
  color: var(--card-text, #182033);
  padding: 12px 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.navigation-link:focus-visible,
.navigation-toggle:focus-visible,
.site-brand:focus-visible {
  outline: 3px solid var(--primary, #3b82f6);
  outline-offset: 3px;
}

body.navigation-open {
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 759px) {
  .site-navigation {
    background: var(--card-background, #ffffff);
    backdrop-filter: none;
  }
}

@media (min-width: 760px) {
  .navigation-inner {
    width: min(
      calc(
        100% - var(--page-padding-tablet, 24px)
        - var(--page-padding-tablet, 24px)
      ),
      var(--content-width, 1200px)
    );
  }

  .navigation-toggle {
    display: none;
  }

  .navigation-panel,
  .navigation-panel[aria-hidden="true"],
  .navigation-panel[aria-hidden="false"] {
    display: flex;
    position: static;
    max-height: none;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    overflow: visible;
    padding: 0;
    background: transparent;
  }

  .navigation-link {
    width: auto;
    min-height: 40px;
    border: 0;
    background: transparent;
    padding: 8px 10px;
  }

  .navigation-link:hover {
    background: var(--secondary, #dcebff);
  }

  body.navigation-open {
    overflow: auto;
    touch-action: auto;
  }
}

@media (min-width: 1100px) {
  .navigation-inner {
    width: min(
      calc(
        100% - var(--page-padding-desktop, 32px)
        - var(--page-padding-desktop, 32px)
      ),
      var(--content-width, 1200px)
    );
  }
}

/* ------------------------------------------------------------
   Matrix-Bereichskarussell
   Mobil: 1 Block je Bereich
   Desktop: 1/2/3 Spalten, ab 4 Blöcken Navigation
   ------------------------------------------------------------ */
.section-header {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.section-heading-copy {
  min-width: 0;
}

.section-carousel {
  min-width: 0;
  max-width: 100%;
}

.section-carousel-viewport {
  min-width: 0;
  max-width: 100%;
  outline: none;
}

html.js .section-carousel-viewport {
  overflow: hidden;
  touch-action: pan-y;
  transition: height 220ms ease;
}

.section-carousel-track {
  min-width: 0;
}

html:not(.js) .section-carousel-track {
  display: grid;
  gap: 16px;
}

html.js .section-carousel-track {
  display: flex;
  align-items: stretch;
  gap: 16px;
  transition: transform 280ms ease;
  will-change: transform;
}

.section-carousel .content-block {
  min-width: 0;
  max-width: 100%;
  height: auto;
}

html.js .section-carousel .content-block {
  flex: 0 0 100%;
}

.section-carousel-controls {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.section-carousel-controls[hidden] {
  display: none !important;
}

.section-carousel-button {
  display: inline-flex;
  min-height: 46px;
  min-width: 108px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #b9c7dc;
  border-radius: 13px;
  background: #ffffff;
  color: var(--card-text);
  padding: 9px 13px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgb(24 32 51 / 7%);
}

.section-carousel-button:not(:disabled):hover {
  border-color: var(--primary);
  background: var(--secondary);
}

.section-carousel-button:focus-visible,
.section-carousel-viewport:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.section-carousel-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.section-carousel-status {
  min-width: 62px;
  color: var(--card-text);
  font-size: 0.92rem;
  font-weight: 800;
  text-align: center;
}

.empty-section {
  border: 1px dashed #b9c7dc;
  border-radius: 14px;
  background: rgb(255 255 255 / 55%);
  padding: 18px;
  color: var(--card-text);
  text-align: center;
}

@media (max-width: 759px) {
  html:not(.js) .section-carousel-track {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-carousel-controls {
    order: 2;
  }

  /*
   * MOBILE-CAROUSEL-NOWRAP-FIX
   * Die Beschriftungen „Zurück“ und „Weiter“ dürfen nicht
   * innerhalb eines Wortes umbrochen werden.
   */
  .section-carousel-button {
    min-width: max-content;
    flex: 1 0 auto;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
  }

  .section-carousel-button > span {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
  }

  .section-carousel-status {
    min-width: 44px;
    flex: 0 1 auto;
  }
}

@media (min-width: 760px) {
  .section-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .section-heading-copy {
    flex: 1 1 auto;
  }

  .section-carousel-controls {
    width: auto;
    flex: 0 0 auto;
  }

  .section-carousel-button {
    min-width: 104px;
  }

  html:not(.js) .section-carousel-track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  html.js .section-carousel[data-visible-count="1"] .content-block {
    flex-basis: 100%;
  }

  html.js .section-carousel[data-visible-count="2"] .content-block {
    flex-basis: calc((100% - 16px) / 2);
  }

  html.js .section-carousel[data-visible-count="3"] .content-block {
    flex-basis: calc((100% - 32px) / 3);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.js .section-carousel-track,
  html.js .section-carousel-viewport {
    transition: none;
  }
}

/* ------------------------------------------------------------
   Individuelles Button-Design
   ------------------------------------------------------------ */
.button-row {
  align-items: stretch;
}

.button {
  background-repeat: no-repeat;
}

.button-full-width {
  width: 100%;
  flex: 1 0 100%;
}

/* ------------------------------------------------------------
   Bilder, Videos, Audio und externe Einbettungen
   ------------------------------------------------------------ */
.media-item {
  display: grid;
  min-width: 0;
  gap: 8px;
  margin: 0 0 16px;
}

.media-item:last-child {
  margin-bottom: 0;
}

.media-action {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.media-ratio-16-9 .content-media,
.media-ratio-16-9 .content-embed {
  aspect-ratio: 16 / 9;
}

.media-ratio-9-16 .content-media,
.media-ratio-9-16 .content-embed {
  aspect-ratio: 9 / 16;
}

.media-ratio-1-1 .content-media,
.media-ratio-1-1 .content-embed {
  aspect-ratio: 1 / 1;
}

.media-ratio-4-3 .content-media,
.media-ratio-4-3 .content-embed {
  aspect-ratio: 4 / 3;
}

.media-item .content-media,
.media-item .content-embed {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
  border-radius: var(--card-radius);
  background: #eef3f9;
}

.media-item .content-embed {
  min-height: 280px;
}

.media-ratio-auto .content-embed {
  aspect-ratio: 16 / 9;
}

.content-audio {
  width: 100%;
  max-width: 100%;
}

.media-item figcaption {
  color: var(--card-text);
  font-size: 0.9rem;
  line-height: 1.45;
  opacity: 0.82;
}

.external-media-link,
.external-media-card {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #b9c7dc;
  border-radius: 13px;
  background: #ffffff;
  color: var(--card-text);
  padding: 11px 14px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.external-media-link:hover,
.external-media-card:hover {
  border-color: var(--primary);
  background: var(--secondary);
}

/* ------------------------------------------------------------
   Konsolidiertes Seitenlayout und Design
   ------------------------------------------------------------ */
.hero,
.content-section,
.content-block,
.special-section,
.site-footer {
  min-width: 0;
  max-width: 100%;
  background-clip: padding-box;
}

.matrix-text-field {
  max-width: 100%;
  overflow-wrap: anywhere;
  background-position: center;
}

.content-section,
.content-block {
  overflow: hidden;
}

.hero[style*="--matrix-design-background-image"],
.content-section[style*="--matrix-design-background-image"],
.content-block[style*="--matrix-design-background-image"],
.special-section[style*="--matrix-design-background-image"],
.site-footer[style*="--matrix-design-background-image"] {
  background-image: var(--matrix-design-background-image) !important;
  background-size: var(--matrix-design-background-size, cover) !important;
  background-position: var(--matrix-design-background-position, center) !important;
  background-repeat: var(--matrix-design-background-repeat, no-repeat) !important;
}

body {
  background-color: var(--page-background, #f7f9fc);
  background-image: var(--page-background-image, none);
  background-size: var(--page-background-size, cover);
  background-position: var(--page-background-position, center);
  background-repeat: var(--page-background-repeat, no-repeat);
  color: var(--page-text, #182033);
  font-size: var(--base-font-size, 16px);
  line-height: var(--base-line-height, 1.5);
}

.page-shell {
  display: grid;
  width: min(
    calc(
      100% - var(--page-padding-mobile, 12px)
      - var(--page-padding-mobile, 12px)
    ),
    var(--content-width, 1200px)
  );
  gap: var(--section-gap-mobile, 20px);
  margin: 0 auto;
  padding-top: var(--page-padding-mobile, 12px);
  padding-bottom: calc(
    var(--page-padding-mobile, 12px)
    + var(--page-padding-mobile, 12px)
  );
}

.page-shell > .content-section {
  margin-top: 0;
}

.hero,
.content-section,
.content-block,
.special-section,
.site-footer,
.error-card {
  border-radius: var(--card-radius, 18px);
  box-shadow: var(
    --card-shadow,
    0 8px 26px rgb(31 52 81 / 10%)
  );
}

.hero.matrix-inherit-global,
.content-section.matrix-inherit-global,
.content-block.matrix-inherit-global,
.special-section.matrix-inherit-global,
.site-footer.matrix-inherit-global {
  background-color: var(--card-background, #ffffff);
  background-image: none;
  color: var(--card-text, #182033);
  border-radius: var(--card-radius, 18px);
  box-shadow: var(
    --card-shadow,
    0 8px 26px rgb(31 52 81 / 10%)
  );
  padding: var(--card-padding-mobile, 18px);
}

.site-footer.matrix-inherit-global {
  border: 1px solid #d9e2f0;
}

.hero.matrix-inherit-global :is(
  .hero-title,
  .hero-subtitle,
  .hero-description,
  .hero-body
),
.special-section.matrix-inherit-global :is(
  .special-section-title,
  .special-section-subtitle,
  .special-section-description,
  .special-section-body
),
.site-footer.matrix-inherit-global :is(
  .footer-title,
  .footer-subtitle,
  .footer-description,
  .footer-body
),
.content-section.matrix-inherit-global :is(
  .section-title,
  .section-subtitle,
  .section-description
),
.content-block.matrix-inherit-global :is(
  .block-title,
  .block-subtitle,
  .block-description,
  .block-body
) {
  color: inherit;
}

.button {
  border-radius: var(--button-radius, 14px);
}

.button.button-global-style {
  background-color: var(--button-background, #3b82f6);
  background-image: none;
  color: var(--button-text, #ffffff);
  border-radius: var(--button-radius, 14px);
}

.hero-title {
  font-size: var(
    --hero-title-size,
    clamp(2.35rem, 6vw, 3.75rem)
  );
}

.section-title {
  font-size: var(
    --section-title-size,
    clamp(1.45rem, 3.5vw, 1.95rem)
  );
}

.block-title {
  font-size: var(--block-title-size, 1.2rem);
}

.special-section-title,
.footer-title {
  font-size: var(
    --special-title-size,
    clamp(1.4rem, 3.5vw, 1.8rem)
  );
}

.hero-copy,
.special-section-copy,
.footer-copy {
  display: grid;
  min-width: 0;
  gap: calc(var(--block-gap-mobile, 16px) * 0.7);
}

.hero-copy > *,
.special-section-copy > *,
.footer-copy > * {
  margin-top: 0;
  margin-bottom: 0;
}

.special-section,
.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--block-gap-mobile, 16px);
  align-items: start;
}

.special-section {
  background: var(--card-background, #ffffff);
  color: var(--card-text, #182033);
}

.special-section-media,
.footer-media {
  display: grid;
  min-width: 0;
  gap: var(--block-gap-mobile, 16px);
}

.site-footer {
  width: min(
    calc(
      100% - var(--page-padding-mobile, 12px)
      - var(--page-padding-mobile, 12px)
    ),
    var(--content-width, 1200px)
  );
  margin-top: var(--section-gap-mobile, 20px);
  margin-right: auto;
  margin-bottom: var(--page-padding-mobile, 12px);
  margin-left: auto;
  text-align: left;
}

.site-footer .footer-copy,
.site-footer .footer-media,
.site-footer .button-row,
.site-footer .media-item,
.site-footer .marquee {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.hero-body,
.special-section-body,
.footer-body {
  white-space: pre-wrap;
}

.block-grid,
html:not(.js) .section-carousel-track,
html.js .section-carousel-track {
  gap: var(--block-gap-mobile, 16px);
}

@media (min-width: 760px) {
  .page-shell {
    width: min(
      calc(
        100% - var(--page-padding-tablet, 24px)
        - var(--page-padding-tablet, 24px)
      ),
      var(--content-width, 1200px)
    );
    gap: var(--section-gap-desktop, 28px);
    padding-top: var(--page-padding-tablet, 24px);
    padding-bottom: calc(
      var(--page-padding-tablet, 24px)
      + var(--page-padding-tablet, 24px)
    );
  }

  .hero.matrix-inherit-global,
  .content-section.matrix-inherit-global,
  .content-block.matrix-inherit-global,
  .special-section.matrix-inherit-global,
  .site-footer.matrix-inherit-global {
    padding: var(--card-padding-desktop, 22px);
  }

  .hero-copy,
  .special-section-copy,
  .footer-copy {
    gap: calc(var(--block-gap-desktop, 18px) * 0.7);
  }

  .special-section:has(.special-section-media),
  .site-footer:has(.footer-media) {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(0, 0.75fr);
    align-items: center;
  }

  .special-section-media,
  .footer-media {
    gap: var(--block-gap-desktop, 18px);
  }

  .site-footer {
    width: min(
      calc(
        100% - var(--page-padding-tablet, 24px)
        - var(--page-padding-tablet, 24px)
      ),
      var(--content-width, 1200px)
    );
    margin-top: var(--section-gap-desktop, 28px);
    margin-bottom: var(--page-padding-tablet, 24px);
  }

  .block-grid,
  html:not(.js) .section-carousel-track,
  html.js .section-carousel-track {
    gap: var(--block-gap-desktop, 18px);
  }

  html.js .section-carousel[data-visible-count="2"] .content-block {
    flex-basis: calc(
      (100% - var(--block-gap-desktop, 18px)) / 2
    );
  }

  html.js .section-carousel[data-visible-count="3"] .content-block {
    flex-basis: calc(
      (
        100% - var(--block-gap-desktop, 18px)
        - var(--block-gap-desktop, 18px)
      ) / 3
    );
  }
}

@media (min-width: 1100px) {
  .page-shell {
    width: min(
      calc(
        100% - var(--page-padding-desktop, 32px)
        - var(--page-padding-desktop, 32px)
      ),
      var(--content-width, 1200px)
    );
    padding-top: var(--page-padding-desktop, 32px);
    padding-bottom: calc(
      var(--page-padding-desktop, 32px)
      + var(--page-padding-desktop, 32px)
    );
  }

  .site-footer {
    width: min(
      calc(
        100% - var(--page-padding-desktop, 32px)
        - var(--page-padding-desktop, 32px)
      ),
      var(--content-width, 1200px)
    );
    margin-bottom: var(--page-padding-desktop, 32px);
  }
}

/* ------------------------------------------------------------
   Phase 10C: mobile Hero-Reihenfolge
   ------------------------------------------------------------ */
@media (max-width: 759px) {
  .hero[data-mobile-order="media_first"] .hero-media {
    order: -1;
  }

  .hero[data-mobile-order="media_first"] .hero-copy {
    order: 0;
  }

  .hero[data-mobile-order="text_first"] .hero-copy {
    order: -1;
  }

  .hero[data-mobile-order="text_first"] .hero-media {
    order: 0;
  }
}

@media (min-width: 760px) {
  .hero .hero-copy,
  .hero .hero-media {
    order: 0;
  }
}

/* ------------------------------------------------------------
   Phase 10D: Hero-Lauftext auf Desktop kompakt halten
   ------------------------------------------------------------ */
@media (min-width: 760px) {
  /*
   * Das hohe Landingvideo bestimmt die Höhe der Hero-Zeile.
   * Der Textbereich darf diese Höhe nicht übernehmen, weil
   * CSS Grid sonst seine inneren Zeilen auseinanderzieht.
   */
  .hero-copy {
    align-self: start;
    align-content: start;
    height: auto;
    min-height: 0;
  }

  .hero-copy .hero-marquee {
    align-self: start;
    min-height: 0;
    height: auto;
  }

  .hero-copy .hero-marquee span {
    line-height: 1.35;
  }
}

/* ------------------------------------------------------------
   Universelle Button-Aktionen und Layouts
   ------------------------------------------------------------ */
.button-row {
  width: 100%;
  min-width: 0;
}

.button-row.button-layout-flow {
  display: flex;
}

.button-row.button-layout-grid {
  display: grid;
  grid-template-columns: repeat(
    var(--button-columns-mobile, 1),
    minmax(0, 1fr)
  );
  align-items: stretch;
}

.button-row.button-align-center {
  justify-content: center;
}

.button-row.button-align-end {
  justify-content: flex-end;
}

.button-row.button-layout-grid.button-align-center,
.button-row.button-layout-grid.button-align-end {
  justify-content: stretch;
}

.button-row.button-layout-equal.button-layout-flow .button {
  flex: 1 1 12rem;
}

.button-row.button-layout-grid .button {
  width: 100%;
  min-width: 0;
}

.button-row.button-layout-grid .button-full-width,
.button-row .button-full-width {
  grid-column: 1 / -1;
}

.button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  line-height: 1.25;
  text-align: center;
}

.button:focus-visible {
  outline: 3px solid color-mix(in srgb, currentColor 45%, white);
  outline-offset: 3px;
}

.button-symbol {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 1.25em;
  margin-right: 0.45em;
  font-size: 1.05em;
}

.button-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.button-audio[aria-pressed="true"] {
  box-shadow:
    0 0 0 3px rgb(255 255 255 / 55%) inset,
    0 7px 20px rgb(24 32 51 / 18%);
  transform: translateY(-1px);
}

.button-copy.is-copy-confirmed .button-label::after {
  content: " ✓";
}

@media (min-width: 760px) {
  .button-row.button-layout-grid {
    grid-template-columns: repeat(
      var(--button-columns-desktop, 2),
      minmax(0, 1fr)
    );
  }
}

/* ------------------------------------------------------------
   Universelle Medien-Anordnung
   ------------------------------------------------------------ */
.block-media,
.special-section-media {
  width: 100%;
  min-width: 0;
}

.block-media.media-align-stretch,
.special-section-media.media-align-stretch {
  justify-items: stretch;
}

.block-media.media-align-start,
.special-section-media.media-align-start {
  justify-items: start;
}

.block-media.media-align-center,
.special-section-media.media-align-center {
  justify-items: center;
}

.block-media.media-align-end,
.special-section-media.media-align-end {
  justify-items: end;
}

.block-media .media-item,
.special-section-media .media-item {
  width: min(100%, var(--matrix-media-max-width, 100%));
}

.special-section.special-media-placement-above,
.special-section.special-media-placement-below {
  grid-template-columns: minmax(0, 1fr);
}

.special-section.special-media-placement-above .special-section-media {
  order: -1;
}

.special-section.special-media-placement-below .special-section-media {
  order: 1;
}

@media (min-width: 760px) {
  .special-section.special-media-placement-above,
  .special-section.special-media-placement-below {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}

/* ------------------------------------------------------------
   Universelle Social-Profil-Erkennung und Profilkarten
   ------------------------------------------------------------ */
.social-native-profile,
.social-profile-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.social-native-profile {
  display: grid;
  min-width: 0;
  justify-items: center;
  overflow: visible;
}

.social-native-profile .tiktok-profile-embed,
.social-native-profile .tiktok-embed,
.social-native-profile iframe {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 auto !important;
}

.instagram-profile-wrap,
.x-profile-wrap,
.x-post-wrap,
.pinterest-profile-wrap,
.pinterest-pin-wrap,
.twitch-profile-wrap,
.facebook-page-wrap {
  width: 100%;
  min-width: 0;
}

.instagram-profile-wrap {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.instagram-profile-embed,
.instagram-profile-wrap .instagram-media,
.instagram-profile-wrap iframe {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 540px !important;
  margin: 0 auto !important;
}

.x-profile-wrap iframe,
.x-post-wrap iframe,
.pinterest-profile-wrap > span,
.pinterest-pin-wrap > span {
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: auto !important;
}

.twitch-channel-embed {
  width: 100% !important;
  min-height: 300px !important;
  aspect-ratio: 16 / 9 !important;
  border: 0;
}

.facebook-page-embed {
  width: 100% !important;
  min-height: 500px !important;
  height: 500px !important;
  aspect-ratio: auto !important;
  border: 0;
}

.social-native-fallback-link {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 540px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 16px;
  border: 1px solid rgb(24 32 51 / 16%);
  border-radius: var(--card-radius);
  background: var(--social-card-background, #1f4f86);
  color: var(--social-card-foreground, #ffffff);
  box-shadow: 0 8px 24px rgb(24 32 51 / 14%);
  text-decoration: none;
}

.social-native-fallback-link:hover {
  filter: brightness(1.04);
}

.social-native-fallback-link:focus-visible {
  outline: 3px solid rgb(255 255 255 / 78%);
  outline-offset: -4px;
}

.social-profile-card {
  --social-card-background: #1f4f86;
  --social-card-foreground: #ffffff;
  --social-card-muted: rgb(255 255 255 / 82%);
  --social-card-accent: rgb(255 255 255 / 22%);
  overflow: hidden;
  border: 1px solid rgb(24 32 51 / 16%);
  border-radius: var(--card-radius);
  background: var(--social-card-background);
  color: var(--social-card-foreground);
  box-shadow: 0 8px 24px rgb(24 32 51 / 14%);
}

.social-profile-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 16px;
  color: inherit;
  text-decoration: none;
}

.social-profile-link:hover {
  background: rgb(255 255 255 / 10%);
}

.social-profile-link:focus-visible {
  outline: 3px solid rgb(255 255 255 / 78%);
  outline-offset: -4px;
}

.social-profile-badge {
  display: inline-flex;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--social-card-accent);
  border-radius: 15px;
  background: var(--social-card-accent);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.social-profile-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.social-profile-copy strong,
.social-profile-copy span,
.social-profile-copy small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.social-profile-copy strong {
  font-size: 1.08rem;
}

.social-profile-copy span {
  font-weight: 700;
}

.social-profile-copy small {
  color: var(--social-card-muted);
  font-size: 0.82rem;
}

.social-profile-arrow {
  font-size: 1.4rem;
  font-weight: 900;
}

.youtube-subscribe-wrap {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--social-card-accent);
  background: #ffffff;
  padding: 8px 12px;
}

.social-platform-tiktok {
  --social-card-background:
    linear-gradient(135deg, #111111 0%, #241326 60%, #003b44 100%);
  --social-card-foreground: #ffffff;
}

.social-platform-instagram {
  --social-card-background:
    linear-gradient(135deg, #833ab4 0%, #e1306c 52%, #f77737 100%);
}

.social-platform-youtube {
  --social-card-background: #ff0000;
}

.social-platform-whatsapp {
  --social-card-background: #128c4a;
}

.social-platform-bigo {
  --social-card-background:
    linear-gradient(135deg, #00bde7 0%, #1976d2 52%, #7b2ff7 100%);
  --social-card-foreground: #ffffff;
}

.social-platform-facebook {
  --social-card-background: #0866ff;
}

.social-platform-x {
  --social-card-background: #111111;
}

.social-platform-threads {
  --social-card-background: #1b1b1b;
}

.social-platform-snapchat {
  --social-card-background: #fffc00;
  --social-card-foreground: #111111;
  --social-card-muted: rgb(17 17 17 / 75%);
  --social-card-accent: rgb(17 17 17 / 12%);
}

.social-platform-twitch {
  --social-card-background: #9146ff;
}

.social-platform-telegram {
  --social-card-background: #229ed9;
}

.social-platform-discord {
  --social-card-background: #5865f2;
}

.social-platform-linkedin {
  --social-card-background: #0a66c2;
}

.social-platform-pinterest {
  --social-card-background: #bd081c;
}

.social-platform-bluesky {
  --social-card-background: #1185fe;
}


/* ------------------------------------------------------------
   Lisa-Bavaria-Standarddesign

   Ausschließlich Darstellung: keine Inhalte, Links oder Medien.
   Alle Farben, Radien, Abstände, Schatten und der Seitenhintergrund
   bleiben über das globale Seitendesign im Editor veränderbar.
   ------------------------------------------------------------ */
:root {
  --matrix-line:
    color-mix(in srgb, var(--primary, #55aee8) 28%, transparent);
  --matrix-panel:
    color-mix(in srgb, var(--card-background, #ffffff) 88%, transparent);
  --matrix-panel-soft:
    color-mix(in srgb, var(--secondary, #e8f7ff) 74%, transparent);
  --matrix-muted:
    color-mix(in srgb, var(--page-text, #14314c) 64%, transparent);

  /*
   * CMS-GLOBAL-DESIGN-GRADIENT-FIX
   * Diese Verläufe werden ausschließlich aus den im Editor
   * gepflegten globalen Farben erzeugt.
   */
  --matrix-global-surface-gradient:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--card-background, #ffffff) 82%, transparent),
      color-mix(in srgb, var(--secondary, #e8f7ff) 74%, transparent)
    );
  --matrix-global-block-gradient:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--card-background, #ffffff) 90%, transparent),
      color-mix(in srgb, var(--secondary, #e8f7ff) 68%, transparent)
    );
}

body {
  background-attachment: fixed;
}

.site-navigation {
  border-bottom-color: var(--matrix-line);
  background:
    color-mix(in srgb, var(--secondary, #e8f7ff) 82%, white 18%);
  color: var(--page-text, #14314c);
  backdrop-filter: blur(10px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--page-text, #14314c);
  font-weight: 900;
}

.site-brand:not(.has-custom-icon):not(.without-icon)::before {
  content: "";
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  background:
    linear-gradient(
      135deg,
      transparent 42%,
      #ffffff 42% 58%,
      transparent 58%
    ),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--primary, #55aee8) 82%, white),
      var(--button-background, #1f7fbd)
    );
  box-shadow:
    0 12px 28px
    color-mix(in srgb, var(--button-background, #1f7fbd) 18%, transparent);
}

.site-brand-icon {
  box-shadow:
    0 12px 28px
    color-mix(in srgb, var(--button-background, #1f7fbd) 18%, transparent);
}

.navigation-link {
  color:
    color-mix(in srgb, var(--page-text, #14314c) 88%, white 12%);
  font-weight: 850;
}

.navigation-link:hover {
  color: var(--button-background, #1f7fbd);
  background: var(--matrix-panel-soft);
}

.navigation-toggle {
  border-color: var(--matrix-line);
  border-radius: var(--button-radius, 48px);
  background-image:
    linear-gradient(
      135deg,
      var(--primary, #55aee8),
      var(--button-background, #1f7fbd)
    );
  font-weight: 900;
  box-shadow:
    0 12px 28px
    color-mix(in srgb, var(--button-background, #1f7fbd) 18%, transparent);
}

.hero,
.content-section,
.content-block,
.special-section,
.site-footer,
.error-card {
  border: 1px solid var(--matrix-line);
}

/*
 * CMS-GLOBAL-DESIGN-GRADIENT-FIX
 * Nur Container mit aktivierter globaler Designvererbung erhalten
 * den aus Karten- und Sekundärfarbe berechneten Verlauf.
 * Individuelle Farben, Verläufe und Hintergrundbilder bleiben unberührt.
 */
.hero.matrix-inherit-global,
.content-section.matrix-inherit-global,
.special-section.matrix-inherit-global,
.site-footer.matrix-inherit-global {
  background-color: var(--matrix-panel);
  background-image: var(--matrix-global-surface-gradient);
}

.hero.matrix-inherit-global {
  overflow: hidden;
}

.content-block.matrix-inherit-global {
  background-color: var(--matrix-panel);
  background-image: var(--matrix-global-block-gradient);
}

.hero-title {
  margin-bottom: 0.55rem;
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.hero-subtitle,
.section-subtitle,
.block-subtitle {
  font-weight: 900;
}

.hero-description,
.section-description,
.block-description,
.special-section-description,
.footer-description,
.media-item figcaption {
  color: var(--matrix-muted);
}

.marquee {
  border: 1px solid var(--matrix-line);
  border-radius: 999px;
  background:
    color-mix(in srgb, var(--card-background, #ffffff) 72%, transparent);
}

.button,
.button.button-global-style {
  min-height: 48px;
  border-radius: var(--button-radius, 48px);
  font-weight: 900;
}

.button.button-global-style {
  background-color: var(--button-background, #1f7fbd);
  background-image:
    linear-gradient(
      135deg,
      var(--primary, #55aee8),
      var(--button-background, #1f7fbd)
    );
  box-shadow:
    0 12px 28px
    color-mix(in srgb, var(--button-background, #1f7fbd) 18%, transparent);
}

.button:hover,
.button.button-global-style:hover {
  transform: translateY(-1px);
}

.section-carousel-button,
.external-media-link,
.external-media-card {
  border-color: var(--matrix-line);
  border-radius: var(--button-radius, 48px);
  background:
    color-mix(in srgb, var(--card-background, #ffffff) 82%, transparent);
  color: var(--page-text, #14314c);
}

.section-carousel-button:not(:disabled):hover,
.external-media-link:hover,
.external-media-card:hover {
  border-color: var(--primary, #55aee8);
  background: var(--matrix-panel-soft);
}

.media-item .content-media,
.media-item .content-embed,
.social-profile-card,
.tiktok-profile-wrap,
.instagram-profile-wrap,
.x-profile-wrap,
.x-post-wrap,
.pinterest-profile-wrap,
.pinterest-pin-wrap,
.twitch-profile-wrap,
.facebook-page-wrap {
  border-radius: max(14px, calc(var(--card-radius, 26px) - 8px));
}

.empty-section {
  border-color: var(--matrix-line);
  border-radius: max(14px, calc(var(--card-radius, 26px) - 8px));
  background:
    color-mix(in srgb, var(--card-background, #ffffff) 55%, transparent);
}

@media (min-width: 760px) {
  .hero {
    grid-template-columns:
      minmax(0, 1.15fr)
      minmax(320px, 0.85fr);
    gap: 1.2rem;
    align-items: stretch;
  }

  .hero-media {
    align-self: stretch;
  }
}

/* ------------------------------------------------------------
   Mobile Navigation: Vollbild-Menü nicht im Sticky-Header fangen
   ------------------------------------------------------------ */
@media (max-width: 759px) {
  .site-navigation {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
