@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/roboto-300.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/roboto-400.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/roboto-400-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/roboto-500.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/roboto-700.woff2") format("woff2");
}

:root {
  --color-primary: #0f7ea6;
  --color-primary-bg: #29abe2;
  --color-accent: #ce5400;
  --color-heizung: #800080;
  --color-sanitaer: #0088cc;
  --color-wartung: #ce5400;
  --color-badsanierung: #3d833d;
  --color-text: #595959;
  --color-heading: #424242;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f6f7;
  --color-dark: #1a1a1a;
  --color-nav: #6e6e6e;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Roboto", Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-dark);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* Kopfbereich */
.site-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.brand img {
  width: 96px;
  height: 96px;
}

.brand-text .brand-firma {
  display: block;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1.85rem;
  letter-spacing: 0.03em;
}

.brand-text .brand-name {
  display: block;
  color: var(--color-heading);
  font-weight: 700;
  font-size: 1.55rem;
}

.notdienst {
  font-weight: 600;
  text-align: right;
}

.notdienst a {
  color: var(--color-heading);
  text-decoration: none;
}

/* Navigation */
.nav-bar {
  border-top: 3px solid var(--color-primary-bg);
  border-bottom: 3px solid var(--color-primary-bg);
  background: var(--color-bg);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
}

.burger {
  display: none;
  margin-left: auto;
  background: none;
  border: 2px solid var(--color-primary);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  color: var(--color-heading);
  cursor: pointer;
}

.burger-icon {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-dark);
  position: relative;
}

.burger-icon::before,
.burger-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--color-dark);
}

.burger-icon::before {
  top: -7px;
}

.burger-icon::after {
  top: 7px;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

.main-nav a {
  display: block;
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: var(--color-nav);
  font-weight: 400;
  text-transform: uppercase;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

.main-nav a[aria-current="page"] {
  background: var(--color-primary-bg);
  color: #fff;
}

@media (max-width: 760px) {
  .burger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .main-nav {
    display: none;
    width: 100%;
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
  }

  .nav-inner {
    flex-wrap: wrap;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .notdienst {
    text-align: left;
  }
}

/* Hauptinhalt */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

main h1 {
  color: var(--color-heading);
  font-size: 2rem;
  margin-top: 0;
}

main h2 {
  color: var(--color-heading);
  font-size: 1.3rem;
  margin-top: 2.5rem;
}

/* Aufzählungen im Inhaltsbereich: grünes Häkchen statt Standard-Bullet */
/* overflow: hidden erzeugt einen eigenen Block-Formatierungskontext, damit die Liste
   neben einem schwimmenden Bild (.leistung-bild) nicht unter das Bild rutscht */
main ul:not(.gallery-grid) {
  list-style: none;
  margin: 0.75rem 0;
  padding: 0;
  overflow: hidden;
}

main ul:not(.gallery-grid) li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.4rem;
}

main ul:not(.gallery-grid) li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 1.1rem;
  height: 1.1rem;
  background: url("../img/haekchen.png") no-repeat center / contain;
}

/* Leistungs-Boxen auf der Startseite */
.leistungen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.leistungen-box {
  border: 2px solid var(--box-color, var(--color-primary));
  border-radius: 6px;
  padding: 1.25rem;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
}

.leistungen-box h2 {
  margin-top: 0;
  font-size: 1.2rem;
  color: var(--box-color, var(--color-heading));
}

.leistungen-box--heizung {
  --box-color: var(--color-heizung);
}

.leistungen-box--sanitaer {
  --box-color: var(--color-sanitaer);
}

.leistungen-box--wartung {
  --box-color: var(--color-wartung);
}

.leistungen-box--badsanierung {
  --box-color: var(--color-badsanierung);
}

.leistungen-box .weiterlesen {
  display: inline-block;
  margin-top: auto;
  padding-top: 0.5rem;
  font-weight: 600;
}

/* Leistungsbeschreibung mit Bild (Heizung, Sanitär, Wartung & Service, Badsanierung) */
/* Einheitliches Muster: links kurze fette Überschrift + Bild, rechts die Fakten/Aufzählung. */
.leistung-block {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  margin: 1.5rem 0;
}

.leistung-bild-spalte {
  flex: 0 0 390px;
  max-width: 100%;
}

.leistung-titel {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.leistung-bild-spalte figure {
  margin: 0;
}

.leistung-bild-spalte img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.leistung-fakten-spalte {
  flex: 1 1 280px;
}

.leistung-fakten-spalte ul {
  margin-top: 0;
}

@media (max-width: 640px) {
  .leistung-block {
    flex-direction: column;
  }

  .leistung-bild-spalte {
    flex-basis: auto;
    width: 100%;
  }

  .leistung-bild-spalte img {
    height: auto;
    aspect-ratio: 3 / 2;
  }
}

.portraet {
  float: left;
  width: 140px;
  border-radius: 6px;
  margin: 0 1.25rem 0.75rem 0;
}

@media (max-width: 500px) {
  .portraet {
    float: none;
    margin: 0 0 1rem;
  }
}

.bildquelle {
  color: #999;
  font-size: 0.8rem;
  margin: 0.4rem 0 0;
}

.bild-platzhalter {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background: var(--color-bg-alt);
  border: 2px dashed #c5ccd0;
  border-radius: 6px;
  color: #8a9296;
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}

/* Referenzen / Galerie-Raster */
.referenzen-label {
  clear: both;
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--color-heading);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(41, 171, 226, 0.3);
}

.referenzen-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 1.5rem 0;
}

