<footer class="main-footer">
    <div class="footer-container">
        <!-- 主要内容区域 -->
        <div class="footer-main">
            <!-- Logo 和公司信息 -->
            <div class="footer-brand">
                <div class="footer-logo">
                    <h3 class="font-display text-[#111318] dark:text-white text-3xl md:text-2xl leading-tight tracking-tight mb-4 bg-clip-text text-transparent bg-gradient-to-r from-gray-900 to-gray-600 dark:from-white dark:to-gray-400"> Follow NENGHUI</h3>
                   
                    <!-- <img src="https://nenghui.com/wp-content/uploads/2025/11/logo-2.png" alt="<?php bloginfo('name'); ?>" style="    height: 32px;" class="logo-img"> -->
                </div>
           <div class="footer-social flex items-center gap-4">
                <!-- LinkedIn -->
                <a href="https://www.linkedin.com/company/nenghuitech" class="social-btn group linkedin" aria-label="LinkedIn">
                    <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
                        <path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>
                    </svg>
                </a>

                <!-- Facebook -->
                <a href="https://www.facebook.com/nenghuitech" class="social-btn group facebook" aria-label="Facebook">
                    <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
                        <path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/>
                    </svg>
                </a>

                <!-- X (Twitter) -->
                <a href="https://x.com/NenghuiTech" class="social-btn group twitter" aria-label="Twitter">
                    <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
                        <path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/>
                    </svg>
                </a>

                <!-- YouTube -->
                <a href="https://www.youtube.com/@NenghuiTech" class="social-btn group youtube" aria-label="YouTube">
                    <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
                        <path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/>
                    </svg>
                </a>
            </div>



            </div>
            
            <!-- 导航菜单区域 -->
            <div class="footer-nav">
                <div class="footer-nav-column">
                    <h3 class="footer-nav-title">ABOUT US</h3>
                    <ul class="footer-nav-list">
                        <li><a href="/about-us">Company Profile</a></li>
                        <li><a href="/story">Brand Story</a></li>
                        <li><a href="/contact-us">Contact Nenghui</a></li>
                  
                        
                        <li><a href="/news">News</a></li>
                    </ul>
                </div>
                
                <div class="footer-nav-column">
                    <h3 class="footer-nav-title">PRODUCTS & SOLUTIONS</h3>
                    <ul class="footer-nav-list">
                        <li><a href="/pros/">Energy Storage Systems</a></li>
                        <li><a href="/epc-emc">EPC&EMC/PPA Solution</a></li>
                        <li><a href="/microgrid">Microgrids</a></li>
                    </ul>
                </div>
                <div class="footer-nav-column">
                    <h3 class="footer-nav-title">CAREER</h3>
                    <ul class="footer-nav-list">
                        <li><a href="/join-us/">Join Us</a></li>
                    </ul>
                </div>
                  <div class="footer-nav-column">
                    <h3 class="footer-nav-title">SERVICE & SUPPORT</h3>
                    <ul class="footer-nav-list">
                        <li><a href="/download-center/">Download Center</a></li>
                        <li><a href="/support/">Service</a></li>
                        <li><a href="/faq/">FAQ</a></li>
                    </ul>
                </div>
            </div>
            <!-- 订阅区域 -->
            <!-- <div class="footer-subscribe">
                <?php echo do_shortcode('[fluentform id="3"]'); ?>
            </div> -->
        </div>
        
        <!-- 分隔线 -->
        <div class="footer-divider"></div>
        
        <!-- 底部版权信息 -->
        <div class="footer-bottom">
            <div class="footer-copyright">
                <p>&copy; <?php echo date('Y'); ?> Shanghai Nenghui Technology Co.,Ltd. All rights reserved.</p>
            </div>
            <div class="footer-links">
                <?php 
                $cookie_options = get_option('nenghui_cookie_options');
                $privacy_page_id = isset($cookie_options['privacy_policy_page']) ? $cookie_options['privacy_policy_page'] : '';
                $cookie_page_id = isset($cookie_options['cookie_policy_page']) ? $cookie_options['cookie_policy_page'] : '';
                
                if ($privacy_page_id) : ?>
                    <a href="<?php echo get_permalink($privacy_page_id); ?>">Privacy Policy</a>
                <?php endif; ?>
                
                <?php if ($cookie_page_id) : ?>
                    <a href="<?php echo get_permalink($cookie_page_id); ?>">Cookie Policy</a>
                <?php endif; ?>
            </div>
        </div>
    </div>
    
    <?php wp_footer(); ?>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/11.0.5/swiper-bundle.min.js"></script>
    <script>
       AOS.init({
        duration: 800,   // 动画持续时间
        once: true,      // 动画只触发一次，防止回滚时重复触发
        offset: 100,     // 触发偏移量
        easing: 'ease-out-cubic', // 缓动函数
    });
    </script>
</footer>
<!-- 
    核心修复 1: 外层容器添加 pointer-events-none 
    这确保了容器本身不会阻挡鼠标，鼠标可以穿透空白区域点击到底层页面 
