/* The app's footer (templates/components/app_footer.html): Grundee on the left, four link groups beside it; two
   columns of groups on a tablet and a phone. Text colours meet WCAG AA on the light background; the green is
   only a tint behind green text. */

.app-footer {
    margin-top: 3rem;
    padding: 2.5rem 0 1.25rem;
    border-top: 1px solid #e1e6dc;
    background: #f7f8f5;
    color: #4d574f;
    font-size: 0.9rem;
}

.app-footer__main {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(0, 3fr);
    gap: 2rem 3rem;
}

/* ---------- Grundee ---------- */
.app-footer__logo {
    display: inline-block;
    margin-bottom: 0.75rem;
}

.app-footer__about {
    max-width: 30ch;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.app-footer__mail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #17211a;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.app-footer__mail:hover,
.app-footer__mail:focus-visible {
    color: var(--grundee-green-text);
}

.app-footer__social {
    display: flex;
    gap: 8px;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.app-footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e1e6dc;
    border-radius: 50%;
    background: #fff;
    color: #17211a;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.app-footer__social a:hover,
.app-footer__social a:focus-visible {
    border-color: var(--grundee-green);
    background: var(--grundee-accent);
    color: var(--grundee-green-text);
}

/* ---------- The link groups ---------- */
.app-footer__links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem 2rem;
}

.app-footer__col h2 {
    margin-bottom: 0.75rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #17211a;
}

.app-footer__col ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-footer__col li + li {
    margin-top: 0.45rem;
}

.app-footer__col a,
.app-footer__col .cookie-settings-link {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: #4d574f;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.app-footer__col a:hover,
.app-footer__col a:focus-visible,
.app-footer__col .cookie-settings-link:hover,
.app-footer__col .cookie-settings-link:focus-visible {
    color: var(--grundee-green-text);
    text-decoration: underline;
}

/* ---------- Copyright, map credit, languages ---------- */
.app-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e1e6dc;
    font-size: 0.8rem;
}

.app-footer__copy {
    margin: 0;
}

.app-footer__langs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-footer__langs form {
    margin: 0;
}

.app-footer__langs button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 6px;
    border: 1px solid #e1e6dc;
    border-radius: 999px;
    background: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    color: #17211a;
}

.app-footer__langs button[aria-current="true"] {
    border-color: var(--grundee-green);
    background: var(--grundee-accent);
    color: var(--grundee-green-text);
}

.app-footer__langs .language-flag {
    display: inline-flex;
    width: 18px;
    height: 18px;
    overflow: hidden;
    border-radius: 50%;
}

.app-footer__langs .language-flag svg {
    width: 100%;
    height: 100%;
}

@media (max-width: 991.98px) {
    .app-footer {
        padding-top: 2rem;
    }

    .app-footer__main {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .app-footer__about {
        max-width: none;
    }

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

@media (max-width: 575.98px) {
    .app-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}
