/* ════════════════════════════════════════════════════════════════
   mobil_menue.css — Navigation auf dem Handy (26.11.2026)
   Knopf (drei Striche → X), Glas-Panel unter der Kopfleiste,
   Links gleiten nacheinander herein. Nur bis 860px sichtbar —
   darüber bleibt die Kopfleiste genau wie bisher.
   ════════════════════════════════════════════════════════════════ */
.mm-knopf { display: none; }

/* Die volle Leiste (Logo, fünf Punkte, „Anmelden") braucht gut 800px.
   Darunter ragte „Anmelden" rechts heraus — deshalb übernimmt bis
   860px der Menü-Knopf (27.11.2026, vorher 600px). Gilt für Startseite
   (.landing-nav) und Unterseiten (.sh-nav in site_header.php). */
@media (max-width: 860px) {
    .landing-nav,
    .sh-nav { display: none !important; }
}

/* Kopfleiste der Startseite: Logo, Anmelden und Menü-Knopf in EINER
   Zeile (landing.css erlaubt unter 600px Umbruch — mit dem zusätzlichen
   Knopf rutschte die rechte Gruppe sonst in eine zweite Zeile) */
@media (max-width: 600px) {
    .landing-header { flex-wrap: nowrap !important; }
    .landing-header > div:last-child { gap: 8px !important; flex-shrink: 0; }
    .landing-header .landing-btn-outline { padding: 8px 14px; }
}
@media (max-width: 360px) {
    .landing-header .logo { font-size: 21px !important; }
    .landing-header .landing-btn-outline { padding: 7px 12px; font-size: 12.5px; }
}

@media (max-width: 860px) {
    .mm-knopf {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 50%;
        border: 1px solid rgba(29, 29, 31, 0.14);
        background: rgba(255, 255, 255, 0.6);
        color: #1d1d1f;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    }
    .mm-knopf:active { transform: scale(0.94); }
    .mm-knopf.ist-offen { background: #4f4a8c; border-color: #4f4a8c; color: #fff; }
    .mm-knopf:focus-visible { outline: 2px solid #5b54a8; outline-offset: 2px; }

    /* Drei Striche, die sich zum X drehen */
    .mm-strich {
        position: absolute;
        left: 50%;
        width: 16px;
        height: 2px;
        margin-left: -8px;
        border-radius: 2px;
        background: currentColor;
        transition: transform 0.32s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.18s ease, top 0.32s cubic-bezier(0.65, 0, 0.35, 1);
    }
    .mm-strich:nth-child(1) { top: 13px; }
    .mm-strich:nth-child(2) { top: 19px; }
    .mm-strich:nth-child(3) { top: 25px; }
    .mm-knopf.ist-offen .mm-strich:nth-child(1) { top: 19px; transform: rotate(45deg); }
    .mm-knopf.ist-offen .mm-strich:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
    .mm-knopf.ist-offen .mm-strich:nth-child(3) { top: 19px; transform: rotate(-45deg); }
}

/* Abgedunkelter Hintergrund */
.mm-schleier {
    position: fixed;
    inset: 0;
    z-index: 9990;
    display: none;
    background: rgba(24, 20, 52, 0.28);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mm-schleier.ist-da { display: block; }
.mm-schleier.ist-offen { opacity: 1; }

/* Panel */
.mm-panel {
    position: fixed;
    left: calc(14px + env(safe-area-inset-left, 0px));
    right: calc(14px + env(safe-area-inset-right, 0px));
    z-index: 9991;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding: 8px;
    border-radius: 22px;
    background: #fff;                       /* voll deckend, nichts scheint durch */
    border: 1px solid rgba(29, 29, 31, 0.06);
    box-shadow: 0 24px 60px rgba(30, 26, 70, 0.28), 0 2px 8px rgba(30, 26, 70, 0.08);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    transform-origin: top right;
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
    transition: opacity 0.26s ease, transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
}
.mm-panel.ist-offen { opacity: 1; transform: none; }
/* Tablet (601–860px): nicht über die ganze Breite, sondern als Menü
   unter dem Knopf, bündig mit der rechten Kante der Kopfleiste */
@media (min-width: 601px) {
    .mm-panel {
        left: auto;
        right: calc(28px + env(safe-area-inset-right, 0px));
        width: 360px;
    }
}

.mm-liste { display: flex; flex-direction: column; gap: 2px; }
.mm-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 12px;
    border-radius: 16px;
    color: #1d1d1f;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    /* nacheinander hereingleiten */
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.28s ease, transform 0.36s cubic-bezier(0.32, 0.72, 0, 1), background 0.15s ease;
}
.mm-panel.ist-offen .mm-link {
    opacity: 1;
    transform: none;
    transition-delay: calc(0.05s + var(--i, 0) * 0.045s), calc(0.05s + var(--i, 0) * 0.045s), 0s;
}
.mm-link:active,
.mm-link:hover,
.mm-link:focus-visible { background: rgba(91, 84, 168, 0.09); }
.mm-link:focus-visible { box-shadow: inset 0 0 0 2px rgba(91, 84, 168, 0.5); }

.mm-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(91, 84, 168, 0.12);
    color: #4f4a8c;
}
.mm-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mm-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mm-titel { font-size: 15.5px; font-weight: 700; letter-spacing: -0.2px; line-height: 1.25; }
.mm-unter { font-size: 12.5px; font-weight: 500; color: rgba(29, 29, 31, 0.55); line-height: 1.3; }
.mm-pfeil { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: rgba(29, 29, 31, 0.32); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease, stroke 0.2s ease; }
.mm-link:active .mm-pfeil,
.mm-link:hover .mm-pfeil { transform: translateX(3px); stroke: #5b54a8; }

@media (prefers-reduced-motion: reduce) {
    .mm-panel, .mm-link, .mm-schleier, .mm-strich { transition-duration: 0.01s !important; transition-delay: 0s !important; }
}
