/* ========================================
   Footer
======================================== */

.site-footer {
    width: 100%;
    background: #111827;
    color: #94a3b8;
}

.site-footer,
.site-footer * {
    box-sizing: border-box;
}

.footer-container {
    width: 1200px;
    max-width: calc(100% - 40px);
    margin: 0 auto;
}

.site-footer img,
.site-footer svg {
    max-width: 100%;
}

/* ========================================
   顶部
======================================== */

.footer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 60px;
    padding: 54px 0 44px;
}

/* ========================================
   公司信息
======================================== */

.footer-info {
    flex: 1;
    min-width: 0;
    max-width: 620px;
}

.footer-site-logo {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;

    max-width: 500px;
    min-height: 48px;

    margin-bottom: 18px;

    box-sizing: border-box;

    background-color: #f1f5f9;
}

.footer-site-logo img {
    display: block;

    width: auto;
    max-width: 500px;
    height: 60px;

    object-fit: contain;
    object-position: left center;
}

.footer-site-desc {
    max-width: 520px;
    margin-bottom: 20px;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.9;
}

/* ========================================
   联系方式
======================================== */

.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 18px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.6;
    text-decoration: none;
    transition: color .2s ease;
}

.footer-contact-item:hover {
    color: #ffffff;
}

.footer-contact-label {
    color: #64748b;
    font-size: 13px;
}

.footer-contact-tel strong {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: .3px;
}

/* ========================================
   关注我们
======================================== */

.footer-follow {
    flex-shrink: 0;
    min-width: 260px;
}

.footer-follow-title {
    margin-bottom: 16px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
}

/* ========================================
   公众号 / 小程序
======================================== */

.footer-qrcode {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}

.footer-qrcode-item {
    width: 104px;
    text-align: center;
}

.footer-qrcode-img {
    width: 104px;
    height: 104px;
    padding: 5px;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
}

.footer-qrcode-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footer-qrcode-name {
    margin-top: 9px;
    color: #e2e8f0;
    font-size: 13px;
    line-height: 1.5;
}

.footer-qrcode-desc {
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

/* ========================================
   社交图标
======================================== */

.footer-social {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-social-entry {
    position: relative;
    display: inline-flex;
}

.footer-social-item {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    margin: 0;
    padding: 0;

    box-sizing: border-box;

    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;

    outline: none;

    background: rgba(255, 255, 255, .05);

    color: #94a3b8;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    transition:
        color .2s ease,
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.footer-social-item svg {
    width: 19px;
    height: 19px;

    fill: none;
    stroke: currentColor;

    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;

    pointer-events: none;
}

.footer-social-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .24);
    transform: translateY(-2px);
}

/* ========================================
   PC Hover 二维码

   默认始终关闭
======================================== */

.footer-social-popover {
    position: absolute;

    left: 50%;
    bottom: calc(100% + 12px);

    z-index: 1000;

    width: 164px;

    padding-bottom: 8px;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transform: translate(-50%, 8px);

    transition:
        opacity .18s ease,
        visibility .18s ease,
        transform .18s ease;
}

/*
 * 关键修复：
 *
 * 只允许真正支持鼠标 Hover 的设备触发。
 *
 * 不再使用：
 *
 * .footer-social-entry:focus-within
 *
 * 所以点击后不会保持弹层。
 */
@media (hover: hover) and (pointer: fine) {

    .footer-social-entry:hover>.footer-social-popover {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform: translate(-50%, 0);
    }

}

.footer-social-popover-content {
    position: relative;
    z-index: 2;

    padding: 12px;

    box-sizing: border-box;

    border-radius: 10px;

    background: #ffffff;

    text-align: center;

    box-shadow:
        0 16px 40px rgba(0, 0, 0, .28),
        0 4px 10px rgba(0, 0, 0, .08);
}

/* 箭头 */

.footer-social-popover-arrow {
    position: absolute;

    left: 50%;
    bottom: 2px;

    z-index: 1;

    width: 12px;
    height: 12px;

    background: #ffffff;

    transform:
        translateX(-50%) rotate(45deg);
}

/* Hover 二维码 */

.footer-social-popover-qrcode {
    width: 140px;
    height: 140px;

    overflow: hidden;

    border-radius: 6px;

    background: #ffffff;
}

.footer-social-popover-qrcode img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}

