/* ============================================================================
   Hand-CSS-Layer – Rope Solutions. Lädt NACH theme.css (siehe base.html.twig).
   Reines, Node-frei editierbares CSS: alles, was kein Tailwind-Utility ist –
   Grain-Overlay, Seil-Hairline, Konturziffern, Nav-Höhe, Knopf-Klassen.
   Der Build überschreibt diese Datei NIE.
   ========================================================================== */

:root {
    /* Höhe der fixierten Navigationsleiste. Steht hier und nicht im Markup, weil
       body-Abstand, Sprungmarken-Offset und die geschrumpfte Leiste denselben
       Wert brauchen – eine Wahrheit statt drei. */
    --rs-nav-h: 7.5rem;
    --rs-nav-h-scrolled: 5rem;
    --color-brand-red: #e30613;
    --color-brand-dark: #1c1c1c;
}

body {
    -webkit-font-smoothing: antialiased;
    /* Die Leiste ist fixiert – ohne diesen Abstand läge sie über dem Seitenanfang. */
    padding-top: var(--rs-nav-h);
    font-size: clamp(16px, 2vw, 1.15rem);
}

/* Die Startseite beginnt mit einem bildschirmfüllenden Hero, der bewusst UNTER der
   halbtransparenten Leiste durchläuft. Rollen-Body-Klasse aus base.html.twig. */
body.site-home {
    padding-top: 0;
}

/* Sprungmarken (#services, #beratung …) dürfen nicht unter der Leiste landen. */
[id] {
    scroll-margin-top: calc(var(--rs-nav-h-scrolled) + 1rem);
}

/* v4-Preflight setzt Buttons auf cursor:default – v3-Verhalten beibehalten. */
button,
[role="button"] {
    cursor: pointer;
}

#content a {
    text-decoration: none;
    border-bottom: 2px solid var(--color-brand-red);
    padding-bottom: .15rem;
}

#content a:hover {
    border-bottom: 2px solid var(--color-brand-dark);
    text-decoration: none;
}

#content a.bg-primary-600,
#content a.bg-brand-dark {
    padding-bottom: calc(var(--spacing) * 2.6);
}

#content a.btn-primary {
    padding-bottom: 1rem;
}

.container-zero-p-m {
    padding: 0;
    margin: 0;
}

.gap-zero .grid {
    gap: 0;
}

/* ---------------------------------------------------------------------------
   Dekor aus dem Entwurf
   ------------------------------------------------------------------------- */

/* Feiner Film-Grain über dem Viewport. Self-hosted als data-URI – der Entwurf lud
   das Rauschen von grainy-gradients.vercel.app; Frontend bleibt CDN-frei. */
.grain {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.035;
}

/* Gestrichelte Seil-Hairline – das Leitmotiv des Designs (senkrechte Sicherungslinie). */
.safety-line-dash {
    background-image: linear-gradient(to bottom, var(--color-brand-red) 50%, rgba(255, 255, 255, 0) 0%);
    background-position: right;
    background-size: 2px 12px;
    background-repeat: repeat-y;
}

/* Konturziffern der Produktkategorien; Farbe je Kachel über --num-stroke. */
.num-outline {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--num-stroke, rgba(28, 28, 28, 0.35));
}

/* Global (nicht in @theme), damit auch arbitrary values wie
   animate-[pulse-slow_8s_infinite] greifen. `pulse-slow` ist ein Alias auf
   dieselbe Bewegung – im Entwurf wurde beides synonym benutzt. */
@keyframes pulse-soft {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes pulse-slow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ---------------------------------------------------------------------------
   Navigationsleiste – Höhe und das Schrumpfen beim Scrollen.
   Der Umschalter setzt NUR die Hook-Klasse `is-scrolled` (stabil, kein
   Tailwind-Utility) – so muss keine Klasse in die Safelist.
   ------------------------------------------------------------------------- */
.rs-nav {
    transition: box-shadow .3s ease, background-color .3s ease;
}

.rs-nav__bar {
    height: var(--rs-nav-h);
    transition: height .3s ease;
}

.rs-nav.is-scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1);
}

.rs-nav.is-scrolled .rs-nav__bar {
    height: var(--rs-nav-h-scrolled);
}

/* Aktiver Menüpunkt (Hook aus frontend_nav.html.twig). */
#content .nav-active,
.rs-nav .nav-active>a {
    color: var(--color-brand-red);
}

/* ---------------------------------------------------------------------------
   Inhalts-Chrome. Alles Inhaltliche ist auf #content gescopt, damit es nicht
   in Kopf-/Fußbereich leckt.
   ------------------------------------------------------------------------- */
#content :where(a) {
    text-decoration: none;
}

#content :where(a):hover {
    text-decoration: underline;
}

/* Knopf-Klassen für redaktionellen Inhalt (Editor kennt `btn btn-primary`).
   Kantig und versal – die Formensprache des Designs, keine Pillen. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding: 1rem 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .9rem;
    border-radius: 0;
    transition: all .3s ease;
}

.btn.btn-primary {
    background-color: var(--color-brand-red);
    color: #ffffff !important;
    text-decoration: none !important;
}

.btn.btn-primary:hover {
    background-color: var(--color-brand-dark);
    color: #ffffff !important;
}

.btn.btn-secondary {
    border: 1px solid rgba(28, 28, 28, .25);
    color: var(--color-brand-dark) !important;
    text-decoration: none !important;
}

.btn.btn-secondary:hover {
    border-color: var(--color-brand-red);
    color: var(--color-brand-red) !important;
}

.btn.btn-primary.btn-border {
    border: 1px solid var(--color-brand-red);
    background-color: transparent;
    color: var(--color-brand-red) !important;
}

.btn.btn-primary.btn-border:hover {
    background-color: var(--color-brand-red);
    color: var(--color-white) !important;
}

/* ---------------------------------------------------------------------------
   Formulare (Kontakt-Modul). Die Modul-Vorlage liefert ein neutrales
   Grundaussehen; die Marke kommt hier dazu – gleiche Anker wie in den anderen
   Kunden-Themes.
   ------------------------------------------------------------------------- */
#content .cf-form input:not([type="checkbox"]):not([type="radio"]),
#content .cf-form select,
#content .cf-form textarea {
    background-color: #ffffff;
    border: 1px solid rgba(28, 28, 28, .15);
    border-radius: 0;
}

#content .cf-form input:focus,
#content .cf-form select:focus,
#content .cf-form textarea:focus {
    border-color: var(--color-brand-red);
    outline: 2px solid rgba(227, 6, 19, .25);
    outline-offset: 1px;
}

