/*
 * Umbrüche der öffentlichen Seiten.
 *
 * Navigation:  bis 1280 px hinter dem Menüknopf
 * Tablet:      bis 1000 px — schmalere Ränder, zweispaltige Raster
 * Smartphone:  bis 680 px  — eine Spalte, Anrufleiste am unteren Rand
 *
 * Touchflächen bleiben überall mindestens 44 px hoch.
 */

@media (max-width: 1280px) {
    .menueknopf {
        display: inline-flex;
    }

    .kopf__leiste {
        flex-wrap: wrap;
    }

    .navigation {
        order: 3;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 8px 0 4px;
        border-top: 1px solid var(--linie);
    }

    /* Ohne JavaScript bleibt die Navigation sichtbar; mit JavaScript öffnet sie der Menüknopf. */
    .js .navigation {
        display: none;
    }

    .js .navigation.ist-offen {
        display: flex;
    }

    .navigation__link {
        min-height: 48px;
        font-size: 17px;
    }

    /* Im aufgeklappten Handymenü stehen die Bereiche ohne Zwischenschritt untereinander. */
    .leistungsmenue__knopf {
        display: none;
    }

    .leistungsmenue__titel {
        display: block;
        padding: 10px 10px 4px;
        color: var(--text-leise);
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }

    .leistungsmenue__liste,
    .js .leistungsmenue__liste {
        position: static;
        display: grid;
        width: auto;
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .leistungsmenue__liste::before,
    .leistungsmenue__kurz {
        display: none;
    }

    .leistungsmenue__link {
        min-height: 48px;
        padding: 6px 10px;
    }

    .einstieg {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }

    .ablauf {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1000px) {
    :root {
        --rand: 24px;
    }

    .fuss__raster {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .zweispaltig,
    .ueber,
    .schwerpunkt,
    .anfrageblock {
        grid-template-columns: minmax(0, 1fr);
    }

    .ueber,
    .schwerpunkt {
        padding: 32px;
        gap: 28px;
    }

    .anfrageblock__seite {
        position: static;
    }

    .gruppen,
    .raster-projekte {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ablauf {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .seitenkopf__inhalt {
        padding: 30px;
    }
}

@media (max-width: 680px) {
    :root {
        --rand: 16px;
    }

    body {
        font-size: 16px;
    }

    .kopf {
        padding-top: 10px;
    }

    .kopf__leiste {
        gap: 8px;
        padding: 6px 6px 6px 14px;
    }

    .marke {
        gap: 8px;
    }

    .marke__logo {
        width: 34px;
    }

    .marke__name {
        font-size: 24px;
    }

    /* Der Zusatz unter dem Namen weicht auf Handys, damit Sprache und Menü in derselben Zeile bleiben. */
    .marke__zusatz {
        display: none;
    }

    .kopf__werkzeuge {
        gap: 0;
    }

    /* Eine Kopfzeile auch auf schmalen Handys: Telefon und Hell/Dunkel
       wandern ins Menü beziehungsweise in die Anrufleiste. */
    .kopf__telefon {
        display: none;
    }

    .navigation__link--handy {
        display: inline-flex;
    }

    .einstieg {
        padding-top: 32px;
    }

    .einstieg__einleitung,
    .seitenkopf__text {
        font-size: 18px;
    }

    .einstieg__aktionen .knopf {
        flex: 1 1 100%;
    }

    .abschnitt {
        padding-top: 48px;
    }

    .leistungen,
    .gruppen,
    .raster-projekte,
    .ablauf,
    .formular__reihe {
        grid-template-columns: minmax(0, 1fr);
    }

    .bereichskarte {
        padding: 14px;
    }

    .bereichskarte__titel {
        font-size: 22px;
    }

    .seitenkopf__inhalt {
        flex-direction: column;
        gap: 18px;
        padding: 24px;
    }

    .seitenkopf__symbol {
        width: 64px;
        height: 64px;
        border-radius: 18px;
    }

    .seitenkopf__symbol .symbol {
        width: 32px;
        height: 32px;
    }

    .karte,
    .ueber,
    .schwerpunkt,
    .rechtstext__karte {
        padding: 22px;
    }

    .fuss {
        margin-top: 56px;
        padding-bottom: 96px;
    }

    .fuss__raster {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .anrufleiste {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        display: block;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: var(--tief);
        box-shadow: 0 -6px 24px rgba(7, 19, 25, 0.25);
    }

    .anrufleiste a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-height: 48px;
        border-radius: 14px;
        background: var(--knopf);
        color: var(--auf-knopf);
        font-weight: 700;
        text-decoration: none;
    }

    .anrufleiste a:active {
        background: var(--knopf-hover);
    }

    .anrufleiste a:hover {
        background: var(--knopf-hover);
    }
}