.referenzen-grid .gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.5rem;
}

.referenzen-grid .gallery-grid img {
  height: 80px;
}

@media (min-width: 600px) {
  .referenzen-grid .gallery-grid img {
    height: 90px;
  }
}

@media (max-width: 900px) {
  .referenzen-grid {
    grid-template-columns: 1fr;
  }
}

.referenz-gruppe {
  margin-bottom: 2rem;
}

.referenz-gruppe h3 {
  color: var(--color-heading);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.gallery-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
}

.gallery-grid img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid var(--color-primary-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.referenz-teaser {
  margin: 0.75rem 0 1rem;
  min-height: 3.2em;
}

/* Dekorative Wellen-Grafik (wie im alten Design) */
.deko-welle {
  clear: both;
  display: block;
  width: 100%;
  height: auto;
  margin: 3rem 0 0;
}

@media (min-width: 600px) {
  .gallery-grid img {
    height: 140px;
  }
}

.gallery-grid a {
  display: block;
}

/* Lightbox für die Bilder-Galerien */
.lightbox {
  border: 0;
  padding: 0;
  max-width: 95vw;
  max-height: 95vh;
  background: transparent;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.lightbox-image {
  display: block;
  max-width: 92vw;
  max-height: 80vh;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 4px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-counter {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.85rem;
}

/* Kontakt / Über mich */
.kontakt-spalten {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  margin: 1.5rem 0;
}

.kontakt-spalten .kontakt-block {
  flex: 1 1 300px;
  margin: 0;
}

.kontakt-spalten .kontakt-leistungen {
  flex: 1 1 250px;
  padding-top: 1.3rem;
}

.kontakt-leistungen p {
  margin: 0.75rem 0 1rem;
}

.kontakt-block {
  background: var(--color-bg-alt);
  border-radius: 6px;
  padding: 1.5rem;
  max-width: 30rem;
}

.kontakt-block dt {
  font-weight: 700;
  margin-top: 0.75rem;
}

.kontakt-block dd {
  margin: 0;
}

.hinweis {
  border-left: 4px solid var(--color-accent);
  padding: 0.75rem 1rem;
  background: var(--color-bg-alt);
  margin: 1.5rem 0;
}

/* Footer */
.site-footer {
  background: var(--color-dark);
  color: #fff;
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  color: #cfeeff;
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  text-decoration: underline;
}

.footer-copy {
  color: #bbb;
  font-size: 0.9rem;
}
