/* Realschule Lage: Design-System und Elemente. Alles unter .rsl bzw. .rsl-* */

:root {
  --lage: oklch(0.42 0.2 266);
  --lage-deep: oklch(0.25 0.13 266);
  --lage-soft: oklch(0.93 0.035 266);
  --ink: oklch(0.21 0.025 266);
  --ink-2: oklch(0.40 0.03 266);
  --bg: oklch(0.985 0.003 266);
  --surface: oklch(0.955 0.01 266);
  --line: oklch(0.87 0.015 266);
  --signal: oklch(0.74 0.17 42);
  --on-signal: oklch(0.2 0.03 40);
  --on-lage: oklch(0.99 0.005 266);
  --link: var(--lage);

  --font-display: "Schibsted Grotesk", "Arial Narrow", Arial, sans-serif;
  --font-body: "Atkinson Hyperlegible Next", Arial, sans-serif;

  --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.94rem);
  --step-0: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-1: clamp(1.33rem, 1.2rem + 0.55vw, 1.6rem);
  --step-2: clamp(1.66rem, 1.4rem + 1.1vw, 2.25rem);
  --step-3: clamp(2.1rem, 1.6rem + 2.2vw, 3.3rem);
  --step-4: clamp(2.6rem, 1.8rem + 3.6vw, 4.6rem);

  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --section: clamp(4.5rem, 3rem + 6vw, 9rem);
  --radius-media: 6px;
  --radius-panel: 10px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;

  /* z-index: Header 30, Menü 40 */
  --z-header: 30;
  --z-menu: 40;
}

/* Dunkles Design: data-theme setzt ein Skript im <head> (Gerät oder Schalter im Header). */
:root[data-theme="dark"] {
  --bg: oklch(0.17 0.02 266);
  --surface: oklch(0.215 0.025 266);
  --ink: oklch(0.95 0.008 266);
  --ink-2: oklch(0.78 0.02 266);
  --line: oklch(0.32 0.03 266);
  --lage-soft: oklch(0.26 0.06 266);
  --link: oklch(0.76 0.14 266);
  --lage-deep: oklch(0.22 0.09 266);
  color-scheme: dark;
}
:root { color-scheme: light; --fs-color-primary: var(--lage); }
/* Flatsome: Flächen bleiben Schulblau (weiße Schrift), nur Umriss-Buttons und Pfeile werden im Dunkeln hell. */
[data-theme="dark"] body.rsl .button.primary.is-outline, [data-theme="dark"] body.rsl .meta-nav { color: var(--link); border-color: var(--link); }
[data-theme="dark"] body.rsl .button.primary.is-outline:hover { background: var(--link); color: var(--bg); }
html { background: var(--bg); }

/* ---------- Basis (überschreibt Flatsome) ---------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.rsl { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: var(--step-0); line-height: 1.6; }
body.rsl #wrapper, body.rsl #main { background: var(--bg); }
body.rsl h1, body.rsl h2, body.rsl h3, body.rsl h4, body.rsl h5, body.rsl h6 {
  font-family: var(--font-display); color: var(--ink); letter-spacing: -0.02em; text-wrap: balance;
}
body.rsl a { color: var(--link); text-underline-offset: 0.18em; }
body.rsl :focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
body.rsl .skip-link:focus { z-index: 100; }

.rsl-wrap { width: min(100% - 2 * var(--gutter), 1320px); margin-inline: auto; }
.rsl-section-reset, [class^="rsl-"] { box-sizing: border-box; }
[class^="rsl-"] h2, [class^="rsl-"] h3, [class^="rsl-"] p, [class^="rsl-"] ul, [class^="rsl-"] ol, [class^="rsl-"] figure, [class^="rsl-"] blockquote { margin: 0; }
[class^="rsl-"] ul, [class^="rsl-"] ol { padding: 0; list-style: none; }
[class^="rsl-"] li { margin: 0; }
.rsl-icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.18em; }
.rsl-admin-hint { padding: 1rem; border: 1px dashed var(--line); color: var(--ink-2); }
.rsl-empty { color: var(--ink-2); }

/* Buttons: interaktiv = Pille, Medien 6px, Flächen 10px */
.rsl-btn, body.rsl .rsl-btn {
  --btn-bg: var(--lage); --btn-fg: var(--on-lage);
  display: inline-flex; align-items: center; gap: 0.55em;
  min-height: 3rem; margin: 0; padding: 0.7rem 1.35rem;
  border-radius: 999px; border: 2px solid var(--btn-bg);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-display); font-weight: 700; font-size: var(--step-0); line-height: 1.2;
  text-transform: none; letter-spacing: -0.005em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.rsl-btn .rsl-icon { transition: transform 0.3s var(--ease-out); }
.rsl-btn:hover .rsl-icon:last-child { transform: translateX(4px); }
.rsl-btn:active { transform: translateY(1px) scale(0.985); }
.rsl-btn--ghost, body.rsl .rsl-btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line); }
.rsl-btn--ghost:hover { border-color: var(--ink); }
.rsl-btn--signal, body.rsl .rsl-btn--signal { --btn-bg: var(--signal); --btn-fg: var(--on-signal); }
.rsl-btn--light, body.rsl .rsl-btn--light { --btn-bg: var(--on-lage); --btn-fg: var(--lage); }
.rsl-btn--sm, body.rsl .rsl-btn--sm { min-height: 2.6rem; padding: 0.45rem 1rem; font-size: var(--step--1); }

