/**
 * 页脚静态样式
 * public-footer.css
 * 修复移动端布局堆叠问题，保持关键元素并排显示
 */

.footer-full-width {
    width: 100%;
    display: flex;
    justify-content: center;
}

.site-footer {
    width: 100%;
    font-size: 14px;
    line-height: 1.6;
    margin-top: auto;
    box-sizing: border-box;
}

.footer-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ========== 默认布局 ========== */
.footer-default .footer-default-content {
    padding: 30px 0 20px;
}

.footer-default .footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-default .footer-social-links {
    flex: 1;
}

.footer-default .footer-social {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-default .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.footer-default .social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    text-decoration: none !important;
}

.footer-default .social-icon {
    font-size: 16px;
    font-weight: bold;
    text-decoration: none !important;
}

.footer-default .footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-default .link-item {
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.footer-default .link-item:after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

.footer-default .link-item:hover:after {
    width: 100%;
}

.footer-default .footer-bottom {
    border-top: 1px solid;
    padding-top: 20px;
}

.footer-default .footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-default .record-info,
.footer-default .copyright,
.footer-default .powered-by {
    font-size: 13px;
    opacity: 0.8;
}

/* ========== 居中布局 ========== */
.footer-centered .footer-centered-content {
    padding: 40px 0 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.footer-centered .footer-social-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-centered .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.footer-centered .social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    text-decoration: none !important;
}

.footer-centered .social-icon {
    font-size: 18px;
    font-weight: bold;
    text-decoration: none !important;
}

.footer-centered .footer-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-centered .footer-info {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.footer-centered .copyright,
.footer-centered .powered-by {
    font-size: 13px;
    opacity: 0.8;
}

/* ========== 极简布局 ========== */
.footer-minimal .footer-minimal-content {
    padding: 30px 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-minimal .footer-info-minimal {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-minimal .copyright,
.footer-minimal .powered-by {
    font-size: 12px;
    opacity: 0.7;
}

/* ========== 分栏布局 ========== */
.footer-split .footer-split-content {
    padding: 40px 0 20px;
}

.footer-split .footer-left {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 8px;
}

.footer-split .footer-social-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-split .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.footer-split .social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    text-decoration: none !important;
}

.footer-split .social-icon {
    font-size: 16px;
    font-weight: bold;
    text-decoration: none !important;
}

.footer-split .footer-right {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 8px;
}

.footer-split .footer-links-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-split .links-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-split .link-header {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 15px;
}

.footer-split .link-item {
    padding: 3px 0;
    font-size: 13px;
    transition: color 0.3s ease;
}

.footer-split .footer-bottom-split {
    border-top: 1px solid;
    padding-top: 20px;
}

.footer-split .footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-split .copyright-powered {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-split .record-info,
.footer-split .copyright,
.footer-split .powered-by {
    font-size: 13px;
    opacity: 0.8;
}

/* ========== 公共无链接样式 ========== */
.social-link.no-link,
.link-item.no-link,
.footer-link-text {
    cursor: default;
    opacity: 0.7;
}

.social-link.no-link:hover,
.link-item.no-link:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.1);
}

.footer-social-links .social-link {
    text-decoration: none !important;
}

.footer-social-links .social-link:hover {
    text-decoration: none !important;
}

.footer-social-links .social-icon,
.footer-social-links .social-text {
    text-decoration: none !important;
}

/* ========== 返回顶部按钮 ========== */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
}

/* ==================== 响应式布局修复 ==================== */
@media screen and (max-width: 1024px) {
    .footer-full-width {
        width: 100%;
        padding: 0;
    }
    
    .footer-container {
        max-width: 100%;
        padding: 0 15px;
    }
}

@media screen and (max-width: 768px) {
    .site-footer {
        width: 100%;
        overflow-x: hidden;
    }
    
    .footer-full-width {
        width: 100%;
        padding: 0;
    }
    
    .footer-container {
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    /* 默认布局：顶部区域竖向排列，但内部元素保持并排 */
    .footer-default .footer-top {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-default .footer-social-links {
        justify-content: center;
        width: 100%;
    }
    
    .footer-default .footer-social {
        justify-content: center;
    }
    
    .footer-default .footer-links {
        justify-content: center;
    }
    
    /* 修复默认布局底部信息：改为水平并排 + 自动换行 */
    .footer-default .footer-info {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    /* 居中布局：底部信息改为水平并排 */
    .footer-centered .footer-info {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-centered .footer-centered-content {
        padding: 30px 0 20px;
        gap: 20px;
    }
    
    .footer-centered .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }
    
    /* 极简布局：底部信息水平并排 */
    .footer-minimal .footer-info-minimal {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    /* 分栏布局修改：链接列改为两列并排，底部信息水平排列 */
    .footer-split .footer-links-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    /* 修复分栏布局底部信息水平并排 */
    .footer-split .footer-info {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .footer-split .copyright-powered {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .footer-split .footer-left {
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    .footer-split .footer-social-links {
        justify-content: center;
    }
    
    .footer-split .links-column {
        align-items: center;
        text-align: center;
    }
    
    /* 默认布局与分栏布局的链接项在移动端保持适中间距 */
    .back-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* 小屏幕手机：分栏布局链接列再进一步优化，防止过于拥挤 */
@media screen and (max-width: 550px) {
    .footer-split .footer-links-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-split .links-column {
        align-items: center;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .site-footer {
        font-size: 13px;
    }
    
    .footer-container {
        padding: 0 10px;
    }
    
    /* 默认布局：社交媒体图标稍微缩小，链接保持并排但可换行 */
    .footer-default .footer-social-links {
        gap: 10px;
    }
    
    .footer-default .social-link {
        width: 35px;
        height: 35px;
    }
    
    .footer-default .footer-links {
        gap: 15px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* 居中布局社交媒体图标微调 */
    .footer-centered .footer-social-links {
        gap: 8px;
    }
    
    .footer-centered .social-link {
        width: 35px;
        height: 35px;
    }
    
    /* 返回顶部按钮微调 */
    .back-to-top-btn {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    /* 保证所有页脚内容容器不溢出且内容居中 */
    .footer-default .footer-default-content,
    .footer-centered .footer-centered-content,
    .footer-minimal .footer-minimal-content,
    .footer-split .footer-split-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-default .footer-top,
    .footer-split .footer-left,
    .footer-split .footer-right {
        align-items: center;
        text-align: center;
    }
    
    /* 底部信息保持水平并排，如果空间不足则换行 */
    .footer-default .footer-info,
    .footer-centered .footer-info,
    .footer-split .footer-info,
    .footer-split .copyright-powered {
        flex-direction: row;
        justify-content: center;
    }
}

/* 全局防止水平溢出 */
body {
    overflow-x: hidden;
    width: 100%;
}