/* Layout & Header Fixes (Bestätigte Stabilität) */
body {
    min-width: 100% !important;
    width: 100%;
    overflow-x: hidden;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #F4F4F9 !important;
    color: #333333 !important;
    
    /* 1. Reset des Padding (wird durch Media Queries unten gesteuert) */
    padding-top: 0 !important; 
}

html {
    font-size: 100%;
}

.index.home .top-bar {
    background-color: #323c46 !important;
}

/* KORREKTUR DER HEADER-LÜCKE */
.index.home #header {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* 🚀 BASE-Einstellung für Content */
.index.home #content {
    margin-top: 0 !important; 
}

#header-wrapper {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* ---------------------------------------------------------------------- */
/* 🛑 KOMPENSATION DER FIXIERTEN HEADER-HÖHE (DESKTOP FINAL) 🛑 */
/* ---------------------------------------------------------------------- */

/* Desktop-Ansicht (ab 769px) */
@media (min-width: 769px) {
    
    /* DESKTOP-FIX: Body-Padding für Header-Kompensation */
    .index.home body {
        padding-top: 150px !important; 
    }
    
    /* DESKTOP-FIX: Content mit relativer Position und negativem top-Wert nach oben ziehen */
    .index.home #content {
        position: relative !important; 
        top: -95px !important; 
        margin-top: 0 !important; 
        /* Wichtig: Reset Transformation für Desktop */
        transform: none !important; 
    }
}

/* ---------------------------------------------------------------------- */
/* TEXT & BILD FORMATIERUNG (DESKTOP) */
/* ---------------------------------------------------------------------- */

.fad-size-150 { 
    font-size: 150%; 
}
.fad-size-125 { 
    font-size: 125%; 
}

/* Linkes Bild: float und Ränder für Textfluss */
.image-left { 
    float: left; 
    margin: 0 10px 10px 0; 
    max-width: 100%; 
    height: auto; 
}

/* Rechtes Bild: float und Ränder für Textfluss */
.image-right {
    float: right; 
    margin: 0 0 10px 15px; 
    max-width: 100%; 
    height: auto; 
}

/* Bildbreite-Regeln */
.fad_image_width_33 { 
    width: 33%; 
}

/* Regel für das Siegel (fad_image_width_auto) */
.fad_image_width_auto {
    width: auto;
    max-width: 100%; 
}

/* LÖSUNG GEGEN VERSCHACHTELUNG: Erzwingt klaren Start nach float */
.clear-float {
    clear: both;
}

/* CTA BUTTON STYLING & AUSRICHTUNG */
.cta-button {
    float: right; 
    display: inline-block; 
    padding: 10px 20px;
    background-color: #FF6600; 
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-left: 20px;
    margin-top: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    vertical-align: middle; 
}

.cta-button:hover {
    background-color: #E65C00;
}

/* ---------------------------------------------------------------------- */
/* MOBILE ANPASSUNG (HÖHEN-RESET MIT ZEROING BEIBEHALTEN) */
/* ---------------------------------------------------------------------- */

@media screen and (max-width: 768px) {
    
    /* SCHRITT 1: Body-Padding für die geschätzte Mobile Header-Höhe (60px) */
    .index.home body {
        padding-top: 60px !important; 
    }
    
    /* SCHRITT 2: AGGRESSIVES ZEROING BEIBEHALTEN (wichtig für H1/H2-Abstand) */
    .index.home #content {
        /* Zeroing aller vertikalen Abstände */
        margin-top: 0 !important;
        padding-top: 0 !important; 
        
        /* HÖHEN- UND POSITIONIERUNGS-KORREKTUREN WIEDER ENTFERNT/ZURÜCKGESETZT */
        position: static !important; 
        top: auto !important;
        transform: none !important; 
    }
    
    /* CTA Button mobile: Volle Breite, kein float */
    .cta-button {
        float: none; 
        display: block; 
        width: 100%; 
        margin-left: 0;
        margin-top: 15px; 
        text-align: center; 
    }
    
    /* 1. KORREKTUR: Erzwingt Block-Display und entfernt float für ALLE Bilder */
    .image-left, .image-right, .insert_module {
        display: block !important;
        float: none !important; 
        clear: both !important;
        margin: 20px auto !important;
        width: 100% !important;
        max-width: 400px;
        box-sizing: border-box;
    }
    
    /* 2. SPEZIFISCHE REGEL FÜR SIEGEL: Überschreibt nur die Breite der obigen Regel */
    .image-left.fad_image_width_auto {
        width: auto !important; 
        max-width: 120px !important;
    }
}


/* ---------------------------------------------------------------------- */
/* KACHELN & FOOTER STYLES (UNVERÄNDERT ÜBERNOMMEN) */
/* ---------------------------------------------------------------------- */

/* 5. Hauptinhaltsbereich (Kacheln & Text) */
h1 {
    font-size: 2.5em;
    color: #0077B6;
    margin-top: 0;
}

h3 {
    font-size: 1.4em;
    color: #333333;
    line-height: 1.4;
}

/* Visuelle Kacheln (Privat/Gewerbe/Beratung) */
.page_box.row {
    background-color: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.page_box.row:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.page_box_image {
    width: 50%;
    min-height: 200px;
}

.page_box_image img {
    height: 100%;
    object-fit: cover;
}

.page_box_link:nth-child(2) {
    width: 50%;
    padding: 20px;
}

/* 7. Footer (Modernisierung der Farben) */
.footer1 {
    background-color: #333333 !important;
    color: #FFFFFF !important;
    padding: 30px 0;
}

.footer2 {
    background-color: #1a1a1a !important;
    color: #CCCCCC !important;
}

.footer1 h3 {
    color: #FF8C00 !important;
    border-bottom: 2px solid #555555;
    padding-bottom: 5px;
}

.footer1 a, .footer2 a {
    color: #CCCCCC !important;
}

.footer1 a:hover, .footer2 a:hover {
    color: #FF8C00 !important;
}

.footer1 button.open_form {
    background-color: #0077B6 !important;
    color: #FFFFFF !important;
    border-radius: 5px;
}

.footer1 button.open_form:hover {
    background-color: #005A90 !important;
}