#content .cf-form input[type="checkbox"],
#content .cf-form input[type="radio"] {
    accent-color: var(--color-brand-red);
}

#content .cf-form fieldset {
    background-color: #F8FAFC;
    border: 1px solid rgba(28, 28, 28, .08);
    padding: 1.25rem;
}

#content .cf-form .cf-btn {
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 700;
}

#content .cf-form .cf-btn-primary {
    background-color: var(--color-brand-red);
    color: #ffffff;
}

#content .cf-form .cf-btn-primary:hover {
    background-color: var(--color-brand-dark);
}

#content .cf-form .cf-btn-secondary {
    border: 1px solid rgba(28, 28, 28, .25);
    color: var(--color-brand-dark);
}

#content .cf-form .cf-progress li[aria-current="step"] {
    color: var(--color-brand-red);
    font-weight: 700;
}

#content .cf-form .cf-step {
    border-left: 3px solid var(--color-brand-red);
    padding-left: 1.25rem;
}

#content .cf-form .cf-summary-row {
    border-bottom: 1px solid rgba(28, 28, 28, .08);
}

/* ---------------------------------------------------------------------------
   Inhaltsblöcke des niarxbuilder in der Marke.

   Die Block-Partials tragen bewusst neutrale Klassen (`prose`, `nb-accordion`,
   `nb-col`, Primary-Palette) – sie sollen in JEDEM Theme funktionieren. Hier
   bekommen sie das Aussehen von Rope Solutions.
   ------------------------------------------------------------------------- */

/* CTA-Block: der Partial setzt bg-primary-600 (Grau). Markenrot und kantig. */
#content .prose a.inline-flex,
#content a.inline-flex.bg-primary-600 {
    background-color: var(--color-brand-red);
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: .08em;
}

#content a.inline-flex.bg-primary-600:hover {
    background-color: var(--color-brand-dark);
}

/* Akkordeon: neutral-Palette → Marke, kantig statt rund. */
#content .nb-accordion details {
    border-radius: 0;
    border-color: rgba(28, 28, 28, .12);
}

#content .nb-accordion summary {
    color: var(--color-brand-dark);
}

#content .nb-accordion details[open] summary {
    color: var(--color-brand-red);
}

#content .nb-accordion summary>span:last-child {
    border-radius: 999px;
}

/* ---------------------------------------------------------------------------
   Haken-Klassen für redaktionellen Inhalt.

   ABSICHT: Seiteninhalte in der Datenbank verwenden AUSSCHLIESSLICH diese
   stabilen `rs-*`-Klassen – keine Tailwind-Utilities. Grund: der Tailwind-Build
   scannt Templates, nicht die Datenbank; eine Utility-Klasse, die nur in einem
   Seiteninhalt vorkommt, würde nie kompiliert und wäre wirkungslos. Hand-CSS
   hat dieses Problem nicht und ist auf dem Server ohne Node änderbar.
   ------------------------------------------------------------------------- */

/* Kleine versale Vorzeile über einer Überschrift („// DIE RS PHILOSOPHIE"). */
#content .rs-eyebrow {
    display: block;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: #64748B;
    margin-bottom: .75rem;
}

/* Einleitungsabsatz unter der H1. */
#content .rs-lead {
    font-size: 1.375rem;
    line-height: 1.6;
    color: var(--color-brand-dark);
    font-weight: 300;
}

/* Kachel – die Grundform für Spalteninhalte. */
#content .rs-card {
    height: 100%;
    background-color: #ffffff;
    border: 1px solid rgba(28, 28, 28, .12);
    padding: 2rem;
}

#content .rs-card> :first-child {
    margin-top: 0;
}

#content .rs-card> :last-child {
    margin-bottom: 0;
}

/* Kachel-Ueberschrift. h2 ODER h3 – welche Ebene richtig ist, haengt davon ab, ob
   ueber dem Raster schon eine H2 steht. Beide sollen gleich aussehen. */
#content .rs-card :where(h2, h3) {
    margin-top: 0;
    font-size: 1.375rem;
    line-height: 1.3;
}

/* Kachel mit rotem Kantenakzent – für hervorgehobene Einstiege. */
#content .rs-card--accent {
    border-top: 4px solid var(--color-brand-red);
}

/* Definitionsliste „Titel + Erläuterung" – die häufigste Form im Konzept. */
#content .rs-list {
    list-style: none;
    padding-left: 0;
    margin: 1.5rem 0;
}

#content .rs-list>li {
    padding-left: 1.5rem;
    border-left: 2px solid rgba(28, 28, 28, .12);
    margin-bottom: 1.5rem;
}

#content .rs-list>li:hover {
    border-left-color: var(--color-brand-red);
}

#content .rs-list b,
#content .rs-list strong {
    display: block;
    font-weight: 700;
    color: var(--color-brand-dark);
    margin-bottom: .25rem;
}

/* Flächen. Kommen als CSS-Klasse an den Bereich-Block (⚙︎-Modal → cssClass).
   Der Hintergrund läuft bis an den Bildschirmrand, der Inhalt behält die Breite, die
   im Bereich eingestellt ist (max-w-7xl usw.). border-image malt über die Box hinaus
   (outset 100vw links/rechts) – das zählt NICHT zur scrollbaren Breite, anders als ein
   ::after mit 100vw, und liegt von selbst hinter dem Inhalt. */
#content :is(.rs-band-gray, .rs-band-dark, .rs-band-red) {
    background-color: var(--rs-band-bg);
    /* Langform statt `fill 0 // 0 100vw`: gleichwertig, aber der VS-Code-CSS-Parser kennt das leere
       Breiten-Segment `//` nicht und meldet danach Folgefehler im Rest der Datei. */
    border-image-source: linear-gradient(var(--rs-band-bg) 0 0);
    border-image-slice: 0 fill;
    border-image-outset: 0 100vw;
    padding-top: 4rem;
    padding-bottom: 4rem;
    margin-top: 0;
    margin-bottom: 0;
}

#content .rs-band-gray {
    --rs-band-bg: #F8FAFC;
}

#content .rs-band-dark {
    --rs-band-bg: var(--color-brand-dark);
    color: #ffffff;
}

#content .rs-band-red {
    --rs-band-bg: var(--color-brand-red);
    color: #ffffff;
}

#content .rs-band-dark :where(h1, h2, h3, h4, strong, b),
#content .rs-band-red :where(h1, h2, h3, h4, strong, b) {
    color: #ffffff;
}

