/* 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-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-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.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.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.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.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.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.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.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.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.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.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.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-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-smart, .hero-wallbox, .hero-pv, .hero-netzwerk, .hero-dguv) {
    height: 75vh !important;
    background-position: center 25% !important;
  }
}

/* Cookie-Banner */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid #ddd;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
  padding: 1rem;
  z-index: 2000;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1100px;
  margin: auto;
  text-align: center;
}

.cookie-content h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.cookie-content p {
  margin: 0.5rem 0 1rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.cookie-buttons .btn {
  padding: 0.5rem 1rem;
  border: none;
  background: #555;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

.cookie-buttons .btn:hover {
  background: #333;
}

/* Modal-Hintergrund */
.cookie-modal {
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}
.cookie-modal.show {
  display: flex;
}
/* Modal-Inhalt */
.cookie-modal-content {
  background: #fff;
  max-width: 500px;
  width: 90%;
  padding: 1.5rem;
  border-radius: 8px;
  position: relative;
}
.cookie-modal-content h2 {
  margin-top: 0;
}
.cookie-modal-content fieldset {
  border: 1px solid #ddd;
  padding: 1rem;
  margin-bottom: 1rem;
}
.cookie-modal-content legend {
  font-weight: bold;
}
.cookie-modal-content label {
  display: block;
  margin-bottom: 0.5rem;
}
.close-modal {
  position: absolute;
  top: 0.5rem; right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}
.btn {
  padding: 0.5rem 1rem;
  background: #555;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn:hover {
  background: #333;
}

/* ====== 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 */
}

:root {
  /* Fallback-Höhe des Headers; wird gleich per JS überschrieben */
  --topbar-height: 64px;
}

/* Floating-Banner direkt unter dem Header */
.flash {
  position: fixed;
  left: 50%;
  top: calc(var(--topbar-height) + 12px); /* 12px Abstand unter dem Header */
  transform: translateX(-50%);
  z-index: 10000;               /* über dem Header */
  width: min(92vw, 720px);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.45;
  display: none;                /* bleibt wie bisher */
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.flash.show { display: block; }

.flash-success {
  background: #eaf8ee;
  border: 1px solid #c7e7cc;
}
.flash-error {
  background: #fde2e4;
  border: 1px solid #f5c2c7;
}

