/* Footer bookmarks and mobile copyright spacing. */
.footer,
.site-footer-nav {
    margin-top: 0 !important;
}

.site-footer-nav .footer-bottom-right {
    display: none !important;
}

.site-footer-nav .wrapper .footer-links {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin: 20px 0 4px;
    padding: 16px 20px;
    text-align: left;
    background: #f8fafc;
    border: 1px solid #e8edf3;
    border-radius: 12px;
}

.site-footer-nav .footer-links::before {
    content: "友情链接";
    flex: none;
    padding-left: 10px;
    border-left: 3px solid #5b8ac4;
    color: #344054;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.site-footer-nav .footer-links ul {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer-nav .footer-links ul li {
    min-width: 0;
    margin: 0;
    padding: 0;
}

.site-footer-nav .footer-links ul li a {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
    color: #475467;
    font-size: 14px;
    line-height: 20px;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: background-color .2s, border-color .2s, color .2s;
}

.site-footer-nav .footer-links ul li a:hover,
.site-footer-nav .footer-links ul li a:focus-visible {
    border-color: #9cc3ee;
    background: #f3f8ff;
    color: #245e9d;
}

.site-footer-nav .footer-links ul li a:focus-visible {
    outline: 2px solid #5b8ac4;
    outline-offset: 2px;
}

@media screen and (max-width: 768px) {
    .site-footer-nav .wrapper .footer-links {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px 6px;
        margin: 18px 0 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: none;
        text-align: center;
    }

    .site-footer-nav .wrapper .b2-footer-utility-links {
        justify-content: center;
        margin: 6px 0 0;
        padding: 0 12px;
        font-size: 12px;
    }

    .site-footer-nav .wrapper .footer-links.mobile-hidden {
        display: none;
    }

    .site-footer-nav .footer-links::before {
        display: block;
        content: "友情链接：";
        padding: 0;
        border: 0;
        color: inherit;
        font-size: 12px;
        font-weight: 400;
        line-height: 1.5;
    }

    .site-footer-nav .footer-links ul {
        display: flex;
        flex: 0 1 auto;
        justify-content: center;
        gap: 4px 14px;
    }

    .site-footer-nav .footer-links ul li a {
        display: inline;
        width: auto;
        min-height: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: none;
        color: #475467;
        text-align: center;
        font-size: 12px;
        line-height: 1.5;
    }

    .site-footer-nav .footer-links ul li a:hover,
    .site-footer-nav .footer-links ul li a:focus-visible {
        border: 0;
        background: none;
        color: #475467;
        text-decoration: underline;
    }

    .site-footer-nav .footer-bottom {
        margin-bottom: 0;
        padding: 8px 12px 10px;
    }

    .site-footer-nav .footer-bottom-left .beian:not(:has(a)) {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-footer-nav .footer-links ul li a {
        transition: none;
    }
}

/* Keep copyright left, utility links centered, and bookmarks right. */
@media screen and (min-width: 769px) {
    .site-footer-nav .wrapper {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        column-gap: 20px;
    }

    .site-footer-nav .wrapper .footer-bottom {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        width: auto;
    }

    .site-footer-nav .wrapper .footer-links {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        gap: 0;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: none;
        color: inherit;
        font: inherit;
    }

    .site-footer-nav .wrapper .b2-footer-utility-links {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        flex-wrap: nowrap;
        margin: 0;
    }

    .site-footer-nav .footer-links::before {
        content: "友情链接：";
        padding: 0;
        border: 0;
        color: inherit;
        font: inherit;
    }

    .site-footer-nav .footer-links ul {
        flex: 0 1 auto;
        gap: 0 14px;
    }

    .site-footer-nav .footer-links ul li a {
        display: inline;
        min-height: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: none;
        color: #475467;
        font: inherit;
        text-decoration: none;
    }

    .site-footer-nav .footer-links ul li a:hover,
    .site-footer-nav .footer-links ul li a:focus-visible {
        border: 0;
        background: none;
        color: #475467;
        text-decoration: underline;
    }
}

.site-footer-nav .wrapper .b2-footer-utility-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 16px;
    color: inherit;
    font: inherit;
}

.site-footer-nav .b2-footer-utility-links a,
.site-footer-nav .b2-footer-utility-links button {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    line-height: inherit;
    text-decoration: none;
    cursor: pointer;
}

.site-footer-nav .b2-footer-utility-links a:hover,
.site-footer-nav .b2-footer-utility-links button:hover {
    text-decoration: underline;
}

.site-footer-nav .b2-footer-utility-links a:focus-visible,
.site-footer-nav .b2-footer-utility-links button:focus-visible {
    outline: 2px solid #5b8ac4;
    outline-offset: 3px;
}