-->
<div class="fixed bottom-8 right-8 z-[90] flex flex-col-reverse items-end gap-4 group/widget pointer-events-none">

    <!-- 1. Toggle Button -->
    <!-- 
        核心修复 2: 按钮添加 pointer-events-auto 
        因为外层禁用了交互，这里必须显式开启，否则按钮也点不动了 
    -->
    <button id="support-btn" onclick="toggleSupportMenu()" class="pointer-events-auto relative size-16 bg-primary text-[#0d1b17] rounded-full shadow-[0_10px_30px_rgba(19,236,164,0.3)] flex items-center justify-center transition-all duration-500 hover:scale-110 hover:shadow-[0_0_40px_rgba(19,236,164,0.5)] z-50 border border-white/20 cursor-pointer">
        <div class="absolute inset-0 rounded-full border border-white/40 opacity-0 scale-50 transition-all duration-1000 ease-out group-hover/widget:scale-150 group-hover/widget:opacity-100 animate-[ping_2s_infinite]"></div>
        <div class="relative w-full h-full flex items-center justify-center">
            <span id="icon-chat" translate="no" class="material-symbols-outlined notranslate text-3xl transition-all duration-300 rotate-0 opacity-100 absolute">&#xf0e2;</span>
            <span id="icon-close" translate="no" class="material-symbols-outlined notranslate text-3xl transition-all duration-300 absolute text-white opacity-0 -rotate-90 scale-50">&#xe5cd;</span>
        </div>
    </button>

    <!-- 2. Menu Items -->
    <!-- 
        核心修复 3: 菜单容器默认 pointer-events-none
        这样在隐藏状态下，它完全不可点击，不会遮挡。
        JS 打开时会动态改为 pointer-events-auto
    -->
    <div id="support-menu" class="flex flex-col gap-3 items-end pointer-events-none">

        <!-- Live Chat -->
        <!-- <a href="#" class="menu-item-card flex items-center gap-3 bg-white/90 backdrop-blur-xl pl-6 pr-2 py-2 rounded-full shadow-[0_10px_40px_rgba(0,0,0,0.1)] border border-white hover:bg-primary hover:border-primary hover:text-[#0d1b17] group/item transition-all duration-300 origin-bottom-right opacity-0 translate-y-4 translate-x-4 scale-90">
            <span class="text-xs font-bold text-[#0d1b17] uppercase tracking-wider group-hover/item:text-[#0d1b17]">Live Chat</span>
            <div class="size-10 rounded-full bg-[#13eca4]/20 text-[#00a884] group-hover/item:bg-white group-hover/item:text-[#0d1b17] flex items-center justify-center transition-colors">
                <span class="material-symbols-outlined text-xl">&#xe0b7;</span>
            </div>
        </a> -->

        <!-- WhatsApp -->
        <a href="javascript:void(0);" class="menu-item-card flex items-center gap-3 bg-white/90 backdrop-blur-xl pl-6 pr-2 py-2 rounded-full shadow-[0_10px_40px_rgba(0,0,0,0.1)] border border-white hover:bg-[#07C160] hover:border-[#07C160] hover:text-white group/item transition-all duration-300 origin-bottom-right opacity-0 translate-y-4 translate-x-4 scale-90">
            <div class="flex flex-col items-end leading-tight">
                <span class="text-[10px] font-bold text-[#0d1b17]/50 uppercase tracking-widest group-hover/item:text-white/70">WHATSAPP</span>
                <span class="text-sm font-bold text-[#0d1b17] group-hover/item:text-white">13718570501</span>
            </div>
             <div class="size-10 rounded-full bg-[#07C160]/10 text-[#07C160] group-hover/item:bg-white/20 group-hover/item:text-white flex items-center justify-center transition-colors">
                <svg viewBox="0 0 24 24" fill="currentColor" class="w-5 h-5">
                    <path d="M18.8 13.9c-.3-.1-.5-.2-.7-.3.7-1.1 1.2-2.3 1.2-3.6 0-3.6-3.4-6.5-7.6-6.5S4 6.4 4 10c0 2.2 1.3 4.2 3.4 5.4-.1.6-.4 1.4-1 2.2 1.5.1 2.8-.5 3.6-1.1.6.2 1.2.3 1.8.3.1 3.2 3 5.8 6.6 5.8 1.5 0 2.9-.5 4.1-1.3.7.5 1.8 1 3.1.9-.5-.7-.8-1.5-.9-2 .9-1 1.4-2.1 1.4-3.4 0-1.2-.6-2.4-1.9-3.4-.6.3-1.2.5-1.8.5z"></path>
                </svg>
            </div>
        </a>

        <!-- Email -->
        <a href="mailto:info@nenghui.com" class="menu-item-card flex items-center gap-3 bg-white/90 backdrop-blur-xl pl-6 pr-2 py-2 rounded-full shadow-[0_10px_40px_rgba(0,0,0,0.1)] border border-white hover:bg-blue-500 hover:border-blue-500 hover:text-white group/item transition-all duration-300 origin-bottom-right opacity-0 translate-y-4 translate-x-4 scale-90">
            <div class="flex flex-col items-end leading-tight">
                <span class="text-[10px] font-bold text-[#0d1b17]/50 uppercase tracking-widest group-hover/item:text-white/70">Email Us</span>
                <span class="text-sm font-bold text-[#0d1b17] group-hover/item:text-white">contact@nenghui.com</span>
            </div>
            <div class="size-10 rounded-full bg-blue-100 text-blue-600 group-hover/item:bg-white/20 group-hover/item:text-white flex items-center justify-center transition-colors">
                <span class="material-symbols-outlined text-xl">&#xe158;</span>
            </div>
        </a>

        <!-- Phone -->
        <a href="tel:+867561234567" class="menu-item-card flex items-center gap-3 bg-white/90 backdrop-blur-xl pl-6 pr-2 py-2 rounded-full shadow-[0_10px_40px_rgba(0,0,0,0.1)] border border-white hover:bg-[#0d1b17] hover:border-[#0d1b17] hover:text-white group/item transition-all duration-300 origin-bottom-right opacity-0 translate-y-4 translate-x-4 scale-90">
            <div class="flex flex-col items-end leading-tight">
                <span class="text-[10px] font-bold text-[#0d1b17]/50 uppercase tracking-widest group-hover/item:text-white/70">Call Now</span>
                <span class="text-sm font-bold text-[#0d1b17] group-hover/item:text-white">+86 02150896255</span>
            </div>
            <div class="size-10 rounded-full bg-gray-100 text-gray-600 group-hover/item:bg-white/20 group-hover/item:text-white flex items-center justify-center transition-colors">
                <span class="material-symbols-outlined text-xl">&#xe0b0;</span>
            </div>
        </a>

    </div>