#content .rs-band-dark .rs-eyebrow {
    color: #eb515a;
}

#content .rs-band-dark .rs-card {
    background-color: rgba(255, 255, 255, .04);
    border-color: rgba(255, 255, 255, .12);
    color: #ffffff;
}

#content .rs-band-dark .rs-list>li {
    border-left-color: rgba(255, 255, 255, .2);
}

/* Auszeichnung im Fließtext. */
#content .rs-accent {
    color: var(--color-brand-red);
}

#content .rs-band-red .bg-primary-600 {
    background-color: var(--color-white) !important;
    color: var(--color-brand-dark);
}

/* ---------------------------------------------------------------------------
   Hero-Block in der Marke.

   Die Vorlage (templates/cockpit/editor/blocks/hero.html.twig) liefert ein
   neutrales Grundaussehen, das in jedem Theme trägt. Hier bekommt es die
   Formensprache von Rope Solutions: Anthrazit statt Neutral, kantige Knöpfe,
   Signalrot als Primärhandlung und die gestrichelte Seil-Hairline als Anker.
   ------------------------------------------------------------------------- */
#content .nb-hero {
    background-color: var(--color-brand-dark);
}

/* Die Seil-Hairline aus dem Entwurf – senkrecht durch den Hero, rein dekorativ. */
#content .nb-hero::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    opacity: .3;
    pointer-events: none;
    background-image: linear-gradient(to bottom, var(--color-brand-red) 50%, rgba(255, 255, 255, 0) 0%);
    background-position: right;
    background-size: 2px 12px;
    background-repeat: repeat-y;
}

@media (max-width: 767px) {
    #content .nb-hero::after {
        display: none;
    }
}

#content .nb-hero__veil {
    background-image: linear-gradient(to top, var(--color-brand-dark) 0%, rgba(28, 28, 28, .6) 45%, rgba(28, 28, 28, .1) 100%);
}

#content .nb-hero__eyebrow {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: #eb515a;
}

#content .nb-hero__title {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.02;
    font-size: clamp(2.5rem, 6vw, 5rem);
    margin: 0;
}

#content .nb-hero__text {
    color: #ffffff;
    font-weight: 300;
    font-size: 1.25rem;
    line-height: 1.6;
}

#content .nb-hero__cta {
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .9rem;
    transition: all .3s ease;
}

#content .nb-hero__cta--primary {
    background-color: var(--color-brand-red);
    color: #ffffff;
}

#content .nb-hero__cta--primary:hover {
    background-color: #ffffff;
    color: var(--color-brand-dark);
}

#content .nb-hero__cta--secondary {
    border: 1px solid rgba(255, 255, 255, .3);
    color: #ffffff;
}

#content .nb-hero__cta--secondary:hover {
    border-color: var(--color-brand-red);
    color: #eb515a;
}

/* Der Hero sprengt den Satzspiegel und sitzt direkt unter der Leiste. Auf der
   Startseite hat der body keinen oberen Abstand (site-home), das Bild läuft
   also bewusst unter der halbtransparenten Navigation durch. */
#content .nb-hero {
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
}

.img-fit {
    width: 100%;
    height: 570px;
    object-fit: cover;
    object-position: center;
}

.img-fit.img-fit-bottom {
    object-position: bottom;
}


.rounded-2xl {
    border-radius: 0 !important;
}

/* brand bg */
#content .rs-band-center>.grid {
    align-items: center;
}

#content .rs-band-dark .de-wheel .de-wheel__progress {
    background-color: var(--color-brand-red);
}

#content .rs-band-dark .de-wheel .de-wheel__prev,
#content .rs-band-dark .de-wheel .de-wheel__next {
    color: var(--color-white);
}

#content .rs-band-dark .de-wheel .de-wheel__prev:hover,
#content .rs-band-dark .de-wheel .de-wheel__next:hover {
    color: var(--color-white);
    background-color: var(--color-brand-red);
}

/* brand bg end */

/* breadcrumbs */
nav.breadcrumb ol li a {
    font-size: 14px;
}

nav.breadcrumb ol li span {
    font-size: 14px;
}

/* breadcrumbs end */

/* wheel */
.de-wheel__viewport .de-wheel__track {
    gap: 4rem;
}

/* Folienbreite zum größeren gap passend: de-wheel.css rechnet mit 2rem (50% - 1rem). Mit 4rem ragte
   die letzte sichtbare Folie 2rem über den Rand – Text rechts abgeschnitten (Korrekturvorlage v2). */
@media (min-width: 768px) {

    .de-wheel__viewport .de-wheel__slide,
    .de-wheel--cols-2 .de-wheel__viewport .de-wheel__slide,
    .de-wheel--cols-3 .de-wheel__viewport .de-wheel__slide {
        width: calc(50% - 2rem);
    }
}

@media (min-width: 1024px) {

    .de-wheel__viewport .de-wheel__slide,
    .de-wheel--cols-3 .de-wheel__viewport .de-wheel__slide {
        width: calc((100% - 8rem) / 3);
    }
}

/* wheel end */

/* nav */
nav#main-header #primary-nav ul li ul li a {
    font-size: 16px;
}

/* nav end */

/* banner */
#content .banner-slider {
    height: 90dvh;
}

/* banner end */

/* ===========================================================================
   Startseite: Bento-Raster „Drei Fragen" und Split-Screen „Ausrüstung/Branchen".

   Beide Formen stammen aus dem Entwurf (idea/ropesolutions/layout_01.html,
   Abschnitte PRODUKTKATEGORIEN und EINSATZGEBIETE). Sie entstehen AUSSCHLIESSLICH
   hier im Hand-CSS – der Seiteninhalt trägt nur die stabilen Haken `rs-bento-head`,
   `rs-bento`, `rs-split` und `rs-check` (siehe die Begründung weiter oben: der
   Tailwind-Build scannt Templates, nicht die Datenbank).

   Angesetzt wird am Markup des Bereich-Blocks (templates/cockpit/editor/blocks/
   section.html.twig): section.cssClass > div.grid > div.nb-col. Die Regeln tragen
   `#content` und schlagen damit die Utility-Klassen des Blocks (ID vor Klasse) –
   auch innerhalb von Media-Queries.
   ========================================================================= */

/* --- Kopfzeile über dem Raster: Überschrift links, Einordnung rechts ------- */
#content .rs-bento-head>.grid {
    align-items: end;
}

#content .rs-bento-head h2 {
    margin-top: 0;
    font-size: clamp(2rem, 4.5vw, 2.5rem);
    line-height: 1.05;
    letter-spacing: -.02em;
}

