/* 1. Globales Box-Sizing */
html {
  box-sizing: border-box;
}
*, *::before, *::after {
  box-sizing: inherit;
}

html {
  scroll-behavior: smooth;
}

/* 2. Wortumbruch für alle H2 im main-Content */
main > h2,
.hero h2 {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ======= BASIS ======= */
html {
    height: 100%;
  }
  body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    color: #111;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
  }
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }
  
  /* ======= HEADER ======= */
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  .logo img {
    height: 100px;
    transition: height 0.3s ease;
  }
  .hamburger {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
  }
  
  /* ======= NAVIGATION (Desktop) ======= */
  .main-nav {
    display: flex;
    align-items: center;
  }
  .nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .nav-links a {
    text-decoration: none;
    color: #000;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    transition: color 0.3s;
  }
  .nav-links a:hover {
    color: #b30000;
  }
  .nav-links a.active {
    border-bottom: 2px solid #b30000;
  }
  .telefon {
    font-weight: bold;
  }
  
  /* Dropdown (Desktop) */
  .dropdown {
    position: relative;
  }
  .dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: #000;
    text-decoration: none;
  }
  .dropdown-content a:hover {
    color: #b30000;
  }
  .dropdown:hover .dropdown-content {
    display: block;
  }
  
  /* ======= MOBILE NAV ======= */
  .mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 250px;
    background: #fff;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
    z-index: 2000;
    transition: right 0.3s ease;
  
    overflow-y: auto;  /* <--- Das macht das Menü scrollbar! */
    -webkit-overflow-scrolling: touch; /* Für besseres Scrollen auf iOS */
  }
  
  .mobile-nav.show {
    right: 0;
  }
  .mobile-nav .close-btn {
    align-self: flex-end;
    font-size: 28px;
    cursor: pointer;
  }
  .mobile-nav a {
    display: block;
    margin: 0.7rem 0;
    font-size: 1.1rem;   /* Schriftgröße anpassen, z.B. 1.25rem bis 1.5rem */
    font-weight: bold;
    color: #000;
    text-decoration: none;
    text-align: center;   /* zentriert */
    letter-spacing: 0.01em;
  }
  
  .mobile-nav .close-btn {
    align-self: flex-end;
    font-size: 2rem;   /* etwas größer */
  }
  .mobile-nav a:hover {
    color: #b30000;
  }
  
  /* ======= MOBILE-DROPDOWN für „Alle Leistungen“ ======= */
  .mobile-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    margin: 0.5rem 0;
    cursor: pointer;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.02rem;
  }
  .mobile-dropdown-header span {
    flex-grow: 1;
    text-decoration: none;
    color: #000;
  }
  .mobile-dropdown-toggle {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    pointer-events: auto;
  }
  .mobile-dropdown-toggle.rotate {
    transform: rotate(180deg);
  }
  .mobile-dropdown-content {
    font-size: 1.1rem;
    text-align: center;
    list-style: none;
    padding-left: 1rem;
    margin: 0;
    display: none;
    flex-direction: column;
  }

  .mobile-dropdown-content.open {
    display: flex;
  }
  .mobile-dropdown-content li + li {
    margin-top: 0.5rem;
  }
  .mobile-dropdown-content a {
    font-size: 1.00rem;
    text-decoration: none;
    color: #000;
  }
  .mobile-dropdown-content a:hover {
    color: #b30000;
  }
  
  /* ======= HERO & MAIN ======= */
  main,
  .hero {
    flex: 1;
    max-width: 1100px;
    margin: auto;
    padding: 2rem 1rem;
  }
  .hero h2 {
    margin-top: 0;
    font-size: 1.75rem;
  }
  .hero p {
    margin-bottom: 1.5rem;
  }
  
  /* ======= CTA BUTTON ======= */
  .cta-container {
    text-align: center;
  }
  .button {
    display: inline-block;
    margin: 1.5rem 0;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    background-color: #b30000;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
  }
  .button:hover {
    background-color: #8a0000;
  }
  
/* ======= KONTAKT / ANFAHRT / ÖFFNUNGSZEITEN: volle Breite, zentriert ======= */
.kontakt-anfahrt-zeiten {
  background-color: #f2f2f2;
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  padding: 2rem 1rem;
}
/* behalten wir, um das Grid wieder auf Max-Width zu zentrieren */
.kontakt-anfahrt-zeiten .info-grid {
  max-width: 1100px;
  margin: 0 auto;
}
  .info-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin: 0 auto;
  }
  .info-box {
    flex: 1;
    min-width: 220px;
    max-width: 300px;
    text-align: center;
  }
  .info-box .icon-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1rem;
  }
  .info-box h3 {
    margin-bottom: 0.5rem;
  }
  /* Links außerhalb der Route-Buttons ununterstrichen & schwarz */
  .info-box a:not(.route-button),
  .info-box p a:not(.route-button),
  a[href^="tel:"],
  a[href^="mailto:"] {
    color: #000;
    text-decoration: none;
  }
  .info-box a:not(.route-button):hover,
  .info-box p a:not(.route-button):hover {
    color: #b30000;
  }
  
  /* ======= ROUTE BUTTON ======= */
  .route-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    background: #b30000;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s ease;
  }
  .route-button:hover {
    background: #8a0000;
  }
  
  /* ======= LEISTUNGEN GRID ======= */
/* 1) Grid-Feintuning */
.leistungen-grid {
  display: grid;
  gap: 2rem;
  margin: 2rem auto;
  max-width: 1200px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  padding: 0 1rem;
}

/* 2) Box-Grundformat */
.leistung-box {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.leistung-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* === Bild + Overlay === */
.leistung-image {
  position: relative;
  overflow: hidden;
  /* 16:9 Aspect Ratio */
  height: 0;
  padding-top: 56.25%;
}

.leistung-image img {
  position: absolute;
  inset: 0;              /* top/right/bottom/left = 0 */
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.leistung-box:hover .leistung-image img {
  transform: scale(1.05);
}

/* Overlay: volle Fläche, Flex-Zentrierung */
.leistung-image .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.leistung-box:hover .leistung-image .overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Icon mittig und als Block-Element */
.leistung-image .overlay .icon {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}




/* 4) Inhalt & Button */
.leistung-content {
  padding: 1.5rem;
  text-align: center;
}
.leistung-content h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  color: #333;
}
.leistung-content p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 1.25rem;
}
/* kleinere Variante des CTA-Buttons */
.button-sm {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  background-color: #b30000;
  color: #fff;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.3s ease;
}
.button-sm:hover {
  background-color: #8a0000;
}

