/* Sunside Immobilien-ABC — themeneutrale, gescopte Styles.
   Schrift wird vom Theme geerbt (font: inherit), Markenfarbe via --sab-brand.
   Bewusst zurückhaltend: JD Homes ist monochrom (Schwarz/Weiß). */

.sab {
  --sab-brand: #111111;
  /* Textfarbe explizit setzen statt vom Theme erben. Geerbt wurde bei JD Homes
     Weiß, wodurch Überschrift und Einleitung unsichtbar waren. */
  --sab-ink: #111111;
  --sab-radius: 10px;
  --sab-maxw: 1120px;
  --sab-gap: clamp(1rem, 3vw, 2rem);
  --sab-soft: color-mix(in srgb, var(--sab-ink) 4%, transparent);
  --sab-line: color-mix(in srgb, var(--sab-ink) 14%, transparent);
  --sab-muted: color-mix(in srgb, var(--sab-ink) 62%, transparent);
  --sab-on-brand: #fff;
  font: inherit;
  line-height: 1.6;
  color: var(--sab-ink);
}
.sab *, .sab *::before, .sab *::after { box-sizing: border-box; }

/* Überschriften und Fließtext gegen Theme-Regeln absichern. Ein blosses
   color auf .sab reicht nicht: Theme-Regeln wie "h1 { color: #fff }" schlagen
   Vererbung. Klassenselektoren gewinnen dagegen. */
.sab .sab-hero__title,
.sab .sab-group__title,
.sab .sab-prose h2,
.sab .sab-prose h3,
.sab .sab-prose h4,
.sab .sab-prose p,
.sab .sab-prose li,
.sab .sab-prose td,
.sab .sab-prose th,
.sab .sab-term__name,
.sab .sab-section-title { color: var(--sab-ink); }

.sab-container { width: 100%; max-width: var(--sab-maxw); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.sab-section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.sab-section-tight { padding-block: clamp(1.5rem, 4vw, 3rem); }

/* Brotkrumen */
.sab-crumbs { font-size: .85rem; padding-block: 1rem; }
.sab-crumbs .sab-container { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.sab-crumbs a { color: var(--sab-muted); text-decoration: none; }
.sab-crumbs a:hover { color: var(--sab-brand); text-decoration: underline; }
.sab-crumbs__sep { color: var(--sab-muted); }

/* Hero */
.sab-hero { padding-block: clamp(1.6rem, 4vw, 3rem); }
/* Ohne eigene H1 - das Theme liefert den Seitentitel - reicht deutlich weniger Luft. */
.sab-hero--compact { padding-block: clamp(1rem, 2vw, 1.4rem) 0; }
.sab-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--sab-brand); margin-bottom: .6rem; }
.sab-eyebrow--onbrand { color: rgba(255,255,255,.85); }
.sab-hero__title { font-size: clamp(1.8rem, 4.5vw, 3rem); line-height: 1.12; margin: 0 0 .6rem; text-wrap: balance; font-weight: 800; }
.sab-hero__lead { font-size: clamp(1.05rem, 2vw, 1.24rem); max-width: 68ch; color: var(--sab-muted); margin: 0; }

/* Fließtext eines Begriffs */
.sab-prose { max-width: 76ch; }
.sab-prose > *:first-child { margin-top: 0; }
.sab-prose p { margin: 0 0 1.1em; }
.sab-prose h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 700; margin: 2em 0 .6em; padding-left: .7rem; border-left: 4px solid var(--sab-brand); line-height: 1.25; }
.sab-prose h3 { font-size: 1.12rem; font-weight: 700; margin: 1.6em 0 .5em; }
.sab-prose ul, .sab-prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.sab-prose li { margin-bottom: .45em; }
.sab-prose a { color: var(--sab-brand); text-decoration: underline; text-underline-offset: 2px; }
.sab-prose strong { font-weight: 700; }
.sab-prose blockquote { margin: 1.5em 0; padding: 1.1rem 1.3rem; background: var(--sab-soft); border-left: 4px solid var(--sab-brand); border-radius: 0 var(--sab-radius) var(--sab-radius) 0; }
.sab-prose blockquote > *:last-child { margin-bottom: 0; }
.sab-prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .96rem; }
.sab-prose th, .sab-prose td { border: 1px solid var(--sab-line); padding: .55rem .7rem; text-align: left; }
.sab-prose th { background: var(--sab-soft); font-weight: 700; }