@media (min-width: 48rem) {

    /* Die Einordnung bleibt schmal und endet bündig mit der Überschrift. */
    #content .rs-bento-head .nb-col:last-child {
        text-align: right;
    }

    #content .rs-bento-head .nb-col:last-child .prose {
        max-width: 24rem;
        margin-left: auto;
    }
}

/* --- Das Raster: eine große Kachel, zwei Satelliten ------------------------ */
#content .rs-bento .nb-col {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    min-height: 15rem;
    padding: 2rem;
    overflow: hidden;
    background-color: #ffffff;
    border: 1px solid rgba(28, 28, 28, .12);
    transition: background-color .5s ease, border-color .5s ease, color .5s ease;
}

/* Konturziffer als Ordnungshilfe. Rein dekorativ, deshalb im CSS und nicht im
   Text – so taucht sie weder in der Suche noch im Vorlesen auf. Die Füllfarbe
   ist der Rückfall für Browser ohne text-stroke. */
#content .rs-bento .nb-col::before {
    content: "02";
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(28, 28, 28, .07);
    -webkit-text-stroke: 1.5px rgba(28, 28, 28, .3);
    pointer-events: none;
}

#content .rs-bento .nb-col:nth-child(1)::before {
    content: "01";
}

#content .rs-bento .nb-col:nth-child(3)::before {
    content: "03";
}

/* Roter Kantenakzent, der beim Überfahren einläuft. */
#content .rs-bento .nb-col::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background-color: var(--color-brand-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s ease;
}

#content .rs-bento .nb-col:hover::after {
    transform: scaleX(1);
}

/* Die erste Kachel führt: dunkle Fläche, größere Schrift, Seil-Hairline links
   (dasselbe Muster wie .safety-line-dash, hier als Hintergrund der Kachel). */
#content .rs-bento .nb-col:first-child {
    padding: 2.5rem;
    color: #ffffff;
    background-color: var(--color-brand-dark);
    background-image: linear-gradient(to bottom, var(--color-brand-red) 50%, rgba(255, 255, 255, 0) 0);
    background-size: 2px 12px;
    background-repeat: repeat-y;
    background-position: left 1.5rem top;
    border-color: var(--color-brand-dark);
}

#content .rs-bento .nb-col:first-child::before {
    color: rgba(255, 255, 255, .08);
    -webkit-text-stroke-color: rgba(255, 255, 255, .45);
}

/* Die Satelliten kippen beim Überfahren auf dieselbe dunkle Fläche. */
#content .rs-bento .nb-col:not(:first-child):hover {
    color: #ffffff;
    background-color: var(--color-brand-dark);
    border-color: var(--color-brand-dark);
}

#content .rs-bento .nb-col:not(:first-child):hover::before {
    color: rgba(255, 255, 255, .08);
    -webkit-text-stroke-color: rgba(255, 255, 255, .45);
}

#content .rs-bento .nb-col:first-child :where(h2, h3, h4, strong, b),
#content .rs-bento .nb-col:hover :where(h2, h3, h4, strong, b) {
    color: #ffffff;
}

#content .rs-bento .nb-col :where(h2, h3) {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.5rem;
    line-height: 1.25;
    /* Platz für die Konturziffer in der Ecke. */
    padding-right: 3.5rem;
}

#content .rs-bento .nb-col:first-child :where(h2, h3) {
    font-size: clamp(1.75rem, 3vw, 2rem);
}

#content .rs-bento .nb-col p {
    margin: 0;
    color: inherit;
}

/* Trennlinie zwischen Überschrift und Erläuterung – nur in der großen Kachel,
   wo genug Fläche dafür ist. */
#content .rs-bento .nb-col:first-child .prose:last-child:not(:first-child) {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, .15);
}

@media (min-width: 48rem) {
    #content .rs-bento>.grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    #content .rs-bento>.grid>.nb-col {
        grid-column: span 6;
    }

    /* Die Leitkachel nimmt auf mittleren Schirmen die volle Zeile. */
    #content .rs-bento>.grid>.nb-col:first-child {
        grid-column: span 12;
        min-height: 20rem;
    }
}

@media (min-width: 64rem) {
    #content .rs-bento>.grid>.nb-col {
        grid-column: span 3;
    }

    #content .rs-bento>.grid>.nb-col:first-child {
        grid-column: span 6;
    }
}

/* --- Split-Screen: zwei Hälften, Foto als Grund, Text darüber -------------- */
#content .rs-split {
    max-width: none;
    margin-top: 0;
    margin-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    color: #ffffff;
    background-color: var(--color-brand-dark);
}

#content .rs-split>.grid {
    gap: 0;
}

#content .rs-split .nb-col {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    min-height: 28rem;
    padding: 3rem 1.5rem;
    overflow: hidden;
}

/* Die Naht zwischen den Hälften: gestapelt oben, nebeneinander links. */
#content .rs-split .nb-col+.nb-col {
    border-top: 1px solid rgba(255, 255, 255, .1);
}

@media (min-width: 48rem) {
    #content .rs-split .nb-col {
        min-height: 36rem;
        padding: 4rem 3rem;
    }

    #content .rs-split .nb-col+.nb-col {
        border-top: 0;
        border-left: 1px solid rgba(255, 255, 255, .1);
    }
}

@media (min-width: 64rem) {
    #content .rs-split .nb-col {
        min-height: 40rem;
        padding: 6rem 4rem;
    }
}

/* Das Bild des Bild-Blocks füllt die Hälfte aus und tritt zurück. */
#content .rs-split .nb-col>figure {
    position: absolute;
    inset: 0;
    z-index: 0;
    margin: 0;
}

#content .rs-split .nb-col>figure img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    opacity: .3;
    transition: opacity .7s ease, transform .7s ease;
}

#content .rs-split .nb-col:hover>figure img {
    opacity: .55;
    transform: scale(1.04);
}

/* Verlauf nach unten – hält den Text lesbar, egal wie hell das Foto ist. */
#content .rs-split .nb-col>figure::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to top, var(--color-brand-dark), rgba(28, 28, 28, .35) 60%, rgba(28, 28, 28, .1));
}

#content .rs-split .nb-col>.prose {
    position: relative;
    z-index: 1;
    color: #ffffff;
}

#content .rs-split :where(h1, h2, h3, h4, strong, b) {
    color: #ffffff;
}

#content .rs-split h2 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.05;
    letter-spacing: -.02em;
}