/* 1) Grid-Feintuning */
.leistungen-grid {
  display: grid;
  gap: 2rem;
  margin: 2rem auto;
  max-width: 1200px;
  padding: 0 1rem;
  
  /* default: 1 Spalte */
  grid-template-columns: 1fr;
}

/* medium: 2 Spalten ab 768px */
@media (min-width: 768px) {
  .leistungen-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* large: 3 Spalten ab 1024px */
@media (min-width: 1024px) {
  .leistungen-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


  
  /* ======= FOOTER ======= */
  .site-footer {
    background: #f2f2f2;
    padding: 2rem 1rem 0;
    font-size: 0.9rem;
  }
  .footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin: auto;
    max-width: 1200px;
  }
  .footer-column {
    flex: 1;
    min-width: 220px;
  }
  .footer-column h4 {
    margin-bottom: 0.5rem;
  }
  .footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .footer-column ul li {
    margin-bottom: 0.3rem;
  }
  .footer-column ul li::before {
    content: "› ";
    color: #000;
  }
  .footer-column ul li a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
  }
  .footer-column ul li a:hover {
    color: #b30000;
  }
  .footer-logo {
    height: 60px;
    margin-bottom: 0.5rem;
  }
  .footer-bottom {
    margin-top: 3rem; 
    text-align: center;
    background: #b30000;
    color: #fff;
    padding: 1rem 0;
    margin-left: calc(-50vw + 50%);
    width: 100vw;
  }
  
  /* ======= SCROLL TO TOP ======= */
  .scroll-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    background-color: #b30000;       /* sattes Rot */
    color: #fff;                      /* Pfeil in Weiß */
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;               /* etwas größerer Pfeil */
    line-height: 3rem;                /* vertikale Zentrierung */
    text-align: center;
    cursor: pointer;
    display: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: background-color 0.3s;
    z-index: 1000;
  }
  .scroll-to-top.show {
    display: block;
  }
  .scroll-to-top:hover {
    background-color: #8a0000;
  }
  
  /* ======= SPEZIELLE HOVER-REGELN FÜR TEL/MAIL ======= */
  a[href^="tel:"]:hover,
  a[href^="mailto:"]:hover {
    color: #b30000;
  }
  
/* ======= RESPONSIVE DETAILS ======= */
@media (max-width: 1024px) {
  .logo img {
    height: 100px;
  }
}
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  .main-nav {
    display: none;
  }
  main ul {
    margin-left: 1rem;
    padding-left: 1rem;
  }


  /* Footer auf kleinen Bildschirmen vollflächig + zentriert */
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-bottom {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    text-align: center;
    padding: 1rem 0;   /* optional: vertikales Padding */
  }
  main,
  .hero {
    padding: 1rem;
  }
  .info-grid,
  .leistungen-grid {
    gap: 1rem;
  }
  .leistung-box {
    padding: 1rem;
  }
}
@media (max-width: 480px) {
  .logo img {
    height: 80px;
  }
}

.hamburger {
  color: #000; /* oder #000, wenn Du Schwarz möchtest */
}

/* mobile arrow in „Alle Leistungen“ schwarz */
.mobile-dropdown-toggle {
  color: #000; /* macht den Pfeil schwarz */
}

/* Unsere Leistungen Überschrift */
.leistungen-preview h2,
main > h2 {
  font-size: 2.5rem;
  text-align: center;
  margin: 2rem 0 1.5rem;
}

/* Nur der "Mehr erfahren"-Link zentriert */
.leistung-box a {
  display: block;            /* Link zum Block-Element machen */
  width: fit-content;        /* nur so breit wie sein Inhalt */
  margin: 1rem auto 0;       /* oben Abstand, horizontal auto = zentriert */
  text-align: center;        /* Text (Mehr erfahren) zentrieren */
}

/* Icons8-Link im Footer */
.footer-bottom a {
  color: inherit;         /* übernimmt die weiße Schriftfarbe */
  text-decoration: none;  /* keine Unterstreichung */
}

.footer-bottom a:hover {
  color: #000;         /* oder dein gewünschtes Rot beim Hover */
  /* optional: text-decoration: underline; */
}

/* ======= PROZESS-ABLAUF ======= */
.prozess-ablauf {
  background: #f9f9f9;
  padding: 3rem 1rem;
  text-align: center;
}
.prozess-ablauf h2 {
  margin-bottom: 2rem;
  font-size: 2rem;
}
.ablauf-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  max-width: 1100px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .ablauf-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* NEU: Icon und Text in einer Spalte zentrieren */
.ablauf-schritt {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ablauf-schritt img {
  width: 60px;
  margin-bottom: 1rem;
}
.ablauf-schritt h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}
.ablauf-schritt p {
  font-size: 0.95rem;
  line-height: 1.4;
  max-width: 280px;
}

/* ======= KONTAKTFORMULAR ======= */
.kontakt-formular {
  background: #fff;
  padding: 3rem 1rem;
}
.kontakt-formular .form-container {
  display: grid;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  grid-template-columns: 1fr 1fr;
  align-items: center; /* <--- NEU! Beide Spalten vertikal zentrieren */
  min-height: 480px; /* Optional, sorgt für gleiche Höhe bei weniger Inhalt */
}
@media (max-width: 768px) {
  .kontakt-formular .form-container {
    grid-template-columns: 1fr;
  }
}
.kontakt-formular .form-image {
  display: flex;
  align-items: center;
  height: 100%;
}

