/* 前台底部信息栏 */
.front-footer {
    position: relative;
    z-index: 2;
    margin-top: auto;
    border-top: 1px solid rgba(15, 23, 42, .08);
    background: #f8fafc;
    color: #0f172a;
}

.front-footer .container { padding-top: 48px; padding-bottom: 0; }

.footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(150px, .7fr) minmax(220px, 1fr);
    gap: clamp(28px, 5vw, 72px);
    padding-bottom: 40px;
}

.footer-brand-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}
.footer-logo img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.footer-brand-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.footer-brand h4,
.footer-col h4 {
    margin: 24px 0 12px;
    color: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .03em;
}

.footer-about {
    max-width: 460px;
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.9;
}

.footer-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 18px;
}
.footer-link-grid a {
    color: #475569;
    font-size: 12px;
    line-height: 1.7;
    transition: color .16s ease;
}
.footer-link-grid a:hover { color: var(--topbar-accent, #2563eb); }

.footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
}
.footer-contact li i {
    width: 14px;
    margin-top: 2px;
    color: var(--topbar-accent, #2563eb);
    font-size: 11px;
    text-align: center;
    flex-shrink: 0;
}
.footer-contact li a { color: #475569; }
.footer-contact li a:hover { color: var(--topbar-accent, #2563eb); }

.footer-qr {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}
.footer-qr img {
    display: block;
    width: 66px;
    height: 66px;
    padding: 4px;
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: 8px;
    background: #fff;
    object-fit: contain;
}
.footer-qr span { color: #64748b; font-size: 11px; }

.footer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 0 20px;
    border-top: 1px solid rgba(15, 23, 42, .08);
    color: #8491a4;
    font-size: 11px;
    line-height: 1.6;
}

/* 深色品牌风格 */
.front-footer--dark {
    border-top-color: rgba(255, 255, 255, .1);
    background: linear-gradient(135deg, #081426 0%, #10233d 58%, #0a1526 100%);
    color: #f1f6ff;
}
.front-footer--dark .footer-about,
.front-footer--dark .footer-contact li,
.front-footer--dark .footer-qr span { color: rgba(225, 236, 250, .64); }
.front-footer--dark .footer-link-grid a,
.front-footer--dark .footer-contact li a { color: rgba(225, 236, 250, .72); }
.front-footer--dark .footer-link-grid a:hover,
.front-footer--dark .footer-contact li a:hover { color: #fff; }
.front-footer--dark .footer-meta {
    border-top-color: rgba(255, 255, 255, .1);
    color: rgba(225, 236, 250, .48);
}
.front-footer--dark .footer-qr img { border-color: rgba(255, 255, 255, .16); }

/* 极简单行风格 */
.front-footer--minimal .container { padding-top: 22px; }
.front-footer--minimal .footer-main {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    padding-bottom: 18px;
    align-items: center;
}
.front-footer--minimal .footer-brand h4,
.front-footer--minimal .footer-brand p { display: none; }
.front-footer--minimal .footer-col h4 { display: none; }
.front-footer--minimal .footer-link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    justify-content: flex-end;
}
.front-footer--minimal .footer-meta { padding: 12px 0 16px; }

@media (max-width: 960px) {
    .front-footer .container { padding-top: 36px; }
    .footer-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; }
    .footer-contact { grid-column: 1 / -1; }
    .footer-contact ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 20px; }
}

@media (max-width: 640px) {
    .front-footer .container { padding-top: 28px; }
    .footer-main { grid-template-columns: 1fr; gap: 22px; padding-bottom: 26px; }
    .footer-link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-brand h4,
    .footer-col h4 { margin-top: 0; }
    .footer-meta { flex-direction: column; align-items: flex-start; gap: 5px; }
}

/* 移动端固定底部导航 */
.front-mobile-nav { display: none; }

@media (max-width: 768px) {
    body.has-front-mobile-nav { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
    body.has-front-mobile-nav .front-footer { display: none; }

    .front-mobile-nav {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 45;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        min-height: 58px;
        padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(15, 23, 42, .1);
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 -6px 22px rgba(15, 23, 42, .08);
    }

    .front-mobile-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 0;
        padding: 5px 3px;
        border-radius: 9px;
        color: #64748b;
        font-size: 10px;
        line-height: 1.1;
    }
    .front-mobile-nav a i { font-size: 16px; }
    .front-mobile-nav a.is-active {
        background: rgba(37, 99, 235, .09);
        color: var(--topbar-accent, #2563eb);
        font-weight: 600;
    }
}

/* RTL：图标和文字自然随方向排列 */
.front.is-rtl .front-mobile-nav a { direction: rtl; }

/* 自定义背景颜色：覆盖风格默认背景，并按背景明暗自适应文字色 */
.front-footer.has-custom-bg {
    border-top-color: var(--footer-line, rgba(15, 23, 42, .08));
    background: var(--footer-bg, #f8fafc);
    color: var(--footer-fg, #0f172a);
}

.front-footer.has-custom-bg .footer-about,
.front-footer.has-custom-bg .footer-contact li,
.front-footer.has-custom-bg .footer-qr span {
    color: var(--footer-muted, #64748b);
}

.front-footer.has-custom-bg .footer-link-grid a,
.front-footer.has-custom-bg .footer-contact li a {
    color: var(--footer-link, #475569);
}

.front-footer.has-custom-bg .footer-link-grid a:hover,
.front-footer.has-custom-bg .footer-contact li a:hover {
    color: var(--footer-hover, #2563eb);
}

.front-footer.has-custom-bg .footer-contact li i {
    color: var(--topbar-accent, #2563eb);
}

.front-footer.has-custom-bg.is-custom-dark .footer-contact li i {
    color: color-mix(in srgb, var(--topbar-accent, #2563eb) 55%, #fff);
}

.front-footer.has-custom-bg .footer-qr img {
    border-color: var(--footer-line, rgba(15, 23, 42, .1));
}

.front-footer.has-custom-bg .footer-meta {
    border-top-color: var(--footer-line, rgba(15, 23, 42, .08));
    color: var(--footer-muted, #8491a4);
}

.front-mobile-nav.has-custom-bg {
    border-top-color: var(--footer-line, rgba(15, 23, 42, .1));
    background: var(--footer-bg-solid, rgba(255, 255, 255, .98));
    box-shadow: 0 -6px 22px rgba(15, 23, 42, .08);
}

.front-mobile-nav.has-custom-bg a {
    color: var(--footer-muted, #64748b);
}

.front-mobile-nav.has-custom-bg a.is-active {
    background: var(--footer-active, rgba(37, 99, 235, .09));
    color: var(--footer-hover, var(--topbar-accent, #2563eb));
}