/* ---------- Header ---------- */
body.rsl #header { position: sticky; top: 0; z-index: var(--z-header); height: auto; min-height: 0; background: transparent; }
body.rsl #header .header-wrapper { position: static; }
body.rsl.admin-bar #header { top: 32px; }
@media (max-width: 782px) { body.rsl.admin-bar #header { top: 46px; } }
@media (max-width: 600px) { body.rsl.admin-bar #header { top: 0; } }
body.rsl #header .header-bg-container { display: none; }
.rsl-header {
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out);
}
.rsl-header.is-scrolled { border-bottom-color: var(--line); }
.rsl-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.rsl-logo { display: block; flex: none; color: var(--ink); font-family: var(--font-display); font-weight: 800; text-decoration: none; }
.rsl-logo img { display: block; height: 30px; width: auto; }
[data-theme="dark"] .rsl-logo img { filter: invert(1) hue-rotate(180deg) saturate(1.4); }

.rsl-theme-toggle, body.rsl .rsl-theme-toggle {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; min-height: 0; margin: 0; padding: 0;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font-size: 1.15rem; cursor: pointer;
  transition: border-color 0.2s var(--ease-out), transform 0.3s var(--ease-out);
}
.rsl-theme-toggle:hover { border-color: var(--ink); }
.rsl-theme-toggle:active { transform: rotate(-20deg) scale(0.95); }
.rsl-theme-toggle .is-sun, [data-theme="dark"] .rsl-theme-toggle .is-moon { display: none; }
[data-theme="dark"] .rsl-theme-toggle .is-sun { display: block; }

.rsl-nav { margin-left: auto; }
.rsl-nav__list { display: flex; gap: 0.1rem; margin: 0; padding: 0; list-style: none; }
.rsl-nav__list > li { position: relative; margin: 0; }
.rsl-nav__list a {
  display: flex; align-items: center; gap: 0.3em; padding: 0.55rem 0.7rem; border-radius: 999px;
  color: var(--ink); font-weight: 500; font-size: 1rem; text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s var(--ease-out);
}
.rsl-nav__list a:hover, .rsl-nav__list li:focus-within > a { background: var(--surface); }
.rsl-nav__list .current-menu-item > a, .rsl-nav__list .current-menu-ancestor > a { color: var(--link); }
.rsl-nav__list > .menu-item-has-children > a::after {
  content: ""; width: 0.45em; height: 0.45em; margin-left: 0.1em;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-0.15em) rotate(45deg); opacity: 0.6;
}
.rsl-nav .sub-menu {
  position: absolute; left: 0; top: 100%; z-index: var(--z-menu);
  min-width: 15rem; margin: 0; padding: 0.5rem; list-style: none;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-panel);
  box-shadow: 0 18px 40px -20px oklch(0.2 0.01 266 / 0.35);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out), visibility 0.2s;
}
.rsl-nav li:hover > .sub-menu, .rsl-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.rsl-nav .sub-menu li { position: relative; margin: 0; }
.rsl-nav .sub-menu a { border-radius: 6px; padding: 0.5rem 0.75rem; white-space: normal; }
.rsl-nav .sub-menu .sub-menu { left: 100%; top: -0.5rem; }
.rsl-nav .sub-menu .menu-item-has-children > a::after { content: "›"; margin-left: auto; opacity: 0.6; }

.rsl-header__actions { display: flex; align-items: center; gap: 0.5rem; }
/* Runde Icon-Knöpfe im Header, die beim Hover zur Pille mit Text wachsen */
.rsl-pill, body.rsl .rsl-pill {
  display: inline-flex; align-items: center; height: 2.6rem; padding: 0 calc((2.6rem - 1.15rem) / 2 - 1px);
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: var(--step--1); line-height: 1; text-decoration: none; white-space: nowrap;
  transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}
.rsl-pill .rsl-icon { width: 1.15rem; height: 1.15rem; vertical-align: 0; }
.rsl-pill__label { display: grid; grid-template-columns: 0fr; transition: grid-template-columns 0.35s var(--ease-out); }
.rsl-pill__label > span { min-width: 0; overflow: hidden; padding-block: 0.3em; margin-block: -0.3em; }
.rsl-pill__label > span::before { content: ""; display: inline-block; width: 0.5rem; }
.rsl-pill:hover, .rsl-pill:focus-visible { border-color: var(--ink); }
.rsl-pill:hover .rsl-pill__label, .rsl-pill:focus-visible .rsl-pill__label { grid-template-columns: 1fr; }
.rsl-pill--signal, body.rsl .rsl-pill--signal { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.rsl-pill--signal:hover, .rsl-pill--signal:focus-visible { border-color: var(--signal); }
@media (prefers-reduced-motion: reduce) { .rsl-pill__label { transition: none; } }
/* Der Menüpunkt "Login" steckt am Desktop im Schloss-Knopf */
.rsl-nav__list > li:has(> a[href*="/lehrerbereich"]) { display: none; }
.rsl-menu-toggle, body.rsl .rsl-menu-toggle {
  display: none; place-items: center; width: 2.75rem; height: 2.75rem; min-height: 0; margin: 0; padding: 0;
  border: 0; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 1.3rem; cursor: pointer;
}
@media (max-width: 1180px) {
  .rsl-nav { display: none; }
  .rsl-header__actions { margin-left: auto; }
  .rsl-menu-toggle, body.rsl .rsl-menu-toggle { display: grid; }
  /* Login steht dann im ausklappbaren Menü */
  .rsl-header__actions .rsl-pill:not(.rsl-pill--signal) { display: none; }
}
@media (max-width: 420px) { .rsl-header__inner { gap: 0.75rem; } .rsl-header__actions { gap: 0.4rem; } .rsl-logo img { height: 26px; } }

.rsl-mobile-menu {
  border: 0; padding: 0; margin: 0; max-width: none; max-height: none;
  width: 100%; height: 100dvh; background: var(--bg); color: var(--ink); overflow-y: auto;
}
.rsl-mobile-menu[open] { display: block; }
.rsl-mobile-menu::backdrop { background: transparent; }
.rsl-mobile-menu__bar { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; min-height: var(--header-h); padding: 0 var(--gutter); background: var(--bg); }
.rsl-mobile-menu__title { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); }
.rsl-mobile-menu .rsl-menu-toggle { display: grid; }
.rsl-mobile-menu__list { margin: 0; padding: 0.5rem var(--gutter) 3rem; list-style: none; }
.rsl-mobile-menu__list li { margin: 0; }
.rsl-mobile-menu__list > li > a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--line); color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); text-decoration: none; }
.rsl-mobile-menu__list .sub-menu { margin: 0; padding: 0.4rem 0 0.8rem 1rem; list-style: none; }
.rsl-mobile-menu__list .sub-menu a { display: block; padding: 0.45rem 0; color: var(--ink-2); text-decoration: none; }

