/* public/css/footer.css
 *
 * 公共页脚样式
 * 由 footer.js 注入到 index.html / subscribe.html 时使用。
 *
 * 依赖的 CSS 变量（在 index.html / subscribe.html 内定义）：
 *   --page-pad     水平内边距
 *   --text         主要文字色
 *   --muted        次要文字色
 *   --accent-deep  hover 高亮色
 *   --content-max  内容最大宽度（仅在 .site-footer 参与首页排版时使用）
 */

/* ----- 通用 Footer 容器 ----- */
.site-footer {
    width: 100%;
    display: flex;
    min-height: 250px;
    align-items: center;
    justify-content: space-evenly;
    gap: clamp(24px, 3.5vw, 64px);
    padding: 0 var(--page-pad, 24px);
    color: var(--text, #1f1f1f);
    background: #F9F8F7;
    flex-wrap: wrap;
}

.footer-brand {
    align-self: center;
}


.footer-center {
    display: grid;
    justify-items: center;
    gap: 20px;
    color: var(--text, #1f1f1f);
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.footer-links button,
.footer-links a button {
    background: transparent;
    border: 0;
    padding: 0 9px;
    transition: color 160ms ease;
    cursor: pointer;
    font-family: "HYXiYuanJ", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #676767;
}

.footer-links button:hover,
.footer-links a button:hover {
    color: var(--accent-deep, #1f1f1f);
}

.footer-links span,
.site-footer p {
    font-family: "HYXiYuanJ", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #676767;
}

.beian-link {
    font-family: "HYXiYuanJ", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #676767;
    text-decoration: underline;
    transition: color 160ms ease;
}

.beian-link:hover {
    color: var(--accent-deep, #1f1f1f);
}

.social-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.social-dot {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    transition: transform 160ms ease, filter 160ms ease;
    cursor: pointer;
}

.social-dot:hover {
    transform: translateY(-1px);
    filter: saturate(1.08) contrast(1.05);
}

.social-dot.red {
    background: #eb3f4d;
}

.social-dot.dark {
    background: #262626;
}

.social-dot.blue {
    background: #55a7d9;
}

.social-dot.orange {
    background: #f2a232;
}

.social-dot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 把图标里的图片包裹层撑满 .social-dot */
.social-dot__icon {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.footer-copyright {
    margin-top: -14px;
}

/* ============================================================
 * 社交媒体图标二维码悬浮卡片 样式（socialQr.css）
 * 用法：每个社交图标改成 .social-dot > (.social-dot__icon) + .qr-popup 结构
 * 通过 :hover / :focus-within 触发弹层显示
 * ============================================================ */

/* 给绝对定位的弹层提供参考元素 */
.social-dot {
    position: relative;
    display: inline-block;
}

/* 弹层主体 */
.qr-popup {
    position: absolute;
    left: -230px;
    top: -295px;
    width: 250px;
    padding: 8px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s;
    z-index: 999;
    pointer-events: none;
}

.qr-popup__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* 小三角（指向图标）位于弹层右下角 */
/* .qr-popup__arrow {
    position: absolute;
    right: -6px;
    bottom: 14px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: 4px -4px 8px rgba(0, 0, 0, 0.08);
} */

/* hover / focus-within 显示弹层 */
.social-dot:hover .qr-popup,
.social-dot:focus-within .qr-popup {
    visibility: visible;
    opacity: 1;
}

/* ----- 响应式：max-width 900px ----- */
@media (max-width: 900px) {
    .site-footer {
        grid-template-columns: 1fr;
        justify-items: start;
        gap: 22px;
        padding-block: 60px;
    }

    .footer-center {
        justify-items: start;
        text-align: left;
    }

    .footer-links {
        justify-content: flex-start;
    }

    .site-footer p {
        text-align: left;
    }

    .social-links {
        justify-content: flex-start;
    }
}

/* ----- 响应式：max-width 760px ----- */
@media (max-width: 760px) {
    .footer-links span {
        display: none;
    }

    .footer-links button,
    .footer-links a button {
        padding: 4px 8px;
    }
}