/* ============================================
   HUICHENG PRECISION - 现代化页眉页脚设计
   Modern Header & Footer Design
   ============================================ */

/* ===== 现代页眉 ===== */

.site-header-modern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 27, 45, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.site-header-modern.scrolled {
    background: rgba(10, 27, 45, 0.95);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 48px;
    height: 80px;
}

/* Logo 现代化 */
.brand-modern {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.brand-modern:hover {
    transform: scale(1.02);
}

.logo-modern svg {
    filter: drop-shadow(0 4px 12px rgba(18, 98, 230, 0.4));
}

.brand-text-modern {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff;
    line-height: 1;
}

.brand-tagline {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
}

/* 导航现代化 */
.nav-modern {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-modern > a,
.nav-dropdown > a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
}

.nav-modern > a:hover,
.nav-dropdown:hover > a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.nav-modern > a.active {
    color: #ffffff;
    background: rgba(18, 98, 230, 0.2);
}

.nav-modern > a.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #1262e6;
    border-radius: 2px;
}

/* 下拉菜单 - Mega Menu */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-icon {
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-mega {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    width: 820px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow: hidden;
}

.nav-dropdown:hover .dropdown-mega {
    opacity: 1;
    visibility: visible;
    top: calc(100% + 8px);
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.mega-section {
    padding: 24px 20px;
    border-right: 1px solid #e8eef5;
}

.mega-section:last-child {
    border-right: none;
}

.mega-section h4 {
    font-size: 12px;
    font-weight: 700;
    color: #1262e6;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin: 0 0 16px 0;
}

.mega-section a {
    display: block;
    color: #2d3748;
    text-decoration: none;
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.mega-section a:hover {
    background: #f4f7fb;
    color: #1262e6;
    padding-left: 16px;
}

/* CTA 按钮 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-quote-modern {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #1262e6 0%, #0a4fb8 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(18, 98, 230, 0.3);
    transition: all 0.3s ease;
}

.btn-quote-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(18, 98, 230, 0.4);
}

.btn-quote-modern svg {
    width: 16px;
    height: 16px;
}

/* 移动端按钮 */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* 移动端导航 */
.mobile-nav-modern {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: rgba(10, 27, 45, 0.98);
    backdrop-filter: blur(20px);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    padding: 24px 32px;
}

.mobile-nav-modern.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-nav-modern > a {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-nav-modern > a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.mobile-dropdown summary {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-dropdown summary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.mobile-dropdown-content {
    padding-left: 20px;
    margin-top: 8px;
}

.mobile-dropdown-content a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    margin-left: 12px;
    transition: all 0.2s ease;
}

.mobile-dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border-left-color: #1262e6;
}

/* ===== 现代页脚 ===== */

.footer-modern {
    position: relative;
    background: #0a1b2d;
    color: rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.footer-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(180deg, rgba(18, 98, 230, 0.15) 0%, transparent 100%);
    pointer-events: none;
}

.footer-content {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 32px 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 60px;
}

/* 品牌区域 */
.footer-brand-modern {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-logo h3 {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 4px 0;
    letter-spacing: 0.5px;
}

.footer-logo p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.footer-desc {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* 社交媒体现代化 */
.footer-social-modern {
    display: flex;
    gap: 12px;
}

.footer-social-modern a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.footer-social-modern a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.footer-social-modern a:hover::before {
    opacity: 0;
}

.social-linkedin {
    background: rgba(10, 102, 194, 0.2);
    border: 1px solid rgba(10, 102, 194, 0.3);
}

.social-linkedin:hover {
    background: #0a66c2;
    border-color: #0a66c2;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(10, 102, 194, 0.4);
}

.social-whatsapp {
    background: rgba(37, 211, 102, 0.2);
    border: 1px solid rgba(37, 211, 102, 0.3);
}

.social-whatsapp:hover {
    background: #25d366;
    border-color: #25d366;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.social-email {
    background: rgba(18, 98, 230, 0.2);
    border: 1px solid rgba(18, 98, 230, 0.3);
}

.social-email:hover {
    background: #1262e6;
    border-color: #1262e6;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(18, 98, 230, 0.4);
}

.footer-social-modern svg {
    width: 22px;
    height: 22px;
    color: #ffffff;
    position: relative;
    z-index: 1;
}

/* 认证标识 */
.footer-cert-modern {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.footer-cert-modern svg {
    color: #ffd700;
    flex-shrink: 0;
}

.footer-cert-modern div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-cert-modern strong {
    font-size: 14px;
    color: #ffffff;
    font-weight: 700;
}

.footer-cert-modern span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* 链接列 */
.footer-links-modern h4 {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.footer-links-modern a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 0;
    transition: all 0.2s ease;
    position: relative;
    padding-left: 0;
}

.footer-links-modern a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: #1262e6;
    transition: width 0.3s ease;
}

.footer-links-modern a:hover {
    color: #ffffff;
    padding-left: 16px;
}

.footer-links-modern a:hover::before {
    width: 10px;
}

/* 联系卡片 */
.footer-contact-modern h4 {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.contact-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(18, 98, 230, 0.3);
    transform: translateX(4px);
}

.contact-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(18, 98, 230, 0.15);
    border-radius: 8px;
}

.contact-icon svg {
    width: 20px;
    height: 20px;
    color: #1262e6;
}

.contact-card > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.contact-card a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.contact-card a:hover {
    color: #1262e6;
}

.contact-name {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.contact-card address {
    font-style: normal;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

/* 页脚底部 */
.footer-bottom-modern {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom-modern p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* 返回顶部 - 现代风格 */
.back-to-top-modern {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #1262e6 0%, #0a4fb8 100%);
    border: none;
    border-radius: 16px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(18, 98, 230, 0.3);
}

.back-to-top-modern.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(18, 98, 230, 0.4);
}

.back-to-top-modern svg {
    width: 24px;
    height: 24px;
}

/* ===== 响应式 ===== */

@media (max-width: 1200px) {
    .header-container {
        gap: 32px;
    }
    
    .dropdown-mega {
        width: 700px;
    }
    
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
        gap: 40px;
    }
}

@media (max-width: 1024px) {
    .nav-modern,
    .header-actions {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .header-container {
        grid-template-columns: auto 1fr auto;
        height: 70px;
        padding: 0 24px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .brand-name {
        font-size: 18px;
    }
    
    .brand-tagline {
        font-size: 9px;
    }
    
    .logo-modern svg {
        width: 40px;
        height: 40px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .footer-content {
        padding: 60px 24px 32px;
    }
    
    .footer-bottom-modern {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
    
    .back-to-top-modern {
        width: 50px;
        height: 50px;
        bottom: 24px;
        right: 24px;
        border-radius: 14px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 16px;
    }
    
    .mobile-nav-modern {
        padding: 20px 16px;
    }
    
    .back-to-top-modern {
        width: 48px;
        height: 48px;
        bottom: 20px;
        right: 20px;
    }
    
    .back-to-top-modern svg {
        width: 20px;
        height: 20px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer-brand-modern,
.footer-links-modern,
.footer-contact-modern {
    animation: fadeInUp 0.6s ease-out;
}

.footer-links-modern {
    animation-delay: 0.1s;
}

.footer-contact-modern {
    animation-delay: 0.2s;
}