/* ---------- Einstieg ---------- */
.rsl-hero { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5.5rem) clamp(3rem, 2rem + 4vw, 6rem); }
.rsl-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
body.rsl .rsl-hero__title { margin: 0; font-size: var(--step-4); font-weight: 800; letter-spacing: -0.035em; line-height: 0.98; }
.rsl-hero__line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.rsl-hero__line > span { display: inline-block; }
.rsl-brush { position: relative; display: inline-block; color: var(--link); }
.rsl-brush svg { position: absolute; left: -3%; bottom: -0.16em; width: 106%; height: 0.32em; overflow: visible; }
.rsl-brush path { fill: none; stroke: var(--signal); stroke-width: 9; stroke-linecap: round; }
.rsl-hero__lede { margin-top: 1.5rem !important; font-size: var(--step-1); line-height: 1.45; color: var(--ink-2); max-width: 34ch; }
.rsl-hero__ctas { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.rsl-hero__media { position: relative; aspect-ratio: 5 / 4.4; }
.rsl-hero__media figure { position: absolute; overflow: hidden; border-radius: var(--radius-media); background: var(--surface); }
.rsl-hero__main { inset: 0 0 14% 12%; }
.rsl-hero__inset { width: 46%; aspect-ratio: 4 / 3; left: 0; bottom: 0; outline: 6px solid var(--bg); box-shadow: 0 20px 40px -24px oklch(0.2 0.01 266 / 0.35); }
.rsl-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.rsl-hero__badge {
  position: absolute; right: -0.5rem; bottom: 4%; max-width: 13rem;
  padding: 0.75rem 1rem; border-radius: var(--radius-panel);
  background: var(--lage); color: var(--on-lage); font-family: var(--font-display); font-weight: 700; font-size: var(--step--1); line-height: 1.25;
  transform: rotate(-2deg); box-shadow: 0 14px 30px -18px oklch(0.2 0.01 266 / 0.4);
}
.rsl-hero__badge strong { display: block; font-size: var(--step-1); }
@media (max-width: 860px) {
  .rsl-hero__grid { grid-template-columns: 1fr; }
  .rsl-hero__media { aspect-ratio: 4 / 3.4; }
  .rsl-hero__badge { right: 0; }
}

/* ---------- Schnell gefunden ---------- */
.rsl-quick { border-block: 1px solid var(--line); background: var(--surface); }
.rsl-quick__inner { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 2rem; padding-block: 1.1rem; }
body.rsl .rsl-quick h2 { font-size: var(--step-0); font-weight: 700; letter-spacing: 0; white-space: nowrap; }
.rsl-quick ul { display: flex; flex-wrap: wrap; gap: 0.5rem; }
body.rsl .rsl-quick a {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
  color: var(--ink); font-weight: 500; text-decoration: none;
  transition: border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.rsl-quick a .rsl-icon { color: var(--link); }
body.rsl .rsl-quick a:hover { border-color: var(--lage); transform: translateY(-2px); }

/* ---------- Weg an die Schule ---------- */
.rsl-path { position: relative; overflow: hidden; padding-block: var(--section); background: var(--lage); color: var(--on-lage); }
[data-theme="dark"] .rsl-path { background: oklch(0.34 0.22 265); }
body.rsl .rsl-path h2 { max-width: 16ch; color: var(--on-lage); font-size: var(--step-3); font-weight: 800; }
body.rsl .rsl-path h3 { color: var(--on-lage); }
body.rsl .rsl-path a { color: var(--on-lage); }
.rsl-path__intro { margin-top: 1.25rem !important; max-width: 52ch; font-size: var(--step-1); line-height: 1.45; color: oklch(0.93 0.03 266); }
.rsl-steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 1rem + 3vw, 4rem); margin-top: clamp(3rem, 2rem + 4vw, 5.5rem) !important; counter-reset: rsl-step; }
.rsl-steps__trail { position: absolute; left: 0; right: 0; top: 1.75rem; width: 100%; height: 40px; overflow: visible; pointer-events: none; }
.rsl-steps__trail path { fill: none; stroke: var(--signal); stroke-width: 7; stroke-linecap: round; }
.rsl-step { position: relative; counter-increment: rsl-step; }
.rsl-step__num { position: relative; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 999px; background: var(--on-lage); color: var(--lage); font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); }
.rsl-step__num::before { content: counter(rsl-step); }
body.rsl .rsl-step h3 { margin-top: 1.5rem; font-size: var(--step-2); font-weight: 800; }
.rsl-step p { margin-top: 0.75rem !important; max-width: 36ch; color: oklch(0.93 0.03 266); }
body.rsl .rsl-step__info { display: flex; align-items: center; gap: 0.6rem; margin-top: 1.25rem !important; color: var(--on-lage); font-weight: 700; }
body.rsl .rsl-step__more { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1.25rem; font-weight: 700; }
.rsl-path__closing { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: clamp(3rem, 2rem + 3vw, 4.5rem); padding-top: 2rem; border-top: 1px solid oklch(0.99 0 0 / 0.25); }
.rsl-path__closing p { font-size: var(--step-1); font-weight: 500; }
body.rsl .rsl-path__closing a { font-weight: 700; font-size: var(--step-1); }
@media (max-width: 860px) {
  .rsl-steps { grid-template-columns: 1fr; gap: 2.5rem; }
  .rsl-steps__trail { display: none; }
  .rsl-steps::before { content: ""; position: absolute; left: calc(1.75rem - 3px); top: 1.75rem; bottom: 1rem; width: 6px; border-radius: 6px; background: var(--signal); transform-origin: top; }
  .rsl-step { padding-left: 5rem; }
  .rsl-step__num { position: absolute; left: 0; top: 0; }
  body.rsl .rsl-step h3 { margin-top: 0.4rem; }
}

/* ---------- Abschnittskopf ---------- */
.rsl-head { max-width: 40rem; }
body.rsl .rsl-head h2, body.rsl .rsl-news__head h2, body.rsl .rsl-dates h2, body.rsl .rsl-people h2, body.rsl .rsl-staff h2 { font-size: var(--step-3); font-weight: 800; line-height: 1.05; }
.rsl-head p { margin-top: 1rem !important; font-size: var(--step-1); line-height: 1.45; color: var(--ink-2); }

