/* Homepage: latest news + method quick-access grid */
.home-page {
  color: var(--sc-ink, #1a1a1a);
}

.home-page__section {
  margin: 0 0 2.25rem;
}

.home-page__section > h2 {
  margin: 0 0 0.85rem;
  color: var(--sc-burgundy, #b50c40);
  font-size: 1.15rem;
  line-height: 1.35;
}

.home-page__lead {
  margin: 0 0 1.25rem;
  color: var(--sc-muted, #5c5c5c);
  font-size: 1rem;
  line-height: 1.5;
}

.home-news-cta {
  margin: 1rem 0 0;
}

.home-news-cta a,
a.home-cta,
.layout-topnav .head-stage .stage-slideshow__cta.home-cta,
.layout-topnav .head-stage a.stage-slideshow__cta {
  display: inline-block;
  box-sizing: border-box;
  padding: 0.7rem 1.35rem;
  font-size: 1.1rem;
  line-height: 1.25;
  font-weight: 700;
  text-decoration: none;
  border: 0;
}

.home-news-cta a,
a.home-cta {
  background: #535352; /* footer claim badge grey (footer.svg) */
  color: #fff !important;
}

.home-news-cta a:hover,
.home-news-cta a:focus-visible,
a.home-cta:hover,
a.home-cta:focus-visible {
  background: #3f3f3e; /* darker grey hover, same family as footer badge */
  outline: none;
}

/* Tighten single news teaser on home */
.layout-topnav .frame-home-page .news-list-container > .news-list-item {
  margin: 0;
  padding: 0 0 0.5rem;
  border-bottom: 0;
}

.layout-topnav .frame-home-page .news-list-container > .news-list-item:nth-child(n) .news-img-wrap {
  float: left;
  margin: 0 1rem 0.75rem 0;
  max-width: 280px;
}

/* No container query: desktop content column is ~672px and would falsely trigger compact */
.home-page__methods {
  /* layout hook for homepage methods sections */
}
/* —— Zertifizierungsanträge (hellblau, Pastille/Pill) —— */
.home-page {
  --sc-sky: #e8f4fa;
  --sc-sky-mid: #d9eef7;
  --sc-sky-soft: #f3f9fc;
}

.home-page__applications {
  margin: 1.5rem 0 2.25rem;
  /* Extra right padding so content clears the pill end; left stays rectangular */
  padding: 1.45rem 2.75rem 1.6rem 1.25rem;
  background:
    linear-gradient(165deg, var(--sc-sky-soft) 0%, var(--sc-sky) 48%, var(--sc-sky-mid) 100%);
  /* Soft sky edge (badges are solid fills without hard CSS borders) */
  border: 1px solid #b7d7e8;
  /* Sandwich stripe: darker left accent (as before pastille) */
  border-left: 3px solid #7eb8d4;
  /* Pastille only on the right; left edge stays sharp like before */
  border-radius: 0 9999px 9999px 0;
  box-sizing: border-box;
}

.home-page__applications > h2 {
  margin: 0 0 0.65rem;
  color: var(--sc-burgundy, #b50c40);
  font-size: 1.15rem;
  line-height: 1.35;
}

.home-page__applications .home-page__lead {
  margin: 0 0 1rem;
  max-width: 40rem;
}

.home-page__applications .home-news-cta {
  margin: 0;
}

.layout-topnav #mainContent_mitte:has(.home-page__applications) {
  max-width: none;
}

@media (max-width: 700px) {
  .home-page__applications {
    /* Keep right pill; avoid clipping; left stays sharp */
    padding: 1.25rem 1.65rem 1.35rem 1rem;
    margin: 1.25rem 0 1.75rem;
    border-radius: 0 2.25rem 2.25rem 0;
  }
}


/* —— Applications pastille parallax (staging trial) ——
   Enabled via JS class .sc-pastille-parallax-on on .home-page__applications.
   Kill switch: data-parallax="off" on the section, or class sc-no-parallax on <html>. */
.home-page__applications.sc-pastille-parallax-on {
  will-change: transform;
  backface-visibility: hidden;
}

@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .home-page__applications.sc-pastille-parallax-on {
    will-change: auto;
    transform: none !important;
  }
}


.home-methods__grid {
  display: grid;
  /* Fixed preferred tile width: wrap when narrow; do not shrink as viewport grows */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 14rem));
  justify-content: center;
  justify-items: stretch;
  gap: 0.65rem;
  margin: 0 0 1.5rem;
}

