:root {
  --brand: #021c7f;
  --on-brand: #fff;
  --cta: #c2410c;
  --on-cta: #fff;
  --heading: var(--brand);
  --bg: #fafaf9;
  --fg: #1c1917;
  --muted: #57534e;
  --accent: #0f766e;
  --accent-fg: #fff;
  --surface: #f0efec;
  --border: #dddad5
}

@media (prefers-color-scheme:dark) {
  :root {
    --brand: #9db4ff;
    --on-brand: #0b1437;
    --cta: #fb923c;
    --on-cta: #1c1917;
    --bg: #161412;
    --fg: #f2f0ed;
    --muted: #a8a29e;
    --accent: #2dd4bf;
    --accent-fg: #042f2e;
    --surface: #211e1b;
    --border: #38342f
  }
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  font: 1rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg)
}

h1,
h2,
h3 {
  color: var(--heading);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
  margin: 0 0 .6em
}

h1 {
  font-size: clamp(1.9rem, 6vw, 3rem)
}

h2 {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  margin-top: 1.6em
}

h3 {
  font-size: 1.2rem
}

a {
  color: var(--brand)
}

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

.container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 4rem)
}

.vorteile-container {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  >div {
    margin-top: 10px;
  }
}

.vorteile-container>div {
  margin-top: 10px;
}

.narrow {
  max-width: 700px
}

.section {
  padding: 2.5rem 0 3.5rem
}

.section h2:first-child {
  margin-top: 0
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border)
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-height: 60px
}

.logo {
  font: 700 1.25rem Georgia, serif;
  color: var(--fg);
  text-decoration: none
}

.menu-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--brand);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  cursor: pointer
}

nav {
  flex-basis: 100%;
  display: none
}

nav.open {
  display: block;
  padding-bottom: .5rem
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0
}

nav a {
  display: block;
  padding: .85rem 0;
  color: var(--brand);
  text-decoration: none;
  border-top: 1px solid var(--border)
}

nav a[aria-current=page] {
  color: var(--brand);
  font-weight: 600
}

@media(min-width:1000px) {
  .menu-btn {
    display: none
  }

  nav,
  nav.open {
    display: block;
    flex-basis: auto;
    padding: 0
  }

  nav ul {
    display: flex;
    gap: 1.75rem
  }

  nav a {
    padding: .4rem 0;
    border: 0;
    border-bottom: 2px solid transparent
  }

  nav a:hover,
  nav a[aria-current=page] {
    border-bottom-color: var(--brand)
  }
}

.hero {
  background: var(--surface);
  padding: clamp(3rem, 8vw, 7rem) 0
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 36em
}

.btn {
  display: inline-block;
  background: var(--brand);
  color: var(--on-brand);
  padding: .8rem 1.4rem;
  border: 0;
  border-radius: 6px;
  font: 600 1rem system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer
}

.btn:hover {
  filter: brightness(1.1)
}

.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr))
}

.cards article {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  overflow: hidden
}

.cards p {
  color: var(--muted);
  margin: 0 0 1rem
}

.gallery {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, 1fr)
}

@media(min-width:760px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem
  }
}

.gallery a {
  display: block;
  border-radius: 6px;
  overflow: hidden
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform .25s
}

.gallery a:hover img {
  transform: scale(1.04)
}

dialog#lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  color: #fff
}

dialog#lightbox::backdrop {
  background: rgba(0, 0, 0, .88)
}

dialog#lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center
}

#lightbox figure {
  margin: 0;
  max-width: min(92vw, 1100px);
  text-align: center
}

#lightbox img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 4px
}

#lightbox figcaption {
  padding-top: .75rem
}

.lb-close,
.lb-nav {
  position: absolute;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer
}

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

.lb-nav {
  top: 50%;
  transform: translateY(-50%)
}

.lb-prev {
  left: .5rem
}

.lb-next {
  right: .5rem
}

.lb-close:hover,
.lb-nav:hover {
  background: rgba(255, 255, 255, .3)
}

form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem
}

label {
  display: grid;
  gap: .35rem;
  font-weight: 600
}

input,
textarea,
select {
  font: inherit;
  padding: .7rem .8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg)
}

form .btn {
  justify-self: start
}

footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  color: var(--muted);
  font-size: .95rem
}

@media(prefers-reduced-motion:reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important
  }
}

@media(min-width:1280px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr)
  }
}

.checks {
  padding-left: 1.2rem;
  margin: 1.5rem 0 2rem
}

.checks li {
  margin: .3rem 0
}

.section .btn+.gallery {
  margin-top: 2.5rem
}

.logo {
  display: flex;
  align-items: center;
  gap: .65rem
}

.logo img {
  display: block;
  height: 80px
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem 2rem
}

.legal {
  display: flex;
  gap: 1.5rem
}

.legal a {
  color: var(--brand)
}

.locations {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr))
}

.loc {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08)
}