/* ---------- Profil (Bento) ---------- */
.rsl-profile { padding-block: var(--section); }
.rsl-bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: minmax(12rem, auto); grid-auto-flow: dense; gap: 1rem; margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
body.rsl .rsl-tile {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.4rem; border-radius: var(--radius-panel); background: var(--surface); color: var(--ink); text-decoration: none;
}
body.rsl .rsl-tile h3 { font-size: var(--step-1); font-weight: 800; line-height: 1.15; }
.rsl-tile p { margin-top: 0.4rem !important; max-width: 38ch; font-size: var(--step--1); color: var(--ink-2); }
.rsl-tile__go { position: absolute; top: 1.1rem; right: 1.1rem; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 999px; background: var(--bg); color: var(--ink); transition: transform 0.35s var(--ease-out), background-color 0.35s var(--ease-out); }
.rsl-tile:hover .rsl-tile__go { transform: rotate(-45deg); background: var(--signal); color: var(--on-signal); }
.rsl-tile--wide { grid-column: span 4; grid-row: span 2; }
.rsl-tile--tall { grid-column: span 2; grid-row: span 2; }
.rsl-tile--small { grid-column: span 2; }
body.rsl .rsl-tile--photo { min-height: 22rem; background: oklch(0.25 0.13 266); color: oklch(0.99 0 0); }
.rsl-tile--photo img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out); }
.rsl-tile--photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, oklch(0.16 0.06 266 / 0.85), oklch(0.16 0.06 266 / 0.05) 62%); }
.rsl-tile--photo:hover img { transform: scale(1.04); }
body.rsl .rsl-tile--photo h3, .rsl-tile--photo p { color: oklch(0.99 0 0); }
body.rsl .rsl-tile--blue { background: var(--lage); color: var(--on-lage); }
body.rsl .rsl-tile--blue h3, .rsl-tile--blue p { color: var(--on-lage); }
.rsl-tile__big { margin-bottom: auto; font-family: var(--font-display); font-weight: 800; font-size: var(--step-3); line-height: 0.95; letter-spacing: -0.03em; }
body.rsl .rsl-tile--line { background: transparent; border: 1px solid var(--line); }
@media (max-width: 960px) {
  .rsl-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rsl-tile--wide { grid-column: span 2; grid-row: auto; }
  .rsl-tile--tall, .rsl-tile--small { grid-column: span 1; grid-row: auto; }
}
@media (max-width: 560px) {
  .rsl-bento { grid-template-columns: 1fr; }
  .rsl-tile--wide, .rsl-tile--tall, .rsl-tile--small { grid-column: auto; }
  body.rsl .rsl-tile--photo { min-height: 18rem; }
}

/* ---------- Aktuelles ---------- */
.rsl-news { padding-block: 0 var(--section); }
.rsl-news__head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 1rem; }
.rsl-news__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.5rem, 1rem + 3vw, 4rem); margin-top: 2.5rem; }
body.rsl .rsl-lead a, body.rsl .rsl-story a { color: inherit; text-decoration: none; }
.rsl-lead a { display: block; }
.rsl-lead__img { overflow: hidden; aspect-ratio: 16 / 10; border-radius: var(--radius-media); background: var(--surface); }
.rsl-lead__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out); }
.rsl-lead a:hover img { transform: scale(1.03); }
.rsl-lead time, .rsl-story time { display: block; margin-top: 1.25rem; font-size: var(--step--1); font-weight: 500; color: var(--ink-2); }
body.rsl .rsl-lead h3 { margin-top: 0.4rem; font-size: var(--step-2); font-weight: 800; line-height: 1.1; }
.rsl-lead a:hover h3, .rsl-story a:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
.rsl-lead p { margin-top: 0.75rem !important; max-width: 60ch; color: var(--ink-2); }
.rsl-stories { display: grid; align-content: start; gap: 1.5rem; }
.rsl-story a { display: grid; grid-template-columns: 7.5rem 1fr; align-items: start; gap: 1.1rem; }
.rsl-story__img { overflow: hidden; aspect-ratio: 1; border-radius: var(--radius-media); }
.rsl-story__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.rsl-story a:hover img { transform: scale(1.06); }
.rsl-story__img--empty { display: grid; place-items: center; background: var(--lage-soft); color: var(--link); font-size: 2.2rem; }
.rsl-story time { margin-top: 0; }
body.rsl .rsl-story h3 { margin-top: 0.25rem; font-size: var(--step-1); font-weight: 700; line-height: 1.15; }
@media (max-width: 860px) { .rsl-news__grid { grid-template-columns: 1fr; } }

/* ---------- Termine ---------- */
.rsl-dates { padding-block: var(--section); background: var(--surface); }
.rsl-dates__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 1rem + 4vw, 6rem); }
.rsl-dates__aside p { margin-top: 1rem !important; max-width: 36ch; color: var(--ink-2); }
.rsl-dates__links { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; margin-top: 1.75rem; }
body.rsl .rsl-dates__links a { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; }
.rsl-date-list li { display: grid; grid-template-columns: 5.5rem 1fr auto; align-items: center; gap: 1.25rem; padding-block: 1.1rem; }
.rsl-date-list li + li { border-top: 1px solid var(--line); }
.rsl-date-list__day { font-family: var(--font-display); line-height: 1; }
.rsl-date-list__day b { display: block; font-size: var(--step-3); font-weight: 800; letter-spacing: -0.03em; color: var(--link); }
.rsl-date-list__day span { font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); }
body.rsl .rsl-date-list h3 { font-size: var(--step-1); font-weight: 700; line-height: 1.2; }
body.rsl .rsl-date-list h3 a { color: var(--ink); text-decoration: none; }
body.rsl .rsl-date-list h3 a:hover { text-decoration: underline; }
.rsl-date-list__meta { margin-top: 0.2rem !important; font-size: var(--step--1); color: var(--ink-2); }
.rsl-tag { padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--lage-soft); color: var(--ink); font-size: var(--step--1); font-weight: 700; white-space: nowrap; }
.rsl-dates__empty { display: grid; justify-items: start; align-content: center; gap: 0.75rem; padding: 2rem; border: 1px dashed var(--line); border-radius: var(--radius-panel); color: var(--ink-2); }
.rsl-dates__empty .rsl-icon { font-size: 2rem; color: var(--link); }
body.rsl .rsl-dates__empty a { font-weight: 700; }
@media (max-width: 860px) {
  .rsl-dates__grid { grid-template-columns: 1fr; }
  .rsl-date-list li { grid-template-columns: 4.5rem 1fr; }
  .rsl-tag { grid-column: 2; justify-self: start; }
}