.kontakt-formular .form-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover; /* Sorgt dafür, dass das Bild immer voll wirkt */
  max-height: 430px; /* Optional: maximale Bildhöhe, passt zur Form */
}
.kontakt-formular .form-content {
  display: flex;
  flex-direction: column;
}
.kontakt-formular .form-content h2 {
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}
.kontakt-formular .form-content input,
.kontakt-formular .form-content textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f5f8fa;
  font-size: 1rem;
}
.kontakt-formular .form-content .checkbox {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.kontakt-formular .form-content .checkbox input {
  margin-right: 0.5rem;
  margin-top: 0.2rem;
}
.kontakt-formular .form-content .submit-button {
  align-self: center; /* <-- statt flex-start */
  padding: 0.75rem 1.5rem;
  background: #b30000;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: 1rem;  /* Optional für Luft nach oben */
}

.kontakt-formular .form-content .submit-button:hover {
  background: #8a0000;
}

.kontakt-formular .form-content .checkbox-row {
  display: flex;
  align-items: center;
  margin-bottom: 1.2rem;
  gap: 0.7rem; /* Abstand zwischen Checkbox und Text */
  font-size: 0.96rem;
  line-height: 1.35;
}

.kontakt-formular .form-content .checkbox-row input[type="checkbox"] {
  margin: 0;
  accent-color: #b30000; /* schöne rote Checkbox */
  width: 1.15rem;
  height: 1.15rem;
}

.kontakt-formular .form-content .checkbox-row label {
  margin: 0;
  cursor: pointer;
  user-select: text;
  font-weight: 400;
}


/* ======= INTRO TEXT SECTION ======= */
.intro-text {
  background: none;       /* Kein Hintergrund */
  border-radius: 0;       /* Keine abgerundeten Ecken */
  box-shadow: none;       /* Kein Schatten */
  padding: 4rem 2rem;     /* Weißraum oben/unten behalten */
  line-height: 1.7;
  max-width: 1100px;
  margin: 2rem auto;
}

.intro-text p {
  margin-bottom: 1.2rem;
}


.intro-container {
  margin-bottom: 2rem;
}


.animate-left,
.animate-right {
  opacity: 0;
  transform: translateX(-60px);
  transition: all 0.8s ease-out;
}

.animate-right {
  transform: translateX(60px);
}

.animate-left.visible,
.animate-right.visible {
  opacity: 1;
  transform: translateX(0);
}
.animate-left.visible {
  transition-delay: 0.1s;
}
.animate-right.visible {
  transition-delay: 0.2s;
}

/* ==========================================================================
   1) Gemeinsame Full-Bleed-Styles für alle Hero-Sektionen
   ========================================================================== */
:is(.hero-haustechnik, .hero-ueber-uns, .hero-leistungen, .hero-kontakt, .hero-elektrotechnik, .hero-beleuchtungstechnik, .hero-sprechanlage, .hero-telefonanlage, .hero-smart, .hero-wallbox, .hero-pv, .hero-netzwerk, .hero-dguv) {
  position: relative;
  width: 100vw !important;
  max-width: none !important;
  left: 50%;
  transform: translateX(-50%);
  height: 100vh !important;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}
:is(.hero-haustechnik, .hero-ueber-uns, .hero-leistungen, .hero-kontakt, .hero-elektrotechnik, .hero-beleuchtungstechnik, .hero-sprechanlage, .hero-telefonanlage, .hero-smart, .hero-wallbox, .hero-pv, .hero-netzwerk, .hero-dguv)::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  pointer-events: none;
}

/* ==========================================================================
   2) Seite-spezifische Hintergrundbilder
   ========================================================================== */
body.home       .hero-haustechnik  { background: url('bilder/haustechnik.png')   top center / cover no-repeat; }
body.ueber-uns  .hero-ueber-uns    { background: url('bilder/ueber-uns.png') center   / cover no-repeat; }
body.leistungen .hero-leistungen   { background: url('bilder/leistungen.png') center  / cover no-repeat; }
body.kontakt    .hero-kontakt      { background: url('bilder/kontakt_2.png')    center  / cover no-repeat; }
body.elektrotechnik .hero-elektrotechnik { background: url('bilder/schaltkasten.png')    center  / cover no-repeat; }
body.beleuchtungstechnik  .hero-beleuchtungstechnik { background: url('bilder/spot.png')    center  / cover no-repeat; }
body.sprechanlage .hero-sprechanlage  { background: url('bilder/sprechanlage.png')    center  / cover no-repeat; }
body.telefonanlage .hero-telefonanlage  { background: url('bilder/telefonanlagen.png')    center  / cover no-repeat; }
body.smart  .hero-smart { background: url('bilder/smart.png')    center  / cover no-repeat; }
body.wallbox  .hero-wallbox { background: url('bilder/wallbox.png')    center  / cover no-repeat; }
body.pv   .hero-pv  { background: url('bilder/pv.png')    center  / cover no-repeat; }
body.netzwerk .hero-netzwerk { background: url('bilder/netzwerkschrank.png')    center  / cover no-repeat; }
body.dguv .hero-dguv  { background: url('bilder/dguv3.png')    center  / cover no-repeat; }
/* ==========================================================================
   3) Hero-Content (Text, Button, Spacing)
   ========================================================================== */
.hero-content {
  position: relative;
  max-width: 800px;
  text-align: center;
  color: #fff;
  padding: 2rem;
  margin-top: 100px;
}
.hero-subtitle {
  display: inline-block;
  margin-bottom: 1rem;
  font-weight: bold;
  color: #b30000;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}
.hero-content .button {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  background-color: #b30000;
  color: #fff;
  border-radius: 30px;
  transition: transform 0.3s ease;
}
.hero-content .button:hover {
  transform: translateY(-2px);
}

/* ==========================================================================
   4) Header & Navigation auf transparentem Hero
   ========================================================================== */
/* Transparenter Header auf allen vier Seiten */
:is(body.home, body.ueber-uns, body.leistungen, body.kontakt, body.elektrotechnik, body.beleuchtungstechnik, body.sprechanlage, body.telefonanlage, body.smart, body.wallbox, body.pv, body.netzwerk, body.dguv) .topbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: transparent !important;
  border-bottom: none           !important;
  z-index: 1001;
}
/* Link-Grundfarbe */
:is(body.home, body.ueber-uns, body.leistungen, body.kontakt, body.elektrotechnik, body.beleuchtungstechnik, body.sprechanlage, body.telefonanlage, body.smart, body.wallbox, body.pv, body.netzwerk, body.dguv) .nav-links a,
:is(body.home, body.ueber-uns, body.leistungen, body.kontakt, body.elektrotechnik, body.beleuchtungstechnik, body.sprechanlage, body.smart, body.wallbox, body.pv, body.netzwerk, body.dguv) .telefon {
  color: #000 !important;
}
/* Hover-Effekt */
:is(body.home, body.ueber-uns, body.leistungen, body.kontakt, body.elektrotechnik, body.beleuchtungstechnik, body.sprechanlage, body.telefonanlage, body.smart, body.wallbox, body.pv, body.netzwerk, body.dguv) .nav-links a:hover,
:is(body.home, body.ueber-uns, body.leistungen, body.kontakt, body.elektrotechnik, body.beleuchtungstechnik, body.sprechanlage, body.telefonanlage, body.smart, body.wallbox, body.pv, body.netzwerk, body.dguv) .telefon:hover {
  color: #b30000 !important;
}
/* Aktiver Menüpunkt */
:is(body.home, body.ueber-uns, body.leistungen, body.kontakt, body.elektrotechnik, body.beleuchtungstechnik, body.sprechanlage, body.telefonanlage, body.smart, body.wallbox, body.pv, body.netzwerk, body.dguv) .nav-links a.active {
  border-color: #b30000 !important;
}