.loc-head {
  background: var(--brand);
  color: var(--on-brand);
  padding: 1.25rem 1.5rem
}

.loc-head h2,
.loc-head h3 {
  margin: 0;
  color: inherit;
  font-size: 1.5rem
}

.loc-head p {
  margin: .2rem 0 0;
  opacity: .9
}

.loc-list {
  list-style: none;
  margin: 0;
  padding: 1.5rem;
  display: grid;
  gap: 1.2rem
}

.loc-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start
}

.ico {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand);
  display: grid;
  place-items: center
}

.ico svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round
}

.loc-list strong {
  display: block
}

.loc-list a {
  color: var(--brand)
}

/* Stepper: mobil senkrecht, ab 1000px waagerecht */
.steps {
  background: var(--surface)
}

.stepper {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid
}

.stepper li {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0 1.25rem;
  padding-bottom: 2rem
}

.stepper li:last-child {
  padding-bottom: 0
}

.stepper li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 56px;
  bottom: 0;
  width: 2px;
  background: var(--border)
}

.step-ico {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  display: grid;
  place-items: center
}

.step-ico svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round
}

.step-no {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--fg);
  border: 2px solid var(--brand);
  font: 700 .75rem/18px system-ui, sans-serif;
  text-align: center
}

.step-text h3 {
  margin: .3rem 0 .3rem
}

.step-text p {
  margin: 0;
  color: var(--muted)
}

@media(min-width:1000px) {
  .stepper {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem
  }

  .stepper li {
    display: block;
    text-align: center;
    padding: 0
  }

  .stepper li:not(:last-child)::before {
    left: 50%;
    top: 27px;
    bottom: auto;
    width: calc(100% + 1.5rem);
    height: 2px
  }

  .step-ico {
    margin: 0 auto 1rem
  }

  .step-text p {
    max-width: 22ch;
    margin: 0 auto
  }

  .vorteile-container {
    flex-direction: row;
  }
}



/* Hero mit transparentem Hintergrundbild. Bild ersetzen: images/startbild.svg (oder Dateiname unten ändern).
   Transparenz über --hero-bild-deckkraft einstellen (0 = unsichtbar, 1 = voll sichtbar) */
.hero--bild {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  --hero-bild-deckkraft: .4
}

.hero--bild::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("images/00_Header Home_bearbeitet desktop.png") bottom/cover no-repeat;
  opacity: var(--hero-bild-deckkraft)
}

/* Bilder in den Leistungs-Karten */
.card-img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover
}

.card-img--fenster {
  display: block;
  height: 150px;
  object-fit: cover;
  left: 30%;
  position: relative;
}

.card-img--tueren {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: cover
}

.card-body {
  padding: 1.4rem
}

/* Bilderleiste mit externen Links: mobil 2 x 2, ab 760px 4 nebeneinander */
.bilder-leiste {
  padding-top: 0
}

.bilder {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr)
}

@media(min-width:760px) {
  .bilder {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem
  }
}

.bilder a {
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden
}

.bilder img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8/3;
  object-fit: cover;
  transition: transform .25s
}

.bilder a:hover img {
  transform: scale(1.04)
}

/* Hintergrundbilder der Hero-Blöcke je Seite (Pfad relativ zu dieser CSS-Datei). Die Startseite nutzt images/startbild.svg */
.hero--fenster::before {
  background-image: url("images/00_Header Fenster desktop.jpg")
}

.hero--tueren::before {
  background-image: url("images/00_Header Haustueren desktop.jpg")
}

.hero--sonnenschutz::before {
  background-image: url("images/00_Header Sonnenschutz desktop.jpg")
}

.hero--referenzen::before {
  background-image: url("images/00_Header Referenzen desktop.jpg")
}

.hero--ueber-uns::before {
  background-image: url("images/00_Header Über uns desktop.jpg")
}

.hero--kontakt::before {
  background-image: url("images/00_Header Kontakt desktop.jpg")
}

/* Kontaktformular: Datenschutz-Checkbox, Dankesmeldung */
.check {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  font-weight: 400
}

.check input {
  width: auto;
  margin-top: .35rem;
  padding: 0;
  flex: none
}

.hinweis {
  margin: 1rem 0 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--brand);
  background: var(--surface);
  border-radius: 6px
}

/* Info-Leiste ganz unten: mobil untereinander, ab 1000px drei Spalten und max. 250px hoch */
.inf-main {
  background: var(--on-brand);
  color: var(--brand)
}

.inf-main a {
  color: inherit
}

.inf-grid {
  display: grid;
  gap: 2rem;
  padding-top: 2rem;
  padding-bottom: 2rem
}

.inf-logo img {
  display: block;
  height: 80x
}

.inf-social {
  list-style: none;
  display: flex;
  gap: .75rem;
  margin: 1rem 0 0;
  padding: 0
}

.inf-social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid currentColor;
  border-radius: 50%
}

.inf-social a:hover {
  background: var(--brand);
  color: var(--on-brand)
}