/* ---------- Schulleitung & Sekretariat ---------- */
.rsl-people { padding-block: var(--section) 0; }
.rsl-people__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: start; }
.rsl-persons { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1.5rem; margin-top: 2rem !important; }
.rsl-person__photo { overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--radius-media); background: var(--lage-soft); }
.rsl-person__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.rsl-person__initials { display: grid; place-items: center; height: 100%; font-family: var(--font-display); font-weight: 800; font-size: var(--step-3); color: var(--link); }
.rsl-person__name { margin-top: 0.85rem !important; font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); line-height: 1.15; }
.rsl-person__role { margin-top: 0.2rem !important; font-size: var(--step--1); color: var(--ink-2); }
body.rsl .rsl-person__mail { display: inline-block; margin-top: 0.35rem; font-size: var(--step--1); word-break: break-all; }
.rsl-office { position: sticky; top: calc(var(--header-h) + 1.5rem); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); border-radius: var(--radius-panel); background: var(--lage); color: var(--on-lage); }
body.rsl .rsl-office h3 { color: var(--on-lage); font-size: var(--step-2); font-weight: 800; }
.rsl-office p { margin-top: 0.75rem !important; color: oklch(0.93 0.03 266); }
body.rsl .rsl-office__line { display: flex; align-items: center; gap: 0.6rem; margin-top: 1rem; color: var(--on-lage); font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); word-break: break-all; }
.rsl-office__hours { font-size: var(--step--1); }
@media (max-width: 960px) { .rsl-people__grid { grid-template-columns: 1fr; } .rsl-office { position: static; } }

/* ---------- Kollegium ---------- */
.rsl-staff { padding-block: var(--section); }
.rsl-staff__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem 3rem; }
.rsl-staff__head p { margin-top: 1rem !important; max-width: 46ch; color: var(--ink-2); }
.rsl-search { display: grid; gap: 0.4rem; min-width: min(100%, 20rem); }
body.rsl .rsl-search label { margin: 0; font-size: var(--step--1); font-weight: 700; color: var(--ink); }
body.rsl .rsl-search input {
  height: 3rem; margin: 0; padding: 0 1.1rem; border: 2px solid var(--line); border-radius: 999px;
  background: var(--bg); color: var(--ink); font: inherit; box-shadow: none;
}
body.rsl .rsl-search input::placeholder { color: var(--ink-2); opacity: 1; }
body.rsl .rsl-search input:focus { border-color: var(--lage); outline: none; }
.rsl-staff__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0 2rem; margin-top: 2.5rem !important; }
.rsl-staff__list li { display: grid; gap: 0.1rem; padding-block: 0.85rem; border-bottom: 1px solid var(--line); }
.rsl-staff__list li[hidden] { display: none; }
.rsl-staff__name { font-weight: 700; }
body.rsl .rsl-staff__list a { font-size: var(--step--1); word-break: break-all; text-decoration: none; }
body.rsl .rsl-staff__list a:hover { text-decoration: underline; }
.rsl-staff__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem !important; color: var(--ink-2); }

/* ---------- Geschichte ---------- */
.rsl-history { padding-block: var(--section); background: var(--surface); }
.rsl-history__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem; align-items: end; }
.rsl-history__year { grid-column: 1 / span 7; font-family: var(--font-display); font-weight: 800; font-size: clamp(5rem, 2rem + 14vw, 14rem); line-height: 0.82; letter-spacing: -0.04em; color: var(--link); }
.rsl-history__img { grid-column: 8 / span 5; }
.rsl-history__img img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--radius-media); filter: grayscale(1) contrast(1.05); }
.rsl-history__img figcaption { margin-top: 0.6rem; font-size: var(--step--1); color: var(--ink-2); }
.rsl-history__text { grid-column: 1 / span 7; }
body.rsl .rsl-history__text h2 { max-width: 22ch; font-size: var(--step-2); font-weight: 800; }
.rsl-history__text p { margin-top: 1rem !important; max-width: 56ch; color: var(--ink-2); }
body.rsl .rsl-history__text a { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1.25rem; font-weight: 700; }
.rsl-timeline {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(15rem, 18rem); gap: 1.5rem;
  margin-top: clamp(3rem, 2rem + 3vw, 4.5rem) !important; padding-bottom: 1.25rem !important;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.rsl-milestone { position: relative; scroll-snap-align: start; padding-top: 1.75rem; border-top: 3px solid var(--line); }
.rsl-milestone::before { content: ""; position: absolute; top: -0.55rem; left: 0; width: 0.8rem; height: 0.8rem; border-radius: 999px; background: var(--signal); }
.rsl-milestone__year { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); color: var(--ink); line-height: 1; }
.rsl-milestone p + p { margin-top: 0.6rem !important; font-size: var(--step--1); color: var(--ink-2); }
.rsl-quote { margin-top: clamp(3rem, 2rem + 3vw, 5rem) !important; padding-left: clamp(0rem, -2rem + 8vw, 8rem); }
body.rsl .rsl-quote blockquote { max-width: 30ch; margin: 0; padding: 0; border: 0; font-family: var(--font-display); font-style: normal; font-weight: 700; font-size: var(--step-2); line-height: 1.2; color: var(--ink); }
.rsl-quote figcaption { margin-top: 0.75rem; color: var(--ink-2); }
@media (max-width: 860px) { .rsl-history__year, .rsl-history__img, .rsl-history__text { grid-column: 1 / -1; } }

/* ---------- Footer ---------- */
body.rsl #footer { background: var(--lage-deep); }
body.rsl #footer .absolute-footer { display: none; }
.rsl-footer { padding-block: clamp(4rem, 3rem + 4vw, 7rem) 2rem; background: var(--lage-deep); color: oklch(0.88 0.02 266); }
.rsl-footer p, .rsl-footer li, .rsl-footer address { margin: 0; color: oklch(0.88 0.02 266); font-style: normal; }
.rsl-footer ul { margin: 0; padding: 0; list-style: none; }
.rsl-footer li { margin: 0; border: 0; }
body.rsl .rsl-footer a { color: oklch(0.99 0 0); text-decoration: none; }

.rsl-footer__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2.5rem 4rem; padding-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); border-bottom: 1px solid oklch(0.99 0 0 / 0.14); }
.rsl-footer__title { font-family: var(--font-display); font-weight: 800; font-size: var(--step-4); line-height: 0.98; letter-spacing: -0.035em; color: oklch(0.99 0 0) !important; text-wrap: balance; }
.rsl-footer__intro { margin-top: 1.25rem !important; max-width: 38ch; font-size: var(--step-1); line-height: 1.45; }
.rsl-footer__contact { display: grid; gap: 1.25rem; }
body.rsl .rsl-footer__big { display: flex; align-items: center; gap: 1rem; font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); line-height: 1.1; letter-spacing: -0.01em; }
.rsl-footer__big .rsl-icon { box-sizing: content-box; width: 1.4rem; height: 1.4rem; padding: 0.9rem; border-radius: 999px; background: oklch(0.99 0 0 / 0.1); transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out); }
.rsl-footer__big span { display: grid; gap: 0.2rem; }
.rsl-footer__big small { font-family: var(--font-body); font-weight: 500; font-size: var(--step--1); letter-spacing: 0; color: oklch(0.82 0.03 266); }
.rsl-footer__big:hover .rsl-icon { background: var(--signal); color: var(--on-signal); }
.rsl-footer__big:hover span { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }

