/**
 * Módulo: Footer — marca + tagline, menu, linha legal.
 * Fundo: --color-primary-base (Customizer, alinhado a botões/header).
 */

.module-footer {
    --module-footer-bg: var(--color-primary-base, #2c3e50);
    --module-footer-fg: var(--color-text-inverse, #ffffff);
    --module-footer-rule: color-mix(in srgb, var(--module-footer-fg) 42%, transparent);
    background-color: var(--module-footer-bg);
    color: var(--module-footer-fg);
    padding: 2.75rem 0 2.35rem;
}

.module-footer__container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding-inline: 1rem;
}

.module-footer__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
}

.module-footer__row--brand {
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.module-footer__brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.module-footer__brand-logo {
    display: inline-flex;
    line-height: 0;
    text-decoration: none;
}

.module-footer__logo-img {
    max-height: 40px;
    width: auto;
    max-width: 140px;
    height: auto;
    display: block;
}

.module-footer__site-name {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: inherit;
    text-decoration: none;
}

.module-footer__site-name:hover,
.module-footer__site-name:focus-visible {
    text-decoration: underline;
}

.module-footer__tagline {
    margin: 0;
    padding-top: 0.15rem;
    max-width: 42rem;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.55;
    color: color-mix(in srgb, var(--module-footer-fg) 95%, transparent);
    text-align: right;
}

.module-footer__row--mid {
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.75rem;
    gap: 1.5rem 2rem;
}

.module-footer__mid-left {
    flex: 1 1 auto;
    min-width: 0;
}

.module-footer__nav {
    display: block;
}

.module-footer__menu.module-footer__menu--inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.module-footer__menu--inline > li {
    margin: 0;
}

.module-footer__menu--inline a {
    color: color-mix(in srgb, var(--module-footer-fg) 92%, transparent);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 400;
    padding: 0.2rem 0;
    border-radius: 2px;
}

.module-footer__menu--inline a:hover {
    color: var(--module-footer-fg);
    text-decoration: underline;
}

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

.module-footer__widget-nav {
    font-size: 0.9375rem;
}

.module-footer__widget-nav .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
}

.module-footer__widget-nav a {
    color: color-mix(in srgb, var(--module-footer-fg) 92%, transparent);
    text-decoration: none;
}

.module-footer__widget-nav a:focus-visible {
    outline: 2px solid var(--module-footer-fg);
    outline-offset: 3px;
}

.module-footer__rule {
    border: none;
    border-top: 1px solid var(--module-footer-rule);
    margin: 0.25rem 0 1.5rem;
}

.module-footer__row--legal {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem 1.5rem;
    align-items: start;
    font-size: 0.75rem;
    line-height: 1.5;
    color: color-mix(in srgb, var(--module-footer-fg) 92%, transparent);
    min-width: 0;
}

.module-footer__legal-col {
    min-width: 0;
}

.module-footer__legal-text {
    margin: 0;
}

.module-footer__legal-nav {
    width: 100%;
}

.module-footer__legal-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0;
    align-items: center;
    justify-content: flex-start;
}

.module-footer__legal-list > li {
    display: inline-flex;
    align-items: center;
}

.module-footer__legal-list > li + li::before {
    content: '|';
    display: inline-block;
    margin-inline: 0.65rem;
    color: color-mix(in srgb, var(--module-footer-fg) 50%, transparent);
    font-weight: 400;
    pointer-events: none;
}

.module-footer__legal-col--links .module-footer__legal-list {
    justify-content: flex-start;
}

.module-footer__legal-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.module-footer__legal-email-wrap {
    margin: 0;
}

.module-footer__legal-email {
    color: inherit;
    text-decoration: none;
    word-break: break-all;
}

.module-footer__legal-email:hover {
    text-decoration: underline;
}

.module-footer__legal-email:focus-visible {
    outline: 2px solid var(--module-footer-fg);
    outline-offset: 3px;
}

.module-footer__legal-list a {
    color: inherit;
    text-decoration: none;
}

.module-footer__legal-list a:hover {
    text-decoration: underline;
}

.module-footer__legal-list a:focus-visible {
    outline: 2px solid var(--module-footer-fg);
    outline-offset: 3px;
}

.module-footer .module-fallback {
    margin: 0;
    font-size: 0.875rem;
    color: color-mix(in srgb, var(--module-footer-fg) 85%, transparent);
}

.module-footer .module-fallback a {
    color: inherit;
    text-decoration: underline;
}

.module-footer .module-fallback a:focus-visible {
    outline: 2px solid var(--module-footer-fg);
    outline-offset: 2px;
}

@media (min-width: 768px) and (max-width: 1023px) {
    .module-footer__row--legal {
        grid-template-columns: 1fr 1fr;
    }

    .module-footer__legal-col--company {
        grid-column: 1;
    }

    .module-footer__legal-col--copy {
        grid-column: 2;
        text-align: right;
    }

    .module-footer__legal-col--links {
        grid-column: 1 / -1;
    }

    .module-footer__legal-col--links .module-footer__legal-list {
        justify-content: center;
    }

    .module-footer__legal-aside {
        align-items: center;
    }
}

@media (min-width: 1024px) {
    .module-footer__row--legal {
        grid-template-columns: 1fr minmax(10rem, 1.4fr) 1fr;
        align-items: center;
    }

    .module-footer__legal-col--copy {
        text-align: center;
    }

    .module-footer__legal-col--links .module-footer__legal-list {
        justify-content: flex-end;
    }

    .module-footer__legal-aside {
        align-items: flex-end;
        text-align: right;
    }
}

@media (max-width: 767px) {
    .module-footer {
        padding: 2rem 0 1.75rem;
    }

    .module-footer__row--brand {
        flex-direction: column;
        align-items: flex-start;
    }

    .module-footer__tagline {
        text-align: left;
        max-width: none;
    }

    .module-footer__row--mid {
        flex-direction: column;
        align-items: stretch;
    }

    .module-footer__legal-col--copy,
    .module-footer__legal-col--links .module-footer__legal-list {
        text-align: center;
        justify-content: center;
    }

    .module-footer__legal-aside {
        align-items: center;
        text-align: center;
    }

    .module-footer__legal-col--company {
        text-align: center;
    }
}
