/* Google Fonts Import (falls nicht im HTML) */
/* @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Open+Sans:wght@400;600&display=swap'); */

/* CSS Variablen für Farben und Schriftarten */
:root {
    --primary-color: #0a2b4c; /* Dunkelblau aus Text */
    --secondary-color: #f8f4e9; /* Helles Beige aus "Warum Wir?" */
    --accent1-color: #e63946; /* Rot aus Logo */
    --accent2-color: #a8e6cf; /* Helles Türkis/Hellblau aus Footer */
    --accent3-color: #cce38e; /* Hellgrün/Lime aus Icons/Highlights */
    --text-color: #333;
    --text-light: #fff;
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Open Sans', sans-serif;
    --border-radius: 5px;
    --section-padding: 60px 0;
    --container-width: 1140px;
}

/* Basis-Reset und globale Stile */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth; /* Sanftes Scrollen zu Ankern */
    font-size: 16px; /* Basis-Schriftgröße */
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; text-align: center; margin-bottom: 2.5rem; position: relative; }
/* Unterstrich für H2 Titel */
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent1-color);
    margin: 10px auto 0;
}

h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; color: var(--primary-color); font-weight: 600; }


p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent1-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

ul {
    list-style: none;
}

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

/* Hilfsklassen */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent1-color);
    color: var(--text-light);
    padding: 12px 25px;
    font-family: var(--heading-font);
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.cta-button:hover {
    background-color: #c42a37; /* Dunkleres Rot */
    color: var(--text-light);
    transform: translateY(-2px);
}

.cta-button-accent {
     background-color: var(--primary-color);
}
.cta-button-accent:hover {
     background-color: #071f38; /* Dunkleres Blau */
}


.icon {
    font-size: 2.5rem;
    color: var(--accent1-color);
    margin-bottom: 1rem;
}
.icon-inline {
    font-size: 1.2rem;
    color: var(--accent1-color);
    margin-right: 8px;
    vertical-align: middle;
}

/* Header */
.sticky-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--heading-font);
    font-size: 1.8rem;
    font-weight: 700;
}
.logo a {
    color: var(--primary-color);
    text-decoration: none;
}
.logo-mh {
    color: var(--accent1-color);
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    font-family: var(--body-font);
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: var(--accent1-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
    left: 0;
    background: var(--accent1-color);
}
.nav-links a:hover {
    color: var(--accent1-color);
}

.header-contact {
    margin-left: 30px;
    font-size: 0.9rem;
    font-weight: 600;
}
.header-contact a {
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 15px;
}
.header-contact a:hover {
    color: var(--accent1-color);
}


.burger {
    display: none; /* Wird nur auf Mobilgeräten angezeigt */
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section */
#hero {
    /* --- HINTERGRUNDBILD HIER EINGEFÜGT --- */
    background: url('images/hero-elektro.jpg') no-repeat center center/cover;
    color: var(--text-light);
    height: 70vh; /* Höhe anpassen nach Bedarf */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 0 20px; /* Padding für schmale Bildschirme */
}
/* Dunkler Overlay für bessere Lesbarkeit */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 43, 76, 0.6); /* Dunkelblau mit Transparenz */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

#hero h1 {
    color: var(--text-light);
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

#hero .subtitle {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Why Us Section */
#why-us {
    background-color: var(--secondary-color);
    padding: var(--section-padding);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.feature-item {
    background-color: #fff;
    padding: 30px 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* --- KORREKTUR FÜR TEXTUMBRUCH --- */
.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem; /* Basis-Schriftgröße für Desktop */
    /* Erlaube dem Browser, lange Wörter ggf. zu trennen */
    overflow-wrap: break-word; /* Standard */
    word-wrap: break-word;     /* Legacy */
    /* Optional: Fügt Trennstriche für bessere Lesbarkeit hinzu (benötigt lang="de" im HTML) */
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
}
/* --- ENDE KORREKTUR --- */


/* Services Overview Section */
#services-overview {
    padding: var(--section-padding);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.service-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.service-card:hover {
     transform: translateY(-5px);
}

.service-image {
    width: 100%;
    height: 200px; /* Feste Höhe für Bilder */
    object-fit: cover; /* Stellt sicher, dass das Bild den Bereich ausfüllt */
}

.service-content {
    padding: 25px;
    flex-grow: 1; /* Lässt den Inhaltsbereich wachsen */
    display: flex;
    flex-direction: column;
}
.service-content h3 {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    font-size: 1.4rem; /* Etwas kleiner als die H3 im Why-Us Bereich */
}

.service-content p {
    margin-bottom: 15px;
    flex-grow: 1; /* Sorgt dafür, dass der Button unten bleibt */
}

.learn-more {
    display: inline-block;
    font-weight: 600;
    color: var(--accent1-color);
    text-decoration: none;
    margin-top: auto; /* Schiebt den Link nach unten */
    align-self: flex-start; /* Verhindert, dass der Link die volle Breite einnimmt */
}

.learn-more:hover {
    text-decoration: underline;
}

.service-details {
    margin-top: 40px;
    text-align: center;
}
.service-details h4 {
    margin-bottom: 20px;
}
.service-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 0;
}
.service-list li {
   background-color: var(--secondary-color);
   padding: 8px 15px;
   border-radius: var(--border-radius);
   font-size: 0.95rem;
}
.service-list i {
    color: var(--accent1-color);
    margin-right: 8px;
}


/* CTA Section */
#cta {
    background-color: var(--accent3-color); /* Hellgrün */
    color: var(--primary-color);
    padding: 40px 0;
    text-align: center;
}
#cta h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}
#cta h2::after {
    background-color: var(--primary-color); /* Anpassen für Kontrast */
}
#cta p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}


