* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    overflow: hidden;
}

.site-footer {
    width: 100%;
    text-align: center;
    padding: 6px 0;
    font-size: 0.78rem;
    color: #888;
    flex-shrink: 0;
    background: transparent;
}

.site-footer a {
    color: #888;
    text-decoration: none;
    transition: color 0.15s;
}

.site-footer a:hover {
    color: #dc2626;
    text-decoration: underline;
}

.site-footer-sep {
    margin: 0 8px;
    color: #ccc;
}

.top-bar {
    width: 100%;
    background: #dc2626;
    color: #fff;
    padding: 12px 24px;
    display: flex;
    /* Seit den drei Knoepfen unter der Tagline stapelt die Leiste: Marke oben,
       Navigation darunter - deshalb column statt der frueheren Zeile. */
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* .gew-logo-wrap / .gew-logo sind am 18.08.2026 entfallen. Sie hielten das
   GEW-Zeichen rechts in der Kopfleiste - zuletzt nur noch in impressum.php und
   datenschutz.php, wo es den falschen Betreiber nannte. Auf der Karte war es
   schon am 16.08. weg (traegerneutral). Das Verbandslogo lebt weiter als
   .traeger-logo in der Auswahl, wo es zu genau einem Angebot gehoert. */

.top-bar-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin: 0;
    color: inherit;
    text-decoration: none;
}

.top-bar-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.top-bar-btn {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.top-bar-btn:hover,
.top-bar-btn:focus {
    background: #fff;
    color: #dc2626;
}

.top-bar-tagline {
    color: #fff;
    font-weight: 400;
}

.top-bar-logo {
    height: 40px;
    width: auto;
    display: block;
}

.top-bar-title {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.map-container {
    width: 100%;
    max-width: 550px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
    margin: 10px auto;
}

/* Die Bundesland-Liste unter der Karte gibt es NUR auf dem Handy - am Desktop
   ist die Karte selbst das Bedienelement. Ausgeblendet per default, sichtbar
   erst in der 768px-Regel weiter unten. */
.land-select-wrap {
    display: none;
}

.map-container svg {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* ── Verzweigungs-Seite (wahl.php: Karte → Träger → Instanz) ─────────────────
   Bewusst trägerneutral: weder GEW-Rot noch KEG-Gelb, damit die Auswahl keinen
   Anbieter optisch bevorzugt. Die Verbandsfarbe beginnt erst hinter dem Klick,
   in der Instanz selbst. */

.wahl-body {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
}

.wahl-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 24px 16px;
}

.wahl-karte {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.12);
    padding: 26px 26px 20px;
    width: 100%;
    max-width: 500px;
}

.wahl-titel {
    font-size: 1.4rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
}

.wahl-frage {
    font-size: 0.92rem;
    color: #666;
    margin-bottom: 18px;
}

.wahl-zurueck {
    display: inline-block;
    margin-top: 18px;
    font-size: 0.85rem;
    color: #888;
    text-decoration: none;
}

.wahl-zurueck:hover {
    color: #333;
    text-decoration: underline;
}

/* LANDESSEITE (13.10.2026): Kopf mit Landesumriss, Umschalter "Ich habe einen
   Zugang / Ich bin neu", darunter Anmeldezeilen bzw. Test und Kauf. Die Teile
   werden per hidden umgeschaltet (assets/landesseite.js). */
.wahl-main {
    gap: 44px;
}

/* GALERIE am PC: fuenf iPhone-Bilder (mit Rahmen im Bild), schraeg gestellt
   und gewechselt von assets/landesseite.js. Ohne Skript steht das erste still. */
.galerie {
    flex: none;
    width: 260px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.galerie-bilder {
    position: relative;
    width: 160px;
    aspect-ratio: 520 / 1067;
    filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.22));
    animation: galerie-schweben 6s ease-in-out infinite;
}

