/* ============================================================
   Footer 全局样式
   配色：与母版统一，使用 --primary-color / --accent-color
   ============================================================ */

.footer {
    background: #0d1a2b;
    color: rgba(255, 255, 255, 0.82);
    padding: 56px 0 0;
    border-top: 3px solid var(--accent-color);
    position: relative;
    overflow: hidden;
}

/* ===== 背景光晕装饰 ===== */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    right: -10%;
    width: 50%;
    height: 140%;
    background: radial-gradient(ellipse, rgba(var(--accent-rgb), 0.04) 0%, transparent 70%);
    pointer-events: none;
}

/* ============================================================
   页脚主体网格
   ============================================================ */
.footer-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr 0.9fr 1.1fr;
    gap: 36px;
    padding-bottom: 46px;
    position: relative;
    z-index: 1;
}

/* ============================================================
   品牌区
   ============================================================ */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-brand .logo {
    width: 180px;
    max-height: 42px;
    object-fit: contain;
}

.footer-brand .brand-desc {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.65);
    max-width: 340px;
}

/* ===== 法律链接（横排） ===== */
.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    margin: -4px 0 4px;
}
.footer-legal-links a {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-legal-links a:hover {
    color: var(--accent-color);
}
.footer-legal-links .sep {
    color: rgba(255, 255, 255, 0.2);
}

/* ===== 社交图标 ===== */
.footer-brand .social-wrap {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.footer-brand .social-wrap a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.28s ease;
    font-size: 15px;
}

.footer-brand .social-wrap a:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.25);
}

/* ============================================================
   通用栏目样式
   ============================================================ */
.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-col .col-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
    letter-spacing: 0.3px;
    position: relative;
    padding-bottom: 12px;
}

.footer-col .col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2.2px;
    background: var(--accent-color);
    border-radius: 2px;
    transition: width 0.3s ease;
}

@media (min-width: 768px) {
    .footer-col:hover .col-title::after {
        width: 48px;
    }
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.footer-col ul li a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.70);
    transition: color 0.24s ease;
    word-break: break-all;
    text-decoration: none;
}

.footer-col ul li a:hover {
    color: var(--accent-color);
}

/* ============================================================
   联系栏目（图标对齐）
   ============================================================ */
.footer-col.contact-col ul li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.footer-col.contact-col ul li > i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: var(--accent-color);
    margin-top: 3px;
}

.footer-col.contact-col ul li a,
.footer-col.contact-col ul li span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.68);
}

.footer-col.contact-col ul li a {
    text-decoration: none;
}

.footer-col.contact-col ul li a:hover {
    color: var(--accent-color);
}

/* ============================================================
   版权栏
   ============================================================ */
.footer-copyright-wrap {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-copyright {
    padding: 10px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.32);
    font-size: 12px;
    letter-spacing: 0.2px;
    line-height: 1.6;
}

.footer-copyright a {
    color: rgba(255, 255, 255, 0.50);
    text-decoration: none;
}

.footer-copyright a:hover {
    color: var(--accent-color);
}

/* ============================================================
   响应式适配
   ============================================================ */
@media (max-width: 1024px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 40px 30px;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 36px 0 0;
    }
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-bottom: 32px;
    }
    .footer-col .col-title {
        margin-bottom: 14px;
    }
    .footer-brand .brand-desc {
        max-width: 100%;
    }
    .footer-legal-links {
        font-size: 11px;
        gap: 4px 4px;
    }
    .footer-copyright {
        font-size: 11px;
        padding: 8px 0;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 24px 0 0;
    }
    .footer-inner {
        gap: 24px;
        padding-bottom: 24px;
    }
    .footer-brand .logo {
        width: 140px;
    }
    .footer-brand .brand-desc {
        font-size: 12px;
    }
    .footer-col .col-title {
        font-size: 14px;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
    .footer-col ul li a {
        font-size: 13px;
    }
    .footer-col.contact-col ul li a,
    .footer-col.contact-col ul li span {
        font-size: 13px;
    }
    .footer-legal-links {
        font-size: 10px;
    }
    .footer-copyright {
        font-size: 10px;
    }
    .footer-brand .social-wrap a {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
}

/* ============================================================
   返回顶部按钮
   ============================================================ */
.fixed-sidebar-tool {
    position: fixed;
    right: 24px;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    top: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 99;
}

.fixed-sidebar-tool .btn-backtop {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 24px;
    background-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.35);
    transition: all 0.26s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    touch-action: manipulation;
    opacity: 0;
    visibility: hidden;
}

.fixed-sidebar-tool .btn-backtop.show {
    opacity: 1;
    visibility: visible;
}

.fixed-sidebar-tool .btn-backtop:hover {
    transform: translateY(-4px);
    background-color: var(--accent-color);
    box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.35);
}

.fixed-sidebar-tool .btn-backtop:active {
    transform: translateY(-1px);
}

/* ===== Tooltip 气泡 ===== */
.fixed-sidebar-tool .btn-backtop .tooltip {
    position: absolute;
    right: 64px;
    top: 50%;
    transform: translateY(-50%);
    background: #1a1a2e;
    color: #fff;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease;
}

.fixed-sidebar-tool .btn-backtop .tooltip::after {
    content: "";
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    border: 7px solid transparent;
    border-left-color: #1a1a2e;
}

.fixed-sidebar-tool .btn-backtop:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .fixed-sidebar-tool {
        right: 12px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        gap: 12px;
    }
    .fixed-sidebar-tool .btn-backtop {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    .fixed-sidebar-tool .btn-backtop .tooltip {
        display: none !important;
    }
}