/* ============================================================
   RITTER WEBSERVICE — ratgeber.css
   Ratgeber als „Merkblätter“ des Planungsbüros, auf Planpapier.
   Lädt nach planpapier.css (und werkzeugakte.css für Beispiel-
   kästen und Tabellen) und ersetzt dort styles.css und
   werkstatt.css. Markup der 20 Artikel bleibt bis auf die
   Kennzeile unverändert: st-hero, article-layout, st-liste …
   Die Skizzen (rh-*) sind für dunklen Grund gezeichnet und
   stehen deshalb in einem Blaupausen-Fenster.
   ============================================================ */

/* Knöpfe, Seitenkopf (st-hero), nummerierte Posten und Ablaufschritte: altbau.css */

/* ── Skizze im Kopf des Merkblatts ──────────────────────── */
.ratgeber-hero-visual { display: flex; justify-content: center; animation: rh-float 6s ease-in-out infinite; }
.rh-frame, .rh-panel {
  width: 100%; max-width: 340px; overflow: hidden; border-radius: 16px; box-shadow: var(--schatten);
  background:
    linear-gradient(rgba(98,177,255,.12) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, rgba(98,177,255,.12) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(150deg, #0D2D5E, #061631);
}
.rh-frame-bar { display: flex; gap: 6px; padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
.rh-frame-bar span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.2); }
.rh-frame-bar span:first-child { background: var(--hand); }
.rh-frame-screen { display: flex; align-items: center; justify-content: center; min-height: 168px; padding: 26px 22px; }
.rh-panel { display: flex; align-items: center; justify-content: center; min-height: 210px; padding: 24px; }
.rh-illustration { width: 100%; height: auto; overflow: visible; }

@keyframes rh-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes rh-draw { 0% { stroke-dashoffset: 240; } 40%, 60% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 240; } }
@keyframes rh-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: .55; } }
@keyframes rh-grow { 0%, 100% { transform: scaleY(.32); } 50% { transform: scaleY(1); } }
@keyframes rh-spin { to { transform: rotate(360deg); } }
@keyframes rh-needle { 0%, 100% { transform: rotate(-30deg); } 50% { transform: rotate(30deg); } }
@keyframes rh-tick { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }
@keyframes rh-blink { 50% { opacity: 0; } }
@keyframes rh-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes rh-rise { 0% { transform: translateY(0); opacity: .9; } 80%, 100% { transform: translateY(-22px); opacity: 0; } }
@keyframes rh-check-pop { 0%, 15% { transform: scale(0); opacity: 0; } 30%, 80% { transform: scale(1); opacity: 1; } 95%, 100% { transform: scale(0); opacity: 0; } }
.rh-draw { stroke-dasharray: 240; stroke-dashoffset: 240; animation: rh-draw 4s ease-in-out infinite; }
.rh-pulse { transform-box: fill-box; transform-origin: center; animation: rh-pulse 2.4s ease-in-out infinite; }
.rh-grow { transform-box: fill-box; transform-origin: bottom; animation: rh-grow 2.6s ease-in-out infinite; }
.rh-spin { transform-box: fill-box; transform-origin: center; animation: rh-spin 7s linear infinite; }
.rh-needle { transform-box: fill-box; transform-origin: bottom center; animation: rh-needle 1.8s ease-in-out infinite; }
.rh-tick { transform-box: fill-box; transform-origin: bottom center; animation: rh-tick 2.4s ease-in-out infinite; }
.rh-blink { animation: rh-blink 1.1s steps(2) infinite; }
.rh-bob { transform-box: fill-box; transform-origin: center; animation: rh-bob 2.8s ease-in-out infinite; }
.rh-rise { transform-box: fill-box; transform-origin: center; animation: rh-rise 3s ease-in infinite; }
.rh-check-pop { transform-box: fill-box; transform-origin: center; animation: rh-check-pop 3.6s ease-in-out infinite; }
.rh-delay-1 { animation-delay: .3s; } .rh-delay-2 { animation-delay: .6s; } .rh-delay-3 { animation-delay: .9s; }
.rh-delay-4 { animation-delay: 1.2s; } .rh-delay-5 { animation-delay: 1.5s; }

