/* Stufe1 Effekte – Kopfleiste und Auftritt der Titel.
   Alles hängt an html.s1fx: ohne JavaScript greift keine dieser Regeln. */

/* Kopfleiste: bleibt oben, gleitet beim Scrollen nach unten weg, kommt beim Scrollen nach oben zurück */
html.s1fx-kopf #masthead {
  position: fixed; top: var(--s1-bar, 0px); left: 0; right: 0; z-index: 1000;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s;
}
html.s1fx-kopf #inner-wrap { padding-top: var(--s1-kopf, 0px); }
html.s1fx-kopf #masthead.s1-unterwegs { box-shadow: 0 1px 18px rgba(0, 0, 0, 0.18); }
html.s1fx-kopf #masthead.s1-weg { transform: translateY(calc(-100% - var(--s1-bar, 0px))); box-shadow: none; }
html.s1fx-kopf #masthead:focus-within { transform: none; }

/* Auftritt: vor dem Auftritt unsichtbar */
html.s1fx .entry-content :is(h1, h2):not(.s1-check__title):not(.stufe1-oo-h):not([data-s1-fertig]),
html.s1fx [data-s1]:not([data-s1-fertig]) { visibility: hidden; }

/* Zeilen, die hinter einer Kante hervorsteigen: Platz für Umlaute und Unterlängen */
.s1-z-mask { padding: 0.14em 0.06em; margin: -0.14em -0.06em; }

@media (prefers-reduced-motion: reduce) {
  html.s1fx-kopf #masthead { transition: none; }
}

/* ====== BUEHNE ====== */
/* Bühne: Seitenvorhang und Karussell im Bereich der Immobilien */
html.s1fx .s1-listings.s1-buehne { padding: 0; position: relative; height: calc(100svh - var(--s1-bar, 0px)); min-height: 540px; overflow: hidden; background: #fff; }
html.s1fx .s1-listings.s1-buehne > .wp-block-group__inner-container { display: none; }
.s1-schicht { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 20px 24px; }
.s1-schicht-hell { background: #fff; align-items: center; text-align: center; }
html.s1fx .s1-listings .s1-schicht-hell h2 { color: rgb(37, 45, 66) !important; margin: 0; font-family: Merriweather, serif; font-weight: 300; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.15; max-width: 11em; }
.s1-vorhang-flaeche { position: absolute; inset: 0; background: rgb(140, 85, 63); }
.s1-schicht-dunkel { background: rgb(37, 45, 66); color: #fff; overflow: hidden; padding-top: calc(var(--s1-kopf, 0px) + 8px); padding-bottom: 12px; }
.s1-k { --w: min(54vw, 52svh); --g: min(clamp(2.25rem, 5.4vw, 4.75rem), 10svh); position: relative; width: 100%; outline-offset: -4px; }
.s1-k-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; max-width: 1240px; width: 100%; margin: 0 auto clamp(8px, 2svh, 22px); }
.s1-k-kopf .s1-headrow__links { margin: 0; }
.s1-k-filter { display: flex; gap: 8px; }
.s1-k-filter button { font: 400 0.9375rem/1.2 "Source Sans 3", sans-serif; padding: 8px 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.55); background: transparent; color: #fff; cursor: pointer; transition: background-color 0.25s, color 0.25s; }
.s1-k-filter button:hover, .s1-k-filter button:focus-visible { border-color: #fff; background: rgba(255, 255, 255, 0.12); }
.s1-k-filter button[aria-pressed="true"] { background: #fff; color: rgb(37, 45, 66); border-color: #fff; }
html.s1fx .s1-listings .s1-k-titel { max-width: none; width: 100%; position: relative; z-index: 3; text-align: center; pointer-events: none; margin: 0 0 calc(var(--g) * -0.5); font-family: Merriweather, serif; font-weight: 300; color: #fff; line-height: 1; }
.s1-k-titel .oben { display: block; font-style: italic; font-size: max(0.9375rem, calc(var(--g) * 0.3)); color: rgb(217, 164, 142); margin-bottom: 0.4em; }
.s1-k-titel .unten { display: block; font-size: var(--g); white-space: nowrap; text-shadow: 0 2px 26px rgba(18, 22, 36, 0.55); }
.s1-bogen { position: relative; height: calc(var(--w) * 0.5625); touch-action: pan-y; cursor: grab; }
.s1-bogen.zieht { cursor: grabbing; }
.s1-bogen-ring { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.s1-bogen-bild { position: absolute; left: 50%; top: 0; width: 0; height: 100%; margin: 0; transform-style: preserve-3d; }
.s1-streifen { position: absolute; left: 0; top: 0; height: 100%; background-color: rgb(27, 33, 51); background-repeat: no-repeat; backface-visibility: hidden; }
.s1-k-fuss { position: relative; z-index: 3; display: flex; align-items: center; justify-content: center; gap: clamp(16px, 2.4vw, 32px); margin-top: clamp(12px, 2.2svh, 26px); }
.s1-pfeil { width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.5); background: none; color: #fff; display: grid; place-items: center; cursor: pointer; transition: background-color 0.25s, border-color 0.25s; }
.s1-pfeil:hover, .s1-pfeil:focus-visible { background: rgb(140, 85, 63); border-color: rgb(140, 85, 63); }
.s1-pfeil svg { width: 18px; height: 18px; }
.s1-k-zahl { font: 400 0.9375rem/1 "Source Sans 3", sans-serif; letter-spacing: 0.14em; font-variant-numeric: tabular-nums; color: rgb(217, 164, 142); min-width: 5.4em; text-align: center; }
.s1-k-text { text-align: center; max-width: 44rem; margin: clamp(8px, 1.8svh, 20px) auto 0; padding-inline: 8px; }
.s1-k-text .name { font-family: Merriweather, serif; font-weight: 300; font-size: clamp(1rem, 1.45vw, 1.1875rem); line-height: 1.35; margin: 0 0 0.35em; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Absätze im Karussell: die Breitenbegrenzung des Themes aufheben, damit alles mittig steht */
html.s1fx .s1-listings .s1-k-text p { max-width: none; width: 100%; margin-left: auto; margin-right: auto; text-align: center; }
.s1-k-text .daten { font: 400 0.9375rem/1.4 "Source Sans 3", sans-serif; color: rgba(255, 255, 255, 0.78); margin: 0 0 0.8em; }
.s1-k-text a.s1-k-knopf { display: inline-block; background: rgb(140, 85, 63); color: #fff; text-decoration: none; font: 600 1rem/1 "Source Sans 3", sans-serif; padding: 12px 22px; border-radius: 4px; }
.s1-k-text a.s1-k-knopf:hover, .s1-k-text a.s1-k-knopf:focus-visible { background: rgb(120, 71, 52); }
@media (max-width: 760px) {
  /* Am Handy reicht der Weg über das Hauptmenü: die beiden Verweise entfallen, der Bereich wird luftiger */
  .s1-k-kopf .s1-headrow__links { display: none; }
  .s1-k { --w: 78vw; --g: clamp(2rem, 10vw, 3.25rem); }
  .s1-k-kopf { justify-content: center; }
}