.inf-ico {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round
}

.inf-titel {
  margin: 0 0 .6rem;
  font: 700 1.1rem/1.3 Georgia, "Times New Roman", serif
}

.inf-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem
}

.inf-list li {
  display: flex;
  gap: .6rem;
  align-items: flex-start
}

.inf-list .inf-ico {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: .25rem
}

.inf-hours li {
  justify-content: space-between;
  max-width: 20rem
}

.inf-mehr {
  margin: .7rem 0 0
}

@media(min-width:1000px) {
  .inf-main {
    max-height: 250px;
    overflow: hidden
  }

  .inf-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
    gap: 3rem
  }
}

/* Hero-Buttons nebeneinander (auf kleinen Bildschirmen umbrechend); Konfigurator-Button in Signalfarbe (--cta) */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: .25rem
}

.btn--cta {
  background: var(--cta);
  color: var(--on-cta);
  box-shadow: 0 6px 16px rgba(194, 65, 12, .35)
}

/* Info-Leiste mobil: Inhalt horizontal zentriert */
@media(max-width:999px) {
  .inf-grid {
    text-align: center;
    justify-items: center
  }

  .inf-social {
    justify-content: center
  }

  .inf-list {
    justify-items: center
  }

  .inf-list li {
    justify-content: center;
    align-items: center
  }

  .inf-list .inf-ico {
    margin-top: 0
  }

  .inf-hours li {
    max-width: none
  }
}

/* Filter für die Referenzen: kleine Buttons über der Galerie */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.5rem 0 0
}

.filter[hidden] {
  display: none
}

.filter+.gallery {
  margin-top: 1.25rem
}

.filter-btn {
  font: 600 .9rem system-ui, sans-serif;
  padding: .4rem .95rem;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: transparent;
  color: var(--brand);
  cursor: pointer
}

.filter-btn:hover {
  background: var(--surface)
}

.filter-btn.is-active {
  background: var(--brand);
  color: var(--on-brand)
}

/* Info-Leiste, oberer Streifen: Aufruf mit Telefon- und Beratungs-Button. Brandfarbe als Hintergrund (invers zum unteren Teil),
   dahinter ein transparentes Bild. Bild ersetzen: images/infoleiste-bild.svg. Deckkraft: --inf-bild-deckkraft (0 bis 1) */
.inf-cta {
  position: relative;
  isolation: isolate;
  background: var(--brand);
  color: var(--on-brand);
  --inf-bild-deckkraft: .3
}

.inf-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("images/Beratung anfragen V1 desktop.jpg") center/cover no-repeat;
  opacity: var(--inf-bild-deckkraft)
}

.inf-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem
}

.inf-cta-text h2 {
  margin: 0 0 .15rem;
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  color: inherit
}

.inf-cta-text p {
  margin: 0
}

.inf-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem
}

.inf-cta .btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--on-brand);
  color: var(--brand)
}

.inf-cta .btn--tel {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: inset 0 0 0 2px var(--on-brand)
}

@media(min-width:1000px) {
  .inf-cta {
    max-height: 100px;
    overflow: hidden
  }

  .inf-cta-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    padding-top: .75rem;
    padding-bottom: .75rem
  }
}

/* Info-Leiste am Desktop: erster Block links, mittlerer Block mittig, rechter Block rechts */
@media(min-width:1000px) {
  .inf-logo {
    justify-self: start;
    text-align: left
  }

  .inf-kontakt {
    justify-self: center;
    text-align: center
  }

  .inf-kontakt .inf-list {
    justify-items: center
  }

  .inf-kontakt .inf-list li {
    justify-content: center;
    align-items: center
  }

  .inf-kontakt .inf-ico {
    margin-top: 0
  }

  .inf-zeiten {
    justify-self: end;
    text-align: right
  }

  .inf-zeiten .inf-hours li {
    max-width: none;
    gap: 1.5rem
  }
}

/* Bild-Text-Zeilen: mobil untereinander, ab 760px abwechselnd Bild 2/3 + Text 1/3 und Text 1/3 + Bild 2/3 */
.bild-text {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.5rem
}

.bt-zeile {
  display: grid;
  gap: 1rem 2.5rem;
  grid-template-columns: 1fr;
  align-items: center
}

.bt-bild {
  display: block;
  width: 100%;
  height: 400px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px
}

.bt-bild-ueber-uns {
  display: block;
  width: 100%;
  height: 400px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px
}

.bt-text h2 {
  margin: 0 0 .5rem;
  font-size: clamp(1.25rem, 3vw, 1.6rem)
}

.bt-text p {
  margin: 0;
  color: var(--muted)
}

@media(min-width:760px) {
  .bt-zeile {
    grid-template-columns: 2fr 1fr
  }

  .bt-umgekehrt {
    grid-template-columns: 1fr 2fr
  }

  .bt-umgekehrt .bt-bild {
    order: 2
  }

  .bt-umgekehrt .bt-text {
    order: 1
  }
}