/* Footer – Entwurf Kunde 2026-10-14 (ZISS_Footer_desktop_2 / _mobile_2).
   Klasse .site-footer statt .footer: Das DB-CSS (/de/css/) setzt auf .footer
   Hintergrund (mit !important), Padding und Mindesthöhe – die gelten hier nicht mehr. */

.site-footer {
    --footer-bg: #ecf0d6;
    --footer-text: #4d5520;
    --footer-muted: #858c58;
    --footer-line: #d3d9ae;
    --footer-accent: var(--ziss-color, #a8bf00);
    clear: both; /* nichts Schwebendes davor darf den Footer verschieben */
    padding-bottom: 40px;
    color: var(--footer-text);
    font-family: 'DM Sans', sans-serif;
}

.site-footer a,
.footer-linkbutton {
    color: var(--footer-text);
    text-decoration: none;
}
.site-footer a:hover,
.footer-linkbutton:hover {
    color: var(--footer-text);
    text-decoration: underline;
    text-decoration-color: var(--footer-accent);
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-footer p {
    margin: 0;
}

/* „Nach oben“: Text + Pfeil, rechtsbündig mit der grünen Fläche */
.footer-totop-wrap {
    display: flex;
    justify-content: flex-end;
    padding: 24px 0 14px;
}
.footer-totop {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}
.site-footer .footer-totop:hover {
    text-decoration: none;
}
.footer-totop svg {
    color: var(--footer-accent);
    transition: transform 0.2s ease;
}
.footer-totop:hover svg,
.footer-totop:focus-visible svg {
    transform: translateY(-3px);
}
@media (prefers-reduced-motion: reduce) {
    .footer-totop svg { transition: none; }
}

/* Grüne Fläche: im Container (eingerückt), auf dem Handy randlos */
.footer-box {
    background: var(--footer-bg);
    padding: 56px 56px 28px;
}

/* Oben: Logo | Gruppen | Zusatzlinks */
.footer-top {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) auto;
    column-gap: 40px;
    row-gap: 36px;
    align-items: start;
    padding-bottom: 48px;
}
.footer-logo-link {
    display: inline-block;
}
.footer-logo {
    display: block;
    width: 130px;
    max-width: 100%;
    height: auto;
}

.footer-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    column-gap: 32px;
    row-gap: 28px;
}
.site-footer .footer-group-title {
    margin-bottom: 12px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--footer-muted);
}
.footer-group li,
.footer-secondary li {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}
.footer-group li + li {
    margin-top: 8px;
}

/* Zusatzlinks: fett, grün unterstrichen wie Links im Fliesstext.
   Sie stecken in einer .footer-group mit leerer Überschrift und erben deren
   Abstände – so liegen sie auf denselben Zeilen wie die Gruppenlinks. */
.footer-secondary li {
    font-weight: 600;
}
.footer-secondary a {
    text-decoration-line: underline;
    text-decoration-color: var(--footer-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

/* Fusszeile: © links | Rechtliches mittig | Edit/Logout rechts */
.footer-bottom {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    column-gap: 24px;
    row-gap: 16px;
    align-items: center;
    padding-top: 22px;
    border-top: 1px solid var(--footer-line);
    font-size: 13px;
}
.footer-copy {
    grid-column: 1;
    justify-self: start;
}
.footer-legal {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 32px;
}
.footer-editor {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
}
.footer-editor a {
    text-decoration: underline;
    text-decoration-color: var(--footer-accent);
    text-underline-offset: 3px;
}
.footer-editor-sep {
    width: 1px;
    height: 1.1em;
    margin: 0 10px;
    background: var(--footer-line);
}

/* Cookie-Einstellungen ist ein <button>, soll aber wie ein Link aussehen */
.footer-linkbutton {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

/* Tablet: Logo + Gruppen nebeneinander, Zusatzlinks darunter */
@media (max-width: 1199px) {
    .footer-box {
        padding: 48px 40px 24px;
    }
    .footer-top {
        grid-template-columns: 140px minmax(0, 1fr);
    }
    /* Zusatzlinks unter den Gruppen nebeneinander, ohne leere Überschrift */
    .footer-secondary-group {
        grid-column: 2;
    }
    .footer-group-title-empty {
        display: none;
    }
    .footer-secondary {
        display: flex;
        flex-wrap: wrap;
        gap: 16px 40px;
    }
    .footer-secondary-group li + li {
        margin-top: 0;
    }
}

/* Handy: alles untereinander, Fläche randlos (Container-Padding 15px) */
@media (max-width: 639px) {
    .site-footer {
        padding-bottom: 0;
    }
    .footer-totop-wrap {
        padding-top: 32px;
    }
    .footer-box {
        margin: 0 -15px;
        padding: 40px 24px 32px;
    }
    .footer-top {
        grid-template-columns: 1fr;
        row-gap: 40px;
    }
    .footer-logo {
        width: 110px;
    }
    .footer-groups {
        grid-template-columns: 1fr;
        row-gap: 32px;
    }
    .site-footer .footer-group-title {
        margin-bottom: 14px;
    }
    .footer-group li,
    .footer-secondary li {
        font-size: 17px;
    }
    .footer-group li + li {
        margin-top: 18px;
    }
    .footer-secondary-group {
        grid-column: 1;
    }
    .footer-secondary {
        flex-direction: column;
        gap: 26px;
    }
    .footer-secondary-group li + li {
        margin-top: 0;
    }
    .footer-bottom {
        grid-template-columns: 1fr;
        row-gap: 22px;
        padding-top: 26px;
        font-size: 14px;
    }
    .footer-legal,
    .footer-editor,
    .footer-copy {
        grid-column: 1;
        justify-self: start;
    }
    /* Reihenfolge wie im Entwurf: Rechtliches, Edit/Logout, © */
    .footer-legal { order: 1; gap: 8px 24px; }
    .footer-editor { order: 2; }
    .footer-copy { order: 3; }
}