#content .rs-split a {
    color: #ffffff;
    text-decoration: none;
    border-bottom: 2px solid var(--color-brand-red);
    padding-bottom: .15rem;
}

#content .rs-split a:hover {
    border-bottom-color: #ffffff;
}

/* Die ganze Kachel ist klickbar („stretched link", Auftraggeber 2026-10-14): der EINE Link der Kachel spannt seine
   Klickfläche über die Kachel (.nb-col ist position:relative). Kein JS – es bleibt ein echter Link.
   GOTCHA: Der Absatz mit dem Link ist oben als position:relative gesetzt – dann wäre ER der Bezugsrahmen und die
   Klickfläche nur so groß wie der Absatz. Deshalb verliert dieser Absatz die Positionierung; die Überlagerung über
   dem Foto bleibt, weil die Kachel ein Flex-Container ist und z-index für Flex-Kinder auch ohne position wirkt.
   Der Link-Absatz ist der LETZTE Block der Kachel (sonst läge Späteres über der Klickfläche). */
#content .rs-split .nb-col>.prose:has(a) {
    position: static;
}

#content .rs-split .nb-col a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Überfahren irgendwo in der Kachel zeigt den Link als aktiv; Tastaturfokus umrahmt die ganze Kachel. */
#content .rs-split .nb-col:hover a {
    border-bottom-color: #ffffff;
}

#content .rs-split .nb-col:has(a:focus-visible) {
    outline: 3px solid var(--color-brand-red);
    outline-offset: -6px;
}

#content .rs-split .nb-col a:focus-visible {
    outline: none;
}

/* --- Häkchenliste (Aufzählung ohne Punkte) --------------------------------- */
#content .rs-check {
    list-style: none;
    margin: 1.5rem 0;
    padding-left: 0;
    display: grid;
    gap: .5rem;
}

#content .rs-check>li {
    position: relative;
    padding-left: 1.75rem;
}

#content .rs-check>li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    color: var(--color-brand-red);
}

/* Auf dunklem Grund ist das Markenrot zu dunkel – aufgehellt wie bei .rs-eyebrow. */
#content .rs-band-dark .rs-check>li::before,
#content .rs-split .rs-check>li::before {
    color: #eb515a;
}

/* Zeichenzähler unter dem Nachrichtenfeld (assets/js/char-count.js füllt ihn).
   Ohne JavaScript bleibt der Starttext stehen – die Grenze ist trotzdem sichtbar. */
#content .cf-charcount {
    display: block;
    margin-top: .35rem;
    font-size: .8rem;
    color: #64748B;
    text-align: right;
}

#content .cf-charcount[data-state="near"] {
    color: var(--color-brand-red);
    font-weight: 700;
}



.links-grid__item .links-grid__link {
    border-radius: 0;
}

.home-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
}

/* ---------------------------------------------------------------------------
   Hotspot-Bild (Kern-Muster .nb-hotspots, src/css/app.css) in der Marke:
   Markenrot, kantige Karte, versale Überschrift wie die Vorzeilen.
   ------------------------------------------------------------------------- */
#content .nb-hotspots {
    --nb-hotspot-bg: var(--color-brand-red);
}

#content .nb-hotspot__tip {
    border-radius: 0;
    border-top: 3px solid var(--color-brand-red);
    font-size: 1rem;
    line-height: 1.55;
}

#content .nb-hotspot__title {
    display: block;
    margin-bottom: .4rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--color-brand-dark);
}

#content .nb-hotspot__tip p {
    margin: 0 0 .6rem;
}

/* ===========================================================================
   Startseite: „Drei Systemwelten" – Kopf + drei Bild-Paneele (Entwurf layout_01,
   Abschnitt PRODUKTKATEGORIEN). Bewusst ANDERS als das Bento „Drei Fragen":
   Fotos statt weißer Kacheln, Paneele, die sich beim Überfahren aufweiten,
   Zähler „01 / 03" statt Konturziffern, Normen als Schildchen.

   Haken im Inhalt NUR am Bereich (rs-welten-head, rs-welten) und an Listen
   (rs-tags) – der Editor behält Klassen an Listen, an <p>/<span> verlöre er sie
   beim nächsten Speichern. Die Vorzeile über einer Überschrift entsteht deshalb
   strukturell: der Absatz-Block direkt VOR dem Überschriften-Block.
   ========================================================================= */

/* --- Kopf ----------------------------------------------------------------- */
#content .rs-welten-head {
    padding-bottom: 2.5rem;
}

#content .rs-welten-head .prose:has(+ .prose > h2) p,
#content .rs-welten .prose:has(+ .prose > h3) p {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--color-brand-red);
}

#content .rs-welten-head .prose:has(+ .prose > h2) p::before {
    content: "";
    width: 2.5rem;
    height: 2px;
    background-color: var(--color-brand-red);
}

#content .rs-welten-head h2 {
    margin: .75rem 0 0;
    font-size: clamp(2.25rem, 5.5vw, 4rem);
    line-height: 1.02;
    letter-spacing: -.025em;
}

/* Einordnung unter der Überschrift: schmal, mit Seil-Hairline links. */
#content .rs-welten-head .prose:last-child p {
    max-width: 40rem;
    margin: 1.5rem 0 0;
    padding-left: 1.25rem;
    border-left: 2px solid var(--color-brand-red);
    color: #475569;
}

/* --- Paneele --------------------------------------------------------------- */
#content .rs-welten {
    padding-top: 0;
    counter-reset: rs-welt;
}

#content .rs-welten>.grid {
    gap: 1rem;
}

#content .rs-welten .nb-col {
    counter-increment: rs-welt;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Oben ausgerichtet (Korrekturvorlage v2): beim Aufweiten bricht der Text neu um – unten
       ausgerichtet sprangen die Überschriften dabei in der Höhe. Der Link sitzt weiter unten. */
    justify-content: flex-start;
    gap: .9rem;
    min-height: 28rem;
    padding: 5rem 2rem 2rem;
    color: #ffffff;
    background-color: var(--color-brand-dark);
}

/* Das Foto füllt das Paneel: erst entsättigt und gedämpft, beim Überfahren in Farbe. */
#content .rs-welten .nb-col>figure {
    position: absolute;
    inset: 0;
    z-index: -2;
    margin: 0;
}

#content .rs-welten .nb-col>figure img {
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    object-fit: cover;
    object-position: center;
    filter: grayscale(1);
    opacity: .4;
    transform: scale(1.06);
    transition: filter .7s ease, opacity .7s ease, transform .7s ease;
}