.rsl-footer__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.15fr); gap: 2.5rem; padding-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
.rsl-footer__h { margin-bottom: 0.9rem !important; font-family: var(--font-display); font-weight: 700; font-size: var(--step-0); color: oklch(0.99 0 0) !important; }
.rsl-footer__grid p + p { margin-top: 0.75rem; }
.rsl-footer__links { display: grid; gap: 0.55rem; }
body.rsl .rsl-footer__links a { color: oklch(0.88 0.02 266); }
body.rsl .rsl-footer__links a:hover { color: oklch(0.99 0 0); text-decoration: underline; text-underline-offset: 0.2em; }
.rsl-footer__brand { justify-self: end; text-align: right; }
.rsl-footer__brand img { display: inline-block; height: 34px; width: auto; filter: brightness(0) invert(1); }
.rsl-footer__brand p { margin-top: 0.75rem !important; font-size: var(--step--1); }

.rsl-footer__base { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; margin-top: clamp(3rem, 2rem + 3vw, 5rem); padding-top: 1.5rem; border-top: 1px solid oklch(0.99 0 0 / 0.14); font-size: var(--step--1); color: oklch(0.82 0.03 266); }
.rsl-footer__legal { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
body.rsl .rsl-footer__legal a, body.rsl .rsl-footer__top-link { color: oklch(0.88 0.02 266); }
body.rsl .rsl-footer__legal a:hover, body.rsl .rsl-footer__top-link:hover { color: oklch(0.99 0 0); text-decoration: underline; text-underline-offset: 0.2em; }
body.rsl .rsl-footer__top-link { display: inline-flex; align-items: center; gap: 0.4rem; margin-left: auto; font-weight: 700; }
.rsl-footer__top-link .rsl-icon { transform: rotate(-90deg); }

/* "Powered by"-Hinweis des Cookie-Plugins (Gratisversion) unter dem Footer: farblich angleichen */
body.rsl > a[id$="-powered-by"] { display: block; padding: 0.5rem var(--gutter) 1rem; background: var(--lage-deep); color: oklch(0.8 0.03 266) !important; font-size: 0.8rem; text-align: center; }

@media (max-width: 960px) {
  .rsl-footer__top { grid-template-columns: 1fr; }
  .rsl-footer__grid { grid-template-columns: 1fr 1fr; }
  .rsl-footer__brand { justify-self: start; text-align: left; }
}
@media (max-width: 560px) {
  .rsl-footer__grid { grid-template-columns: 1fr; }
  body.rsl .rsl-footer__big { font-size: var(--step-1); }
  body.rsl .rsl-footer__top-link { margin-left: 0; }
}

/* ---------- Unterseiten: Seitenkopf und Fließtext ---------- */
.rsl-page-head { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(2rem, 1.5rem + 2.5vw, 3.75rem); background: linear-gradient(to bottom, var(--surface), var(--bg)); }
.rsl-page-head::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: linear-gradient(to right, transparent, var(--line) 20%, var(--line) 80%, transparent); }
.rsl-page-head__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2rem clamp(2rem, 1rem + 4vw, 5rem); }
.rsl-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; margin: 0 0 1.1rem; padding: 0; list-style: none; font-size: var(--step--1); color: var(--ink-2); }
.rsl-crumbs li { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; }
.rsl-crumbs .rsl-icon { width: 1em; height: 1em; }
.rsl-crumbs li > .rsl-icon { width: 0.8em; height: 0.8em; opacity: 0.6; }
body.rsl .rsl-crumbs a { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ink-2); text-decoration: none; }
body.rsl .rsl-crumbs a:hover { color: var(--link); text-decoration: underline; text-underline-offset: 0.2em; }
.rsl-crumbs [aria-current="page"] span { color: var(--ink); font-weight: 700; }
body.rsl .rsl-page-head__title { margin: 0; max-width: 24ch; font-size: var(--step-3); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; }
.rsl-page-head__brush { display: block; width: clamp(6rem, 4.5rem + 6vw, 10rem); height: 0.8rem; margin-top: 0.9rem; overflow: visible; }
.rsl-page-head__brush path { fill: none; stroke: var(--signal); stroke-width: 9; stroke-linecap: round; }

