/* ==========================================================================
   FOOTER
   Four equal columns on desktop; two text columns on tablet, one on mobile.
   Text columns are edited under Appearance > Footer Settings (ACF).
   ========================================================================== */

.footer {
    background: #333;
    color: var(--color-grey-550);
    line-height: 30px;
}

.footer-inner {
    display: grid;
    gap: 45px var(--column-gap);
    align-items: start;
    width: min(var(--content-max-width), 90%);
    margin-inline: auto;
    padding-block: 45px;
}

.footer-inner > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.footer img {
    max-width: 100%;
    height: auto;
}

.footer :is(strong, b) {
    color: var(--color-grey-400);
    font-weight: 600;
}

.footer a {
    color: var(--color-grey-400);
    text-decoration: none;
}

.footer-copyright a {
    color: #d1d1d1;
}

.footer a:hover {
    color: var(--color-white);
}

.footer a:focus-visible {
    outline: 2px solid var(--color-white);
    outline-offset: 3px;
}

.footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li {
    border-bottom: 1px solid #333;
}

.footer-links li:first-child {
    border-top: 1px solid #333;
}

.footer-links a {
    display: block;
    padding-block: 6px;
}

.footer-bottom {
    background: #222;
    color: var(--color-grey-400);
    font-size: 13px;
}

.footer-copyright {
    width: min(var(--content-max-width), 90%);
    margin: 0 auto;
    padding-block: 20px;
    overflow-wrap: anywhere;
}

@media (min-width: 960px) {
    .footer-inner {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 959px) {
    .footer-inner {
        row-gap: 32px;
        padding-block: 40px;
    }

    .footer-logo {
        justify-self: center;
        width: min(200px, 100%);
    }

    .footer-logo img {
        display: block;
        width: 100%;
    }

    .footer-column > :last-child {
        margin-bottom: 0;
    }

    .footer-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px var(--column-gap);
    }

    .footer-links li,
    .footer-links li:first-child {
        border: 0;
    }

    .footer-copyright {
        /* Keep the final line above the fixed scroll-to-top button. */
        padding-block: 24px 60px;
        text-align: center;
    }
}

@media (min-width: 600px) and (max-width: 959px) {
    .footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-logo,
    .footer-nav {
        grid-column: 1 / -1;
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        gap: 8px var(--column-gap);
    }
}