#content .rs-welten .nb-col:is(:hover, :focus-within)>figure img {
    filter: none;
    opacity: .55;
    transform: scale(1);
}

/* Verlauf von oben (dort steht der Text) – hält ihn lesbar, egal wie hell das Foto ist. */
#content .rs-welten .nb-col::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(to bottom, rgba(28, 28, 28, .96) 0%, rgba(28, 28, 28, .6) 55%, rgba(28, 28, 28, .2) 100%);
}

#content .rs-welten .nb-col>.prose:last-child {
    margin-top: auto;
}

/* Zähler „01 / 03" mit rotem Strich – dekorativ, deshalb im CSS statt im Text. */
#content .rs-welten .nb-col::before {
    content: counter(rs-welt, decimal-leading-zero) " / 03";
    position: absolute;
    top: 2rem;
    left: 2rem;
    padding-left: 3rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .8rem;
    letter-spacing: .2em;
    color: rgba(255, 255, 255, .85);
    background: linear-gradient(var(--color-brand-red), var(--color-brand-red)) left center / 2.25rem 2px no-repeat;
}

#content .rs-welten .prose {
    color: rgba(255, 255, 255, .85);
    max-width: 30rem;
}

#content .rs-welten .prose p {
    margin: 0;
}

#content .rs-welten .prose:has(+ .prose > h3) p {
    color: #eb515a;
}

#content .rs-welten h3 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.6rem, 2.2vw, 2.25rem);
    line-height: 1.05;
    hyphens: auto;
    overflow-wrap: break-word;
    letter-spacing: -.02em;
}

#content .rs-welten a {
    color: #ffffff;
}

#content .rs-welten a:hover {
    border-bottom-color: #ffffff;
}

/* Das ganze Paneel ist klickbar („stretched link"): der vorhandene Link der Spalte spannt seine
   Klickfläche über das Paneel (.nb-col ist position:relative). Kein onclick/JS – es bleibt EIN
   echter Link: Tastatur, Screenreader, Mittelklick und „in neuem Tab öffnen" funktionieren weiter.
   Grund: Paneele, die sich beim Überfahren bewegen, wirken klickbar – also sollen sie es sein. */
#content .rs-welten .nb-col a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Überfahren irgendwo im Paneel zeigt den Link als aktiv; Tastaturfokus umrahmt das ganze Paneel. */
#content .rs-welten .nb-col:hover a {
    border-bottom-color: #ffffff;
}

#content .rs-welten .nb-col:has(a:focus-visible) {
    outline: 3px solid var(--color-brand-red);
    outline-offset: 3px;
}

#content .rs-welten .nb-col a:focus-visible {
    outline: none;
}

/* Normen/Eckdaten als Schildchen (Liste mit Klasse rs-tags). */
#content .rs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: .25rem 0 0;
    padding: 0;
    list-style: none;
}

#content .rs-tags>li {
    margin: 0;
    padding: .3rem .6rem;
    border: 1px solid rgba(255, 255, 255, .3);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .7rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .85);
}

#content .rs-tags>li::marker {
    content: none;
}

#content .rs-tags>li p {
    margin: 0;
}

/* Große Schirme mit Maus: die Paneele stehen nebeneinander und weiten sich beim
   Überfahren auf; ohne Zeiger führt das erste (catchpack®). Touch-Geräte behalten das
   ruhige Raster – dort gäbe es kein Überfahren. */
@media (min-width: 64rem) and (hover: hover) {
    #content .rs-welten>.grid {
        display: flex;
    }

    #content .rs-welten>.grid>.nb-col {
        flex: 1 1 0;
        min-width: 0;
        min-height: 34rem;
        transition: flex-grow .6s ease;
    }

    #content .rs-welten>.grid>.nb-col:first-child {
        flex-grow: 1.7;
    }

    #content .rs-welten>.grid:hover>.nb-col {
        flex-grow: 1;
    }

    #content .rs-welten>.grid>.nb-col:is(:hover, :focus-within) {
        flex-grow: 1.7;
    }
}

@media (prefers-reduced-motion: reduce) {

    #content .rs-welten .nb-col,
    #content .rs-welten .nb-col>figure img {
        transition: none;
    }
}


/* =========================================================================
   Änderungsrunde 2026-10-14 (aenderung_01.pdf)

   Vier Haken, die der Seiteninhalt als CSS-Klasse trägt – wie rs-bento/rs-welten:
     rs-linkcards          Liste, jedes <li> eine Karte, die als Ganzes klickbar ist
     rs-linkcards--rows    dieselbe Liste als Zeilen (Titel links, Text + Button rechts)
     rs-family             Spalten mit gleicher Höhe, letzter Block (Button) am unteren Rand
     rs-media-accordion    Bild + Akkordeon beginnen auf einer Höhe
   Dazu: das Bento-Raster „Drei Fragen" klappt beim Überfahren auf (wie rs-welten).
   ========================================================================= */

/* --- Karten als Ganzes klickbar („stretched link") ------------------------
   Zwei Träger, ein Verhalten:
     ul.rs-linkcards       jede <li> ist eine Karte (Liste, z. B. Startseite „ganzheitlich")
     section.rs-linkcards  jede SPALTE (.nb-col) ist eine Karte (Bereich mit mehreren Spalten, z. B. Leistungen)
   GOTCHA, warum es den zweiten Träger gibt (2026-10-14): Eine Karte aus Überschrift + Text + Button als EIN
   Listenpunkt ist im Niarx Builder nicht darstellbar – öffnet und speichert der Redakteur die Seite, zerlegt der Editor
   die Liste in lose Blöcke, und die Klasse ist weg. Bereich + Spalten + Richtext-Blöcke überstehen das. Listen
   taugen nur für einfachen Text (Absätze, <br>, Link), nie für Überschrift/Button in einem Punkt.
   EIN echter Link je Karte spannt seine Klickfläche über die Karte. Kein JS: Tastatur, Screenreader, Mittelklick und
   „in neuem Tab" bleiben. Mehr als ein Link je Karte geht nicht – die Klickfläche des letzten gewänne. */
#content ul.rs-linkcards {
    list-style: none;
    margin: 1.5rem 0;
    padding: 0;
}

#content .rs-linkcards>li,
#content .rs-linkcards>.grid>.nb-col {
    position: relative;
    cursor: pointer;
}

#content .rs-linkcards>li {
    margin: 0 0 1.5rem;
}