/* ── Text und Seitenleiste ──────────────────────────────── */
.article-layout { max-width: var(--breite); margin: 0 auto; padding: clamp(24px, 4vw, 48px) var(--rand) 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 64px); align-items: start; }
.article-body { max-width: 720px; min-width: 0; }
.article-body .eyebrow-link { display: inline-block; margin-bottom: 24px; font: 600 .72rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--blau-tief); text-decoration: none; }
.article-body h2 { margin: 44px 0 14px; padding-top: 22px; border-top: 1px dashed var(--linie2); font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.article-body h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.article-body h3 { font-size: 1.12rem; margin: 22px 0 8px; }
.article-body p, .article-body li { font-size: 1.04rem; line-height: 1.75; color: var(--tinte2); }
.article-body p { margin: 0 0 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; }
.article-body a:not(.button):not(.eyebrow-link) { color: var(--blau-tief); }
.article-body strong { color: var(--navy); }
.article-body .offer-example { margin: 24px 0 28px; }
.article-body .offer-example p { margin: 0; }
.article-body .offer-byline { margin-top: 36px; }
.article-body .offer-table-hint { font-size: .86rem; margin-bottom: -10px; }

.article-sidebar { position: sticky; top: 100px; display: grid; gap: 20px; }
.article-cta {
  display: grid; gap: 14px; padding: 24px; border-radius: 18px; text-align: left;
  background:
    linear-gradient(rgba(98,177,255,.12) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(98,177,255,.12) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(150deg, #0D2D5E, #061631);
}
.article-cta::before { content: "Nächster Schritt"; font: 600 .66rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #62B1FF; }
.article-cta p { margin: 0; color: #fff; font-weight: 600; line-height: 1.5; }
.article-cta .button { white-space: normal; }
.article-related { display: grid; gap: 8px; padding: 20px 22px; border: 1px dashed var(--linie2); border-radius: 16px; background: var(--weiss); }
.article-related h4 { margin: 0 0 4px; font: 600 .66rem/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--blau-tief); }
.article-related a { color: var(--navy); font-weight: 600; font-size: .94rem; text-decoration: none; }
.article-related a:hover { color: var(--blau-tief); text-decoration: underline; }

/* Posten und Schritte im Artikeltext: Die Fließtextregeln oben sind spezifischer als altbau.css */
.article-body .st-posten h3 { margin: 0 0 4px; font-size: 1.02rem; }
.article-body .st-schritt h3 { margin: 0 0 6px; font-size: 1.05rem; }
.article-body .st-posten p, .article-body .st-schritt p { margin: 0; font-size: .92rem; line-height: 1.6; }
.article-body .st-ablauf { padding-inline: 0; }

/* ── Übersicht: Merkblatt-Sammlung ──────────────────────── */
.ratgeber-sammlung { max-width: var(--breite); margin: 0 auto; padding: clamp(24px, 4vw, 48px) var(--rand) 0; }
.ratgeber-group { counter-reset: merkblatt; margin-bottom: clamp(48px, 7vw, 80px); }
.ratgeber-group-title { margin: 0 0 18px; padding-top: 18px; border-top: 1px solid var(--linie2); font: 600 .74rem/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--blau-tief); }
.ratgeber-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ratgeber-card { counter-increment: merkblatt; position: relative; display: flex; flex-direction: column; padding: 48px 22px 22px; border: 1px solid var(--linie2); border-radius: 16px; background: var(--weiss); color: inherit; text-decoration: none; transition: transform .25s var(--kurve), box-shadow .25s, border-color .2s; }
.ratgeber-card::before { content: "MB " counter(merkblatt, decimal-leading-zero); position: absolute; top: 20px; left: 22px; font: 700 .68rem/1 var(--mono); letter-spacing: .1em; color: var(--hand-tief); }
.ratgeber-card:hover { transform: translateY(-3px); border-color: var(--hand); box-shadow: var(--schatten); }
.ratgeber-card-tag { position: absolute; top: 16px; right: 18px; padding: 3px 9px; border-radius: 999px; background: rgba(36,135,255,.1); font: 600 .62rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--blau-tief); }
.ratgeber-card h3 { margin: 0 0 8px; font-size: 1.12rem; }
.ratgeber-card p { margin: 0 0 16px; font-size: .9rem; color: var(--tinte2); }
.ratgeber-card-link { margin-top: auto; font: 600 .7rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--blau-tief); }

@media (max-width: 980px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .ratgeber-hero-visual { justify-content: flex-start; }
  .article-sidebar { position: static; }
  .ratgeber-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .ratgeber-grid { grid-template-columns: 1fr; }
  .rh-frame, .rh-panel { max-width: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  .ratgeber-hero-visual, [class*="rh-"] { animation: none !important; }
}