</div>

<script>
    let isMenuOpen = false;

    function toggleSupportMenu() {
        isMenuOpen = !isMenuOpen;
        const menu = document.getElementById('support-menu');
        const items = document.querySelectorAll('.menu-item-card');
        const iconChat = document.getElementById('icon-chat');
        const iconClose = document.getElementById('icon-close');
        const btn = document.getElementById('support-btn');

        if (isMenuOpen) {
            // 打开时：启用菜单点击
            menu.classList.remove('pointer-events-none');
            menu.classList.add('pointer-events-auto');

            // 按钮动画
            iconChat.classList.add('opacity-0', 'rotate-90', 'scale-50');
            iconClose.classList.remove('opacity-0', '-rotate-90', 'scale-50');
            iconClose.classList.add('rotate-0', 'scale-100');
            btn.classList.add('bg-[#0d1b17]', 'rotate-90');
            btn.classList.remove('bg-primary');

            // 菜单项动画
            items.forEach((item, index) => {
                setTimeout(() => {
                    item.classList.remove('opacity-0', 'translate-y-4', 'translate-x-4', 'scale-90');
                }, index * 60);
            });

        } else {
            // 关闭时：禁用菜单点击（核心！）
            menu.classList.remove('pointer-events-auto');
            menu.classList.add('pointer-events-none');

            // 按钮动画复原
            iconChat.classList.remove('opacity-0', 'rotate-90', 'scale-50');
            iconClose.classList.add('opacity-0', '-rotate-90', 'scale-50');
            iconClose.classList.remove('rotate-0', 'scale-100');
            btn.classList.remove('bg-[#0d1b17]', 'rotate-90');
            btn.classList.add('bg-primary');

            // 菜单项隐藏
            items.forEach((item, index) => {
                item.classList.add('opacity-0', 'translate-y-4', 'translate-x-4', 'scale-90');
            });
        }
    }
</script>

<script>
    document.addEventListener('DOMContentLoaded', function() {
    // 设定目标网址
    var targetUrl = "https://cn.nenghui.com";
    
    // 设定中文语言的代码 (通常是 zh_CN 或 zh，请根据你的设置调整)
    // 你可以在 TranslatePress 设置 -> Advanced 标签页中查看 Language Code
    var langCode = "zh"; 

    // 查找所有 TranslatePress 语言切换器中的中文链接
    // 这涵盖了浮动栏、菜单和短代码形式的切换器
    var cnLinks = document.querySelectorAll('a[href*="/' + langCode + '/"], a[data-trp-untranslated-slug="' + langCode + '"]');
    console.log(cnLinks);
    cnLinks.forEach(function(link) {
    //     // 方法 A: 直接修改 href 属性 (鼠标悬停时左下角会显示新地址)
    //     link.href = targetUrl;
        
    //     // 方法 B (可选): 如果 TranslatePress 强制通过 JS 跳转，可以使用点击事件拦截
        link.addEventListener('click', function(e) {
            e.preventDefault();
            e.stopPropagation();
            window.location.href = targetUrl;
        });
    });
});
</script>


</body>
 
</html>