#content .rs-linkcards a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Tastaturfokus umrahmt die ganze Karte statt nur den Link. */
#content .rs-linkcards>li:has(a:focus-visible),
#content .rs-linkcards>.grid>.nb-col:has(a:focus-visible) {
    outline: 3px solid var(--color-brand-red);
    outline-offset: 3px;
}

#content .rs-linkcards a:focus-visible {
    outline: none;
}

/* --- Leistungen: Karten untereinander, alles auf einen Blick -------------- */
#content .rs-linkcards--rows>li,
#content .rs-linkcards--rows>.grid>.nb-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .75rem 3rem;
    align-items: start;
    padding: 1.75rem 2rem;
    background-color: #ffffff;
    border: 1px solid rgba(28, 28, 28, .12);
    border-left: 4px solid rgba(28, 28, 28, .12);
    transition: border-color .3s ease, box-shadow .3s ease;
}

#content .rs-linkcards--rows>li {
    margin-bottom: 1rem;
}

#content .rs-linkcards--rows>li:hover,
#content .rs-linkcards--rows>.grid>.nb-col:hover {
    border-color: var(--color-brand-red);
    box-shadow: 0 14px 32px -20px rgba(28, 28, 28, .45);
}

#content .rs-linkcards--rows :where(h3) {
    margin: 0;
    font-size: 1.375rem;
    line-height: 1.3;
}

#content .rs-linkcards--rows :where(p) {
    margin: 0;
}

/* Überfahren irgendwo in der Karte füllt den Button – er ist ja derselbe Link. */
#content .rs-linkcards--rows>li:hover .btn.btn-primary.btn-border,
#content .rs-linkcards--rows>.grid>.nb-col:hover .btn.btn-primary.btn-border {
    background-color: var(--color-brand-red);
    color: #ffffff !important;
}

@media (min-width: 48rem) {

    #content .rs-linkcards--rows>li,
    #content .rs-linkcards--rows>.grid>.nb-col {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    }

    /* Titel links über zwei Zeilen, Text und Button rechts. Liste: direkte Kinder; Spalte: je Block ein .prose. */
    #content .rs-linkcards--rows>li>h3,
    #content .rs-linkcards--rows>.grid>.nb-col>.prose:nth-child(1) {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    #content .rs-linkcards--rows>li>p:nth-of-type(1),
    #content .rs-linkcards--rows>.grid>.nb-col>.prose:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
    }

    #content .rs-linkcards--rows>li>p:nth-of-type(2),
    #content .rs-linkcards--rows>.grid>.nb-col>.prose:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
    }
}

/* --- Bento „Drei Fragen": die überfahrene Kachel wird breit und dunkel, die
   bisher führende klein und weiß. Dasselbe Muster wie rs-welten (flex-grow), nur
   mit Hover-Gerät und ab Desktop-Breite – auf Touch bleibt das Raster wie bisher
   (Hover gibt es dort nicht, die Inhalte stehen ohnehin alle da). -------------- */
@media (min-width: 64rem) and (hover: hover) {
    #content .rs-bento>.grid {
        display: flex;
    }

    #content .rs-bento>.grid>.nb-col {
        flex: 1 1 0;
        min-width: 0;
        grid-column: auto;
        transition: flex-grow .5s ease, background-color .5s ease, border-color .5s ease, color .5s ease, padding .5s ease;
    }

    #content .rs-bento>.grid>.nb-col:first-child,
    #content .rs-bento>.grid>.nb-col:not(:first-child):is(:hover, :focus-within) {
        flex-grow: 2;
    }

    /* Sobald eine andere Kachel aktiv ist, wird die erste wieder zum Satelliten:
       weiße Fläche, Konturziffer grau, normale Schriftgröße. */
    #content .rs-bento>.grid:has(>.nb-col:not(:first-child):is(:hover, :focus-within))>.nb-col:first-child {
        flex-grow: 1;
        padding: 2rem;
        color: inherit;
        background-color: #ffffff;
        background-image: none;
        border-color: rgba(28, 28, 28, .12);
    }

    #content .rs-bento>.grid:has(>.nb-col:not(:first-child):is(:hover, :focus-within))>.nb-col:first-child::before {
        color: rgba(28, 28, 28, .07);
        -webkit-text-stroke-color: rgba(28, 28, 28, .3);
    }

    #content .rs-bento>.grid:has(>.nb-col:not(:first-child):is(:hover, :focus-within))>.nb-col:first-child :where(h2, h3, h4, strong, b) {
        color: inherit;
        font-size: 1.5rem;
    }

    #content .rs-bento>.grid:has(>.nb-col:not(:first-child):is(:hover, :focus-within))>.nb-col:first-child .prose:last-child:not(:first-child) {
        padding-top: 0;
        border-top-color: transparent;
    }
}

@media (prefers-reduced-motion: reduce) {
    #content .rs-bento>.grid>.nb-col {
        transition: none;
    }
}

/* --- Produktfamilie: Titel, Text, Bild und Button stehen je Zeile auf einer Linie ----------------
   Jede Spalte (.nb-col) belegt vier Zeilen des gemeinsamen Rasters und übernimmt sie per Subgrid. Die Zeilen
   sind damit über alle Spalten gleich hoch – ob die Beschreibung ein- oder zweizeilig ist, spielt keine Rolle,
   und das Bild beginnt in jeder Spalte auf derselben Höhe wie der Button darunter.
   Vorher (Flex, letzter Block per margin-top:auto nach unten) blieb nur der Button ausgerichtet; sobald ein
   Bild zwischen Text und Button lag, begannen die Bilder unterschiedlich hoch (2026-10-14).
   Erwartet je Spalte vier Blöcke (Titel, Text, Bild, Button); weniger/mehr bricht nichts, richtet nur nicht
   mehr bündig aus. Subgrid: Chrome 117, Safari 16, Firefox 71 – ältere Browser stapeln einfach. */
#content .rs-family>.grid {
    grid-auto-rows: auto;
}

#content .rs-family .nb-col {
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;
    row-gap: .25rem;
    align-content: start;
}

#content .rs-family .nb-col>* {
    margin-top: 0;
    margin-bottom: 0;
}

/* --- Bild + Akkordeon beginnen auf einer Höhe -------------------------------
   Das Akkordeon trägt my-8 (Abstand oben), das Bild nicht – ohne diese Regel sitzt
   die erste Aufklapp-Zeile 2rem unter der Oberkante des Bildes. */
#content .rs-media-accordion .nb-accordion {
    margin-top: 0;
}

#content .rs-media-accordion .nb-col>figure {
    margin-top: 0;
}

