.af-page footer {
    margin-top: 0;
}

/* Kopfbild im Stil der Unterseiten */
.af-hero {
    display: flex;
    align-items: flex-end;
    min-height: 460px;
    padding-bottom: 56px;
    box-sizing: border-box;
    background-color: #004370;
    background-image:
        linear-gradient(90deg, rgba(0, 67, 112, 0.72) 0%, rgba(0, 67, 112, 0.28) 60%, rgba(0, 67, 112, 0.05) 100%),
        url(/media/head-privatkunden.jpg);
    background-position: center 30%;
    background-repeat: no-repeat;
    background-size: cover;
    color: #fff;
}

.af-eyebrow {
    margin: 0 0 14px;
    color: #fff;
    font-size: 23px;
    font-weight: 400;
    line-height: 1.3;
}

.af-title {
    display: inline-block;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.7);
    color: #fff;
    font-size: 57px;
    font-weight: 400;
    line-height: 1.1;
}

/* Hellblaue Flaeche mit weissen Karten */
.af-band {
    background-color: #e5f0f9;
}

.af-container {
    padding: 44px 0 72px;
    line-height: 1.5;
    font-size: 18px;
}

.af-intro {
    margin: 0 0 32px;
    font-size: 21px;
    line-height: 1.45;
}

.af-back {
    margin: 0 0 20px;
    font-size: 16px;
}

.af-form {
    counter-reset: af-step;
}

.af-section {
    margin-bottom: 24px;
    padding: 40px 44px 20px;
    background: #fff;
}

.af-section h2 {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 28px;
    color: #004370;
    font-size: 28px;
    font-weight: 400;
    line-height: 1.2;
}

.af-section h2::before {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #15b0de;
    color: #fff;
    content: counter(af-step);
    counter-increment: af-step;
    font-size: 21px;
    line-height: 42px;
    text-align: center;
}

.af-page a:focus-visible,
.af-form input:focus-visible,
.af-form textarea:focus-visible,
.af-submit:focus-visible {
    outline: 3px solid #2098d1;
    outline-offset: 2px;
}

.af-alert {
    margin: 0 0 24px;
    padding: 16px 20px;
    border-left: 4px solid #b3261e;
    background: #fbeeed;
}

.af-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
}

.af-grid-city {
    grid-template-columns: 160px 1fr;
}

.af-narrow {
    max-width: 160px;
}

.af-field {
    margin: 0 0 24px;
    padding: 0;
    border: 0;
}

.af-field > label,
.af-field > legend {
    display: block;
    margin-bottom: 8px;
    padding: 0;
    font-size: 16px;
    font-weight: 400;
}

.af-field input[type="text"],
.af-field input[type="email"],
.af-field input[type="tel"],
.af-field input[type="number"],
.af-field textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #8fa5c0;
    border-radius: 0;
    background: #fff;
    color: #3d4b5d;
    font-family: inherit;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
}

.af-field textarea {
    resize: vertical;
}

.af-field [aria-invalid="true"] {
    border-color: #b3261e;
}

.af-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.af-choices > legend {
    width: 100%;
}

.af-choices .af-hint,
.af-choices .af-error {
    flex-basis: 100%;
}

.af-field > .af-choice {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 32px;
    margin-bottom: 0;
    padding: 8px 18px 8px 14px;
    border: 1px solid #8fa5c0;
    background: #fff;
    font-size: 18px;
    cursor: pointer;
}

.af-field > .af-choice:hover {
    border-color: #004370;
}

.af-field > .af-choice:has(input:checked) {
    border-color: #004370;
    background: #e5f0f9;
}

.af-choice input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #004370;
}

/* Nur wenn der Browser :has() kennt, sonst bleibt das Feld sichtbar. */
@supports selector(:has(*)) {
    .af-other {
        display: none;
    }

    .af-section:has(input[value="anderer"]:checked) .af-other {
        display: block;
    }

    #hinweis-orte {
        display: none;
    }

    .af-choices:has(input[value="dach"]:checked) #hinweis-orte {
        display: block;
    }
}

/* Dateiliste, wird von upload.js erzeugt */
.af-filelist {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.af-filelist li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e1e1e1;
    font-size: 16px;
}

.af-file-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.af-file-size {
    flex: 0 0 auto;
    font-size: 15px;
    white-space: nowrap;
}

.af-file-remove {
    flex: 0 0 auto;
    padding: 4px 0;
    border: 0;
    background: none;
    color: #004370;
    font-family: inherit;
    font-size: 15px;
    text-decoration: underline;
    cursor: pointer;
}

.af-file-remove:focus-visible {
    outline: 3px solid #2098d1;
    outline-offset: 2px;
}

.af-submit:disabled {
    background-color: #8fa5c0;
    cursor: progress;
}

.af-field input[type="file"] {
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding: 18px;
    border: 1px dashed #2098d1;
    background: #f4f9fd;
    color: #3d4b5d;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
}

.af-field input[type="file"]::file-selector-button {
    margin-right: 16px;
    padding: 10px 18px;
    border: 0;
    background: #004370;
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
}

.af-hint {
    margin: 8px 0 0;
    font-size: 15px;
}

.af-error {
    margin: 6px 0 0;
    color: #b3261e;
    font-size: 16px;
}

.af-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.af-privacy {
    margin: 32px 0 24px;
    font-size: 16px;
}

.af-submit {
    padding: 28px 34px;
    border: 0;
    background-color: #004370;
    background-image: url(/theme/public/cooltherm/site/assets/pfeil-weiss-next.svg);
    background-position: 34px center;
    background-repeat: no-repeat;
    background-size: 28px 6px;
    color: #fff;
    font-family: inherit;
    font-size: 19px;
    font-weight: 400;
    cursor: pointer;
}

.af-submit span {
    padding-left: 45px;
}

.af-submit:hover {
    background-color: #15b0de;
}

@media only screen and (max-width: 1400px) {
    .af-title {
        font-size: 45px;
    }
}

@media only screen and (max-width: 700px) {
    .af-hero {
        min-height: 300px;
        padding-bottom: 32px;
        background-position: 70% 30%;
    }

    .af-eyebrow {
        font-size: 18px;
    }

    .af-title {
        font-size: 34px;
    }

    .af-intro {
        font-size: 18px;
    }

    .af-section {
        padding: 28px 20px 8px;
    }

    .af-section h2 {
        font-size: 23px;
    }

    .af-section h2::before {
        width: 36px;
        height: 36px;
        font-size: 18px;
        line-height: 36px;
    }

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

    .af-grid-city {
        grid-template-columns: 110px 1fr;
        gap: 0 16px;
    }

    .af-container {
        padding: 28px 0 48px;
    }

    .af-submit {
        width: 100%;
    }
}