@keyframes galerie-schweben {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.galerie-bild {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(45px) rotate(7deg) scale(0.94);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.galerie-bild.ist-aktiv {
    opacity: 1;
    transform: rotate(-3deg);
}

.galerie-bild.war-aktiv {
    transform: translateX(-45px) rotate(-11deg) scale(0.94);
}

.galerie-text {
    min-height: 2.6em;
    font-size: 0.84rem;
    line-height: 1.3;
    color: #555;
    text-align: center;
}

.galerie-steuerung {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.galerie-steuerung[hidden] {
    display: none;
}

.galerie-pfeil {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
    color: #555;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
}

.galerie-pfeil:hover,
.galerie-pfeil:focus-visible {
    border-color: #4f9a62;
    color: #2f6b3f;
}

.galerie-punkte {
    display: flex;
    gap: 6px;
}

.galerie-punkte button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: width 0.2s, background-color 0.2s;
}

.galerie-punkte button[aria-current="true"] {
    width: 22px;
    border-radius: 5px;
    background: #4f9a62;
}

/* Erst ab hier passen Galerie und Karte nebeneinander; darunter zaehlt die Karte. */
@media (max-width: 900px) {
    .galerie { display: none; }
}

/* Neben der Galerie mindestens so hoch wie sie (Handy 328 px + Text + Pfeile),
   damit das Handy nicht uebersteht; der Inhalt bleibt senkrecht mittig. */
@media (min-width: 901px) {
    .wahl-main:has(.galerie) .wahl-karte { min-height: 430px; display: flex; flex-direction: column; justify-content: center; }
    .wahl-main:has(.galerie) .wahl-zurueck { align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .galerie-bild, .galerie-punkte button { transition: none; }
    .galerie-bilder { animation: none; }
}

.wahl-land {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.wahl-umriss {
    flex: none;
    width: 54px;
    height: 42px;
}

.wahl-ort {
    font-size: 0.86rem;
    color: #666;
}

.wahl-ort strong {
    color: #dc2626;
    font-weight: 650;
}

.wahl-land .wahl-titel {
    margin-bottom: 0;
}

.wahl-schalter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    margin-bottom: 14px;
    background: #f0f1f0;
    border-radius: 12px;
}

.wahl-schalter[hidden],
.wahl-teil[hidden] {
    display: none;
}

.wahl-schalter button {
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 9px 6px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #666;
    cursor: pointer;
}

.wahl-schalter button[aria-pressed="true"] {
    background: #fff;
    color: #222;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.wahl-teil {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Ohne Skript stehen beide Teile untereinander und brauchen ihre Ueberschrift;
   mit Skript sagt der Umschalter dasselbe. */
.wahl-teil + .wahl-teil {
    margin-top: 18px;
}

.wahl-teil-titel {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #777;
}

.wahl-js .wahl-teil-titel {
    display: none;
}

.wahl-js .wahl-teil + .wahl-teil {
    margin-top: 0;
}

/* Gruen statt Kopfleisten-Rot beim Darueberfahren (13.10.2026): Ein roter
   Rahmen sah nach Fehler aus. In Ruhe bleiben alle Zeilen grau. */
.zeile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    background: #fff;
    color: #222;
    text-decoration: none;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

a.zeile:hover,
a.zeile:focus-visible {
    border-color: #4f9a62;
    background: #f8fcf9;
    box-shadow: inset 3px 0 0 #4f9a62;
    outline: none;
}

.zeile-symbol {
    flex: none;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #f1f3f1;
}

.zeile-symbol svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: #555;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.zeile-texte {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.zeile-texte strong {
    font-size: 0.95rem;
    font-weight: 600;
}

.zeile-texte small {
    font-size: 0.8rem;
    color: #777;
}

.zeile-pfeil {
    font-size: 0.86rem;
    font-weight: 600;
    color: #2f6b3f;
    white-space: nowrap;
}

/* Nicht freigeschaltet (GEW Bayern): sichtbar, aber erkennbar ausser Betrieb. */
.zeile-aus {
    background: #f7f7f7;
    border-style: dashed;
}

.zeile-aus strong {
    color: #999;
}

.zeile-aus .traeger-logo {
    filter: grayscale(1);
    opacity: 0.45;
}

.test-knopf {
    display: block;
    padding: 12px;
    border-radius: 12px;
    background: #2f8a4e;
    color: #fff;
    text-align: center;
    font-weight: 650;
    font-size: 1.02rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.test-knopf:hover,
.test-knopf:focus-visible {
    background: #277a43;
}

.kauf-titel {
    margin-top: 4px;
    font-size: 0.8rem;
    color: #777;
    text-align: center;
}

.kauf-liste {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.kauf-knopf {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 9px 6px 10px;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    background: #fff;
    color: #222;
    text-align: center;
    text-decoration: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.kauf-knopf:hover,
.kauf-knopf:focus-visible {
    border-color: #4f9a62;
    background: #f8fcf9;
}

.kauf-knopf strong {
    font-size: 0.86rem;
    font-weight: 650;
}

.kauf-knopf small {
    font-size: 0.72rem;
    line-height: 1.25;
    color: #777;
}

.kauf-preis {
    margin-top: 6px;
    font-size: 1rem;
    font-weight: 700;
    color: #2f6b3f;
}

/* Drei Spalten werden unter 440 px so schmal, dass "Gruppenlizenz" anstoesst. */
@media (max-width: 440px) {
    .kauf-liste { grid-template-columns: minmax(0, 1fr); }
    .kauf-knopf { display: grid; grid-template-columns: 1fr auto; text-align: left; align-items: baseline; column-gap: 10px; padding: 9px 12px; }
    .kauf-preis { margin-top: 0; grid-row: 1; grid-column: 2; justify-self: end; }
    .kauf-knopf small:last-child { grid-column: 2; justify-self: end; text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
    .zeile, .kauf-knopf, .test-knopf { transition: none; }
}

.traeger-logo {
    height: 40px;
    width: 84px;
    object-fit: contain;
    flex-shrink: 0;
    /* Die Logos haben weissen statt transparenten Grund. multiply laesst das
       Weiss in der getoenten Kachel verschwinden, statt als Kasten zu stehen. */
    mix-blend-mode: multiply;
}

/* Hier stand bis 17.08.2026 das Theme fuer tippy.js. tippy wurde nie
   aufgerufen - die Mouseover-Blase ist .tooltip weiter unten in dieser Datei,
   gebaut von assets/script.js. Die Bibliothek ist samt popper.js aus
   index.php entfernt. */

.map-container svg path.bundesland {
    fill: #d6d2d2 !important;
    stroke: #ffffff !important;
    stroke-width: 1.5 !important;
    cursor: pointer;
    transition: fill 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.map-container svg path.bundesland:nth-child(2) { fill: #cbc6c6 !important; }
.map-container svg path.bundesland:nth-child(3) { fill: #d1cbcb !important; }
.map-container svg path.bundesland:nth-child(4) { fill: #c8c2c2 !important; }
.map-container svg path.bundesland:nth-child(5) { fill: #d9d4d4 !important; }
.map-container svg path.bundesland:nth-child(6) { fill: #c5bfbf !important; }
.map-container svg path.bundesland:nth-child(7) { fill: #d3cdcd !important; }
.map-container svg path.bundesland:nth-child(8) { fill: #ccc7c7 !important; }
.map-container svg path.bundesland:nth-child(9) { fill: #d0caca !important; }
.map-container svg path.bundesland:nth-child(10) { fill: #c9c3c3 !important; }
.map-container svg path.bundesland:nth-child(11) { fill: #d4cece !important; }
.map-container svg path.bundesland:nth-child(12) { fill: #cac4c4 !important; }
.map-container svg path.bundesland:nth-child(13) { fill: #d2cccc !important; }
.map-container svg path.bundesland:nth-child(14) { fill: #c7c1c1 !important; }
.map-container svg path.bundesland:nth-child(15) { fill: #d5cfcf !important; }
.map-container svg path.bundesland:nth-child(16) { fill: #cdc8c8 !important; }

/* Der frühere rote Dauer-Rand markierte "hier gibt es die App schon". Seit alle
   Bundesländer anklickbar sind (16.08.2026) unterscheidet er nichts mehr - auf
   allen 16 Ländern wäre er nur noch Lärm. Die Hervorhebung bleibt beim Hover. */

.map-container svg path.bundesland[data-active="1"].active {
    fill: #dc2626 !important;
    cursor: pointer;
}

@media (hover: hover) {
    .map-container svg path.bundesland[data-active="1"]:hover {
        fill: #dc2626 !important;
        cursor: pointer;
    }
}

.map-container svg .bundesland-label {
    font-size: 14px;
    font-weight: 600;
    fill: #333;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    user-select: none;
}

.map-container svg path.bundesland[data-active="0"] {
    cursor: not-allowed;
}

@media (hover: hover) {
    .map-container svg path.bundesland[data-active="0"]:hover {
        fill: #c4b8b8 !important;
    }
}

.tooltip {
    position: absolute;
    background: rgba(40, 40, 40, 0.95);
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.85rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    white-space: nowrap;
    z-index: 100;
    transform: translate(-50%, -100%);
    margin-top: -12px;
}

.tooltip.visible {
    opacity: 1;
}

.tooltip-note {
    font-weight: normal;
    font-size: 0.8rem;
}

.map-intro {
    margin: 14px auto 0;
    text-align: center;
    font-size: 1.05rem;
    color: #333;
    flex-shrink: 0;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(40, 40, 40, 0.95);
}

@media (max-width: 1024px) {
    .map-container {
        max-width: 60vw;
    }
}

@media (max-width: 1024px) and (orientation: portrait) {
    .map-container {
        max-width: 70vw;
    }
}

@media (max-width: 1024px) and (orientation: landscape) {
    .map-container {
        max-width: 45vw;
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 10px 14px;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .top-bar-logo {
        height: 32px;
    }

    .top-bar-title {
        font-size: 0.95rem;
    }

    /* order stammt aus der Zeit, als rechts noch das GEW-Logo hing. Mit der
       Navigation in der Leiste zog die order:1 die Marke HINTER die Knoepfe -
       die standen auf dem Handy also ueber der Tagline. Beide Kinder bekommen
       jetzt eine explizite Reihenfolge: Marke oben, Knoepfe darunter. */
    .top-bar-brand {
        order: 1;
        margin: 0;
    }

    .top-bar-nav {
        order: 2;
    }

    .top-bar-btn {
        padding: 5px 12px;
        font-size: 0.82rem;
    }

    .map-container {
        max-width: 95vw;
    }

    .land-select-wrap {
        display: block;
        width: 90vw;
        max-width: 420px;
        margin: 4px auto 16px;
        text-align: center;
    }

    .land-select-label {
        display: block;
        margin-bottom: 6px;
        font-size: 0.9rem;
        color: #444;
    }

    .land-select {
        width: 100%;
        padding: 12px 14px;
        font-size: 1rem;
        font-family: inherit;
        color: #222;
        background: #fff;
        border: 1px solid #bbb;
        border-radius: 8px;
    }

    .tooltip {
        font-size: 1rem;
        padding: 8px 16px;
    }
}

/* ---------- Demo-Seite (demo.php) ---------- */

.demo-intro {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.demo-intro strong {
    font-size: 1.15rem;
}

.demo-intro-text {
    font-size: 0.95rem;
}

.demo-intro-hinweis {
    font-size: 0.85rem;
    color: #777;
}

.demo-wechsel {
    margin: 8px auto 0;
    text-align: center;
    font-size: 0.88rem;
    color: #777;
    flex-shrink: 0;
}

.demo-wechsel-link {
    color: #c4001b;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.demo-wechsel-link:hover,
.demo-wechsel-link:focus-visible {
    text-decoration: underline;
}

/* inline-block: text-decoration des Links wird an Kinder vererbt und laesst
   sich dort nur so abstellen - der Pfeil soll beim Hover ohne Strich bleiben. */
.demo-pfeil {
    display: inline-block;
    margin-left: 6px;
    text-decoration: none;
}