/* Bereichs-Kachel: blaue Fläche mit Icon, dahinter eine gedrehte orange Fläche */
.rsl-page-head__tile {
  position: relative; display: grid; place-items: center; align-content: center; gap: 0.6rem;
  width: clamp(8rem, 6rem + 6vw, 11.5rem); aspect-ratio: 1; margin-right: 0.75rem;
  isolation: isolate; border-radius: 22px; color: var(--on-lage);
}
/* Zwei Ebenen hinter dem Icon: orange gedreht (::before), darüber blau (::after) */
.rsl-page-head__tile::before, .rsl-page-head__tile::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; }
.rsl-page-head__tile::before { background: var(--signal); transform: translate(0.75rem, 0.6rem) rotate(6deg); }
.rsl-page-head__tile::after { background: var(--lage); box-shadow: 0 18px 40px -24px oklch(0.2 0.01 266 / 0.45); }
.rsl-page-head__tile .rsl-icon { width: 44%; height: 44%; }
.rsl-page-head__tile span { font-family: var(--font-display); font-weight: 700; font-size: var(--step--1); letter-spacing: 0.01em; text-align: center; padding-inline: 0.75rem; }
@media (prefers-reduced-motion: no-preference) {
  .rsl-js .rsl-page-head__brush path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: rsl-draw 0.9s var(--ease-out) 0.2s forwards; }
  .rsl-js .rsl-page-head__tile { animation: rsl-tile-in 0.8s var(--ease-out) both; }
  .rsl-js .rsl-page-head__tile::before { animation: rsl-tile-tilt 0.9s var(--ease-out) 0.15s both; }
}
@keyframes rsl-tile-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes rsl-tile-tilt { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(0.75rem, 0.6rem) rotate(6deg); } }
/* Seitenkopf mit Foto: Bild rechts, die Bereichs-Kachel überlappt die linke untere Ecke */
.rsl-page-head__visual { position: relative; }
.rsl-page-head__visual:not(.is-plain) { width: clamp(18rem, 10rem + 20vw, 30rem); margin: 0 0 1.25rem 2.75rem; }
.rsl-page-head__photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 22px; box-shadow: 0 30px 60px -36px oklch(0.2 0.03 266 / 0.55); }
.rsl-page-head__visual:not(.is-plain) .rsl-page-head__tile { position: absolute; left: -2.75rem; bottom: -1.25rem; width: clamp(5.5rem, 4.5rem + 2vw, 7rem); margin: 0; border-radius: 18px; }
.rsl-page-head__visual:not(.is-plain) .rsl-page-head__tile span { display: none; }
.rsl-page-head__visual:not(.is-plain) .rsl-page-head__tile .rsl-icon { width: 48%; height: 48%; }
@media (prefers-reduced-motion: no-preference) {
  .rsl-js .rsl-page-head__photo { animation: rsl-photo-in 1s var(--ease-out) both; }
}
@keyframes rsl-photo-in { from { clip-path: inset(0 0 0 35% round 22px); opacity: 0; } to { clip-path: inset(0 round 22px); opacity: 1; } }
@media (max-width: 640px) {
  .rsl-page-head__grid { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .rsl-page-head__tile { width: 3.75rem; border-radius: 14px; margin: 0.25rem 0.4rem 0 0; }
  .rsl-page-head__tile::before { transform: translate(0.35rem, 0.3rem) rotate(6deg); }
  .rsl-page-head__tile span { display: none; }
  .rsl-page-head__tile .rsl-icon { width: 55%; height: 55%; }
  .rsl-page-head__grid:has(.rsl-page-head__photo) { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .rsl-page-head__visual:not(.is-plain) { width: 100%; margin: 0 0 0.75rem; }
  .rsl-page-head__photo { aspect-ratio: 16 / 8; border-radius: 16px; }
  .rsl-page-head__visual:not(.is-plain) .rsl-page-head__tile { left: auto; right: 0.9rem; bottom: -0.9rem; width: 3.75rem; border-radius: 14px; }
}

body.rsl .page-wrapper { padding-block: clamp(2rem, 1.5rem + 1.5vw, 3rem) var(--section); }
body.rsl .page-wrapper > .row-main { max-width: min(100% - 2 * var(--gutter), 1320px); margin-inline: auto; }
body.rsl .page-wrapper > .row-main > .col { padding: 0; }
body.rsl .page-wrapper .col-inner { max-width: 64rem; margin-inline: 0; }
/* Alte Inhalte tragen zentrierte oder Blocksatz-Ausrichtung im style-Attribut: einheitlich linksbündig */
body.rsl .page-wrapper .col-inner [style*="text-align"] { text-align: start !important; }
body.rsl .page-wrapper .col-inner [style*="color"] { color: inherit !important; }
/* Übersetztes WPBakery-Raster: Spalten nebeneinander, leere Spalten fallen weg */
.rsl-legacy-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0 2.5rem; }
.rsl-legacy-col:not(:has(img, iframe, table, h1, h2, h3, h4, ul, ol, a, strong, p:not(:empty))) { display: none; }
.rsl-figure { margin: 0.5rem 0 2rem; max-width: 52rem; }
.rsl-figure img { display: block; width: 100%; height: auto; border-radius: var(--radius-media); }
.rsl-figure figcaption { margin-top: 0.6rem; color: var(--ink-2); font-size: var(--step--1); }
.rsl-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.6rem; margin: 0.5rem 0 2rem; }
.rsl-gallery a { display: block; overflow: hidden; border-radius: var(--radius-media); }
.rsl-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0 !important; transition: transform 0.5s var(--ease-out); }
.rsl-gallery a:hover img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .rsl-gallery img { transition: none; } }
body.rsl .page-wrapper .col-inner :where(h2, h3, h4) { margin: 2.75rem 0 0.75rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; text-transform: none; }
body.rsl .page-wrapper .col-inner h2 { font-size: var(--step-2); }
body.rsl .page-wrapper .col-inner h3 { font-size: var(--step-1); margin-top: 2rem; }
body.rsl .page-wrapper .col-inner h4 { font-size: var(--step-0); margin-top: 1.75rem; }
body.rsl .page-wrapper .col-inner > :first-child, body.rsl .page-wrapper .col-inner > :first-child > :first-child { margin-top: 0; }
/* Einzelne Beiträge: gleicher Rhythmus wie Unterseiten */
body.rsl .blog-single > .row { max-width: min(100% - 2 * var(--gutter), 1320px); margin-inline: auto; justify-content: flex-start !important; }
body.rsl .blog-single > .row > .col { flex-basis: 100%; max-width: 52rem; margin: 0; padding: 0; }
body.rsl .blog-single .entry-header-text { padding: 0 0 clamp(1.5rem, 1rem + 2vw, 2.5rem); text-align: left; }
body.rsl .blog-single .entry-title { max-width: 22ch; font-size: var(--step-3); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; text-transform: none; }
body.rsl .blog-single .entry-divider { display: none; }
body.rsl .blog-single .entry-header .entry-meta { margin-top: 1rem; font-size: var(--step--1); text-transform: none; letter-spacing: 0; color: var(--ink-2); }
body.rsl .blog-single .entry-image img { border-radius: var(--radius-media); }
body.rsl .blog-single .entry-content :where(h2, h3, h4) { margin: 2.5rem 0 0.75rem; font-weight: 800; line-height: 1.15; text-transform: none; }
body.rsl .blog-single .entry-content p { margin: 0 0 1rem; max-width: 68ch; }
body.rsl .blog-single .entry-content p:empty, body.rsl .blog-single .entry-author { display: none; }
body.rsl .blog-single .next-prev-nav { margin-top: 3rem; border-color: var(--line); }
body.rsl .blog-single .next-prev-nav a { color: var(--ink); font-weight: 700; text-transform: none; letter-spacing: 0; }