.home-methods__item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  min-height: 4.25rem;
  padding: 0.75rem 0.9rem;
  background: #e8e8e8;
  border-left: 0;
  box-sizing: border-box;
  color: var(--sc-ink, #1a1a1a) !important;
  text-decoration: none !important;
  transition: background 0.15s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.home-methods__item:hover,
.home-methods__item:focus-visible {
  background: #ececec;
  outline: none;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  .home-methods__item {
    transition: background 0.15s ease;
  }

  .home-methods__item:hover,
  .home-methods__item:focus-visible {
    transform: none;
    box-shadow: none;
  }
}

.home-methods__item:hover .home-methods__code,
.home-methods__item:focus-visible .home-methods__code {
  color: #3f3f3e;
}

.home-methods__code {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: #535352; /* footer claim badge grey */
  line-height: 1.15;
}

.home-methods__label {
  display: block;
  margin-top: 0.25rem;
  max-width: 100%;
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--sc-muted, #5c5c5c);
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.home-methods__note {
  margin: -0.5rem 0 1rem;
  font-size: 0.88rem;
  color: var(--sc-muted, #5c5c5c);
}

/* Compact codes-only: viewport-based (not container), so desktop sidebar column (~672px) keeps labeled 14rem tiles */
@media (max-width: 700px) {
  .home-methods__grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.5rem), 5.5rem));
    justify-content: center;
    justify-items: stretch;
  }

  .home-methods__item {
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;
    padding: 0.65rem 0.4rem;
    text-align: center;
  }

  .home-methods__label {
    display: none;
  }

  .layout-topnav .frame-home-page .news-list-container > .news-list-item:nth-child(n) .news-img-wrap {
    float: none;
    margin: 0 0 0.75rem;
    max-width: 100%;
  }
}

/* Homepage: full content column width (not article reading-width 42rem).
   Otherwise past ~900px viewport #mainContent_mitte shrinks to 672px and
   news-stage visible count drops while the window gets wider. */
.layout-topnav #mainContent_mitte:has(.frame-home-page),
.layout-topnav #mainContent_mitte:has(.news-stage),
.layout-topnav #mainContent_mitte:has(.home-page__methods) {
  max-width: none;
}

/* —— Aktuelles Textbühne (3 tiles + arrows) —— */
.news-stage {
  margin: 0 0 0.5rem;
}

.news-stage__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.85rem;
}

