/*
Theme Name: AeroCore Child Pro
Theme URI: https://www.lovestu.com/
Description: AeroCore 的子主题，用于放置自定义覆盖样式与功能。
Author: AeroCore
Template: AeroCorePro
Version: 1.2.2
Text Domain: aerocore-child
*/

/* ========== 强制隐藏父主题页脚元素（必须使用 !important） ========== */
footer.site-footer,
#app-footer,
.site-footer__waves,
.site-footer__wave-svg {
    display: none !important;
}

/* ========== 基础样式 ========== */
.kcb-custom-footer,
.kcb-custom-footer * {
    box-sizing: border-box;
}

.kcb-custom-footer {
    background: #22292d;
    color: #b9c0c5;
    padding: 0;
    width: 100%;
    clear: both;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

.kcb-custom-footer a {
    color: inherit;
    text-decoration: none;
}

.kcb-custom-footer__nav a:hover,
.kcb-custom-footer__legal a:hover {
    color: #999;
}

.kcb-custom-footer__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px 24px;
}

.kcb-custom-footer__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-height: 72px;
}

.kcb-custom-footer__nav {
    display: flex;
    align-items: center;
    gap: 64px;
}

.kcb-custom-footer__nav a {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.kcb-custom-footer__social {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: visible; /* 确保二维码可见 */
}

.kcb-custom-footer__social-item {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: #f5f5f5;
    color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.kcb-custom-footer__social-item svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.kcb-custom-footer__qr {
    display: none;
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    width: 112px;
    padding: 6px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    transform: translateX(-50%);
    z-index: 9999;
}

.kcb-custom-footer__qr img {
    display: block;
    width: 100%;
    height: auto;
}

.kcb-custom-footer__social-item--wechat:hover .kcb-custom-footer__qr {
    display: block;
}

.kcb-custom-footer__divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.18);
}

.kcb-custom-footer__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    padding-top: 24px;
}

.kcb-custom-footer__legal {
    flex: 1 1 auto;
    min-width: 0;
    color: #999;
    font-size: 13px;
    line-height: 1.9;
}

.kcb-custom-footer__line {
    margin-bottom: 6px;
    font-size: 12px;
    line-height: 30px;
}

.kcb-custom-footer__sep {
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.35);
}

.kcb-custom-footer__company-line span {
    margin-right: 10px;
}

.kcb-custom-footer__brand {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 150px;
}

.kcb-custom-footer__brand img {
    display: block;
    max-width: 150px;
    max-height: 58px;
    width: auto;
    height: auto;
}

.kcb-custom-footer__brand-text {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
}

/* ========== 移动端适配 ========== */
@media (max-width: 767px) {
    .kcb-custom-footer__inner {
        padding: 22px 16px 26px;
    }

    .kcb-custom-footer__top,
    .kcb-custom-footer__divider,
    .kcb-custom-footer__brand {
        display: none;
    }

    .kcb-custom-footer__content {
        display: block;
        padding-top: 0;
    }

    .kcb-custom-footer__legal {
        font-size: 14px;
        line-height: 1.75;
    }

    .kcb-custom-footer__line {
        margin-bottom: 10px;
    }

    .kcb-custom-footer__sep {
        display: none;
    }

    .kcb-custom-footer__company-line span {
        display: block;
        margin-right: 0;
        margin-bottom: 4px;
    }
}

/* ========== 微信二维码悬停效果（部分 !important 用于覆盖父主题动画干扰） ========== */
.kcb-custom-footer,
.kcb-custom-footer__inner,
.kcb-custom-footer__top,
.kcb-custom-footer__social {
    overflow: visible;
}

/* 确保二维码定位不受父主题影响 */
.kcb-custom-footer .kcb-custom-footer__qr {
    position: absolute !important;
    bottom: calc(100% + 12px) !important;
    width: 112px !important;
    padding: 6px !important;
    background: #ffffff !important;
    border-radius: 4px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28) !important;
    transform: translateX(-50%) translateY(6px) !important;
    z-index: 99999 !important;
    display: block !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease !important;
}

.kcb-custom-footer .kcb-custom-footer__qr::after {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    bottom: -6px !important;
    width: 12px !important;
    height: 12px !important;
    background: #ffffff !important;
    transform: translateX(-50%) rotate(45deg) !important;
}

.kcb-custom-footer .kcb-custom-footer__qr img {
    position: relative !important;
    z-index: 2 !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
}

.kcb-custom-footer__social-item--wechat:hover .kcb-custom-footer__qr,
.kcb-custom-footer__social-item--wechat:focus .kcb-custom-footer__qr,
.kcb-custom-footer__social-item--wechat:focus-within .kcb-custom-footer__qr {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* ========== 社交图标颜色（已无需 !important，子主题后加载即可覆盖） ========== */
.kcb-custom-footer__social-item,
.kcb-custom-footer__social-item:link,
.kcb-custom-footer__social-item:visited,
.kcb-custom-footer__social-item:hover,
.kcb-custom-footer__social-item:focus,
.kcb-custom-footer__social-item:active {
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
}

.kcb-custom-footer__social-item svg,
.kcb-custom-footer__social-item:hover svg,
.kcb-custom-footer__social-item:focus svg,
.kcb-custom-footer__social-item:active svg {
    color: #333;
    fill: #333;
}

/* 确保图标内部元素颜色一致 */
.kcb-custom-footer__social-item svg *,
.kcb-custom-footer__social-item:hover svg *,
.kcb-custom-footer__social-item:focus svg *,
.kcb-custom-footer__social-item:active svg * {
    fill: #333;
    stroke: none;
}

/* hover 轻微上浮效果 */
.kcb-custom-footer__social-item:hover {
    background: #fff;
    transform: translateY(-1px);
}

/* ========== 手机版深色模式自适应 ========== */
@media (max-width: 767px) {
    .kcb-custom-footer {
        background: #fff;
    }
}

@media (prefers-color-scheme: dark) and (max-width: 767px) {
    .kcb-custom-footer {
        background: #1a1a1a !important;
    }
    .kcb-custom-footer__legal,
    .kcb-custom-footer__line,
    .kcb-custom-footer__legal a {
        color: #b0b0b0 !important;
    }
    .kcb-custom-footer__sep {
        color: rgba(255, 255, 255, 0.25) !important;
    }
}

@media (max-width: 767px) {
    body.dark .kcb-custom-footer,
    body.dark-mode .kcb-custom-footer,
    html[data-theme="dark"] .kcb-custom-footer {
        background: #1a1a1a !important;
    }
    body.dark .kcb-custom-footer__legal,
    body.dark .kcb-custom-footer__line,
    body.dark .kcb-custom-footer__legal a {
        color: #b0b0b0 !important;
    }
}
/* 粘性页脚 纵向flex优化方案，不干扰fixed固定导航 */
html {
    height: 100%;
}
body {
    min-height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* 主体内容容器：flex:1撑满剩余高度 + min-height:0兼容内部滚动/超长表格大图 */
body > .archive-page,
body > .site-main,
body > #primary,
body > #content,
body > .main-content,
body > .page-content {
    flex: 1;
    min-height: 0;
}

/* 自定义页脚固定自身高度，不压缩、不拉伸 */
.kcb-custom-footer {
    flex-shrink: 0;
}