/* ==========================================================================
   5) Nach Scroll: Header wieder Weiß auf Schwarz
   ========================================================================== */
:is(body.home.scrolled, body.ueber-uns.scrolled, body.leistungen.scrolled, body.kontakt.scrolled, body.elektrotechnik.scrolled, body.beleuchtungstechnik.scrolled, body.sprechanlage.scrolled, body.telefonanlage.scrolled, body.smart.scrolled, body.wallbox.scrolled, body.pv.scrolled, body.netzwerk.scrolled, body.dguv.scrolled) .topbar {
  background-color: #fff !important;
  border-bottom: 1px solid #ddd !important;
}
:is(body.home.scrolled, body.ueber-uns.scrolled, body.leistungen.scrolled, body.kontakt.scrolled, body.elektrotechnik.scrolled, body.beleuchtungstechnik.scrolled, body.sprechanlage.scrolled, body.telefonanlage.scrolled, body.smart.scrolled, body.wallbox.scrolled, body.pv.scrolled, body.netzwerk.scrolled, body.dguv.scrolled) .nav-links a,
:is(body.home.scrolled, body.ueber-uns.scrolled, body.leistungen.scrolled, body.kontakt.scrolled, body.elektrotechnik.scrolled, body.beleuchtungstechnik.scrolled, body.sprechanlage.scrolled, body.telefonanlage.scrolled, body.smart.scrolled, body.wallbox.scrolled, body.pv.scrolled, body.netzwerk.scrolled, body.dguv.scrolled) .telefon {
  color: #000 !important;
}
:is(body.home.scrolled, body.ueber-uns.scrolled, body.leistungen.scrolled, body.kontakt.scrolled, body.elektrotechnik.scrolled, body.beleuchtungstechnik.scrolled, body.sprechanlage.scrolled, body.telefonanlage.scrolled, body.smart.scrolled, body.wallbox.scrolled, body.pv.scrolled, body.netzwerk.scrolled, body.dguv.scrolled) .nav-links a:hover,
:is(body.home.scrolled, body.ueber-uns.scrolled, body.leistungen.scrolled, body.kontakt.scrolled, body.elektrotechnik.scrolled, body.beleuchtungstechnik.scrolled, body.sprechanlage.scrolled, body.telefonanlage.scrolled, body.smart.scrolled, body.wallbox.scrolled, body.pv.scrolled, body.netzwerk.scrolled, body.dguv.scrolled) .telefon:hover {
  color: #b30000 !important;
}

/* ==========================================================================
   6) Responsive Feinjustierung (optional)
   ========================================================================== */
@media (min-width: 1200px) {
  :is(.hero-haustechnik, .hero-ueber-uns, .hero-leistungen, .hero-kontakt, .hero-elektrotechnik, .hero-beleuchtungstechnik, .hero-sprechanlage, .hero-telefonanlage, .hero-smart, .hero-wallbox, .hero-pv, .hero-netzwerk, .hero-dguv) {
    height: 80vh !important;
    background-position: center 20% !important;
  }
}
@media (min-width: 1600px) {
  :is(.hero-haustechnik, .hero-ueber-uns, .hero-leistungen, .hero-kontakt, .hero-elektrotechnik, .hero-beleuchtungstechnik, .hero-sprechanlage, .hero-telefonanlage, .hero-smart, .hero-wallbox, .hero-pv, .hero-netzwerk, .hero-dguv) {
    height: 75vh !important;
    background-position: center 25% !important;
  }
}

/* ====== NEUE VARIANTE: BOX2, IMAGE2, OVERLAY2, ICON2 ====== */