.footer-social-popover-title {
    margin-top: 9px;

    color: #111827;

    font-size: 14px;
    font-weight: 600;

    line-height: 1.5;
}

.footer-social-popover-desc {
    margin-top: 2px;

    color: #94a3b8;

    font-size: 12px;

    line-height: 1.5;
}

/* ========================================
   站点目录
======================================== */

.footer-directory {
    padding: 34px 0 38px;

    border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer-category {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(110px, 1fr));

    gap: 34px 38px;
}

.footer-category-group {
    min-width: 0;
}

.footer-category-title {
    display: inline-block;

    margin-bottom: 15px;

    color: #f1f5f9;

    font-size: 14px;
    font-weight: 600;

    line-height: 1.6;

    text-decoration: none;

    transition: color .2s ease;
}

.footer-category-title:hover {
    color: #ffffff;
}

.footer-category-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 10px;
}

.footer-category-links a {
    color: #64748b;

    font-size: 13px;

    line-height: 1.6;

    text-decoration: none;

    transition:
        color .2s ease,
        transform .2s ease;
}

.footer-category-links a:hover {
    color: #cbd5e1;

    transform: translateX(3px);
}

/* ========================================
   友情链接
======================================== */

.footer-friends {
    display: flex;
    align-items: center;

    gap: 18px;

    padding: 18px 0;

    border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer-friends-title {
    flex-shrink: 0;

    color: #cbd5e1;

    font-size: 13px;
    font-weight: 500;

    line-height: 1.7;
}

.footer-friends-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px 18px;
}

.footer-friends-list a {
    color: #64748b;

    font-size: 13px;

    line-height: 1.7;

    text-decoration: none;

    transition: color .2s ease;
}

.footer-friends-list a:hover {
    color: #cbd5e1;
}

/* ========================================
   辅助链接
======================================== */

.footer-extra {
    padding: 14px 0;

    border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer-extra-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px 20px;
}

.footer-extra-links a {
    color: #64748b;

    font-size: 12px;

    line-height: 1.7;

    text-decoration: none;

    transition: color .2s ease;
}

.footer-extra-links a:hover {
    color: #cbd5e1;
}

/* ========================================
   版权
======================================== */

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    min-height: 68px;

    padding: 16px 0;

    box-sizing: border-box;

    border-top: 1px solid rgba(255, 255, 255, .08);

    color: #64748b;

    font-size: 12px;

    line-height: 1.8;
}

.footer-copyright {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px 16px;
}

.footer-company-name {
    position: relative;

    padding-left: 16px;
}

.footer-company-name::before {
    content: "";

    position: absolute;

    left: 0;
    top: 50%;

    width: 1px;
    height: 12px;

    background: rgba(255, 255, 255, .15);

    transform: translateY(-50%);
}

.footer-record {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;

    gap: 8px 16px;
}

.footer-record a {
    color: #64748b;

    text-decoration: none;

    transition: color .2s ease;
}

.footer-record a:hover {
    color: #cbd5e1;
}

/* ========================================
   手机全屏二维码
======================================== */

.footer-qr-modal {
    position: fixed;

    inset: 0;

    z-index: 999999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    box-sizing: border-box;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transition:
        opacity .25s ease,
        visibility .25s ease;
}

.footer-qr-modal.is-open {
    opacity: 1;
    visibility: visible;

    pointer-events: auto;
}

/* 遮罩 */

.footer-qr-modal-mask {
    position: absolute;

    inset: 0;

    background: rgba(0, 0, 0, .78);

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* 卡片 */

.footer-qr-modal-card {
    position: relative;

    z-index: 2;

    width: 340px;
    max-width: 100%;

    padding: 30px 24px 26px;

    box-sizing: border-box;

    border-radius: 18px;

    background: #ffffff;

    text-align: center;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, .35);

    transform:
        translateY(18px) scale(.95);

    transition:
        transform .25s ease;
}

.footer-qr-modal.is-open .footer-qr-modal-card {

    transform:
        translateY(0) scale(1);
}

/* 关闭 */

