/* SBI GmbH Roland Keßler – sbi-sanierung.de
   Visual rebuild of the former WordPress/Nicepage site, written from scratch. */

/* ---------- fonts (self-hosted, no Google requests) ---------- */
@font-face {
  font-family: "Roboto Slab";
  src: url("../fonts/roboto-slab-latin.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Roboto Slab";
  src: url("../fonts/roboto-slab-latin-ext.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-400-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --text: #3c434a;
  --blue: #2233b1;
  --blue-light: #2a79b8;
  --green: #3d8b40;
  --green-dark: #2f6e32;
  --grey-bg: #f0f0f0;
  --btn-grey: #b3b3b3;
  --btn-grey-active: #a1a1a1;
  --input: #e5e5e5;
  --submit: #1c47a6;
  --accent-line: #e68387;
  --container: 1140px;
  --gutter: 20px;
  --marble: url("../images/marmor-hintergrund.webp");
  --font: "Roboto Slab", Georgia, "Times New Roman", serif;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 125px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; font-family: var(--font); font-weight: 300; font-size: 16px; line-height: 1.6;
  color: var(--text); background: var(--grey-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: #1e4f8f; }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid #f5c400; outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: #000; color: #fff; padding: 10px 16px; font-weight: 700; }
.skip-link:focus { top: 8px; }
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: calc(942px + 2 * var(--gutter)); }
figure { margin: 0; }
address { font-style: normal; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #b3b3b3 var(--marble) center / cover;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 114px; gap: 24px; }
.logo { flex: 0 0 auto; display: block; }
.logo img { width: 354px; height: auto; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav__item { position: relative; display: flex; }
.nav__link {
  display: block; padding: 10px 8px; border: 2px solid #000; background: var(--btn-grey);
  color: #1a1a1a; font-weight: 700; font-size: 16px; line-height: 16px; text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
.nav__link:hover { color: var(--blue); }
.nav__link.is-active { background: var(--btn-grey-active); border-color: #1a1a1a; }
.has-sub > .nav__link { padding-right: 22px; }
.nav__toggle {
  position: absolute; right: 2px; top: 2px; bottom: 2px; width: 18px; border: 0; padding: 0; background: transparent; cursor: pointer; color: #1a1a1a;
}
.nav__toggle::before { content: ""; display: block; width: 6px; height: 6px; margin: 0 auto; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.nav__sub {
  list-style: none; margin: 0; padding: 0; position: absolute; left: 0; top: 100%; min-width: 426px;
  background: var(--btn-grey); border: 2px solid #000; margin-top: 2px;
  visibility: hidden; opacity: 0; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s;
}
.has-sub:hover .nav__sub, .has-sub:focus-within .nav__sub, .has-sub.is-open .nav__sub { visibility: visible; opacity: 1; transform: none; }
.nav__sub a { display: block; padding: 10px 30px; color: #000; font-weight: 700; font-size: 16px; line-height: 16px; text-decoration: none; }
.nav__sub a:hover, .nav__sub a[aria-current] { color: var(--blue); background: #c4c4c4; }
.burger { display: none; }

/* ---------- hero / banner ---------- */
.hero { position: relative; height: 180px; overflow: hidden; background: #555; }
.hero__img { width: 100%; height: 100%; object-fit: cover; }
.hero:not(.hero--plain)::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .38); }
.hero__text { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 var(--gutter); color: #fff; }
.hero__title { margin: 0; font-size: 36px; font-weight: 600; line-height: 1.2; text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.hero__sub { margin: 6px 0 0; font-size: 18px; font-style: italic; font-weight: 400; }

/* ---------- info bar ---------- */
.infobar { background: var(--grey-bg); }
.infobar p { margin: 0 auto; padding: 15px var(--gutter) 0; text-align: center; color: var(--green); font-weight: 600; font-size: 18px; line-height: 1.68; }
.infobar a { color: inherit; text-decoration: none; }
.infobar a:hover { text-decoration: underline; }
.infobar--marble { background: #b3b3b3 var(--marble) center / cover; }
.infobar--marble p { padding-top: 38px; padding-bottom: 38px; }

/* ---------- sections ---------- */
.section { padding: 30px 0 60px; }
.section--grey { background: var(--grey-bg); }
.section--white { background: #fff; }
.section--marble { background: #b3b3b3 var(--marble) center / cover; }
.marble-spacer { height: 115px; background: #b3b3b3 var(--marble) center / cover; }
.title { margin: 0 0 30px; color: var(--blue); font-size: 36px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; hyphens: auto; }
.title--center { text-align: center; }
.title--light { color: var(--blue-light); font-weight: 600; }
.title--rule { padding-bottom: 6px; margin-bottom: 0; }
.title--rule::after { content: ""; display: block; max-width: 526px; height: 1px; margin: 6px auto 0; background: #6a6a6a; }
.prose { overflow-wrap: break-word; }
.prose--lg { font-size: 18px; line-height: 1.5; font-weight: 400; }
.prose p { margin: 0 0 27px; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { margin: 30px 0 12px; font-size: 20px; font-weight: 600; line-height: 1.4; }
.prose h3 { margin: 27px 0 10px; font-size: 18px; font-weight: 700; line-height: 1.4; }
.prose strong { font-weight: 700; }
.prose ul { margin: 0 0 27px; padding-left: 1.25em; }
.prose ul.plain, .prose ul.dash { list-style: none; padding: 0; }
.prose ul.dash li::before { content: "- "; }
.intro .prose p { margin: 0; }
.intro .prose ul { margin: 0; }
.intro { padding-bottom: 45px; }
.intro .title { margin: 18px 0 38px; }

/* two-column text + images */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 523px); gap: 20px 40px; align-items: start; }
.split__aside { display: grid; gap: 40px; }
.split__aside img { width: 100%; }
.split .title { margin-top: 0; }

/* ---------- services cards (home) ---------- */
.services { padding: 15px 0 50px; }
.services__lead { margin: 19px 0 20px; text-align: center; font-family: "Montserrat", Arial, sans-serif; font-size: 20px; line-height: 1.6; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 0; }
.card { padding: 20px 19px 20px; display: flex; flex-direction: column; }
.card__media img { width: 100%; aspect-ratio: 247 / 220; object-fit: cover; }
.card__title { margin: 22px 0 0; font-size: 20px; font-weight: 600; line-height: 1.4; min-height: 56px; }
.card__title a { color: var(--text); text-decoration: none; }
.card__title a:hover { color: var(--blue); }
.card__text { margin: 25px 0 20px; font-size: 18px; line-height: 1.5; font-weight: 400; flex: 1; }
.card__more {
  align-self: flex-start; margin-left: 6px; padding: 2px 0; border-bottom: 2px solid var(--accent-line);
  color: var(--text); font-size: 14px; letter-spacing: .02em; text-transform: uppercase; text-decoration: none;
}
.card__more:hover { color: var(--blue); border-color: var(--blue); }

/* ---------- gallery ---------- */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.gallery--1 { grid-template-columns: 1fr; }
.gallery--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 40px; }
.gallery--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery--1 img { aspect-ratio: auto; }
.gallery-section { padding-top: 48px; }
.section--grey + .gallery-section.section--grey { padding-top: 0; }
.container--gallery-narrow { max-width: 780px; }
.gallery__link { display: block; overflow: hidden; }
.gallery__link img { transition: transform .3s ease; }
.gallery__link:hover img { transform: scale(1.03); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .88); display: flex; align-items: center; justify-content: center; padding: 50px 16px; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .15); color: #fff; border: 0; width: 46px; height: 46px; font-size: 28px; line-height: 1; cursor: pointer; border-radius: 50%; }
.lightbox button:hover { background: rgba(255, 255, 255, .3); }
.lightbox .lb-close { top: 12px; right: 12px; }
.lightbox .lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- contact ---------- */
.contact { padding: 43px 0 45px; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 555px) minmax(0, 1fr); gap: 20px 20px; align-items: start; }
.contact__title { margin: 0; font-size: 36px; font-weight: 600; line-height: 1.08; color: var(--text); }
.contact__intro { margin: 45px 10px 0; font-size: 18px; line-height: 1.5; font-weight: 400; }
.contact__intro a { color: inherit; }
.form { margin: 45px 10px 0; }
.form__row { margin-bottom: 20px; }
.form label, .form legend { display: block; }
.form__row label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.form input[type=text], .form input[type=email], .form input[type=tel], .form textarea {
  width: 100%; border: 0; background: var(--input); padding: 10px 12px; font: inherit; color: var(--text); border-radius: 0;
}
.form input::placeholder, .form textarea::placeholder { color: #767676; opacity: 1; }
.form textarea { min-height: 124px; resize: vertical; }
.form [aria-invalid="true"] { box-shadow: inset 0 0 0 2px #c62828; }
.form__radios { border: 0; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(2, max-content); gap: 2px 30px; }
.form__radios legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.radio { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 400; cursor: pointer; }
.radio input { margin: 0; width: 15px; height: 15px; accent-color: var(--submit); }
.form__privacy { margin: 0 0 16px; font-size: 13px; line-height: 1.5; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn {
  display: block; width: 100%; padding: 10px 30px; border: 0; background: var(--submit); color: #fff;
  font: inherit; font-weight: 400; cursor: pointer;
}
.btn:hover { background: #163a88; }
.btn[disabled] { opacity: .65; cursor: progress; }
.form__status { margin: 14px 0 0; font-weight: 600; }
.form__status.is-ok { color: var(--green-dark); }
.form__status.is-error { color: #b71c1c; }
.contact__map { margin-top: 0; }
.map { position: relative; display: block; }
.map img { width: 100%; aspect-ratio: 565 / 470; object-fit: cover; background: #e5e5e5; }
.map__btn { position: absolute; right: 12px; bottom: 12px; background: #fff; color: var(--text); padding: 6px 12px; font-size: 14px; font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.map:hover .map__btn { color: var(--blue); }
.map__credit { margin: 4px 0 14px; font-size: 12px; text-align: right; }
.contact__address { font-size: 16px; line-height: 1.6; }

/* ---------- legal ---------- */
.legal { font-size: 16px; line-height: 1.6; font-weight: 400; max-width: 980px; }
.legal p { margin: 0 0 16px; }
.legal h2 { font-size: 18px; margin: 26px 0 10px; }
.legal h3 { font-size: 16px; margin: 20px 0 8px; }
.legal .meta { font-size: 14px; color: #5f666d; }
.legal ul { margin: 0 0 16px; }

/* ---------- footer ---------- */
.site-footer { background: var(--green); color: #fff; text-align: center; padding: 28px 0 22px; font-weight: 300; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; }
.footer__links { list-style: none; margin: 10px 0 6px; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 22px; font-size: 14px; }
.footer__copy { font-size: 13px; opacity: .92; }

/* 404 */
.notfound { padding: 60px 0 80px; text-align: center; }
.notfound .btn { display: inline-block; width: auto; text-decoration: none; margin-top: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1199px) {
  .logo img { width: 280px; }
  .nav__link { font-size: 14px; padding: 9px 6px; }
  .has-sub > .nav__link { padding-right: 20px; }
}
@media (max-width: 1023px) {
  .header__inner { min-height: 90px; }
  .logo img { width: 250px; }
  .burger {
    display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 2px solid #000;
    background: var(--btn-grey); cursor: pointer; padding: 0;
  }
  .burger__bars, .burger__bars::before, .burger__bars::after { display: block; width: 22px; height: 2px; background: #000; position: relative; transition: transform .2s, opacity .2s; }
  .burger__bars::before, .burger__bars::after { content: ""; position: absolute; left: 0; }
  .burger__bars::before { top: -7px; }
  .burger__bars::after { top: 7px; }
  .burger[aria-expanded="true"] .burger__bars { background: transparent; }
  .burger[aria-expanded="true"] .burger__bars::before { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] .burger__bars::after { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(360px, 88vw); z-index: 60; overflow-y: auto;
    background: rgba(0, 0, 0, .95); padding: 70px 0 30px; transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s;
  }
  .nav.is-open { transform: none; visibility: visible; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 55; }
  body.nav-open .site-header { z-index: 65; }
  body.nav-open .burger { position: relative; z-index: 70; background: #fff; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__item { flex-wrap: wrap; }
  .nav__link { flex: 1; border: 0; background: none; color: #fff; font-size: 16px; line-height: 1.3; padding: 13px 24px; text-align: left; }
  .nav__link:hover, .nav__link.is-active { color: #ffe44d; background: none; }
  .nav__toggle { position: static; width: 54px; color: #fff; }
  .nav__toggle[aria-expanded="true"]::before { transform: translateY(2px) rotate(-135deg); }
  .nav__sub { position: static; flex-basis: 100%; min-width: 0; margin: 0; border: 0; background: rgba(255,255,255,.06); display: none; visibility: visible; opacity: 1; transform: none; }
  .has-sub:hover .nav__sub, .has-sub:focus-within .nav__sub { display: none; }
  .has-sub.is-open .nav__sub { display: block; }
  .nav__sub a { color: #eee; font-weight: 400; line-height: 1.3; padding: 11px 24px 11px 38px; }
  .nav__sub a:hover, .nav__sub a[aria-current] { background: none; color: #ffe44d; }

  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .split__aside { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
  .contact__grid { grid-template-columns: 1fr; }
  .contact__intro, .form { margin-left: 0; margin-right: 0; }
}
@media (max-width: 767px) {
  :root { --gutter: 16px; }
  .header__inner { min-height: 72px; }
  .logo img { width: 200px; }
  .hero { height: 130px; }
  .hero__title { font-size: 26px; }
  .hero__sub { font-size: 16px; }
  .infobar p { font-size: 15px; }
  .infobar--marble p { padding-top: 22px; padding-bottom: 22px; }
  .title, .contact__title { font-size: 28px; }
  .prose--lg, .card__text, .contact__intro { font-size: 17px; }
  .gallery--2, .gallery--3 { grid-template-columns: 1fr; }
  .form__radios { grid-template-columns: 1fr; }
  .marble-spacer { height: 60px; }
  .contact__intro, .form { margin-top: 24px; }
}
@media (max-width: 479px) {
  .cards { grid-template-columns: 1fr; }
  .card { padding: 10px 0; }
  .card__title { min-height: 0; }
}

@media print {
  .site-header, .nav, .burger, .marble-spacer, .contact__map, .form { display: none !important; }
  body { background: #fff; }
}
@media (max-width: 767px) { html { scroll-padding-top: 85px; } }
