/* =====================================================================
   Footer
   ===================================================================== */
.site-footer,
footer {
    /* mobile: natural height */
    background: var(--color-black);
    color: var(--color-white);
}

@media (min-width: 1024px) {

    .site-footer,
    footer {
        height: var(--footer-height-desktop);
    }
}

/* Footer padding: mobile and desktop */
.site-footer .container {
    padding: 40px 16px;
}

@media (min-width: 1024px) {
    .site-footer .container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 40px 0px;
        height: 100%;
    }
}

/* Footer Grid & Links */
.footer-grid {
    display: grid;
    flex-grow: 1;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--grid-gap);
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 20px;
    }
}

.footer-divider {
    grid-column: 4/span 9;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
}

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

.footer-links {
    grid-column: 1/-1;
}

.footer-contact {
    grid-column: 1/-1;
}

.footer-legal {
    grid-column: 1/-1;
}

@media (min-width: 1024px) {
    .footer-logo {
        grid-column: 1/span 3;
    }

    .footer-links {
        grid-column: 4/span 3;
    }

    .footer-contact {
        grid-column: 7/span 3;
    }

    .footer-legal {
        grid-column: 10/span 3;
        text-align: right;
    }
}

/* Footer logo sizes */
.footer-logo img {
    height: 55px;
}

@media (min-width: 1024px) {
    .footer-logo img {
        height: 70px;
    }
}

.footer-links,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.footer-links a,
.footer-contact a,
.footer-legal a {
    color: var(--color-white);
    text-decoration: none;
}

.footer-links a:hover,
.footer-contact a:hover,
.footer-legal a:hover {
    color: var(--color-purple);
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Social icons */
.social-icons {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
}

.social-icons img {
    width: 24px;
    height: 24px;
    display: block;
}

/* Mobile Footer Updates */
@media (max-width: 1024px) {
    .site-footer .container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 40px;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .footer-grid,
    .footer-divider,
    .footer-bottom {
        display: contents;
    }

    .footer-logo {
        order: 1;
        width: 100%;
    }

    .footer-links {
        order: 2;
        gap: 24px;
        width: 100%;
    }

    .footer-contact {
        order: 3;
        gap: 24px;
        width: 100%;
    }

    .social-icons {
        order: 4;
        width: 100%;
        gap: 24px;
    }

    .footer-legal {
        order: 5;
        width: 100%;
        text-align: left;
    }

    .footer-bottom>.body-s {
        order: 6;
        width: 100%;
        color: rgba(255, 255, 255, 0.7);
        margin-top: -16px;
        /* Closer to legal */
    }

    .footer-logo img {
        height: 48px;
        /* Slightly smaller for mobile */
    }
}