﻿/* ==========================================================================
   1. GLOBALE EINSTELLUNGEN & RESET
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Times New Roman', Times, serif; 
    margin-left: 20px;
    /* margin: 20; */
    padding: 0;
    font-size: 18px;    
    background-color: #f8f9fa;
}
/* ==========================================================================
   2. HEADERBEREICH (RESPONSIV & FLEXIBEL)
   ========================================================================== */
.kopfbeweglich {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;         /* Richtet Logo, Text & Telefon auf exakt gleicher Höhe aus */
    justify-content: space-between !important; /* Schiebt Logo/Text nach links, Telefon nach rechts */
    gap: 20px !important;
    width: 100% !important;
    max-width: 1200px !important;           /* Verhindert extremes Auseinanderreißen auf Riesen-Monitoren */
    margin: 0 auto !important;              /* Zentriert den gesamten Header mittig auf dem Bildschirm */
    padding: 15px 20px !important;          /* Schöner Sicherheitsabstand nach innen */
    height: auto !important;                /* Von 140px auf auto geändert, damit es auf Handys mitwächst */
    background-color: #f8f9fa;
}

/* Neuer umschließender Container im HTML für Logo + Text */
.header-links {
    display: flex !important;
    align-items: center !important;         /* Logo und Text exakt mittig auf gleicher Höhe */
    gap: 15px !important;                   /* Fester Abstand zwischen Logo und Text */
}

/* Das Logo (ehemals .wave) */
.kopfbeweglich img.wave {
    width: 80px !important;                 /* Schöne, feste Logobreite */
    height: auto !important;
    display: block !important;
    position: static !important;            /* Fehlerbehebung: Löscht das alte position: absolute */
    z-index: 1 !important;                  /* Fehlerbehebung: Holt das Logo wieder nach vorne */
}

.kopfbeweglich h1, 
.logo-text-kopf {
    font-size: 24px;
    color: #333;
    font-weight: bold;
    text-align: center;
}


/* Die Telefonnummer rechts */
.telimkopf {
    font-weight: bold !important;
    text-align: right !important;
    font-size: 1rem !important;
    white-space: nowrap !important;         /* Verhindert hässliche Zeilenumbrüche der Nummer */
    position: static !important;            /* Fehlerbehebung: Löscht das alte position: absolute / left: 90% */
}

/* Menü-Fixierung */
.festgeklebt {
    position: -webkit-sticky; /* Für bessere Safari-Unterstützung */
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    /* width: 100%; */
}
#menu-container {
    margin-left: -20px;
    width: calc(100% + 20px);
}

/* ==========================================================================
   3. HAUPTINHALT (TEXT-CENTER) - OPTIMIERT FÜR DAS NEUE HTML
   ========================================================================== */
.text-center {
    max-width: 850px;       /* Begrenzt die Textbreite für optimale Lesbarkeit am Desktop */
    margin: 40px auto;      /* Zentriert den Textblock mittig auf der Seite */
    padding: 0 20px;
    font-family: sans-serif; /* Wechselt für Fließtext auf serifenlose, moderne Lesbarkeit */
}

.text-center h2 {
    color: #333;
    font-size: 1.6rem;
    margin-top: 40px;
    margin-bottom: 20px;
    display: inline-block;
    border-bottom: 3px solid #0056b3; /* Eleganter blauer Unterstrich statt leerer <br>-Tags */
    padding-bottom: 5px;
}

.text-center p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    text-align: justify;       /* Blocksatz für ruhiges Schriftbild */
    hyphens: auto;             /* Aktiviert automatische Worttrennung */
    line-height: 1.6;
}

/* ==========================================================================
   4. SCROLL-TO-TOP BUTTON & EXTERNE ELEMENTE
   ========================================================================== */
#scrollToTopBtn {
    display: none; 
    position: fixed; 
    bottom: 25px;         /* Leicht erhöht für eine luftige Optik */
    right: 30px; 
    z-index: 99; 
    border: none;
    outline: none;
    background-color: transparent; /* Entfernt den grauen Kasten komplett */
    cursor: pointer;
    padding: 0;                    /* Verhindert Ränder um den Pfeil */
}

/* Sorgt dafür, dass die Grafik nicht zu riesig wird */
#scrollToTopBtn img {
    width: 45px;                   /* Passt die Breite des Pfeils an (nach Wunsch ändern) */
    height: auto;                  /* Behält das Seitenverhältnis des geschwungenen Pfeils bei */
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease; /* Macht die Animation butterweich */
}