/* Terminkalender (Schulmanager): volle Breite, Höhe für einen ganzen Monat ohne inneres Scrollen */
body.rsl .page-wrapper .col-inner:has(.rsl-calendar), body.rsl .page-wrapper .col-inner p:has(> .rsl-calendar) { max-width: none; }
body.rsl .rsl-calendar { display: block; width: 100%; height: max(44rem, calc(100dvh - var(--header-h) - 3rem)); border: 1px solid var(--line); border-radius: var(--radius-panel); background: #eee; }

/* Alte Inhalte beginnen oft mit leeren Absätzen aus WPBakery. */
body.rsl .page-wrapper .col-inner p:empty { display: none; }
body.rsl .page-wrapper .col-inner > :where(h2, h3, h4):first-of-type { margin-top: 0; }
body.rsl .page-wrapper .col-inner p { margin: 0 0 1rem; max-width: 68ch; }
body.rsl .page-wrapper .col-inner :where(ul, ol) { margin: 0 0 1.5rem 1.25rem; max-width: 66ch; }
body.rsl .page-wrapper .col-inner li { margin-bottom: 0.45rem; }
body.rsl .page-wrapper .col-inner table { width: 100%; margin: 1.5rem 0 2rem; border-collapse: collapse; font-size: var(--step--1); }
body.rsl .page-wrapper .col-inner :where(th, td) { padding: 0.7rem 0.9rem; border: 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--ink); }
body.rsl .page-wrapper .col-inner th { background: var(--surface); font-weight: 700; text-transform: none; letter-spacing: 0; }
body.rsl .page-wrapper .col-inner img { border-radius: var(--radius-media); }

/* ---------- Formulare auf Unterseiten (Flatsome-Standard überschreiben) ---------- */
body.rsl label, body.rsl legend { color: var(--ink); }
body.rsl input[type="text"], body.rsl input[type="email"], body.rsl input[type="tel"], body.rsl input[type="password"],
body.rsl input[type="search"], body.rsl input[type="number"], body.rsl input[type="date"], body.rsl select, body.rsl textarea {
  background: var(--bg); color: var(--ink); border: 1px solid var(--ink-2); border-radius: 8px; box-shadow: none;
}
body.rsl input::placeholder, body.rsl textarea::placeholder { color: var(--ink-2); opacity: 1; }
body.rsl input:focus, body.rsl select:focus, body.rsl textarea:focus { border-color: var(--lage); outline: 3px solid color-mix(in oklch, var(--lage) 35%, transparent); outline-offset: 0; }

/* Karte (OSMapper/Leaflet): Bedienelemente und Quellenangabe lesbar halten */
body.rsl .leaflet-bar a, body.rsl .leaflet-bar a.leaflet-disabled { background: #fff; color: oklch(0.21 0.025 266); }
body.rsl .leaflet-control-attribution, body.rsl .leaflet-control-attribution a { background: rgb(255 255 255 / 0.92); color: oklch(0.3 0.03 266); }

/* Passwortgeschützte Seiten (z. B. Lehrerbereich): Flatsome packt sie in einen schmalen Container */
body.rsl .container.password-required { max-width: none; padding: 0; }
body.rsl .post-password-form {
  max-width: 34rem; margin: clamp(2.5rem, 2rem + 2vw, 4rem) 0 var(--section) max(var(--gutter), (100% - 1320px) / 2); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); color: var(--ink);
}
body.rsl .post-password-form p { margin: 0 0 1.25rem; color: var(--ink); font-size: var(--step-0); }
body.rsl .post-password-form p:last-child { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem; margin: 0; }
body.rsl .post-password-form label { display: grid; flex: 1 1 14rem; gap: 0.4rem; margin: 0; font-weight: 700; color: var(--ink); }
body.rsl .post-password-form input[type="password"] { height: 3rem; margin: 0; padding: 0 1rem; font-size: 1rem; }
body.rsl .post-password-form input[type="submit"] {
  height: 3rem; margin: 0; padding: 0 1.5rem; border: 0; border-radius: 999px;
  background: var(--lage); color: var(--on-lage); font-family: var(--font-display); font-weight: 700; font-size: 1rem; text-transform: none; letter-spacing: 0; cursor: pointer;
}

/* ---------- Bewegung (nur ohne "Bewegung reduzieren") ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rsl-js .rsl-hero__line > span { transform: translateY(105%); animation: rsl-rise 0.9s var(--ease-out) forwards; }
  .rsl-js .rsl-hero__line:nth-child(2) > span { animation-delay: 0.08s; }
  .rsl-js .rsl-hero__line:nth-child(3) > span { animation-delay: 0.16s; }
  .rsl-js .rsl-hero__lede, .rsl-js .rsl-hero__ctas { opacity: 0; animation: rsl-fade-up 0.8s var(--ease-out) 0.35s forwards; }
  .rsl-js .rsl-hero__ctas { animation-delay: 0.45s; }
  .rsl-js .rsl-brush path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: rsl-draw 0.9s var(--ease-out) 0.7s forwards; }
  .rsl-js .rsl-hero__main { clip-path: inset(0 0 0 100%); animation: rsl-wipe 1.1s var(--ease-out) 0.15s forwards; }
  .rsl-js .rsl-hero__inset { opacity: 0; animation: rsl-fade-up 0.9s var(--ease-out) 0.6s forwards; }
  .rsl-js .rsl-hero__badge { opacity: 0; animation: rsl-stamp 0.7s var(--ease-out) 1s forwards; }

  .rsl-js .rsl-steps__trail path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease-out); }
  .rsl-js .rsl-steps.is-in .rsl-steps__trail path { stroke-dashoffset: 0; }
  .rsl-js .rsl-steps::before { transform: scaleY(0); transition: transform 1.4s var(--ease-out); }
  .rsl-js .rsl-steps.is-in::before { transform: scaleY(1); }
  .rsl-js .rsl-step { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
  .rsl-js .rsl-steps.is-in .rsl-step { opacity: 1; transform: none; }
  .rsl-js .rsl-steps.is-in .rsl-step:nth-of-type(2) { transition-delay: 0.35s; }
  .rsl-js .rsl-steps.is-in .rsl-step:nth-of-type(3) { transition-delay: 0.7s; }

  .rsl-js .rsl-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
  .rsl-js .rsl-reveal.is-in { opacity: 1; transform: none; }

  .rsl-js .rsl-history__year { clip-path: inset(0 100% 0 0); transition: clip-path 1.4s var(--ease-out); }
  .rsl-js .rsl-history.is-in .rsl-history__year { clip-path: inset(0 0 0 0); }
}
/* Im UX Builder alles sofort sichtbar */
.uxb-draggable .rsl-reveal, body.ux-builder-active .rsl-reveal { opacity: 1 !important; transform: none !important; }

@keyframes rsl-rise { to { transform: translateY(0); } }
@keyframes rsl-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes rsl-draw { to { stroke-dashoffset: 0; } }
@keyframes rsl-wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes rsl-stamp { from { opacity: 0; transform: translateY(16px) rotate(-2deg); } to { opacity: 1; transform: rotate(-2deg); } }