.news-stage__title {
  margin: 0;
  color: var(--sc-burgundy, #b50c40);
  font: 700 1.15rem/1.35 "Lato", Arial, Helvetica, sans-serif;
}

.news-stage__controls {
  display: flex;
  gap: 0.35rem;
}

.news-stage__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--sc-line, #e6e6e6);
  background: #fff;
  color: var(--sc-burgundy, #b50c40);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.news-stage__btn svg {
  display: block;
  fill: currentColor;
}

.news-stage__btn:hover:not(:disabled),
.news-stage__btn:focus-visible:not(:disabled) {
  background: #faf5f7;
  border-color: var(--sc-burgundy, #b50c40);
  outline: none;
}

.news-stage__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.news-stage__viewport {
  overflow: hidden;
  width: 100%;
  container-type: inline-size;
  container-name: newsstage;
}

.news-stage__track {
  display: flex;
  gap: 0.85rem;
  justify-content: flex-start;
  transition: transform 0.35s ease;
  will-change: transform;
}

.news-stage__track.is-centered {
  justify-content: center;
  width: 100%;
  transform: none !important;
}

.news-stage__card {
  /* Fallback before JS; exact widths come from news-stage.js */
  flex: 0 0 calc((100cqw - 1.7rem) / 3);
  width: calc((100cqw - 1.7rem) / 3);
  max-width: calc((100cqw - 1.7rem) / 3);
  min-width: 0;
  margin: 0;
  background: #f7f7f7;
  border-top: 3px solid var(--sc-burgundy, #b50c40);
  box-sizing: border-box;
}

/* Match JS: min card 260px + 0.85rem gap → 1 / 2 / 3 / 4 */
@container newsstage (max-width: 533px) {
  .news-stage__card {
    flex-basis: 100cqw;
    width: 100cqw;
    max-width: 100cqw;
  }
}

@container newsstage (min-width: 534px) and (max-width: 807px) {
  .news-stage__card {
    flex-basis: calc((100cqw - 0.85rem) / 2);
    width: calc((100cqw - 0.85rem) / 2);
    max-width: calc((100cqw - 0.85rem) / 2);
  }
}

@container newsstage (min-width: 808px) and (max-width: 1119px) {
  .news-stage__card {
    flex-basis: calc((100cqw - 1.7rem) / 3);
    width: calc((100cqw - 1.7rem) / 3);
    max-width: calc((100cqw - 1.7rem) / 3);
  }
}

/* 4 tiles only when stage is clearly wide enough */
@container newsstage (min-width: 1120px) {
  .news-stage__card {
    flex-basis: calc((100cqw - 2.55rem) / 4);
    width: calc((100cqw - 2.55rem) / 4);
    max-width: calc((100cqw - 2.55rem) / 4);
  }
}

.news-stage__card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit !important;
  text-decoration: none !important;
}

.news-stage__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.85rem 0.9rem 1rem;
}

.news-stage__date {
  color: var(--sc-muted, #5c5c5c);
  font: 600 0.78rem/1.2 "Lato", Arial, Helvetica, sans-serif;
  letter-spacing: 0.02em;
  text-align: left;
}

.news-stage__headline {
  margin: 0;
  color: var(--sc-ink, #1a1a1a);
  font: 700 0.98rem/1.35 "Lato", Arial, Helvetica, sans-serif;
  text-align: left;
}

.news-stage__teaser {
  margin: 0;
  color: var(--sc-muted, #5c5c5c);
  font: 400 0.88rem/1.45 "Lato", Arial, Helvetica, sans-serif;
  flex: 1 1 auto;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.news-stage__more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
  color: var(--sc-burgundy, #b50c40);
  font: 700 0.85rem/1.2 "Lato", Arial, Helvetica, sans-serif;
}

.news-stage__more svg {
  fill: currentColor;
}

.news-stage__card-link:hover .news-stage__headline,
.news-stage__card-link:focus-visible .news-stage__headline {
  color: var(--sc-burgundy, #b50c40);
}

.news-stage__card-link:focus-visible {
  outline: 2px solid var(--sc-burgundy, #b50c40);
  outline-offset: 2px;
}

.news-stage__empty {
  padding: 1rem 0;
  color: var(--sc-muted, #5c5c5c);
}

/* Hide duplicate heading above plugin if still present */
.frame-home-page .home-page__news-head h2 {
  display: none;
}



/* Startseite: Raute unterhalb der Bühne (nicht als Overlay) */
.layout-topnav .head-stage #banner {
  overflow: visible;
}

/* Parallax sets a fixed #banner height for inner-page images; on the homepage
   the static .head-tagline sits below the slideshow inside #banner and must
   remain in normal flow (otherwise it overflows and overlaps the lead text). */
.layout-topnav .head-stage #banner.sc-parallax-on {
  height: auto;
}

.layout-topnav .head-stage .head-tagline {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  display: block;
  width: auto;
  min-width: 0;
  max-width: 420px;
  /* flush left to stage/#page edge (no content pad) */
  margin: 0.75rem var(--sc-pad, 1.25rem) 0.75rem 0;
  pointer-events: auto;
}

.layout-topnav .head-stage .head-tagline img {
  width: auto !important;
  max-width: min(420px, 100%) !important;
  height: auto !important;
}


/* —— Startseite: Bühnen-Slideshow —— */
.layout-topnav .head-stage .stage-slideshow {
  position: relative;
  width: 100%;
  height: var(--sc-stage-height, clamp(220px, 32vw, 320px));
  overflow: hidden;
  background: var(--sc-stage, #2a2a2a);
}

.layout-topnav .head-stage .stage-slideshow__slide {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  display: block;
  margin: 0;
  padding: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  z-index: 0;
  pointer-events: none;
}

.layout-topnav .head-stage .stage-slideshow__slide.is-active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}

.layout-topnav .head-stage .stage-slideshow__image {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover;
  object-position: center;
  display: block;
}

.layout-topnav .head-stage .stage-slideshow__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: 100%;
  max-width: none;
  padding: 2.25rem var(--sc-pad, 1.25rem) 2.7rem;
  background: linear-gradient(
    to top,
    rgba(20, 20, 20, 0.72) 0%,
    rgba(20, 20, 20, 0.35) 55%,
    rgba(20, 20, 20, 0) 100%
  );
  color: #fff;
  box-sizing: border-box;
}

.layout-topnav .head-stage .stage-slideshow__headline {
  margin: 0;
  max-width: min(34rem, 85%);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.layout-topnav .head-stage .stage-slideshow__text {
  margin: 0;
  max-width: min(34rem, 85%);
  font-size: clamp(0.85rem, 1.6vw, 0.98rem);
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.layout-topnav .head-stage .stage-slideshow__cta.home-cta,
.layout-topnav .head-stage a.stage-slideshow__cta {
  align-self: flex-end;
  margin-top: 0.25rem;
  margin-left: auto;
  background: var(--sc-orange, #f9b000);
  color: #fff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.layout-topnav .head-stage .stage-slideshow__cta.home-cta:hover,
.layout-topnav .head-stage .stage-slideshow__cta.home-cta:focus-visible,
.layout-topnav .head-stage a.stage-slideshow__cta:hover,
.layout-topnav .head-stage a.stage-slideshow__cta:focus-visible {
  background: var(--sc-orange-dark, #e0a000);
  outline: none;
}

@media (max-width: 640px) {
  .layout-topnav .head-stage .stage-slideshow {
    height: var(--sc-stage-height, 240px);
  }

  .layout-topnav .head-stage .stage-slideshow__overlay {
    max-width: none;
    padding: 1.75rem 1rem 2.25rem;
    gap: 0.3rem;
  }

  .layout-topnav .head-stage .stage-slideshow__headline,
  .layout-topnav .head-stage .stage-slideshow__text {
    max-width: calc(100% - 0.25rem);
  }

  .layout-topnav .head-stage .stage-slideshow__text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .layout-topnav .head-stage .stage-slideshow__cta.home-cta,
  .layout-topnav .head-stage a.stage-slideshow__cta {
    align-self: flex-end;
    max-width: 100%;
  }
}