/* Hover-Effekt: Der Pfeil hüpft beim Drüberfahren minimal nach oben und wird intensiver */
#scrollToTopBtn:hover img {
    transform: translateY(-10px) scale(1.05); /* Schiebt den Pfeil 4px hoch und macht ihn minimal größer */
    opacity: 0.9;
}


/* ==========================================================================
   5. BANKENWELT SPALTEN-LAYOUT (DESKTOP vs. MOBIL)
   ========================================================================== */
.mein-text-container {
    column-count: 1;
    column-gap: 20px;
    padding: 1.5rem;      /* Aktualisiert aus dem Inline-Style */
    text-align: left;     /* Neu hinzugefügt aus dem Inline-Style */
}

@media (min-width: 600px) {
    .mein-text-container {
        column-count: 2;
    }
}

@media (min-width: 1024px) {
    .mein-text-container {
        column-count: 3;
    }
}

/* ==========================================================================
   6. TOP IMMOBILIE (RESPONSIV FÜR MOBIL, TABLET & DESKTOP)
   ========================================================================== */
.meinindex-topimmo {
    color: black;
    font-size: 16px;
    padding: 20px;
    background-color: rgb(155, 155, 155); 
    border-radius: 8px;
    margin: 20px;
    display: flex;
    flex-direction: column; 
    gap: 20px;
}

.meinindex-topimmo img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.meinindex-topimmo pre {
    white-space: pre-wrap;       
    word-wrap: break-word;       
    font-family: inherit;        
    margin: 0;
    padding: 0;
}

.meinindex-topimmo-a {
    display: flex;
    border: 2px groove #555555;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    border-radius: 20px;
    width: 150px;
    height: 35px; 
    background-color: #04AA6D;
    text-decoration: none;
    margin-bottom: 15px;
}

.meintext-block {
    margin-left: 0; 
    font-size: clamp(1rem, 3vw, 1.5rem); 
}

/* TABLET-OPTIMIERUNG (Ab 601px bis 1023px) */
@media (min-width: 601px) and (max-width: 1023px) {
    .meinindex-topimmo {
        flex-direction: row;       
        align-items: flex-start;
        padding: 25px;
    }
    .meinindex-topimmo img {
        width: 45%;                
    }
    .meintext-block {
        width: 55%;                
        margin-left: 20px;         
    }
    .meinindex-topimmo h1 {
        font-size: 1.5rem;         
    }
}

/* DESKTOP-OPTIMIERUNG (Ab 1024px) */
@media (min-width: 1024px) {
    .meinindex-topimmo {
        flex-direction: row; 
        align-items: flex-start;
        max-width: 1200px;
        margin: 20px auto; 
    }
    .meinindex-topimmo img {
        width: 40%; 
    }
    .meintext-block {
        margin-left: 20px; 
        width: 60%;
    }
}

/* ==========================================================================
   7. BAUFI GRID SYSTEM (SUBGRID)
   ========================================================================== */
.mein-text-baufi {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto; 
    gap: 1rem;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .mein-text-baufi {
        grid-template-columns: 1fr; 
    }
}

.spalte {
    display: grid;
    grid-template-rows: auto auto; /* Fallback für alte Browser */
    grid-template-rows: subgrid; 
    grid-row: span 2; 
    border: 1px solid #ccc;
    padding: 1rem;
    background-color: #ffffff;
    border-radius: 6px;
}

/* Begrenzung auf h2-Klassen innerhalb der Spalten, um globalen Konflikt zu vermeiden */
.spalte h2 {
    background: #e9ecef;
    margin: 0;
    padding: 0.5rem;
    font-size: 1.3rem;
    color: #333;
}

/* ==========================================================================
   8. ALLGEMEINE INHALTE, SEITENELEMENTE & LISTEN
   ========================================================================== */
.laenger_als_fenster {
    background-color: yellow;
    height: 200vh;
    margin: 2em;
    border: 5px solid red;
}

.footer {
    display: flex;
    align-items: center;
    background-color: brown;
    height: 150px;
    font-size: smaller;
}

.footer_google {
    position: absolute;
    right: 0;
    height: 140px;
    text-align: right;
    border: 0;
}

.menue_alt {
    margin-top: 150px;
}

.button {
    color: white;
    background-color: #beb62f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 80px;
    border-radius: 8px;
    margin-right: 30px;
    text-decoration: none;
}    

.button:hover {
    background-color: #faf481;
}

.icon_button {
    width: 16px;
    margin-right: 4px;
} 

.text_einfach {
    text-align: center;
    font-size: 20px;
    padding-left: 100px;
    padding-right: 100px;
}

.einruecken {
    padding: 20px;
}