/* --- Akkordeon mit Bildwechsel (rs-media-swap, Auftraggeber 2026-10-14) -----------------------------------
   Statt Bilder IN die Aufklappbereiche zu legen, wechselt das Bild neben dem Akkordeon: ist Eintrag k offen, steht
   Bild k da. Aufbau im Seiteninhalt (Bereich mit zwei Spalten, CSS-Klasse `rs-media-accordion rs-media-swap`):
     linke Spalte   NUR Bilder – Bild k gehört zu Eintrag k (gleiche Reihenfolge), am besten gleiches Seitenverhältnis
     rechte Spalte  das Akkordeon mit „Nur einer offen" (sonst wäre nicht eindeutig, welches Bild gilt)
   Ohne JavaScript: das Akkordeon schaltet über das native `open`, CSS liest es per :has(). Die Bilder liegen
   übereinander in EINER Rasterzelle (kein Höhensprung beim Wechsel, Überblendung statt Springen).
   Fallbacks, alle gewollt: kein Eintrag offen oder Eintrag 1 offen → Bild 1; zu einem Eintrag gibt es kein Bild →
   Bild 1 bleibt stehen (die Regeln greifen nur, wenn Bild k existiert); Browser ohne :has() → Bild 1.
   Unsichtbare Bilder sind `visibility:hidden` und damit auch für Screenreader weg – es gibt immer genau EIN Bild. */
#content .rs-media-swap .nb-col:first-child {
    display: grid;
    align-content: start;
}

#content .rs-media-swap .nb-col:first-child>figure {
    grid-area: 1 / 1;
    align-self: start;
    margin: 0;
    transition: opacity .45s ease, visibility .45s;
}

#content .rs-media-swap .nb-col:first-child>figure:not(:first-child) {
    opacity: 0;
    visibility: hidden;
}

#content .rs-media-swap:has(.nb-accordion details:nth-of-type(2)[open]):has(.nb-col:first-child>figure:nth-child(2)) .nb-col:first-child>figure:nth-child(1) {
    opacity: 0;
    visibility: hidden;
}

#content .rs-media-swap:has(.nb-accordion details:nth-of-type(2)[open]) .nb-col:first-child>figure:nth-child(2) {
    opacity: 1;
    visibility: visible;
}

#content .rs-media-swap:has(.nb-accordion details:nth-of-type(3)[open]):has(.nb-col:first-child>figure:nth-child(3)) .nb-col:first-child>figure:nth-child(1) {
    opacity: 0;
    visibility: hidden;
}

#content .rs-media-swap:has(.nb-accordion details:nth-of-type(3)[open]) .nb-col:first-child>figure:nth-child(3) {
    opacity: 1;
    visibility: visible;
}

#content .rs-media-swap:has(.nb-accordion details:nth-of-type(4)[open]):has(.nb-col:first-child>figure:nth-child(4)) .nb-col:first-child>figure:nth-child(1) {
    opacity: 0;
    visibility: hidden;
}

#content .rs-media-swap:has(.nb-accordion details:nth-of-type(4)[open]) .nb-col:first-child>figure:nth-child(4) {
    opacity: 1;
    visibility: visible;
}

#content .rs-media-swap:has(.nb-accordion details:nth-of-type(5)[open]):has(.nb-col:first-child>figure:nth-child(5)) .nb-col:first-child>figure:nth-child(1) {
    opacity: 0;
    visibility: hidden;
}

#content .rs-media-swap:has(.nb-accordion details:nth-of-type(5)[open]) .nb-col:first-child>figure:nth-child(5) {
    opacity: 1;
    visibility: visible;
}

#content .rs-media-swap:has(.nb-accordion details:nth-of-type(6)[open]):has(.nb-col:first-child>figure:nth-child(6)) .nb-col:first-child>figure:nth-child(1) {
    opacity: 0;
    visibility: hidden;
}

#content .rs-media-swap:has(.nb-accordion details:nth-of-type(6)[open]) .nb-col:first-child>figure:nth-child(6) {
    opacity: 1;
    visibility: visible;
}

#content .rs-media-swap:has(.nb-accordion details:nth-of-type(7)[open]):has(.nb-col:first-child>figure:nth-child(7)) .nb-col:first-child>figure:nth-child(1) {
    opacity: 0;
    visibility: hidden;
}

#content .rs-media-swap:has(.nb-accordion details:nth-of-type(7)[open]) .nb-col:first-child>figure:nth-child(7) {
    opacity: 1;
    visibility: visible;
}

#content .rs-media-swap:has(.nb-accordion details:nth-of-type(8)[open]):has(.nb-col:first-child>figure:nth-child(8)) .nb-col:first-child>figure:nth-child(1) {
    opacity: 0;
    visibility: hidden;
}

#content .rs-media-swap:has(.nb-accordion details:nth-of-type(8)[open]) .nb-col:first-child>figure:nth-child(8) {
    opacity: 1;
    visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
    #content .rs-media-swap .nb-col:first-child>figure {
        transition: none;
    }
}

/* Konturziffer (3,5 rem, zweistellig ≈ 4,4 rem + 1,5 rem Abstand zum Rand) braucht mehr Luft als die
   bisherigen 3,5 rem – in den schmalen Kacheln lief „03" in die Überschrift. */
#content .rs-bento .nb-col :where(h2, h3) {
    padding-right: 4.5rem;
}

/* --- Gleich hohe Bilder in einem Bereich (rs-img-even, Korrekturvorlage v2 2026-10-27) ---------------------------
   Kachelraster mit Bild oben: unterschiedliche Seitenverhältnisse (Hochformat neben Quadrat) ließen die Kacheln
   versetzt beginnen. Einheitlich 4:3 und zugeschnitten; das ganze Bild zeigt die Lightbox (Bild-Haken „Großansicht"). */
#content .rs-img-even .nb-col>figure img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* --- Slider-Überschrift auch auf hellen Motiven lesbar (Korrekturvorlage v2, neue Slider-Bilder 2026-10-27) ---------
   Der Verlauf des Banner-Pakets (max. 60 % Schwarz) reicht auf der weißen Hauswand von Slide 2 nicht. Hier kräftiger,
   in Markenanthrazit, und ein weicher Schatten um die Schrift. Das Paket selbst bleibt unangetastet. */
#content .banner-slide__overlay {
    background: linear-gradient(to top, rgba(28, 28, 28, .86) 0%, rgba(28, 28, 28, .55) 45%, rgba(28, 28, 28, 0) 85%);
}

#content .banner-slide__title {
    text-shadow: 0 2px 14px rgba(0, 0, 0, .5);
}