/* Suche + Zähler auf der Übersicht */
.sab-search { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin-bottom: 1.4rem; }
.sab-search__input { flex: 1 1 260px; max-width: 420px; padding: .75rem 1rem; font: inherit; color: inherit; background: transparent; border: 1px solid var(--sab-line); border-radius: 999px; }
.sab-search__input:focus { outline: 2px solid var(--sab-brand); outline-offset: 1px; border-color: transparent; }
.sab-search__count { margin: 0; font-size: .9rem; color: var(--sab-muted); }

/* Buchstaben-Navigation */
.sab-alpha { display: flex; flex-wrap: wrap; gap: .35rem; }
.sab-alpha__item { display: inline-flex; align-items: center; justify-content: center; min-width: 2.1rem; height: 2.1rem; padding: 0 .45rem; border: 1px solid var(--sab-line); border-radius: 8px; text-decoration: none; color: inherit; font-weight: 700; font-size: .92rem; transition: background .15s, color .15s, border-color .15s; }
.sab-alpha__item:hover { background: var(--sab-brand); border-color: var(--sab-brand); color: var(--sab-on-brand); }

/* Begriffsgruppen */
.sab-group { margin-bottom: 2.4rem; }
.sab-group__title { font-size: 1.5rem; font-weight: 800; margin: 0 0 .8rem; padding-bottom: .4rem; border-bottom: 2px solid var(--sab-brand); scroll-margin-top: 6rem; }
.sab-termlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: .5rem 1.2rem; }
.sab-term__link { display: block; padding: .55rem .7rem; border-radius: 8px; text-decoration: none; color: inherit; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.sab-term__link:hover { background: var(--sab-soft); border-color: var(--sab-line); }
.sab-term__name { display: block; font-weight: 700; }
.sab-term__lead { display: block; font-size: .87rem; color: var(--sab-muted); margin-top: .12rem; }
.sab-empty { color: var(--sab-muted); }

/* Verwandte Begriffe */
.sab-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; }
.sab-chip { display: inline-block; padding: .45rem .9rem; border: 1px solid var(--sab-line); border-radius: 999px; text-decoration: none; color: inherit; font-size: .93rem; font-weight: 600; transition: background .15s, border-color .15s, color .15s; }
.sab-chip:hover { background: var(--sab-brand); border-color: var(--sab-brand); color: var(--sab-on-brand); }

/* Weiterführende Links */
.sab-linklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: .5rem 1.4rem; }
.sab-linklist a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--sab-line); display: inline-block; padding: .35rem 0; }
.sab-linklist a:hover { color: var(--sab-brand); border-color: var(--sab-brand); }

.sab-back { display: inline-block; color: var(--sab-muted); text-decoration: none; font-weight: 600; }
.sab-back:hover { color: var(--sab-brand); }

/* Bewertungs-Box */
.sab-valuebox { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; background: var(--sab-brand); color: var(--sab-on-brand); border-radius: var(--sab-radius); padding: clamp(1.5rem, 4vw, 2.4rem); }
.sab-valuebox__title { margin: .1rem 0 .3rem; font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 800; }
.sab-valuebox__text { margin: 0; opacity: .9; }

/* Buttons */
.sab-btn { display: inline-block; border-radius: 999px; padding: .85rem 1.4rem; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem; white-space: nowrap; transition: filter .15s, background .15s, color .15s; }
.sab-btn--onbrand { background: #fff; color: var(--sab-brand); }
.sab-btn--onbrand:hover { filter: brightness(.94); }
.sab-btn--light { background: #fff; color: var(--sab-brand); }
.sab-btn--light:hover { filter: brightness(.94); }

/* Kontakt-CTA */
.sab-cta { background: var(--sab-brand); color: var(--sab-on-brand); padding-block: clamp(2rem, 5vw, 3.2rem); margin-top: 1rem; }
.sab-cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.sab-cta__title { margin: .1rem 0 .3rem; font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 800; }
.sab-cta__text { margin: 0; opacity: .9; }
.sab-cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.sab-cta__call { color: var(--sab-on-brand); font-weight: 700; text-decoration: none; white-space: nowrap; }
.sab-cta__call:hover { text-decoration: underline; }

/* Der eingebettete Site-Footer soll nicht am Text kleben. */
.sab-sitefooter { margin-top: 0; }

@media (max-width: 600px) {
  .sab-valuebox, .sab-cta__inner { flex-direction: column; align-items: flex-start; }
}