.list-container {    
    font-family: sans-serif;
    max-width: 800px;
    padding-left: 0px;
    margin: 20px;
}

.underlined-title {
    display: inline-block; 
    border-bottom: 3px solid #007bff;
    padding-bottom: 5px;
    margin-bottom: 5px;
    color: #333;
    margin-left: 10px;
}

.title-bild {
    padding: 50px 100px 0;
    float: right;
}

.styled-list {
    list-style: none;
    padding: 20px;
}

.styled-list li {
    padding: 10px 0;
    position: relative;
    padding-left: 25px;
}

.styled-list li::before {
    content: "•";
    color: #007bff;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.p1 {
    text-align: justify;
    hyphens: auto; 
}

/* ==========================================================================
   9. AKTIONS-BUTTONS (CALL TO ACTION)
   ========================================================================== */
/* 1. Hauptmenü */
.topnav a[target="_blank"]::after,
/* 2. Rechner-Kacheln auf der Unterseite */
.mein-baufi .rechner-link[target="_blank"]::after,
/* 3. Große Buttons auf den Inhaltsseiten */
.original-button[target="_blank"]::after {
    content: " ↗"; /* Das dezente "Extern"-Symbol */
    font-size: 0.85em; /* Minimal kleiner als der Text */
    color: #888; /* Elegantes, unaufdringliches Grau */
    margin-left: 6px; /* Kleiner Abstand zum Text */
    display: inline-block;
    transition: color 0.2s ease; /* Macht Farbwechsel beim Hover geschmeidig */
}

/* Der Pfeil färbt sich beim Drüberfahren mit der Maus automatisch mit */
.mein-baufi .rechner-link:hover::after,
.original-button:hover::after {
    color: inherit; /* Übernimmt die Hover-Farbe Ihres Buttons */
}

/* Verhindert Farbfehler im "Beratungstermin"-Button des Hauptmenüs */
.meinmenueknopf a[target="_blank"]::after {
    color: inherit;
}
/* Verhindert, dass der Pfeil bei Platzmangel einsam in die nächste Zeile rutscht */
.original-button[target="_blank"] {
    white-space: nowrap; 
}

.original-button {
    display: block;          
    width: max-content;      
    max-width: 90%;          
    margin: 35px auto;       
    padding: 14px 28px;
    background-color: #0056b3;
    color: #ffffff !important;
    font-family: sans-serif;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-align: center;
}
.original-button:hover {
    background-color: #004085;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}
.original-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.button-klein-container {
    display: flex;
    gap: 50px;
    max-width: 500px;
    margin: 20px auto;
}
.button-container-button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 10px;
    font-size: 17px;
    background-color: #04AA6D;
    color: white;
    border: none;
    border-radius: 26px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
}
.button-container-button:hover {
    background-color: #555;
}
/* Schließt Ihre abgebrochene Deklaration sauber mit Ihren Wünschen ab */
.meinberatung, a {
    color: black;
}
/* 10. RESPONSIVE ANPASSUNGEN (SMARTPHONES & TABLETS - ALT-BESTAND)*/
@media (max-width: 768px) {
    .kopfbeweglich {padding: 10px 15px !important;}
    .kopfbeweglich h1 {font-size: 1.2rem !important;}
    .text-center p {text-align: center;}
}
@media (max-width: 600px) {
    .kopfbeweglich {flex-direction: column !important;  
      
/* Auf Handys rutscht die Telefonnummer unter das Logo /text-align: center !important;gap: 10px !important;}.header-links {flex-direction: row !important;     / Logo und Schrift bleiben auch auf dem Handy nebeneinander /}.telimkopf {text-align: center !important;}.list-container {width: 100%;margin: 10px;}.button-klein-container {flex-direction: column;             / Setzt die Buttons auf Handys untereinander /gap: 15px;padding: 0 20px;}.button-container-button {width: 100%;                        / Buttons nutzen die volle Breite des Containers */
}}

/* --- Kontaktformular Styles --- */
.kontakt-formular {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.honeypot-feld {
    display: none !important;
}

.formular-gruppe {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.formular-gruppe label {
    font-weight: bold;
    font-family: sans-serif;
}

.formular-feld {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.select-feld {
    background-color: white;
}

.textarea-feld {
    font-family: sans-serif;
    resize: vertical;
}

.datenschutz-gruppe {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 5px;
}

.datenschutz-gruppe label {
    font-family: sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

.checkbox-feld {
    margin-top: 4px;
    transform: scale(1.2);
}

.formular-button {
    border: none;
    cursor: pointer;
    width: 100%;
}
