/* RD NF SAA – Website-Design (ersetzt die Theme-Darstellung, wenn im Plugin aktiviert). */
:root {
  --rs-primary: #b00020;
  --rs-bg: #f5f6f8; --rs-surface: #ffffff; --rs-ink: #15191e; --rs-mut: #5d6773; --rs-line: #e1e4e8;
  --rs-soft: #eef0f3; --rs-link: #0b5cad; --rs-head: rgba(255,255,255,.92);
  --rs-hero1: #14181d; --rs-hero2: #252b33;
  --rs-r: 14px; --rs-w: 1140px; --rs-text: 760px;
  --rs-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rs-shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.06);
  --rs-adminbar: var(--wp-admin--admin-bar--height, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --rs-bg: #0f1215; --rs-surface: #181d22; --rs-ink: #eceff2; --rs-mut: #9ca7b3; --rs-line: #2a323a;
    --rs-soft: #20262c; --rs-link: #7db8ff; --rs-head: rgba(20,24,29,.92);
    --rs-hero1: #0b0d10; --rs-hero2: #1b2128;
    --rs-shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  }
}

/* ---------- Grundlagen ---------- */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(80px + var(--rs-adminbar)); }
body.rs { margin: 0; background: var(--rs-bg); color: var(--rs-ink); font-family: var(--rs-font); font-size: 17px; line-height: 1.6;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body.rs *, body.rs *::before, body.rs *::after { box-sizing: border-box; }
body.rs a { color: var(--rs-link); text-underline-offset: .15em; }
body.rs a:hover { text-decoration-thickness: 2px; }
body.rs img { max-width: 100%; height: auto; }
body.rs h1, body.rs h2, body.rs h3, body.rs h4 { line-height: 1.2; letter-spacing: -.01em; margin: 1.4em 0 .5em; }
body.rs h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem); }
body.rs h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); }
body.rs h3 { font-size: 1.2rem; }
body.rs :focus-visible { outline: 3px solid var(--rs-primary); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.rs-skip { position: absolute; left: -9999px; top: 8px; z-index: 1000; background: var(--rs-surface); padding: 8px 14px; border-radius: 8px; }
.rs-skip:focus { left: 8px; }

.rs-wrap { width: 100%; max-width: var(--rs-w); margin: 0 auto; padding: 0 20px; }
.rs-narrow { max-width: var(--rs-text); }
.rs-main { flex: 1 0 auto; padding-bottom: 48px; }

/* ---------- Buttons ---------- */
.rs-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 16px; border-radius: 999px; border: 1px solid transparent;
  background: var(--rs-primary); color: #fff !important; font-weight: 600; font-size: .95rem; text-decoration: none !important; white-space: nowrap; cursor: pointer; }
.rs-btn:hover { filter: brightness(1.08); }
.rs-btn-ghost { background: transparent; color: var(--rs-ink) !important; border-color: var(--rs-line); }
.rs-btn-ghost:hover { background: var(--rs-soft); filter: none; }
.rs-avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--rs-soft); font-size: .8rem; font-weight: 700; }

/* ---------- Kopfzeile ---------- */
.rs-header { position: sticky; top: var(--rs-adminbar); z-index: 50; background: var(--rs-head); border-bottom: 1px solid var(--rs-line);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); padding-top: env(safe-area-inset-top); }
.rs-header::before { content: ""; display: block; height: 4px; background: var(--rs-primary); }
.rs-header-in { max-width: var(--rs-w); margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.rs-brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none !important; color: var(--rs-ink) !important; margin-right: auto; }
.rs-logo { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; flex: none; }
.rs-logo-txt { display: grid; place-items: center; background: var(--rs-primary); color: #fff; font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; }
.rs-brand-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.rs-name { font-weight: 750; font-size: 1.08rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-sub { color: var(--rs-mut); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rs-nav { display: flex; align-items: center; gap: 18px; }
.rs-menu, .rs-menu ul { list-style: none; margin: 0; padding: 0; }
.rs-menu { display: flex; align-items: center; gap: 2px; }
.rs-menu > li { position: relative; }
.rs-menu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--rs-ink) !important; text-decoration: none !important; font-weight: 550; font-size: .97rem; }
.rs-menu a:hover { background: var(--rs-soft); }
.rs-menu .current-menu-item > a, .rs-menu .current-menu-ancestor > a, .rs-menu .current_page_item > a { color: var(--rs-primary) !important; box-shadow: inset 0 -2px 0 var(--rs-primary); border-radius: 8px 8px 0 0; }
.rs-menu .sub-menu { position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--rs-surface); border: 1px solid var(--rs-line); border-radius: 12px;
  box-shadow: var(--rs-shadow); padding: 6px; display: none; z-index: 60; }
