/* 
 * 底部高度调整 - 不牺牲Logo大小
 * footer-height.css
 */

/* ========== 恢复Logo原始大小 ========== */
.footer-logo img {
    width: 322px !important;  /* 恢复原始大小 */
    height: 64px !important;   /* 恢复原始大小 */
    margin: 0 auto 15px !important; /* 居中，下方15px间距 */
}

/* ========== 调整底部高度（通过压缩其他元素） ========== */
/* 整体底部压缩 */
.footer {
    padding: 20px 0 10px !important; /* 适中的padding */
    margin-top: 25px !important;     /* 减少顶部margin */
}

/* 压缩内容区域 */
.footer-content {
    margin-bottom: 15px !important;  /* 减少间距 */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;  /* 减少列间距 */
}

/* 压缩每个区块 */
.footer-section {
    margin-bottom: 8px !important;
    padding: 8px !important;
}

/* 压缩标题 */
.footer-section h4 {
    margin-bottom: 8px !important;
    padding-bottom: 4px !important;
    font-size: 1.1rem !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

/* 压缩文本内容 */
.footer-section p, 
.footer-section li {
    margin-bottom: 5px !important;
    line-height: 1.5 !important;
    font-size: 0.85rem !important;
}

/* 压缩底部版权信息 */
.footer-bottom {
    padding-top: 10px !important;
    margin-top: 10px !important;
    font-size: 0.8rem !important;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.footer-bottom p {
    margin-bottom: 4px !important;
}

/* ========== 图标样式优化 ========== */
.footer-section li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 6px;
}

.footer-section li i {
    position: absolute;
    left: 0;
    top: 2px;
    color: #D4AF37;
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
}

/* QQ图标特殊样式 */
.footer-section .fa-qq {
    color: #12B7F5;
    margin-right: 8px;
}

/* 友情链接样式 */
.friend-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #D4AF37;
    text-decoration: none;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 3px;
    background: rgba(212, 175, 55, 0.1);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.friend-link:hover {
    background: rgba(212, 175, 55, 0.2);
    color: #FFD700;
}

/* ========== 响应式调整 ========== */
@media (max-width: 768px) {
    .footer {
        padding: 15px 0 8px !important;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .footer-logo img {
        width: 280px !important;  /* 稍微缩小以适应小屏幕 */
        height: 56px !important;
        margin-bottom: 12px !important;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 12px 0 6px !important;
    }
    
    .footer-logo img {
        width: 240px !important;
        height: 48px !important;
        margin-bottom: 10px !important;
    }
    
    .footer-section h4 {
        font-size: 1rem !important;
    }
    
    .footer-section p, 
    .footer-section li {
        font-size: 0.8rem !important;
    }
}

/* ========== 确保图标正确显示 ========== */
/* 如果Font Awesome加载失败，使用备用方案 */
.footer-section li i.fa-code:before { content: "\\f121"; }
.footer-section li i.fa-paint-brush:before { content: "\\f1fc"; }
.footer-section li i.fa-image:before { content: "\\f03e"; }
.footer-section li i.fa-tools:before { content: "\\f7d9"; }

/* 备用：如果图标不显示，显示文本符号 */
.no-fa-icons .footer-section li:before {
    content: "•";
    color: #D4AF37;
    position: absolute;
    left: 0;
}

.no-fa-icons .footer-section li i {
    display: none;
}
/* ========== 服务内容 - 类似导航栏的图标+文字样式 ========== */
/* 重置列表样式 */
.footer-section ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 10px;
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
    color: #e0d6c2;
}

/* 类似导航栏的链接样式 */
.footer-section li a {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background: rgba(93, 64, 55, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    color: #e0d6c2;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.footer-section li a:hover {
    background: linear-gradient(45deg, #8B0000, #D4AF37);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
    border-color: #D4AF37;
}

.footer-section li a.active {
    background: linear-gradient(45deg, #D4AF37, #8B0000);
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
}

/* 图标样式 - 类似导航栏 */
.footer-section li a i {
    margin-right: 10px;
    font-size: 1rem;
    color: #D4AF37;
    width: 20px;
    text-align: center;
}

.footer-section li a:hover i {
    color: #FFD700;
}

.footer-section li a.active i {
    color: #FFD700;
    animation: iconPulse 2s infinite;
}

/* 图标动画 */
@keyframes iconPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .footer-section li {
        padding: 6px 10px;
        margin-bottom: 10px;
        font-size: 0.9rem;
    }
    
    .service-icon {
        width: 28px;
        height: 28px;
        margin-right: 10px;
    }
    
    .icon-lua-service:before,
    .icon-lua-service:after {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .footer-section li {
        padding: 5px 8px;
        margin-bottom: 8px;
        font-size: 0.85rem;
    }
    
    .service-icon {
        width: 24px;
        height: 24px;
        margin-right: 8px;
    }
}

/* 确保列表项有正确的定位 */
.footer-section li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 6px;
    list-style: none;
}

/* 移除默认的Font Awesome图标显示 */
.footer-section li i.fas {
    display: none;
}

/* 显示我们的自定义图标 */
.footer-section li i[class^="icon-"] {
    display: inline;
}

/* ========== Logo与下方内容间距缩小50% ========== */
/* 保持Logo大小不变，只减少下方间距 */
.footer-logo {
    margin-bottom: 10px !important; /* 原20px，减少50% */
}

.footer-logo img {
    width: 322px !important;
    height: 64px !important;
    margin: 0 auto !important;
    display: block;
}

/* 调整整体布局，确保间距合理 */
.footer-content {
    margin-top: 5px !important; /* 减少上方间距 */
}

/* 进一步压缩整体底部 */
.footer {
    padding: 15px 0 8px !important; /* 进一步压缩 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .footer-logo {
        margin-bottom: 8px !important;
    }
    
    .footer-logo img {
        width: 280px !important;
        height: 56px !important;
    }
}

@media (max-width: 480px) {
    .footer-logo {
        margin-bottom: 6px !important;
    }
    
    .footer-logo img {
        width: 240px !important;
        height: 48px !important;
    }
}

/* 确保图标正确显示的最后保障 */
.footer-section li:before {
    content: "•";
    color: #D4AF37;
    position: absolute;
    left: 0;
    display: none; /* 默认隐藏 */
}

/* 如果所有图标方案都失败，显示圆点 */
.icons-failed .footer-section li:before {
    display: inline-block;
}

.icons-failed .footer-section li i {
    display: none;
}

/* ========== 底部栏固定到底部 ========== */
/* 确保页面结构正确 */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* 背景图片在style.css中设置，这里不覆盖 */
}

.main-content {
    flex: 1 0 auto; /* 主要内容区域自动扩展 */
    padding-bottom: 20px; /* 底部留白 */
}

.footer {
    flex-shrink: 0; /* 底部不收缩 */
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    border-top: 3px solid #D4AF37;
    position: relative;
    z-index: 100;
}

/* 确保容器正确 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 如果内容很少，确保底部仍然在底部 */
body.short-content {
    min-height: 100vh;
}

body.short-content .main-content {
    min-height: calc(100vh - 400px); /* 根据底部高度调整 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    body {
        min-height: 100vh;
    }
    
    .main-content {
        padding-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding-bottom: 10px;
    }
}

/* 确保没有其他元素影响布局 */
* {
    box-sizing: border-box;
}

/* 修复可能的内容溢出 */
.main-content > .container {
    overflow: visible;
}

/* 底部栏内部布局优化 */
.footer .container {
    position: relative;
}

/* 确保底部栏不会被其他元素覆盖 */
.footer {
    position: relative;
    margin-top: auto; /* 关键：自动顶部边距，推到最底部 */
}

/* 服务文字样式 */
.service-text {
    flex: 1;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 图标动画效果 */
@keyframes iconPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.service-icon {
    animation: iconPulse 3s ease-in-out infinite;
}

/* 每个图标不同的动画延迟 */
.icon-lua-service { animation-delay: 0s; }
.icon-ui-service { animation-delay: 0.5s; }
.icon-material-service { animation-delay: 1s; }
.icon-custom-service { animation-delay: 1.5s; }

/* 悬停时暂停动画 */
.footer-section li:hover .service-icon {
    animation-play-state: paused;
}

/* 与顶部导航栏图标风格统一 */
.footer-section li {
    position: relative;
    overflow: hidden;
}

.footer-section li:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.5s ease;
}

.footer-section li:hover:before {
    left: 100%;
}

/* 确保图标在暗色背景下清晰可见 */
.service-icon {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* 图标内部细节 */
.icon-lua-service:before,
.icon-lua-service:after {
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.icon-ui-service:before,
.icon-material-service:before,
.icon-custom-service:before {
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

/* 移动端优化 */
@media (max-width: 480px) {
    .service-icon {
        box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    }
    
    .footer-section li {
        margin-bottom: 6px;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .footer-section li a {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .footer-section li a i {
        font-size: 0.9rem;
        margin-right: 8px;
    }
}

@media (max-width: 480px) {
    .footer-section li {
        margin-bottom: 8px;
    }
    
    .footer-section li a {
        padding: 5px 10px;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }
    
    .footer-section li a i {
        font-size: 0.85rem;
        margin-right: 6px;
    }
}

/* 确保背景平铺效果 */
body {
    background-attachment: scroll !important; /* 平铺模式不需要fixed */
}

/* 主要内容区域优化 */
.main-content {
    background: rgba(0, 0, 0, 0.4); /* 半透明背景提高可读性 */
    backdrop-filter: blur(2px);
    border-radius: 10px;
    margin: 20px auto;
    max-width: 1200px;
    padding: 20px;
}

/* 确保平铺背景可见 */
body::before {
    background: rgba(0, 0, 0, 0.4); /* 调整遮罩透明度 */
}
