/* =========================================================
   STADTSINN 3 – Anpassungen an die WordPress-Blöcke
   Die Bausteine sind jetzt Gruppen, Absätze, Listen und Bilder.
   Diese Regeln sorgen dafür, dass sie genau wie bisher aussehen.
   ========================================================= */

/* Knöpfe (Block «Buttons») im Stil .ss-btn */
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .wp-block-buttons.ss-btns { gap: .8em; }
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .wp-block-buttons > .wp-block-button { margin: 0; }
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .wp-block-button__link { text-decoration: none; text-align: left; }
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background) { background: transparent; }
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):hover,
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):focus { background: var(--ss-night); border-color: var(--ss-night); color: #fff !important; }
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .ss-cta .wp-block-button__link:hover { background: #fff; border-color: #fff; color: var(--ss-night) !important; }

/* Kleine Etiketten, die früher <span> waren */
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) p:is(.ss-rate, .ss-focus-id) { margin: 0; }
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) p.ss-rate { width: fit-content; }
.ss-focus-head > div > p.ss-rate { margin-top: .1em; }

/* Kennzahlen, SWOT, Kontaktliste: Absätze ohne Zusatzabstand */
.ss-facts > div > p,
.ss-contact-list-item > div > p,
.ss-swot > div > p:first-child,
.ss-scale > div > p:first-child { margin: 0; }
.ss-swot > div > p:first-child { line-height: 1; }

/* Kontaktliste als Gruppen (früher <ul>) */
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .ss-contact-list .ss-contact-list-item { display: flex; gap: 14px; align-items: center; margin: 0 0 1.1em; }
.ss-contact-list-item .ss-ico { flex: 0 0 auto; width: 48px; height: 48px; margin: 0; background: rgba(255,255,255,.16) !important; }
.ss-contact-list-item .ss-ico svg { width: 22px; height: 22px; }

/* Weg der nächsten Schritte als Gruppen (früher <ol>) */
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .ss-path .ss-path-item > p.ss-pin { margin: 0 0 1.1em; }
@media (max-width: 780px) {
  :is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .ss-path .ss-path-item > p.ss-pin { margin: 0; }
}

/* Projektbild in organischer Form */
.ss-shot > .wp-block-image { width: 100%; height: 100%; margin: 0; }

/* Leistungs-Kacheln */
.ss-t6 > .wp-block-group > p { margin-bottom: 0; }
.ss-t6 > .wp-block-group > p.ss-note { margin-top: 1.2em !important; }

/* Weitere Leistungen (neu als Gruppe mit Link) */
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .ss-related .ss-rel { position: relative; }
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .ss-rel > p { margin: 0; }
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .ss-rel > p a { color: inherit !important; }
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .ss-rel > p a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .ss-rel > p a:focus-visible { outline: 0; }
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .ss-rel:has(a:focus-visible) { outline: 3px solid var(--ss-gelb); outline-offset: 3px; }

/* Zitat-Block */
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .wp-block-quote.ss-quote { border: 0; }
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .ss-quote > p { margin: 0; }

/* FAQ (Block «Details») */
.ss-faq .wp-block-details > summary { display: block; }
.ss-faq .wp-block-details > :not(summary) { padding: 0 1.5em 1.3em; margin: 0; }
.ss-faq .wp-block-details > p + p { margin-top: -.6em; }

/* Listen-Blöcke: Abstände wie bisher */
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .wp-block-list { margin-top: 0; }
:is(.ss,.wp-block-post-content,:where(.is-preview-mode:not(:has(.site-header)):not(:has(.site-footer)))) .ss-prose .wp-block-list:not([class*="ss-"]) { padding-left: 1.2em; margin-bottom: 1em; }

/* Kontaktformular */
.ss-form-card .wp-block-shortcode, .ss-form-card > div:last-child { margin: 0; }

/* Titel aus dem Template (Impressum, Seite mit Titelbereich) */
.ss-phero-s .wp-block-post-title { margin: .2em 0 0 !important; }

/* Beiträge / Archive (selten genutzt) */
.ss-legal .wp-block-query .wp-block-post-title { font-size: 1.35rem !important; margin: 1.6em 0 .3em !important; }
.ss-legal .wp-block-query .wp-block-post-title a { color: var(--ss-night); }
.ss-legal .wp-block-query-pagination { margin-top: 2em; gap: 1em; }