.rs-menu li:hover > .sub-menu, .rs-menu li:focus-within > .sub-menu { display: block; }
.rs-user { display: flex; align-items: center; gap: 8px; }

.rs-navtoggle { display: none; width: 46px; height: 46px; border: 1px solid var(--rs-line); border-radius: 12px; background: var(--rs-surface); padding: 12px 11px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.rs-navtoggle > span:not(.screen-reader-text) { display: block; height: 2px; background: var(--rs-ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.rs-navtoggle[aria-expanded="true"] > span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.rs-navtoggle[aria-expanded="true"] > span:nth-child(2) { opacity: 0; }
.rs-navtoggle[aria-expanded="true"] > span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 900px) {
  .rs-navtoggle { display: flex; }
  .rs-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--rs-surface); border-bottom: 1px solid var(--rs-line);
    box-shadow: var(--rs-shadow); flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 16px 18px; max-height: calc(100dvh - 80px); overflow: auto; }
  .rs-nav.open { display: flex; }
  .rs-menu { flex-direction: column; align-items: stretch; }
  .rs-menu a { padding: 13px 12px; font-size: 1.05rem; }
  .rs-menu .current-menu-item > a, .rs-menu .current_page_item > a { box-shadow: inset 3px 0 0 var(--rs-primary); border-radius: 0 8px 8px 0; }
  .rs-menu .sub-menu { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 0 14px; background: none; }
  .rs-user { flex-wrap: wrap; border-top: 1px solid var(--rs-line); padding-top: 12px; }
  .rs-user .rs-btn { flex: 1 1 auto; justify-content: center; min-height: 48px; }
  .rs-user .rs-btn-saa { flex-basis: 100%; }
}
@media (max-width: 480px) { .rs-sub { display: none; } .rs-header-in { padding: 8px 14px; } .rs-wrap { padding: 0 16px; } }