/* 1) Box2-Grundformat */
.leistung-box2 {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;  /* entfernt Unterstreichung */
  color: inherit;         /* übernimmt Schriftfarbe */
  cursor: pointer;   
}
.leistung-box2:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* 2) Image2 mit 16:9-Container */
.leistung-image2 {
  position: relative;
  overflow: hidden;
  height: 0;
  padding-top: 56.25%; /* 16:9 */
}
.leistung-image2 > img {
  position: absolute;
  inset: 0;            /* top/right/bottom/left = 0 */
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.leistung-box2:hover .leistung-image2 > img {
  transform: scale(1.05);
}

/* 3) Overlay2 mit Flex-Zentrierung */
.leistung-image2 .overlay2 {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.leistung-box2:hover .leistung-image2 .overlay2 {
  opacity: 1;
  pointer-events: all;
}

/* 4) Icon2 mittig */
.leistung-image2 .overlay2 .icon2 {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}


/* ======= BENEFITS / VORTEILE ======= */
.benefits {
  background-color: #fff;
  padding: 4rem 1rem;
}
.benefits-container {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.benefits-container h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #111;
}

/* Grid: 1 Spalte mobil, 3 Spalten ab 768px */
.benefits-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Box-Styling */
.benefit-item {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.benefit-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

/* Icon */
.benefit-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
}
.benefit-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Überschrift & Text */
.benefit-item h3 {
  margin: 0.5rem 0 1rem;
  font-size: 1.25rem;
  color: #111;
}
.benefit-item p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.5;
}

.nav-links li a.telefon {
    display: inline-flex;
    align-items: center;
    gap: 6px; /* Abstand zwischen Icon und Text */
    line-height: 1; /* verhindert, dass das Icon nach unten rutscht */
    padding: 0 10px; /* an Menü anpassen */
    height: 100%; /* sorgt dafür, dass es sich an die Nav-Höhe anpasst */
}

.nav-links li a.telefon img {
    width: 16px;
    height: 16px;
    display: block; /* vermeidet zusätzliche Lücken */
}

.knx-partner-box {
  margin: 2rem 0;
  text-align: center;
}

.knx-partner-box img {
  max-width: 220px;
  height: auto;
  display: block;
  margin: 0 auto 0.75rem;
}

.knx-partner-box p {
  margin: 0;
  font-size: 0.95rem;
}

/* ======= FAQ SECTION ======= */
.faq-section {
  max-width: 1100px;
  margin: 3rem auto 4rem;
  padding: 0 1rem;
}

.faq-section .intro-container {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.faq-section h2 {
  font-size: 2rem;
  text-align: center;
  margin: 0 0 2rem;
  color: #111;
}

.faq-item + .faq-item {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
}

.faq-item h3 {
  font-size: 1.2rem;
  margin: 0 0 0.6rem;
  color: #111;
}

.faq-item p {
  margin: 0;
  color: #555;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .faq-section .intro-container {
    padding: 1.5rem;
  }

  .faq-section h2 {
    font-size: 1.6rem;
  }

  .faq-item h3 {
    font-size: 1.05rem;
  }
}
.faq-section {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.faq-section .intro-container {
  max-width: 900px;
  margin: 0 auto;
}

.faq-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}

.faq-item {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.faq-item h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  color: #111;
}

.faq-item p {
  margin: 0;
  color: #444;
  line-height: 1.6;
}

/* ========================================================================== 
   MODERN DESIGN LAYER 2026
   Ergänzt den vorhandenen Stand, ohne Bildformate oder Hintergrundpositionen
   der Hero-, Leistungs-, Kontakt- und Partnerbilder zu verändern.
   ========================================================================== */

:root {
  --brand: #b30000;
  --brand-dark: #850000;
  --ink: #151515;
  --muted: #62666c;
  --surface: #ffffff;
  --surface-soft: #f5f6f7;
  --line: rgba(17, 17, 17, 0.10);
  --shadow-soft: 0 10px 32px rgba(14, 18, 24, 0.07);
  --shadow-hover: 0 16px 38px rgba(14, 18, 24, 0.11);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --header-height: 104px;
}

html { scroll-padding-top: 7rem; }
body {
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #fbfbfc;
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  line-height: 1.12;
  letter-spacing: -0.025em;
}

p, li { color: #34383d; }
a { text-underline-offset: 0.18em; }

/* Header: ruhig, klar und leicht transparent wie bei modernen Agenturseiten. */
.topbar {
  min-height: var(--header-height);
  padding: 0.7rem max(1.2rem, calc((100vw - 1240px) / 2));
  gap: 2rem;
  background: rgba(255, 255, 255, 0.91);
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: none;
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  transition: min-height .25s ease, background-color .25s ease, box-shadow .25s ease;
}

:is(body.home, body.ueber-uns, body.leistungen, body.kontakt, body.elektrotechnik, body.beleuchtungstechnik, body.sprechanlage, body.telefonanlage, body.smart, body.wallbox, body.pv, body.netzwerk, body.dguv) .topbar {
  background: rgba(255, 255, 255, 0.86) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.32) !important;
}

:is(body.home.scrolled, body.ueber-uns.scrolled, body.leistungen.scrolled, body.kontakt.scrolled, body.elektrotechnik.scrolled, body.beleuchtungstechnik.scrolled, body.sprechanlage.scrolled, body.telefonanlage.scrolled, body.smart.scrolled, body.wallbox.scrolled, body.pv.scrolled, body.netzwerk.scrolled, body.dguv.scrolled) .topbar {
  position: fixed !important;
  min-height: 82px;
  background: rgba(255, 255, 255, 0.97) !important;
  border-bottom-color: rgba(17, 17, 17, 0.08) !important;
  box-shadow: 0 8px 28px rgba(18, 22, 28, 0.07);
}

.logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
}
.logo img {
  height: 78px;
  width: auto;
  object-fit: contain;
  transition: height .25s ease;
}
body.scrolled .logo img { height: 62px; }

.main-nav { margin-left: auto; }
.nav-links {
  align-items: center;
  gap: .2rem;
}
.nav-links > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .65rem .88rem;
  border: 0 !important;
  border-radius: 999px;
  color: #171717 !important;
  font-size: .96rem;
  font-weight: 650;
  white-space: nowrap;
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}
.nav-links > li > a:hover,
.nav-links > li > a:focus-visible {
  color: var(--brand) !important;
  background: rgba(179, 0, 0, 0.07);
  outline: none;
}
.nav-links > li > a.active:not(.telefon) {
  color: var(--brand) !important;
  background: rgba(179, 0, 0, 0.09);
}
.nav-links li a.telefon {
  min-height: 44px;
  margin-left: .35rem;
  padding: .65rem 1rem;
  color: #fff !important;
  background: var(--brand);
  border-radius: 999px;
  box-shadow: none;
}
.nav-links li a.telefon:hover,
.nav-links li a.telefon:focus-visible {
  color: #fff !important;
  background: var(--brand-dark);
  transform: translateY(-1px);
}
.nav-links li a.telefon img { filter: brightness(0) invert(1); }

.dropdown-content {
  display: block;
  top: calc(100% + .55rem);
  min-width: 270px;
  padding: .55rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(16, 20, 26, 0.13);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
}
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-content a {
  padding: .72rem .82rem;
  border-radius: 10px;
  font-size: .93rem;
  font-weight: 580;
}
.dropdown-content a:hover,
.dropdown-content a:focus-visible {
  background: var(--surface-soft);
  color: var(--brand) !important;
  outline: none;
}