.footer-qr-modal-close {
    position: absolute;

    top: 12px;
    right: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #f1f5f9;

    color: #64748b;

    cursor: pointer;
}

.footer-qr-modal-close svg {
    width: 18px;
    height: 18px;

    fill: none;

    stroke: currentColor;

    stroke-width: 2;

    stroke-linecap: round;
}

/* 标题 */

.footer-qr-modal-title {
    padding: 0 36px;

    color: #111827;

    font-size: 20px;
    font-weight: 600;

    line-height: 1.5;
}

.footer-qr-modal-desc {
    margin-top: 4px;

    color: #94a3b8;

    font-size: 13px;

    line-height: 1.6;
}

/* 二维码 */

.footer-qr-modal-image {
    width: 260px;
    height: 260px;

    max-width: 76vw;
    max-height: 76vw;

    margin: 22px auto 0;

    padding: 8px;

    box-sizing: border-box;

    overflow: hidden;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    background: #ffffff;
}

.footer-qr-modal-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}

.footer-qr-modal-tip {
    margin-top: 15px;

    color: #64748b;

    font-size: 13px;

    line-height: 1.6;
}

body.footer-qr-modal-open {
    overflow: hidden;
}

/* ========================================
   1200
======================================== */

@media screen and (max-width: 1200px) {

    .footer-category {
        grid-template-columns:
            repeat(5, minmax(110px, 1fr));
    }

}

/* ========================================
   992
======================================== */

@media screen and (max-width: 992px) {

    .footer-top {
        gap: 40px;
    }

    .footer-category {
        grid-template-columns:
            repeat(4, minmax(100px, 1fr));
    }

}

/* ========================================
   手机
======================================== */

@media screen and (max-width: 768px) {

    .site-footer {
        margin-top: 40px;
    }

    .footer-container {
        max-width: calc(100% - 30px);
    }

    .footer-top {
        flex-direction: column;

        gap: 32px;

        padding: 38px 0 30px;
    }

    .footer-info {
        width: 100%;
        max-width: none;
    }

    .footer-site-logo {
        max-width: 220px;
        min-height: 44px;

        margin-bottom: 16px;
        padding: 8px 12px;
    }

    .footer-site-logo img {
        max-width: 194px;
        height: 32px;
    }

    .footer-site-desc {
        max-width: none;
    }

    .footer-follow {
        width: 100%;
        min-width: 0;
    }

    /*
     * 手机：
     * 完全禁用 PC Hover 浮层
     */
    .footer-social-popover {
        display: none !important;
    }

    .footer-social-item {
        width: 44px;
        height: 44px;
    }

    .footer-social-item svg {
        width: 20px;
        height: 20px;
    }

    /* 目录 */

    .footer-directory {
        padding: 28px 0 32px;
    }

    .footer-category {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 28px 22px;
    }

    /* 友情链接 */

    .footer-friends {
        flex-direction: column;

        align-items: flex-start;

        gap: 10px;
    }

    /* 版权 */

    .footer-bottom {
        flex-direction: column;

        align-items: flex-start;

        gap: 8px;

        padding: 20px 0;
    }

    .footer-record {
        justify-content: flex-start;
    }

    .footer-company-name {
        padding-left: 0;
    }

    .footer-company-name::before {
        display: none;
    }

}

/* ========================================
   小屏
======================================== */

@media screen and (max-width: 480px) {

    .footer-container {
        max-width: calc(100% - 24px);
    }

    .footer-category {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 26px 18px;
    }

    .footer-qrcode {
        gap: 14px;
    }

    .footer-qrcode-item {
        width: 94px;
    }

    .footer-qrcode-img {
        width: 94px;
        height: 94px;
    }

    .footer-contact-tel strong {
        font-size: 18px;
    }

    .footer-friends-list {
        gap: 7px 14px;
    }

    .footer-bottom {
        font-size: 12px;
    }

    /* 弹层 */

    .footer-qr-modal {
        padding: 18px;
    }

    .footer-qr-modal-card {
        width: 100%;

        padding: 28px 18px 24px;

        border-radius: 16px;
    }

    .footer-qr-modal-image {
        width: min(260px, 72vw);
        height: min(260px, 72vw);
    }

}
