/*------------------------------------*\
    Page footer
\*------------------------------------*/

html {
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

body main {
    flex: 1 1 auto;
}

.page-footer {
    background-color: var(--color-neutral-darkest);
    color: var(--color-text-inverse);
}

.page-footer a {
    color: inherit;
    text-decoration: none;
}

.page-footer .container:has(.page-footer__main) {
    padding-top: 64px;
    padding-bottom: 64px;
}

.page-footer .container:has(.page-footer__sub) {
    padding-bottom: 32px;
}

.page-footer__main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
}

.page-footer__row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
}

.page-footer__logo {
    display: block;
    flex-shrink: 0;
    max-width: min(100%, 274px);
}

.page-footer__logo img {
    display: block;
    width: 100%;
    height: auto;
}

.page-footer__address {
    margin: 0;
    max-width: 40rem;
    font-family: var(--font-body);
    font-size: var(--font-size-paragraph);
    font-weight: 400;
    font-style: normal;
    line-height: var(--line-height-paragraph);
    text-align: center;

    p {
        color: var(--color-white);
    
        &:last-child {
            margin-bottom: 0;
        }
    }
}

.page-footer__social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;

    li {
        margin-bottom: 0;
    }
}

.page-footer a.page-footer__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--color-white);
    color: #232F35;
    text-decoration: none;
}

.page-footer a.page-footer__social-link:hover {
    text-decoration: none;
    background: var(--color-primary);
    color: var(--color-white);
}

.page-footer__social-link .wc-facebook,
.page-footer__social-link .wc-x-twitter,
.page-footer__social-link .wc-linkedin {
    font-size: 20px;
    line-height: 1;
}

.page-footer__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--button-gap);
    width: 100%;
    max-width: 26rem;
    text-align: center;
    text-decoration: none;
    padding: 16.5px 32px;

    &:after {
        display: none;
    }
}

.page-footer__cta:hover {
    text-decoration: none;
}

.page-footer__cta-icon {
    font-size: 21px;
    line-height: 1em;
}

.page-footer__cta-text {
    white-space: normal;
}

.page-footer__sub {
    border-top: 1px solid #141425;
    padding: 32px 0;
}

.page-footer__bottom {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 32px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    color: var(--color-text-inverse);
}

.page-footer__legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.page-footer__legal a {
    white-space: nowrap;
}

.page-footer__legal .menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-footer__legal .menu li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-footer__copyright {
    margin: 0;
    font-size: 14px;
    white-space: nowrap;
    color: var(--color-white);
}

.page-footer a:focus-visible,
.page-footer__cta:focus-visible {
    outline: var(--page-header-focus-ring) solid var(--border-color-input-focus);
    outline-offset: var(--page-header-gap-xs);
}

@media (min-width: 768px) {
    .page-footer__cta {
        width: auto;
        max-width: none;
    }

    .page-footer__row--brand,
    .page-footer__row--actions {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        align-self: stretch;
    }

    .page-footer__address {
        text-align: right;
    }

    .page-footer__social {
        justify-content: flex-start;
    }

    .page-footer__row--actions .page-footer__cta:only-child {
        margin-left: auto;
    }
}

@media (min-width: 1200px) {
    .page-footer__main {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: var(--page-header-gap-lg);
    }

    .page-footer__row {
        display: contents;
    }

    .page-footer__logo {
        align-self: center;
    }

    .page-footer__address {
        text-align: right;
        max-width: 16rem;
    }

    .page-footer__social {
        justify-content: center;
    }

    .page-footer__bottom {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
}
