/* 页脚主体样式 */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding-top: 5px;
}

/* 动画定义 */
@keyframes gradient {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 中部分：内容区域 */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 固定4列 */
    gap: 40px; /* 增加间距 */
    justify-items: start; /* 关键：网格项内容左对齐 */
}

/* 统一友情链接、服务事项、联系我们的样式 */
.footer-section {
    animation: fadeInUp 0.6s ease-out;
    width: 100%; /* 确保占满网格单元格 */
}

.footer-section h3 {
    color: #4a6ee0;
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
    text-align: left;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: #4a6ee0;
    transition: width 0.3s ease;
}

.footer-section:hover h3::after {
    width: 100px;
}

/* 通用链接样式 */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, auto);
    grid-auto-flow: column;
    gap: 8px;
    justify-items: start; /* 网格链接左对齐 */
}

.footer-links li {
    margin-bottom: 5px;
    transition: transform 0.3s ease;
    width: 100%;
}

.footer-links li:hover {
    transform: translateX(5px);
}

.footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    line-height: 1.4;
    justify-content: flex-start; /* 链接内容左对齐 */
}

.footer-links a:hover {
    color: #4a6ee0;
}

.footer-links a i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

/* iconfont图标样式 */
.footer-links a .iconfont {
    font-size: 16px !important;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

.footer-links a:hover i {
    transform: rotate(360deg);
}

/* 联系信息样式 */
.contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-info li {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    transition: transform 0.3s ease;
    justify-content: flex-start; /* 联系信息左对齐 */
}

.contact-info li:hover {
    transform: translateX(5px);
}

.contact-info i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
    color: #4a6ee0;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* 联系信息iconfont图标样式 */
.contact-info .iconfont {
    font-size: 16px !important;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

.contact-info span {
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: left;
}

.work-hours {
    margin-top: 15px;
}

.work-hours p {
    color: #ecf0f1;
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    transition: color 0.3s ease;
    justify-content: flex-start; /* 工作时间左对齐 */
}

.work-hours p:hover {
    color: #4a6ee0;
}

.work-hours i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
    color: #4a6ee0;
    flex-shrink: 0;
}

/* 工作时间iconfont图标样式 */
.work-hours .iconfont {
    font-size: 16px !important;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

/* 二维码样式 */
.qrcode-container {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    margin-top: 15px;
}

.qrcode-item {
    text-align: center;
    transition: transform 0.3s ease;
}

.qrcode-item:hover {
    transform: scale(1.05);
}

.qrcode-img {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    object-fit: contain;
}

.qrcode-img:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.qrcode-label {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #ecf0f1;
}

/* 下部分：版权信息 */
.footer-bottom {
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    margin-top: 0;
}

.footer-bottom p {
    color: #95a5a6;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.footer-bottom a {
    color: #95a5a6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #4a6ee0;
}

/* 模态框样式 */
.qrcode-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.qrcode-modal-content {
    position: relative;
    margin: 10% auto;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.qrcode-modal-img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.qrcode-modal-close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #f1f1f1;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.qrcode-modal-close:hover {
    color: #4a6ee0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .footer-content {
        padding: 30px 20px 20px;
        grid-template-columns: 1fr;
        gap: 0;
        justify-items: center; /* 移动端居中 */
    }

    /* 隐藏友情链接、服务事项、联系我们 */
    .footer-section:nth-child(1),
    .footer-section:nth-child(2),
    .footer-section:nth-child(3) {
        display: none;
    }

    /* 只显示关注我们部分 */
    .footer-section:nth-child(4) {
        text-align: center;
    }

    .qrcode-container {
        justify-content: center;
        gap: 20px;
    }

    .qrcode-img {
        width: 80px;
        height: 80px;
    }

    .qrcode-label {
        font-size: 0.8rem;
        margin-top: 5px;
    }

    .footer-bottom {
        padding: 15px;
    }

    .footer-bottom p {
        font-size: 0.8rem;
        line-height: 1.4;
    }
}