/* Hamburger und Off-Canvas-Menü */
.hamburger {
  width: 48px;
  height: 48px;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: none;
}
.hamburger-line {
  display: block;
  width: 21px;
  height: 2px;
  border-radius: 999px;
  background: #171717;
  transition: transform .2s ease, opacity .2s ease;
}
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  right: 0;
  width: min(390px, 92vw);
  height: 100dvh;
  padding: 1.15rem 1.15rem 1.6rem;
  background: rgba(255, 255, 255, 0.985);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 50px rgba(14, 18, 24, 0.14);
  transform: translateX(105%);
  transition: transform .28s cubic-bezier(.22, .8, .22, 1);
  z-index: 2100;
}
.mobile-nav.show { right: 0; transform: translateX(0); }
.mobile-nav .close-btn {
  align-self: flex-end;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: .8rem;
  padding: 0;
  color: #171717;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  font: 400 2rem/1 ui-sans-serif, sans-serif;
  cursor: pointer;
}
.mobile-nav > a,
.mobile-dropdown-header {
  width: 100%;
  margin: .18rem 0;
  border-radius: 13px;
}
.mobile-nav > a {
  padding: .84rem .9rem;
  color: #171717;
  font-size: 1rem;
  font-weight: 650;
  text-align: left;
}
.mobile-nav > a:hover,
.mobile-nav > a:focus-visible,
.mobile-nav > a.active {
  color: var(--brand);
  background: rgba(179, 0, 0, 0.07);
  outline: none;
}
.mobile-nav > a[href^="tel:"] {
  margin-top: 1rem;
  color: #fff;
  background: var(--brand);
  text-align: center;
}
.mobile-nav > a[href^="tel:"]:hover { color: #fff; background: var(--brand-dark); }
.mobile-dropdown-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .4rem;
  padding: .2rem .25rem .2rem .9rem;
  background: var(--surface-soft);
}
.mobile-dropdown-header > a {
  margin: 0;
  color: #171717;
  font-size: 1rem;
  font-weight: 650;
  text-align: left;
}
.mobile-dropdown-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #171717;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  transition: transform .2s ease, background-color .2s ease;
}
.mobile-dropdown-toggle.rotate { transform: rotate(180deg); }
.mobile-dropdown-content {
  margin: .35rem 0 .65rem;
  padding: .45rem;
  background: #f7f7f8;
  border: 1px solid rgba(17,17,17,.06);
  border-radius: 14px;
}
.mobile-dropdown-content li + li { margin-top: .08rem; }
.mobile-dropdown-content a {
  margin: 0;
  padding: .62rem .75rem;
  border-radius: 9px;
  color: #34383d;
  font-size: .91rem;
  font-weight: 560;
  text-align: left;
}
.mobile-dropdown-content a:hover,
.mobile-dropdown-content a.active { background: #fff; color: var(--brand); }
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2050;
  background: rgba(10, 13, 17, 0.46);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .25s ease;
}
.mobile-nav-backdrop.is-visible { opacity: 1; }
body.menu-open { overflow: hidden; }

/* Hero: nur Oberfläche und Typografie, keine Bildgröße/-position. */
:is(.hero-haustechnik, .hero-ueber-uns, .hero-leistungen, .hero-kontakt, .hero-elektrotechnik, .hero-beleuchtungstechnik, .hero-sprechanlage, .hero-telefonanlage, .hero-smart, .hero-wallbox, .hero-pv, .hero-netzwerk, .hero-dguv)::before {
  background: linear-gradient(90deg, rgba(9, 14, 20, .62), rgba(9, 14, 20, .38) 52%, rgba(9, 14, 20, .42));
}
.hero-content {
  width: min(900px, 100%);
  padding-inline: clamp(1.2rem, 4vw, 3rem);
}
.hero-content h1 {
  font-size: clamp(2.35rem, 5.2vw, 4.7rem);
  letter-spacing: -.045em;
  text-wrap: balance;
}
.hero-content p {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255,255,255,.9);
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
}
.hero-subtitle {
  padding: .46rem .8rem;
  color: #fff;
  background: rgba(179,0,0,.92);
  border-radius: 999px;
  font-size: .78rem;
}

.button,
.route-button,
.submit-button,
.button-sm {
  border-radius: 999px;
  box-shadow: none;
  font-weight: 700;
  letter-spacing: -.01em;
}
.button,
.route-button,
.submit-button {
  padding: .88rem 1.45rem;
  transition: background-color .2s ease, transform .2s ease;
}
.button:hover,
.route-button:hover,
.submit-button:hover {
  transform: translateY(-2px);
}

/* Moderne Karten – Bildcontainer selbst bleiben unangetastet. */
.benefits { background: #f6f7f8; padding: clamp(4rem, 7vw, 7rem) 1rem; }
.benefits-container h2,
.leistungen-preview h2,
main > h2,
.prozess-ablauf h2,
.intro-text h2,
.faq-section h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -.045em;
  text-wrap: balance;
}
.benefit-item,
.leistung-box2,
.ablauf-schritt,
.info-box,
.faq-item,
.leistungs-punkte > div,
.examples > div,
.benefit-grid > .benefit-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 5px 18px rgba(14, 18, 24, 0.045);
}
.benefit-item {
  padding: 2.15rem 1.55rem;
  transform: none;
}
.benefit-item:hover,
.leistung-box2:hover,
.ablauf-schritt:hover,
.info-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.leistung-box2 {
  border-radius: var(--radius-md);
  box-shadow: 0 5px 18px rgba(14, 18, 24, 0.05);
}
.leistung-content { padding: 1.55rem; }
.leistung-content h3 { color: var(--ink); letter-spacing: -.025em; }
.leistung-content p { color: var(--muted); }
.button-sm { padding: .58rem 1rem; }

.intro-text {
  padding-block: clamp(4rem, 7vw, 7rem);
  margin-block: 0;
}
.intro-container { max-width: 900px; margin-left: auto; margin-right: auto; }

