.mathe-suchformular {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .5rem;
    max-width: 35rem;
    margin: 1.25rem 0;
}

.mathe-suchformular label {
    grid-column: 1 / -1;
    font-weight: 650;
}

.mathe-suchformular input:not([type="hidden"]),
.mathe-suchformular select {
    min-width: 0;
    padding: .7rem .85rem;
    border: 1px solid #71947c;
    border-radius: .45rem;
    background: white;
    color: #173d29;
    font: inherit;
}

.mathe-suchformular button,
.mathe-buchen {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .6rem 1rem;
    border: 1px solid #245b38;
    border-radius: .6rem;
    background: #245b38;
    color: white;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
}

.mathe-suchformular button {
    cursor: pointer;
}

.mathe-startsuche {
    width: min(calc(100% - 2rem), 67rem);
    margin: 1.5rem auto;
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid #a6bda9;
    border-radius: .7rem;
    background: #f4f8f0;
    color: #173d29;
    scroll-margin-top: 5rem;
}

.mathe-einstieg {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    align-items: center;
    gap: 1rem;
}

.mathe-startsuche .mathe-suchformular {
    margin-block: 0 .7rem;
}

.mathe-suchlinks {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1rem;
}

.mathe-suchlinks a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.mathe-startsuche .mathe-terminkarten {
    margin-top: 1rem;
}

.mathe-termine {
    width: min(100%, 67rem);
    margin-inline: auto;
    padding-inline: clamp(1rem, 3vw, 2rem);
    text-align: left;
}

#kursbuchung,
.mathe-ergebnisse {
    scroll-margin-top: 6rem;
}

.mathe-formate {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.mathe-formate a {
    padding: .55rem .8rem;
    border: 1px solid #87a38d;
    border-radius: .6rem;
    color: #173d29;
}

.mathe-formate [aria-current="page"] {
    background: #245b38;
    border-color: #245b38;
    color: #fff;
    font-weight: 700;
}

.mathe-finder {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    align-items: start;
    gap: clamp(1rem, 3vw, 2rem);
    margin-top: 1.25rem;
}

.mathe-finder-suche,
.mathe-kartenpanel {
    padding: clamp(1rem, 2.5vw, 1.4rem);
    border: 1px solid #bfd0be;
    border-radius: .85rem;
    background: #fff;
    color: #173d29;
}

.mathe-finder h3 {
    margin: 0 0 .45rem;
}

.mathe-finder-suche .mathe-abicamp-karte {
    margin-top: 1.35rem;
}

.mathe-kartenflaeche {
    height: clamp(21rem, 48vw, 30rem);
    margin-top: .8rem;
    border: 1px solid #b5cbbb;
    border-radius: .65rem;
    isolation: isolate;
}

.mathe-kartenflaeche.leaflet-container {
    background: #eff5f5;
}

.mathe-kartenflaeche[hidden] {
    display: none;
}

.mathe-kartenpin a {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.mathe-kartenpin a::after {
    width: 21px;
    height: 21px;
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: #17613a;
    box-shadow: 0 1px 5px #163c2a55;
    content: "";
    transform: translateY(-3px) rotate(-45deg);
}

.mathe-kartenpin a:hover::after,
.mathe-kartenpin a:focus-visible::after {
    background: #12482c;
    scale: 1.16;
}

.mathe-kartenflaeche .mathe-kartencluster {
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #245b38;
    box-shadow: 0 1px 6px #163c2a55;
    color: #fff;
    font: 700 1rem/1 system-ui, sans-serif;
}

.mathe-kartenflaeche.leaflet-container .leaflet-control-zoom a {
    width: 42px;
    height: 42px;
    line-height: 42px;
}

.mathe-kartenflaeche :focus-visible,
.mathe-ortsliste :focus-visible,
.mathe-ergebnisse:focus-visible,
.mathe-kursdetails summary:focus-visible {
    outline: 3px solid #176db5;
    outline-offset: 3px;
}

.mathe-ortsliste {
    margin-top: .8rem;
}

.mathe-ortsliste summary,
.mathe-kursdetails summary {
    width: fit-content;
    min-height: 44px;
    padding-block: .6rem;
    color: #245b38;
    cursor: pointer;
    font-weight: 700;
}

.mathe-ortsliste ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    gap: .35rem .7rem;
    margin: .25rem 0 0;
    padding: 0;
    list-style: none;
}

.mathe-ortsliste a {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    gap: .2rem .7rem;
    padding: .35rem .65rem;
    border: 1px solid #d5e0d1;
    border-radius: .4rem;
    background: #f5f8f2;
}

.mathe-ortsliste small {
    font-size: .85rem;
    color: #3a5545;
}

.mathe-ergebnisse,
.mathe-ort-navigation {
    margin-top: 1.25rem;
}

.mathe-ergebnis-titel,
.mathe-kurspreis {
    font-weight: 700;
}

.mathe-terminkarten {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: 1rem;
}

.mathe-terminkarte,
.mathe-abicamp-karte {
    padding: 1rem;
    border: 1px solid #b4c9b5;
    border-radius: .75rem;
    background: white;
}

.mathe-abicamp-karte {
    background: #f9faf1;
}

.mathe-abicamp-karte h3,
.mathe-terminkarte h3 {
    margin: 0 0 .5rem;
}

.mathe-naechster {
    color: #245b38;
    font-weight: 700;
}

.mathe-kursdetails {
    margin-block: .3rem .6rem;
}

.mathe-kursbeschreibung {
    white-space: pre-line;
}

.mathe-buchungsdaten {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: .8rem;
}

.mathe-kurssuche-kurz {
    display: none;
}

@media (max-width: 760px) {
    .mathe-finder {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .mathe-kurssuche-hero {
        padding: 27px 20px 24px;
    }

    .mathe-kurssuche-hero h1 {
        margin: 0 0 12px;
    }

    .mathe-kurssuche-hero p {
        margin: 0;
        font-size: 1.025rem;
        line-height: 1.5;
    }

    .mathe-kurssuche-hero .v68-eyebrow,
    .mathe-kurssuche-ausfuehrlich {
        display: none;
    }

    .mathe-kurssuche-kurz {
        display: revert;
    }

    .mathe-kurssuche.v68-section {
        padding: 19px 15px 26px;
    }

    .mathe-kurssuche > .mathe-termine {
        padding: 20px 16px 21px;
        border: 1px solid #d5e4d3;
        border-radius: 16px;
        background: #f5f9ef;
    }

    .mathe-kurssuche .mathe-termine > h2 {
        margin: 0 0 12px;
    }

    .mathe-kurssuche .mathe-formate {
        margin-bottom: 14px;
    }

    .mathe-kurssuche .mathe-finder-suche {
        padding: 0;
        border: 0;
        background: transparent;
    }

    .mathe-kurssuche .mathe-suchformular label {
        color: #214833;
    }

    .mathe-kurssuche #mathe-ort {
        min-height: 44px;
    }
}

@media (max-width: 440px) {
    .mathe-suchformular {
        grid-template-columns: minmax(0, 1fr);
    }
}
