/* =========================================
   1. GRUNDEINSTELLUNGEN & RESET
   ========================================= */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Platz für Sticky Header */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: #444;
    background-color: #f2f5f7;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    color: #2C3E50;
}

a {
    text-decoration: none;
    transition: all 0.3s;
}

/* =========================================
   2. HEADER & NAVIGATION
   (Grüner Verlauf von der Startseite)
   ========================================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10%;
    /* Der grüne Verlauf */
    background: #73BF1E;
    background: linear-gradient(0deg, rgba(115, 191, 30, 1) 0%, rgba(68, 136, 1, 1) 100%);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo {
    height: 60px;
    /* Automatische Breite basierend auf Originalmaßen 1772x811 */
    aspect-ratio: 1772 / 811;
    width: auto;
    background-image: url("logo_header.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Fallback, falls du doch ein <img> Tag nutzt */
.logo img {
    height: 100%;
    width: auto;
}

nav a {
    color: #ecf0f1;
    margin-left: 30px;
    font-weight: 500;
}

nav a:hover {
    color: #fff;
    text-shadow: 0 0 4px #fff;
}

/* =========================================
   3. FOOTER
   (Grüner Verlauf + Impressum-Support)
   ========================================= */
footer {
    background: linear-gradient(0deg, #589217 100%, #306101 0%);
    color: #fff;
    padding: 60px 10%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 40px;
    gap: 30px;
}

/* Verhindert, dass Flexbox die Spalten zu klein quetscht */
footer > div,
footer .footer-col {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

footer h4 {
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
    display: inline-block;
    margin-bottom: 20px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

footer p,
footer a,
footer address {
    color: #ecf0f1;
    line-height: 1.6;
    font-size: 0.95rem;
    font-style: normal;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer li {
    margin-bottom: 10px; /* Kleiner Abstand zwischen den Links */
}

footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.address-block { margin-bottom: 20px; }
.address-label {
    color: #fff;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    opacity: 0.8;
}

/* =========================================
   4. STARTSEITE (Main Page)
   ========================================= */
section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

/* About Card */
.about-card {
    background-color: #fff;
    width: 100%;
    max-width: 1100px;
    padding: 70px 60px 70px 150px;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
    margin-top: 50px;
}

.about-avatar {
    width: 170px;
    height: 170px;
    background-color: #ccc;
    border-radius: 50%;
    border: 8px solid #fff;
    position: absolute;
    top: -40px;
    left: -50px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    background-image: url('ich.jpg');
    background-size: cover;
    background-position: center;
}

.about-content h2 { margin-top: 0; font-size: 2.2rem; margin-bottom: 25px; line-height: 1.2; }
.about-content p { font-size: 1.1rem; color: #666; margin-bottom: 18px; }
.signature { margin-top: 40px; font-style: italic; font-family: serif; font-size: 1.3rem; color: #2C3E50; }

/* Service Boxen */
.service-box {
    display: flex;
    background: #fff;
    width: 100%;
    max-width: 1100px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.service-box.reverse { flex-direction: row-reverse; }
.service-image { flex: 1; background-color: #ddd; background-size: cover; background-position: center; min-height: 400px; }

.service-content {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-content h2 { font-size: 2.2rem; margin-bottom: 15px; color: #2C3E50; }
.service-content p { font-size: 1.1rem; color: #666; margin-bottom: 25px; }

/* Icon Farbe auf Grün angepasst */
.service-icon { font-size: 2.5rem; margin-bottom: 15px; color: #448801; }

/* Button Style (Global für alle Seiten) */
.btn, .submit-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #448801; /* Dein Grün */
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
}

.btn:hover, .submit-btn:hover {
    background-color: #73bf1e;
    transform: translateY(-2px);
}

.submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* =========================================
   5. KONTAKT-SEITE
   ========================================= */
.contact-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 85vh;
}

.contact-card {
    background-color: #fff;
    width: 100%;
    max-width: 800px;
    padding: 60px;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: #2C3E50; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border 0.3s;
}

/* Focus Farbe auf Grün angepasst */
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: #73bf1e;
    outline: none;
    box-shadow: 0 0 5px rgba(115, 191, 30, 0.2);
}

.form-group textarea { resize: vertical; min-height: 150px; }
.submit-btn { width: 100%; font-weight: bold; }

/* Nachrichten Boxen */
.msg-box {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    display: none;
}
.msg-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.msg-error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* =========================================
   6. DATENSCHUTZ / RECHTLICHES
   ========================================= */
.legal-section {
    display: block;
    padding: 60px 20px;
    min-height: 80vh;
}

.legal-card {
    background-color: #fff;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 60px;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
}

.legal-card h1 {
    font-size: 2.5rem;
    border-bottom: 3px solid #73bf1e; /* Grün statt Blau */
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.legal-card h2 {
    font-size: 1.5rem;
    margin-top: 40px;
    margin-bottom: 15px;
    color: #448801; /* Dunkelgrün statt Blau */
}

.legal-card h3 { font-size: 1.2rem; margin-top: 25px; margin-bottom: 10px; }
.legal-card ul { margin-bottom: 15px; padding-left: 20px; }
.legal-card li { margin-bottom: 5px; }
.legal-card p { margin-bottom: 15px; text-align: justify; }




/* --- KUNDENSTIMMEN SECTION --- */
#kundenstimmen {
    padding: 60px 20px;
    text-align: center;
}

.reviews-header h2 {
    margin-bottom: 10px;
    color: #333;
}

.google-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
    font-family: 'Arial', sans-serif;
}

.g-icon {
    font-weight: bold;
    font-size: 24px;
    color: #4285F4; /* Google Blau */
}

.rating-score {
    font-weight: bold;
    color: #333;
}

/* --- SLIDER LAYOUT --- */
.slider-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.slider-track-container {
    overflow: hidden;
    width: 100%;
    padding: 20px 5px; /* Platz für Schatten */
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px;
}

/* --- GOOGLE STYLE CARD --- */
.review-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    padding: 20px;
    text-align: left;
    flex-shrink: 0;
    font-family: 'Roboto', 'Arial', sans-serif;

    /* WICHTIG: Responsive Breite statt fester Pixel */
    /* Wir ziehen 40px ab (für 2 Lücken à 20px) und teilen durch 3 */
    flex: 0 0 calc((100% - 40px) / 3);
    max-width: calc((100% - 40px) / 3);
}

.review-top {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin-right: 12px;
    flex-shrink: 0; /* Verhindert, dass Avatar eingequetscht wird */
}

.review-meta {
    display: flex;
    flex-direction: column;
}

.author {
    font-weight: bold;
    font-size: 14px;
    color: #202124;
}

.date {
    font-size: 12px;
    color: #70757a;
}

.g-mark {
    position: absolute;
    top: 0;
    right: 0;
    color: #dadce0;
    font-size: 20px;
    font-weight: bold;
}

.stars {
    color: #fbbc04;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

/* Grauer Stern für Bewertungen unter 5.0 */
.star-gray {
    color: #dadce0 !important; /* Google-Grau, !important überschreibt das Gelb */
}

.review-text {
    font-size: 14px;
    line-height: 1.5;
    color: #4d5156;
    height: 100px;
    overflow: hidden;
    /* Optional: Text-Ellipsis für sauberen Abschluss */
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

/* --- BUTTONS --- */
.slide-btn {
    background: none;
    border: none;
    font-size: 30px;
    color: #5f6368;
    cursor: pointer;
    padding: 0 15px;
    z-index: 10;
    transition: color 0.3s;
    user-select: none;
}

.slide-btn:hover {
    color: #202124;
}

/* --- RESPONSIVE BREAKPOINTS --- */

/* Tablet (z.B. iPad): Zeige genau 2 Karten */
@media (max-width: 1024px) {
    .review-card {
        /* (100% - 20px Lücke) / 2 */
        flex: 0 0 calc((100% - 20px) / 2);
        max-width: calc((100% - 20px) / 2);
    }
}

/* Handy: Zeige genau 1 Karte */
/* Handy-Optimierung für Reviews */
@media (max-width: 768px) {

    /* Container breiter machen, weniger Rand außen */
    .reviews-container {
        padding: 40px 0;
    }

    .slider-wrapper {
        position: relative;
        padding: 0 10px; /* Minimaler Sicherheitsabstand zum Bildschirmrand */
    }

    /* 1. Buttons schweben lassen (Sparen Platz) */
    .slide-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 35px;
        height: 35px;
        background-color: #fff;
        border-radius: 50%;
        box-shadow: 0 2px 5px rgba(0,0,0,0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 20;
        font-size: 16px;
        padding: 0;
    }

    .slide-btn.prev {
        left: 0; /* Links am Rand kleben */
    }

    .slide-btn.next {
        right: 0; /* Rechts am Rand kleben */
    }

    /* 2. Die Karte auf 100% Breite zwingen */
    .review-card {
        flex: 0 0 100%;
        max-width: 100%;

        /* WICHTIG: Text nach innen schieben, damit Buttons ihn nicht verdecken */
        padding: 25px 45px;
    }

    .slider-track {
        gap: 0; /* Keine Lücke nötig */
    }

    .slider-track-container {
        padding: 10px 0; /* Schatten-Platz oben/unten */
    }

    /* Text mobil etwas höher erlauben */
    .review-text {
        height: auto;
        min-height: 100px;
        -webkit-line-clamp: 7;
    }
}

/* =========================================
   7. RESPONSIVE (MOBILE)
   ========================================= */
@media (max-width: 850px) {
    /* Header */
    header { flex-direction: column; padding: 20px; }
    .logo { height: 50px; margin-bottom: 10px; }
    nav { margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: center; }
    nav a { margin: 5px 10px; font-size: 0.9rem; margin-left: 0; }

    /* Sections allgemein */
    section, .legal-section, .contact-section { padding: 40px 15px; }

    /* About Card Mobile Fix */
    .about-card {
        padding: 140px 30px 40px 30px !important;
        text-align: center;
    }
    .about-avatar {
        left: 50%;
        transform: translateX(-50%);
        top: -75px;
    }

    /* Service Boxen */
    .service-box, .service-box.reverse { flex-direction: column; }
    .service-image { height: 250px; width: 100%; flex: none; min-height: auto; }
    .service-content { padding: 30px 25px; }
    .service-content h2 { font-size: 1.8rem; }

    /* Kontakt & Legal */
    .contact-card, .legal-card { padding: 30px 20px; }
    .legal-card h1 { font-size: 1.8rem; }
}


/* =========================================
   8. FINALER MOBILE FIX FÜR REVIEWS (GANZ UNTEN)
   ========================================= */
@media (max-width: 768px) {

    /* 1. Container-Padding überschreiben (Wichtig!) */
    #kundenstimmen {
        padding: 40px 0 !important; /* Kein seitliches Padding am Hauptcontainer */
        overflow: hidden; /* Verhindert horizontales Scrollen der ganzen Seite */
    }

    .reviews-container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .slider-wrapper {
        padding: 0 15px; /* Kleiner Sicherheitsabstand zum Bildschirmrand */
        width: 100%;
        box-sizing: border-box;
    }

    /* 2. Slider Track Lücken entfernen */
    .slider-track {
        gap: 0 !important;
    }

    /* 3. Die Karte passend machen */
    .review-card {
        flex: 0 0 100%; /* Nimmt 100% der Breite des Wrappers */
        width: 100%;
        max-width: 100%;

        /* Weniger Padding innen, damit mehr Platz für Text ist */
        padding: 30px 25px !important;

        box-sizing: border-box; /* Wichtig, damit Padding eingerechnet wird */
    }

    /* 4. Buttons schwebend und gut sichtbar */
    .slide-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        background-color: #fff;
        border-radius: 50%;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* Etwas mehr Schatten */
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 50;
        font-size: 18px;
        padding: 0;
    }

    /* Positionierung der Buttons - genau auf der Kante */
    .slide-btn.prev {
        left: 5px;
    }

    .slide-btn.next {
        right: 5px;
    }

    /* Text mobil lesbarer machen */
    .review-text {
        height: auto;
        min-height: 110px;
        -webkit-line-clamp: 7; /* Mehr Zeilen erlauben */
    }
}