.prozess-ablauf { background: #fff; padding: clamp(4rem, 7vw, 7rem) 1rem; }
.ablauf-grid { gap: 1.25rem; }
.ablauf-schritt {
  min-height: 100%;
  padding: 2rem 1.35rem;
  transition: transform .22s ease, box-shadow .22s ease;
}
.ablauf-schritt h3::before {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin: 0 auto .9rem;
  border-radius: 999px;
  background: var(--brand);
}

main:not(.rechtstext) {
  width: min(1100px, 100%);
  padding-top: clamp(3.5rem, 6vw, 6rem);
  padding-bottom: clamp(3.5rem, 6vw, 6rem);
}
main:not(.rechtstext) > section + section,
main:not(.rechtstext) > h3 { margin-top: 2.2rem; }
main:not(.rechtstext) h2,
main:not(.rechtstext) h3 { color: var(--ink); }
main:not(.rechtstext) a:not(.button) { color: var(--brand); }
main:not(.rechtstext) li { margin-bottom: .45rem; }

.leistungs-punkte,
.examples,
.benefit-grid { gap: 1rem; }
.leistungs-punkte > div,
.examples > div,
.benefit-grid > .benefit-item { padding: 1.35rem; }

.kontakt-anfahrt-zeiten { background: #f4f5f6; padding-block: clamp(3.5rem, 6vw, 6rem); }
.info-grid { gap: 1rem; }
.info-box {
  max-width: 340px;
  padding: 1.7rem 1.35rem;
  transition: transform .22s ease, box-shadow .22s ease;
}

.kontakt-formular { padding: clamp(4rem, 7vw, 7rem) 1rem; }
.kontakt-formular .form-container {
  padding: clamp(1rem, 2.5vw, 2rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.kontakt-formular .form-content input,
.kontakt-formular .form-content textarea {
  padding: .9rem 1rem;
  background: #f7f8f9;
  border-color: rgba(17,17,17,.11);
  border-radius: 12px;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.kontakt-formular .form-content input:focus,
.kontakt-formular .form-content textarea:focus {
  outline: none;
  background: #fff;
  border-color: rgba(179,0,0,.55);
  box-shadow: 0 0 0 4px rgba(179,0,0,.08);
}

.rechtstext {
  width: min(940px, calc(100% - 2rem));
  margin: clamp(2rem, 5vw, 5rem) auto;
  padding: clamp(1.4rem, 4vw, 3.2rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.rechtstext h1 { font-size: clamp(2rem, 4vw, 3.15rem); }
.rechtstext h3 { margin-top: 2rem; }

.faq-section .intro-container { box-shadow: none; border: 0; background: transparent; }
.faq-item { box-shadow: none; padding: 1.45rem; }

.site-footer {
  padding-top: clamp(3.5rem, 6vw, 5.5rem);
  color: rgba(255,255,255,.82);
  background: #17191c;
}
.footer-column h4 { color: #fff; }
.footer-column p,
.footer-column ul li a { color: rgba(255,255,255,.72); }
.footer-column ul li::before { color: #d14b4b; }
.footer-column ul li a:hover { color: #fff; }
.footer-logo {
  height: 62px;
  padding: .45rem .55rem;
  background: #fff;
  border-radius: 12px;
}
.footer-bottom {
  background: #111316;
  border-top: 1px solid rgba(255,255,255,.08);
}

.scroll-to-top {
  width: 48px;
  height: 48px;
  line-height: 48px;
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 8px 22px rgba(0,0,0,.16);
}


.animate-left,
.animate-right {
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.animate-left.visible,
.animate-right.visible { transform: translateY(0); }

@media (max-width: 900px) {
  :root { --header-height: 84px; }
  .topbar { min-height: 84px; padding: .55rem 1rem; }
  .logo img { height: 62px; }
  body.scrolled .logo img { height: 56px; }
  .main-nav { display: none; }
  .hamburger { display: flex; margin-left: auto; }
  .hero-content { margin-top: 82px; }
}

@media (max-width: 768px) {
  .benefits-grid { gap: 1rem; }
  .benefit-item { padding: 1.6rem 1.15rem; }
  .kontakt-formular .form-container { border-radius: 20px; }
  .site-footer { text-align: left; }
  .footer-container { align-items: stretch; }
}

@media (max-width: 520px) {
  .topbar { padding-inline: .8rem; }
  .logo img { height: 56px; }
  .hamburger { width: 44px; height: 44px; border-radius: 12px; }
  .hero-content h1 { font-size: clamp(2.1rem, 11vw, 3.2rem); }
  .hero-content { padding-inline: 1rem; }
  .mobile-nav { width: 100%; border-left: 0; }
  .rechtstext { width: calc(100% - 1rem); border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .animate-left, .animate-right { opacity: 1; transform: none; }
}

/* ==========================================================================
   HEADER-BREITE AUF GROSSEN BILDSCHIRMEN
   Verhindert übermäßig große Außenabstände bei breiten Viewports.
   ========================================================================== */
.topbar {
  padding-left: clamp(1rem, 4vw, 5rem);
  padding-right: clamp(1rem, 4vw, 5rem);
}

@media (min-width: 1600px) {
  .topbar {
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

/* ==========================================================================
   FOOTER-KONTAKTLINKS
   Auf dunklem Hintergrund gut lesbar, Markenrot bei Hover/Fokus.
   ========================================================================== */
.site-footer a[href^="tel:"],
.site-footer a[href^="mailto:"] {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a[href^="tel:"]:hover,
.site-footer a[href^="mailto:"]:hover,
.site-footer a[href^="tel:"]:focus-visible,
.site-footer a[href^="mailto:"]:focus-visible {
  color: #d71920;
}

.site-footer a[href^="tel:"]:focus-visible,
.site-footer a[href^="mailto:"]:focus-visible {
  outline: 2px solid rgba(215, 25, 32, 0.55);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ==========================================================================
   RECHTSTEXT-SEITEN: HEADER OHNE ÜBERLAGERUNG
   Datenschutz und Impressum besitzen keinen Hero. Der Header bleibt deshalb
   sticky im normalen Seitenfluss und wechselt beim Scrollen nicht zu fixed.
   ========================================================================== */
body.datenschutz .topbar,
body.impressum .topbar,
body.datenschutz.scrolled .topbar,
body.impressum.scrolled .topbar {
  position: sticky !important;
  top: 0;
  left: auto;
  width: 100%;
  min-height: 82px;
  background: rgba(255, 255, 255, 0.97) !important;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08) !important;
  box-shadow: 0 6px 22px rgba(18, 22, 28, 0.055);
}

body.datenschutz .rechtstext,
body.impressum .rechtstext {
  scroll-margin-top: 100px;
}

@media (max-width: 900px) {
  body.datenschutz .topbar,
  body.impressum .topbar,
  body.datenschutz.scrolled .topbar,
  body.impressum.scrolled .topbar {
    min-height: 76px;
  }
}


/* ========================================================================== 
   V6 – Telefon-CTA in allen Header-Zuständen einheitlich
   ========================================================================== */
.topbar .nav-links li a.telefon,
body.scrolled .topbar .nav-links li a.telefon,
:is(body.home.scrolled, body.ueber-uns.scrolled, body.leistungen.scrolled,
    body.kontakt.scrolled, body.elektrotechnik.scrolled,
    body.beleuchtungstechnik.scrolled, body.sprechanlage.scrolled,
    body.telefonanlage.scrolled, body.smart.scrolled, body.wallbox.scrolled,
    body.pv.scrolled, body.netzwerk.scrolled, body.dguv.scrolled)
  .topbar .nav-links li a.telefon {
  color: #fff !important;
  background-color: var(--brand, #b30000) !important;
  border-color: transparent !important;
}

.topbar .nav-links li a.telefon:hover,
.topbar .nav-links li a.telefon:focus-visible,
body.scrolled .topbar .nav-links li a.telefon:hover,
body.scrolled .topbar .nav-links li a.telefon:focus-visible {
  color: #fff !important;
  background-color: var(--brand-dark, #8a0000) !important;
}

.topbar .nav-links li a.telefon img,
body.scrolled .topbar .nav-links li a.telefon img {
  filter: brightness(0) invert(1) !important;
}


/* ==========================================================================
   V9 – Formularschutz und Datenschutz-Link
   ========================================================================== */
.hp-field {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.checkbox-row a {
  color: var(--brand, #b30000);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.checkbox-row a:hover,
.checkbox-row a:focus-visible {
  color: var(--brand-dark, #8a0000);
}

.rechtstext a {
  overflow-wrap: anywhere;
}

/* ==========================================================================
   V10 – HELLER, MODERNISIERTER FOOTER
   Angelehnt an den früheren Footer: heller Hauptbereich, rote Abschlussleiste.
   Die übrige Website und sämtliche Bildformatierungen bleiben unverändert.
   ========================================================================== */
.site-footer {
  position: relative;
  padding: clamp(3rem, 5vw, 4.25rem) 1rem 0;
  color: #26292d;
  background: #f3f4f5;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
  text-align: left;
}

.footer-container {
  display: grid;
  grid-template-columns: 1.08fr 0.85fr 1fr 1fr;
  align-items: start;
  gap: clamp(2rem, 4vw, 4.5rem);
  width: min(1200px, 100%);
  margin: 0 auto;
  padding-bottom: clamp(2.75rem, 4vw, 4rem);
}

.footer-column {
  min-width: 0;
  color: #3f4348;
}

.footer-column h4 {
  margin: 0 0 0.75rem;
  color: #141619;
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.footer-column h4:not(:first-child) {
  margin-top: 1.55rem;
}

.footer-column p {
  margin: 0;
  color: #4e5359;
  line-height: 1.72;
}

.footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column ul li {
  position: relative;
  margin: 0 0 0.55rem;
  padding-left: 0.8rem;
  line-height: 1.45;
}

.footer-column ul li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  color: #c40000;
  font-weight: 800;
}

.footer-column ul li a,
.site-footer a[href^="tel:"],
.site-footer a[href^="mailto:"] {
  color: #3f4348;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-column ul li a:hover,
.footer-column ul li a:focus-visible,
.site-footer a[href^="tel:"]:hover,
.site-footer a[href^="mailto:"]:hover,
.site-footer a[href^="tel:"]:focus-visible,
.site-footer a[href^="mailto:"]:focus-visible {
  color: #b30000;
}

.footer-column ul li a:focus-visible,
.site-footer a[href^="tel:"]:focus-visible,
.site-footer a[href^="mailto:"]:focus-visible,
.footer-bottom a:focus-visible {
  outline: 2px solid rgba(179, 0, 0, 0.42);
  outline-offset: 4px;
  border-radius: 3px;
}

.footer-logo {
  width: auto;
  height: 62px;
  max-width: 180px;
  margin: 0 0 1rem;
  padding: 0;
  background: transparent;
  border-radius: 0;
  object-fit: contain;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  width: 100vw;
  margin: 0 0 0 calc(-50vw + 50%);
  padding: 1rem max(1rem, env(safe-area-inset-left));
  color: #fff;
  background: #b90000;
  border-top: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
}

.footer-bottom br {
  display: none;
}

.footer-bottom a {
  color: #fff;
  text-decoration: none;
  opacity: 0.92;
  transition: opacity 0.2s ease, text-decoration-color 0.2s ease;
}

.footer-bottom a:hover {
  color: #fff;
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer .scroll-to-top {
  border-color: rgba(255, 255, 255, 0.34);
  background: #c50000;
  color: #fff;
}

.site-footer .scroll-to-top:hover,
.site-footer .scroll-to-top:focus-visible {
  background: #990000;
}

@media (max-width: 980px) {
  .footer-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem 3rem;
  }
}

@media (max-width: 620px) {
  .site-footer {
    padding-top: 2.75rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 2.5rem;
  }

  .footer-logo {
    height: 58px;
  }

  .footer-bottom {
    display: block;
    padding-block: 0.9rem;
  }

  .footer-bottom br {
    display: block;
  }
}

/* ========================================================================== 
   Kontaktformular-Rückmeldung (Erfolg / Fehler)
   ========================================================================== */
.form-feedback-modal[hidden] {
  display: none;
}

.form-feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.form-feedback-modal.is-visible {
  opacity: 1;
  visibility: visible;
}

.form-feedback-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 16, 20, 0.58);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.form-feedback-card {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  padding: clamp(2rem, 5vw, 3rem);
  overflow: hidden;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.10);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
  transform: translateY(18px) scale(0.97);
  transition: transform 220ms ease;
  outline: none;
}

.form-feedback-modal.is-visible .form-feedback-card {
  transform: translateY(0) scale(1);
}

.form-feedback-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: #1f8f55;
}

.form-feedback-modal.is-error .form-feedback-card::before {
  background: #b30000;
}

.form-feedback-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 1.4rem;
  color: #fff;
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1;
  background: #1f8f55;
  border-radius: 50%;
  box-shadow: 0 10px 25px rgba(31, 143, 85, 0.20);
}

.form-feedback-modal.is-error .form-feedback-icon {
  background: #b30000;
  box-shadow: 0 10px 25px rgba(179, 0, 0, 0.18);
}

.form-feedback-card h2 {
  margin: 0 0 0.8rem;
  color: #111;
  font-size: clamp(1.55rem, 4vw, 2rem);
  line-height: 1.2;
}

.form-feedback-card p {
  max-width: 42ch;
  margin: 0 auto 1.75rem;
  color: #4a4a4a;
  font-size: 1rem;
  line-height: 1.65;
}

.form-feedback-button {
  min-height: 48px;
  padding: 0.8rem 1.5rem;
  color: #fff;
  font: inherit;
  font-weight: 700;
  background: #b30000;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

.form-feedback-button:hover,
.form-feedback-button:focus-visible {
  background: #8a0000;
  transform: translateY(-1px);
}

.form-feedback-button:focus-visible,
.form-feedback-close:focus-visible {
  outline: 3px solid rgba(179, 0, 0, 0.25);
  outline-offset: 3px;
}

.form-feedback-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #333;
  font: inherit;
  font-size: 1.8rem;
  line-height: 1;
  background: #f2f2f2;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.form-feedback-close:hover {
  color: #fff;
  background: #b30000;
  transform: rotate(4deg);
}

body.feedback-open {
  overflow: hidden;
}

@media (max-width: 520px) {
  .form-feedback-card {
    padding: 2.2rem 1.35rem 1.7rem;
    border-radius: 20px;
  }

  .form-feedback-icon {
    width: 64px;
    height: 64px;
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .form-feedback-modal,
  .form-feedback-card,
  .form-feedback-button,
  .form-feedback-close {
    transition: none;
  }
}