/* ==================== Footer ==================== */
.footer {
    height: 283px;
    background: #1a1a1a;
    color: rgba(255, 255, 255, 0.65);
    padding: 48px 0 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.footer > .container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.footer-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(5, auto);
    gap: 48px;
    flex: 1;
}
.footer-col h4 {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}
.footer-col ul li {
    margin-bottom: 10px;
}
.footer-col ul li a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    transition: var(--transition);
}
.footer-col ul li a:hover {
    color: #1d78bd;
}
.footer-qr {
    display: flex;
    gap: 24px;
    flex-shrink: 0;
}
.footer-qr-item {
    text-align: center;
    min-width: 0;
}
.footer-qr-item img {
    width: 88px;
    height: 88px;
    background: #fff;
    border-radius: 4px;
    padding: 4px;
    display: block;
    margin: 0 auto;
    box-sizing: border-box;
}
.footer-qr-item p {
    font-size: 11px;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
    white-space: nowrap;
}
.footer-bottom {
    padding: 16px 0 20px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    border: none;
}
.mobile-record {
    display: none;
}

/* ==================== Float Tools ==================== */
.float-contact-popover {
    position: fixed;
    right: 100px;
    top: 50%;
    z-index: 998;
    width: 220px;
    padding: 22px 20px 18px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid rgba(29, 120, 189, 0.15);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(20, 57, 87, 0.2);
    color: #263746;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transform: translate(12px, -50%);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}
.float-contact-popover::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -8px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-top: 1px solid rgba(29, 120, 189, 0.15);
    border-right: 1px solid rgba(29, 120, 189, 0.15);
    transform: translateY(-50%) rotate(45deg);
}
.float-contact-popover.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
}
.float-contact-close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8a9aa8;
    font-size: 20px;
    line-height: 24px;
    cursor: pointer;
}
.float-contact-close:hover {
    color: #1d78bd;
}
.float-contact-title {
    margin-bottom: 14px;
    color: #1d78bd;
    font-size: 16px;
    font-weight: 600;
}
.float-contact-qrcode {
    display: block;
    width: 132px;
    height: 132px;
    margin: 0 auto 8px;
    padding: 5px;
    box-sizing: border-box;
    border: 1px solid #e4edf3;
    border-radius: 6px;
    background: #fff;
    object-fit: contain;
}
.float-contact-qr-tip {
    margin: 0 0 14px;
    color: #758492;
    font-size: 12px;
}
.float-contact-phone {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 8px 12px;
    border: 0;
    border-radius: 6px;
    background: #f1f7fb;
    color: #1d78bd;
    cursor: pointer;
}
.float-contact-phone:hover {
    background: #e5f1f8;
}
.float-contact-phone-number {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 15px;
    font-weight: 600;
}
.float-contact-copy-hint {
    color: #758492;
    font-size: 11px;
    font-weight: 400;
}
.float-contact-copy-status {
    display: block;
    min-height: 17px;
    margin-top: 6px;
    color: #2a9d68;
    font-size: 12px;
}
.float-tools {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    width: 72px;
    background: #1d78bd;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(29, 120, 189, 0.35);
}
.float-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 8px;
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}
.float-tool:last-child {
    border-bottom: none;
}
.float-tool:hover {
    background: rgba(255, 255, 255, 0.12);
}
.float-tool img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
    mix-blend-mode: screen;
}
.float-tool.float-backtop img {
    transform: rotate(90deg);
}

@media (max-width: 1024px) {
    .footer {
        height: auto;
        padding: 40px 0 0;
    }
    .footer-main {
        flex-direction: column;
        gap: 28px;
    }
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    .footer-qr {
        width: 100%;
        justify-content: center;
        gap: 20px;
    }
}
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .footer > .container {
        padding-left: 4px;
        padding-right: 4px;
        box-sizing: border-box;
    }
    .footer-qr {
        width: 100%;
        justify-content: space-evenly;
        gap: 12px;
        flex-wrap: nowrap;
    }
    .footer-qr-item {
        flex: 1 1 0;
        max-width: 160px;
    }
    .footer-qr-item img {
        width: 72px;
        height: 72px;
    }
    .footer-qr-item p {
        white-space: normal;
        word-break: break-word;
        padding: 0 4px;
        font-size: 10px;
    }
    .float-tools {
        display: flex;
        top: auto;
        bottom: 20px;
        right: 12px;
        transform: none;
        width: 52px;
        border-radius: 26px;
        box-shadow: 0 8px 24px rgba(29, 120, 189, 0.4);
    }
    .float-tool {
        padding: 10px 6px;
        gap: 2px;
        font-size: 10px;
        line-height: 1.15;
    }
    .float-tool img {
        width: 22px;
        height: 22px;
    }
    .float-contact-popover {
        right: 76px;
        top: auto;
        bottom: 20px;
        width: min(220px, calc(100vw - 92px));
        padding: 20px 14px 14px;
        transform: translateX(12px);
    }
    .float-contact-popover.is-open {
        transform: translateX(0);
    }
    .float-contact-qrcode {
        width: 112px;
        height: 112px;
    }
    /* 手机端隐藏底部页脚导航 */
    .footer {
        display: none;
    }
    .mobile-record {
        display: block;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
        background: #1a1a1a;
        color: rgba(255, 255, 255, 0.55);
        font-size: 11px;
        line-height: 1.4;
        text-align: center;
    }
    .mobile-record a {
        color: inherit;
    }
}
@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-qr-item img {
        width: 64px;
        height: 64px;
    }
    .float-tools {
        bottom: 16px;
        right: 10px;
        width: 48px;
        border-radius: 24px;
    }
    .float-tool {
        padding: 9px 4px;
        font-size: 9px;
    }
    .float-tool img {
        width: 20px;
        height: 20px;
    }
}