/* Contact Section */
#contact {
    padding: var(--section-padding);
    background-color: #fff;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Spaltenaufteilung Info / Formular */
    gap: 40px;
    align-items: start;
}

.contact-info h3, .contact-form-container h3 {
    margin-bottom: 1.5rem;
}
.contact-info p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}
.contact-info i {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-right: 12px;
    width: 20px; /* Feste Breite für Ausrichtung */
    text-align: center;
}
.contact-info a {
    color: var(--accent1-color);
}
.contact-info a:hover {
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-family: var(--body-font);
    font-size: 1rem;
}
.form-group textarea {
    resize: vertical; /* Erlaubt nur vertikales Ändern der Größe */
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(10, 43, 76, 0.3);
}

.checkbox-group {
    display: flex;
    align-items: center;
}
.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: auto; /* Standardbreite wiederherstellen */
}
.checkbox-group label {
    margin-bottom: 0; /* Kein unterer Rand für Checkbox-Label */
    font-weight: normal;
    font-size: 0.9rem;
    color: var(--text-color);
}
.checkbox-group label a {
    color: var(--accent1-color);
    text-decoration: underline;
}


/* Footer */
footer {
    background-color: var(--accent2-color); /* Hellblau */
    color: var(--primary-color);
    padding-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding-bottom: 40px;
}

.footer-col h4 {
    font-family: var(--heading-font);
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 10px;
}
/* Unterstrich für Footer-Titel */
.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 40px;
    background-color: var(--primary-color);
}

.footer-col p, .footer-col li {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}
.footer-col ul {
    padding: 0;
}
.footer-col a {
    color: var(--primary-color);
    text-decoration: none;
}
.footer-col a:hover {
    color: var(--accent1-color);
    text-decoration: underline;
}
.footer-col i {
    margin-right: 8px;
}

.copyright {
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    padding: 15px 0;
    font-size: 0.9rem;
}


/* --- Responsive Design --- */

/* Tablet (max-width: 992px) */
@media (max-width: 992px) {
    :root {
        --section-padding: 50px 0;
    }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    #hero h1 { font-size: 3rem; }
    #hero .subtitle { font-size: 1.2rem; }

    .header-contact { display: none; } /* Telefonnummer im Header ausblenden */

     .contact-grid {
        grid-template-columns: 1fr; /* Untereinander */
        gap: 30px;
    }

    /* --- KORREKTUR: Schriftgröße für Feature H3 anpassen --- */
    .feature-item h3 {
        font-size: 1.4rem; /* Etwas kleiner auf Tablets */
    }
    /* --- ENDE KORREKTUR --- */
}

/* Mobile & Tablet (max-width: 768px) */
@media (max-width: 768px) {
    .header-container {
        position: relative; /* Für absolute Positionierung des Menüs */
    }

     .main-nav { /* Auf Mobilgeräten nur Burger anzeigen */
       flex-grow: 1;
       justify-content: flex-end;
    }

    .nav-links {
        display: none; /* Navigationslinks standardmäßig ausblenden */
        position: absolute;
        top: 100%; /* Unterhalb des Headers */
        left: 0;
        width: 100%;
        background-color: #fff;
        flex-direction: column;
        padding: 15px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
    }

    .nav-links.active {
        display: flex; /* Anzeigen, wenn aktiv */
    }

    .nav-links li {
        margin: 0;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 12px 20px;
        width: 100%;
        border-bottom: 1px solid #eee;
    }
     .nav-links a::after {
         display: none; /* Unterstrich auf Mobil entfernen */
     }
     .nav-links li:last-child a {
         border-bottom: none;
     }


    .burger {
        display: block; /* Burger-Icon anzeigen */
    }

     .header-contact {
        display: none; /* Kontaktinfo im Header auf Mobil ausblenden */
    }


    #hero {
        height: 60vh;
    }
     #hero h1 { font-size: 2.5rem; }
    #hero .subtitle { font-size: 1.1rem; }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
     .services-grid {
        grid-template-columns: 1fr; /* Untereinander */
        gap: 25px;
    }
    .service-list {
         gap: 10px;
    }
    .service-list li {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    .footer-grid {
         grid-template-columns: 1fr; /* Untereinander */
         text-align: center;
    }
     .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    /* --- KORREKTUR: Schriftgröße für Feature H3 anpassen --- */
     .feature-item h3 {
        font-size: 1.3rem; /* Noch etwas kleiner auf Handys */
    }
    /* --- ENDE KORREKTUR --- */

    .service-content h3 {
        font-size: 1.3rem; /* Auch Service H3 anpassen */
    }
}

/* Smaller Mobile (max-width: 576px) */
@media (max-width: 576px) {
    html { font-size: 15px; } /* Schriftgröße leicht anpassen */

    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; margin-bottom: 2rem; }
    #hero h1 { font-size: 2.2rem; }
    #hero .subtitle { font-size: 1rem; }
    .cta-button { padding: 10px 20px; font-size: 0.9rem;}

    .logo { font-size: 1.5rem; }

    .features-grid {
        grid-template-columns: 1fr; /* Sicherstellen, dass es 1-spaltig ist */
    }
     .contact-info p {
        font-size: 0.95rem;
    }
     .contact-grid {
        grid-template-columns: 1fr; /* Sicherstellen, dass es auch hier 1-spaltig ist */
    }

    /* --- KORREKTUR: Schriftgröße für Feature H3 anpassen --- */
    .feature-item h3 {
        font-size: 1.2rem; /* Kleinste Größe für H3 in Features */
    }
    /* --- ENDE KORREKTUR --- */

     .service-content h3 {
        font-size: 1.2rem; /* Kleinste Größe für H3 in Services */
    }
}