/*
===============================================
CCBONLINE 优化页脚样式 v2.0
最后更新: 2025-01-27
优化重点: 性能、响应式、可访问性、SEO
===============================================
*/

/* 性能优化 - 使用contain提升渲染性能 */
.footer {
    contain: layout style;
    background: #111827;
    border-top: 1px solid #374151;
    color: white;
    position: relative;
}

/* Container 统一宽度控制 */
.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 主要内容区域网格布局 */
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 3rem;
    padding: 3rem 0;
    align-items: start;
}

/* 页脚区域通用样式 */
.footer-section {
    min-height: 1px; /* 防止空区域塌陷 */
}

/* 页脚标题统一样式 */
.footer-section h4 {
    color: #fbbf24;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 页脚列表样式 */
.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.75rem;
    transition: transform 0.2s ease;
}

.footer-section li:hover {
    transform: translateX(4px);
}

/* 页脚链接样式 */
.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    line-height: 1.4;
    padding: 0.25rem 0;
    border-radius: 4px;
}

.footer-section a:hover {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    padding-left: 0.5rem;
}

.footer-section a:focus {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* 图标样式 */
.footer-section a i {
    color: #fbbf24;
    margin-right: 0.75rem;
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* 高亮链接样式 */
.footer-highlight {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #111827 !important;
    font-weight: 600 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.2);
}

.footer-highlight:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(251, 191, 36, 0.3);
}

.footer-highlight i {
    color: #111827 !important;
}

/* 品牌区域样式 */
.footer-brand {
    padding-right: 2rem;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-logo-svg {
    width: 240px;
    height: 80px;
    display: block;
}

/* 品牌描述样式 */
.footer-description {
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-description strong {
    color: #fbbf24;
    font-weight: 600;
}

.footer-description em {
    color: #3b82f6;
    font-style: normal;
    font-weight: 500;
}

/* 认证徽章样式 */
.footer-certifications {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.certification-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #d1d5db;
    transition: all 0.3s ease;
}

.certification-badge:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.certification-badge i {
    font-size: 0.9rem;
}

/* 联系信息区域样式 */
.footer-contact {
    border-left: 2px solid #374151;
    padding-left: 2rem;
}

.footer-contact li {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.footer-contact i {
    margin-top: 0.25rem;
    width: 16px;
    flex-shrink: 0;
}

.footer-contact a {
    display: inline;
    padding: 0;
}

.footer-contact a:hover {
    background: none;
    padding: 0;
}

/* 营业时间样式 */
.business-hours {
    font-size: 0.85rem;
}

/* 页脚底部样式 */
.footer-bottom {
    border-top: 1px solid #374151;
    padding: 2rem 0;
    background: #0f172a;
}

.footer-bottom-content {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 2rem;
    align-items: center;
}

/* 版权区域样式 */
.copyright-section p {
    margin: 0;
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 法律链接样式 */
.footer-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.footer-links a:hover {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.footer-links a:focus {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* 社交媒体和快捷操作 */
.footer-social {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-to-top-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.back-to-top-footer:hover {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.back-to-top-footer:focus {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* 无障碍支持 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 平板响应式 (768px - 1024px) */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-contact {
        grid-column: 1 / -1;
        border-left: none;
        border-top: 1px solid #374151;
        padding-left: 0;
        padding-top: 2rem;
        margin-top: 1rem;
    }
    
    .footer-certifications {
        justify-content: center;
    }
}

/* 移动端响应式 (最大768px) */
@media (max-width: 768px) {
    .footer .container {
        padding: 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 2rem 0;
    }
    
    .footer-brand {
        order: 1;
        padding-right: 0;
    }
    
    .footer-logo-svg {
        width: 200px;
        height: auto;
        margin: 0 auto;
    }
    
    .footer-description {
        font-size: 0.85rem;
        text-align: left;
    }
    
    .footer-certifications {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .certification-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .footer-contact {
        order: 2;
        border-left: none;
        border-top: 1px solid #374151;
        padding-left: 0;
        padding-top: 1.5rem;
        text-align: left;
    }
    
    .footer-section {
        order: 3;
        text-align: left;
    }
    
    .footer-section h4 {
        text-align: center;
        justify-content: center;
        font-size: 1rem;
    }
    
    .footer-bottom-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-links {
        justify-content: center;
        font-size: 0.8rem;
    }
    
    .footer-social {
        justify-content: center;
    }
}

/* 小屏幕移动端 (最大480px) */
@media (max-width: 480px) {
    .footer-content {
        padding: 1.5rem 0;
    }
    
    .footer-logo-svg {
        width: 180px;
    }
    
    .footer-description {
        font-size: 0.8rem;
        line-height: 1.5;
    }
    
    .footer-section h4 {
        font-size: 0.95rem;
    }
    
    .footer-section a {
        font-size: 0.85rem;
    }
    
    .footer-links {
        gap: 0.5rem;
    }
    
    .footer-links a {
        font-size: 0.75rem;
        padding: 0.2rem 0.3rem;
    }
    
    .certification-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .footer {
        border-top: 3px solid #ffffff;
    }
    
    .footer-section a {
        border: 1px solid transparent;
    }
    
    .footer-section a:hover {
        border-color: #fbbf24;
    }
}

/* 减动效模式支持 */
@media (prefers-reduced-motion: reduce) {
    .footer-section li,
    .footer-section a,
    .back-to-top-footer,
    .certification-badge {
        transition: none;
    }
    
    .footer-section li:hover {
        transform: none;
    }
}

/* 打印样式 */
@media print {
    .footer {
        background: white !important;
        color: black !important;
        border-top: 2px solid black;
    }
    
    .footer-section a {
        color: black !important;
        text-decoration: underline;
    }
    
    .footer-social,
    .back-to-top-footer {
        display: none !important;
    }
    
    .footer-logo-svg {
        filter: grayscale(1);
    }
}

/* 深色模式额外优化 */
@media (prefers-color-scheme: dark) {
    .footer {
        background: #0a0a0a;
    }
    
    .footer-bottom {
        background: #000000;
    }
}

/* 性能优化 - 硬件加速 */
.footer-logo-svg,
.back-to-top-footer,
.certification-badge {
    transform: translateZ(0);
    will-change: transform;
}

/* 焦点管理 */
.footer a:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* 悬停效果优化 */
@media (hover: hover) {
    .footer-section li:hover {
        transform: translateX(4px);
    }
    
    .footer-highlight:hover {
        transform: translateY(-1px);
    }
    
    .back-to-top-footer:hover {
        transform: translateY(-2px);
    }
}