/* ---------- Startseite: Hero ---------- */
.rs-hero { background: radial-gradient(1200px 400px at 85% -10%, color-mix(in srgb, var(--rs-primary) 45%, transparent), transparent 70%),
  linear-gradient(160deg, var(--rs-hero1), var(--rs-hero2)); color: #fff; }
.rs-hero-in { max-width: var(--rs-w); margin: 0 auto; padding: clamp(32px, 6vw, 72px) 20px; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.rs-hero h1 { margin: 0 0 .4em; color: #fff; }
.rs-hero p { color: rgba(255,255,255,.82); font-size: 1.07rem; max-width: 34em; }
.rs-status { display: inline-block; padding: 6px 12px; border-radius: 8px; font-size: .92rem !important; }
.rs-status-draft { background: #ffcc00; color: #2a2100 !important; }
.rs-status-ok { background: rgba(46, 160, 67, .2); color: #c9f2d2 !important; border: 1px solid rgba(46,160,67,.5); }
.rs-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rs-tile { display: flex; flex-direction: column; gap: 2px; padding: 16px; min-height: 108px; border-radius: var(--rs-r); background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14); color: #fff !important; text-decoration: none !important; transition: background .15s, transform .15s; }
a.rs-tile:hover { background: rgba(255,255,255,.13); transform: translateY(-1px); }
.rs-tile-ic { font-size: 1.4rem; line-height: 1; margin-bottom: 6px; opacity: .9; }
.rs-tile-t { font-weight: 700; font-size: 1.06rem; }
.rs-tile-s { font-size: .86rem; color: rgba(255,255,255,.72); }
.rs-tile-main { grid-column: 1 / -1; background: var(--rs-primary); border-color: transparent; min-height: 120px; }
a.rs-tile-main:hover { background: var(--rs-primary); filter: brightness(1.1); }
.rs-tile-main .rs-tile-t { font-size: 1.3rem; }
.rs-tile-main .rs-tile-s { color: rgba(255,255,255,.88); }
.rs-tile-rea { border-color: rgba(255, 92, 111, .55); }
.rs-tile-rea .rs-tile-ic { color: #ff5c6f; }
.rs-tile-btns { display: flex; gap: 6px; margin-top: 8px; }
.rs-tile-btns a { flex: 1; text-align: center; padding: 8px 6px; border-radius: 9px; background: rgba(255,255,255,.12); color: #fff !important; text-decoration: none !important; font-weight: 650; font-size: .9rem; }
.rs-tile-btns a:hover { background: #ff5c6f; }

.rs-small { font-size: .9rem !important; }
body.rs .search-form input[type="search"] {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--rs-line); border-radius: 10px; background: var(--rs-bg); color: var(--rs-ink); font: inherit; }

@media (max-width: 820px) { .rs-hero-in { grid-template-columns: 1fr; } }

/* ---------- Inhalte ---------- */
.rs-article { max-width: calc(var(--rs-text) + 40px); padding-top: 8px; }
.rs-article-head { margin: 36px 0 18px; }
.rs-article-head .rs-title { margin: .1em 0 0; }
.rs-meta { color: var(--rs-mut); font-size: .9rem; margin: 0; }
.rs-thumb { margin: 0 0 24px; }
.rs-thumb img { border-radius: var(--rs-r); display: block; width: 100%; }
.rs-content { overflow-wrap: break-word; }
.rs-content > * { margin-top: 0; margin-bottom: 1.1em; }
.rs-content > :first-child { margin-top: 28px; }
.rs-article-head + .rs-content > :first-child, .rs-thumb + .rs-content > :first-child { margin-top: 0; }
.rs-content .alignwide { margin-left: calc((var(--rs-text) - min(var(--rs-w) - 40px, 100vw - 40px)) / 2); margin-right: calc((var(--rs-text) - min(var(--rs-w) - 40px, 100vw - 40px)) / 2); max-width: none; }
.rs-content .alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
@media (max-width: 800px) { .rs-content .alignwide { margin-left: 0; margin-right: 0; } }
.rs-content .alignleft { float: left; margin: .3em 1.5em 1em 0; }
.rs-content .alignright { float: right; margin: .3em 0 1em 1.5em; }
.rs-content .aligncenter { margin-left: auto; margin-right: auto; }
.rs-content img, .rs-content .wp-block-image img { border-radius: 10px; }
.rs-content blockquote { margin-left: 0; padding: .4em 1.2em; border-left: 4px solid var(--rs-primary); background: var(--rs-surface); border-radius: 0 10px 10px 0; }
.rs-content table { border-collapse: collapse; width: 100%; background: var(--rs-surface); }
.rs-content th, .rs-content td { border: 1px solid var(--rs-line); padding: 8px 10px; text-align: left; }
.rs-content .wp-block-button__link { border-radius: 999px; background: var(--rs-primary); color: #fff; padding: .7em 1.4em; text-decoration: none; }
.rs-content .wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--rs-primary); border: 2px solid currentColor; }
.rs-content pre, .rs-content code { background: var(--rs-soft); border-radius: 6px; }
.rs-content pre { padding: 14px; overflow: auto; }
.rs-content hr { border: 0; border-top: 1px solid var(--rs-line); margin: 2em 0; }
.rs-content input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), .rs-content select, .rs-content textarea {
  max-width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--rs-line); border-radius: 10px; background: var(--rs-surface); color: var(--rs-ink); font: inherit; }
.rs-content input[type="submit"], .rs-content button[type="submit"] { min-height: 46px; padding: 8px 20px; border: 0; border-radius: 999px; background: var(--rs-primary); color: #fff; font: inherit; font-weight: 650; cursor: pointer; }

/* Übersicht / Karten */
.rs-archive-head { margin: 36px 0 24px; }
.rs-archive-head .rs-title { margin: 0 0 .4em; }
.rs-section-title { margin-top: 40px !important; }
.rs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.rs-card { background: var(--rs-surface); border: 1px solid var(--rs-line); border-radius: var(--rs-r); overflow: hidden; box-shadow: var(--rs-shadow); display: flex; flex-direction: column; }
.rs-card-img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.rs-card-body { padding: 16px 18px 18px; }
.rs-card-title { font-size: 1.2rem !important; margin: .2em 0 .4em !important; }
.rs-card-title a { color: var(--rs-ink) !important; text-decoration: none !important; }
.rs-card-title a:hover { color: var(--rs-primary) !important; }
.rs-card-ex { color: var(--rs-mut); font-size: .95rem; }
.rs-card-ex p { margin: 0; }
.rs-pager { margin-top: 28px; }
.rs-pager .nav-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.rs-pager .page-numbers { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 10px; background: var(--rs-surface); border: 1px solid var(--rs-line); text-decoration: none; color: var(--rs-ink); }
.rs-pager .page-numbers.current { background: var(--rs-primary); border-color: var(--rs-primary); color: #fff; }
.rs-empty { padding: 36px 0; color: var(--rs-mut); }
body.rs .search-form { display: flex; gap: 8px; margin: 12px 0; }
body.rs .search-form label { flex: 1; }
body.rs .search-form .search-submit { min-height: 48px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--rs-primary); color: #fff; font: inherit; font-weight: 650; cursor: pointer; }

/* Kommentare */
.rs-comments { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rs-line); }
.rs-comments ol { padding-left: 0; list-style: none; }
.rs-comments textarea { width: 100%; }

/* ---------- Fußzeile ---------- */
.rs-footer { background: var(--rs-surface); border-top: 1px solid var(--rs-line); color: var(--rs-mut); font-size: .92rem; padding-bottom: env(safe-area-inset-bottom); }
.rs-footer-in { max-width: var(--rs-w); margin: 0 auto; padding: 24px 20px; display: flex; gap: 16px 32px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.rs-foot-brand { display: flex; flex-direction: column; }
.rs-foot-brand strong { color: var(--rs-ink); }
.rs-footmenu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.rs-footmenu a { color: var(--rs-mut) !important; }

/* ---------- SAA-Seiten (App-Modus) ---------- */
body.rs-appmode { background: #0f1215; }
body.rs-appmode .rs-header { position: relative; top: 0; background: #14181d; border-bottom-color: #2a323a; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.rs-appmode .rs-header::before { height: 3px; }
body.rs-appmode .rs-header-in { max-width: 980px; padding: 6px 12px; }
body.rs-appmode .rs-brand { color: #eceff2 !important; }
body.rs-appmode .rs-logo { width: 32px; height: 32px; border-radius: 9px; }
body.rs-appmode .rs-logo-txt { font-size: .85rem; }
body.rs-appmode .rs-name { font-size: .95rem; }
body.rs-appmode .rs-sub { display: none; }
body.rs-appmode .rs-back { color: #eceff2 !important; border-color: #2a323a; min-height: 36px; padding: 4px 12px; font-size: .88rem; }
body.rs-appmode .rs-back:hover { background: #20262c; }
body.rs-appmode .rs-main { padding-bottom: 0; }
.rs-app { max-width: 980px; margin: 0 auto; }
.rs-app .rdnf { border-radius: 0; min-height: calc(100vh - 48px); min-height: calc(100dvh - 48px); }
.rs-app .rd-head { top: var(--rs-adminbar); }
@media (max-width: 600px) {
  body.rs-appmode #wpadminbar { display: none !important; }
  html:has(body.rs-appmode) { margin-top: 0 !important; }
  body.rs-appmode { --rs-adminbar: 0px; }
}
@media (max-width: 782px) { body.admin-bar { --rs-adminbar: 46px; } }
@media (min-width: 783px) { body.admin-bar { --rs-adminbar: 32px; } }
@media (max-width: 600px) { body.admin-bar .rs-header { top: 0; } }

@media print {
  .rs-header, .rs-footer, .rs-navtoggle, .rs-tiles { display: none !important; }
  body.rs { background: #fff; color: #000; }
}
.rs-menu a { white-space: nowrap; }
.rs-ic-txt { font-size: .95rem !important; font-weight: 800; letter-spacing: .02em; border: 2px solid currentColor; border-radius: 6px; padding: 2px 5px; align-self: flex-start; }
@media (min-width: 901px) and (max-width: 1180px) { .rs-sub { display: none; } .rs-user .rs-hide-sm { display: none; } .rs-menu a { padding: 8px 9px; } }
@media (max-width: 1360px) { .rs-user .rs-hide-sm { display: none; } } .rs-brand { min-width: 150px; }
