:root {
    font-family: Arial, Helvetica, sans-serif;
    color: #243746;
    background: #f5f7f8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    line-height: 1.6;
}

.container {
    width: min(1100px, calc(100% - 36px));
    margin: 0 auto;
}

.kopf {
    padding: 48px 0;
    background: #ffffff;
    border-top: 5px solid #a71930;
    border-bottom: 1px solid #dce2e6;
}

.kennung {
    color: #a71930;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.2;
}

h2 {
    margin-top: 42px;
}

.auswahl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 28px 0;
}

.karte {
    background: white;
    padding: 30px;
    border: 1px solid #dce2e6;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}

.karte h3 {
    margin-top: 0;
}

.karte a {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 18px;
    background: #a71930;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.karte a:hover,
.karte a:focus-visible {
    background: #801326;
}

.hinweis {
    color: #5d6972;
}

@media (max-width: 700px) {
    .auswahl {
        grid-template-columns: 1fr;
    }

    .kopf {
        padding: 28px 0;
    }

    .karte {
        padding: 22px;
    }
}


/* Standortauswahl – Privatpersonen */

.standort-bereich {
    margin: 25px 0;
    background: #ffffff;
    border: 1px solid #dce2e6;
    border-radius: 8px;
    overflow: hidden;
}

.standortkarte {
    width: 100%;
    height: 440px;
    min-height: 340px;
    background: #edf1f3;
}

.standort-angaben {
    padding: 24px;
}

.standort-angaben h3 {
    margin-top: 0;
}

.koordinaten-felder {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 18px 0;
}

.koordinaten-felder label,
.lagebeschreibung {
    display: block;
    font-weight: bold;
}

.koordinaten-felder input,
.lagebeschreibung textarea {
    display: block;
    width: 100%;
    padding: 11px;
    margin-top: 6px;
    border: 1px solid #b9c4cc;
    border-radius: 5px;
    font: inherit;
}

.koordinaten-felder input {
    background: #f5f7f8;
}

.standort-genauigkeit {
    margin: 22px 0;
    padding: 16px;
    border: 1px solid #dce2e6;
    border-radius: 5px;
}

.standort-genauigkeit label {
    display: block;
    margin: 8px 0;
}

.lagebeschreibung {
    margin: 20px 0;
}

@media (max-width: 700px) {
    .standortkarte {
        height: 340px;
    }

    .standort-angaben {
        padding: 16px;
    }

    .koordinaten-felder {
        grid-template-columns: 1fr;
    }
}

/* Standortsuche */

.standort-suche {
    background: #fff;
    padding: 24px;
    margin: 24px 0;
    border: 1px solid #dce2e6;
    border-radius: 8px;
}

.standort-suche h3 {
    margin-top: 0;
}

.standort-suche-zeile {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px;
}

.standort-suche-zeile label {
    display: block;
    font-weight: bold;
}

.standort-suche-zeile select,
.standort-suche-zeile input {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 11px;
    border: 1px solid #b9c4cc;
    border-radius: 5px;
    font: inherit;
}

.standort-suchergebnisse {
    margin-top: 10px;
}

.standort-suchergebnis {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 4px;
    border: 1px solid #dce2e6;
    background: #f8fafb;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.standort-suchergebnis:hover,
.standort-suchergebnis:focus-visible {
    background: #edf1f3;
    border-color: #a71930;
}

@media (max-width: 700px) {
    .standort-suche {
        padding: 16px;
    }

    .standort-suche-zeile {
        grid-template-columns: 1fr;
    }
}


/* Beratungsformular – Kontaktdaten und Anliegen */

.formular-abschnitt {
    margin: 28px 0;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #dce2e6;
    border-radius: 8px;
}

.formular-abschnitt h2 {
    margin-top: 0;
}

.formular-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

.formular-grid label,
.formular-textfeld {
    display: block;
    font-weight: bold;
}

.formular-grid input,
.formular-grid select,
.formular-textfeld textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 11px;
    border: 1px solid #b9c4cc;
    border-radius: 5px;
    background: #ffffff;
    color: #243746;
    font: inherit;
}

.formular-grid input:focus-visible,
.formular-grid select:focus-visible,
.formular-textfeld textarea:focus-visible {
    outline: 2px solid #a71930;
    outline-offset: 2px;
}

.anliegen-auswahl {
    margin: 20px 0;
    padding: 18px;
    border: 1px solid #dce2e6;
    border-radius: 5px;
}

.anliegen-auswahl legend {
    padding: 0 8px;
    font-weight: bold;
}

.anliegen-auswahl label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
}

.anliegen-auswahl input {
    margin-top: 6px;
    accent-color: #a71930;
}

.formular-textfeld {
    margin-top: 20px;
}

@media (max-width: 700px) {
    .formular-abschnitt {
        padding: 16px;
    }

    .formular-grid {
        grid-template-columns: 1fr;
    }
}


/* GDfB Mobile Formularoptimierung 20261020 */

/* Allgemeine Stabilität */
#beratungsformular,
#beratungsformular section,
#beratungsformular fieldset,
#beratungsformular label,
#beratungsformular .formular-grid > *,
#beratungsformular .standort-suche-zeile > * {
    min-width: 0;
}

#beratungsformular input:not([type="checkbox"]):not([type="radio"]),
#beratungsformular select,
#beratungsformular textarea {
    max-width: 100%;
}

#beratungsformular textarea {
    resize: vertical;
    overflow-wrap: break-word;
}

/* Firmenvorschläge */
#firma-autocomplete-ergebnisse {
    max-width: 100%;
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

#firma-autocomplete-ergebnisse button {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.45;
    min-height: 44px;
}

/* Mobile Ansicht */
@media (max-width: 700px) {

    .container {
        width: calc(100% - 24px);
    }

    .kopf {
        padding: 20px 0;
    }

    h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
        overflow-wrap: break-word;
    }

    h2 {
        font-size: 1.3rem;
        line-height: 1.35;
    }

    .formular-abschnitt {
        padding: 16px 12px;
        margin: 16px 0;
    }

    .formular-grid,
    .koordinaten-felder,
    .standort-suche-zeile {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    #beratungsformular input:not([type="checkbox"]):not([type="radio"]),
    #beratungsformular select,
    #beratungsformular textarea {
        font-size: 16px;
        min-height: 44px;
    }

    #beratungsformular textarea {
        min-height: 110px;
    }

    .anliegen-auswahl {
        padding: 12px;
        min-width: 0;
    }

    .anliegen-auswahl label {
        align-items: flex-start;
        padding: 10px 0;
        overflow-wrap: anywhere;
    }

    .anliegen-auswahl input[type="checkbox"] {
        width: 20px;
        height: 20px;
        flex: 0 0 20px;
    }

    .standort-suche {
        padding: 16px 12px;
        margin: 16px 0;
    }

    .standortkarte {
        width: 100%;
        height: 320px;
        min-height: 320px;
    }

    .standort-angaben {
        padding: 16px 12px;
    }

    .standort-suchergebnis {
        min-height: 44px;
        overflow-wrap: anywhere;
    }

    #firma-autocomplete-ergebnisse button {
        padding: 12px !important;
        font-size: 16px;
    }

    .freitext-zeichenzaehler {
        font-size: 0.85rem;
        text-align: right;
    }

    #beratungsformular button[type="submit"] {
        min-height: 48px;
        max-width: 100%;
        white-space: normal;
    }
}

