<?php\n/**\n * Plugin Name: Max Mega Menu Submenu Styling\n * Description: JavaScript based styling to force sub menu color to rotary gold and font weight to bold.\n */\n\ndefine('MAX_MEGA_MENU_ASSETS_VERSION_8d123f9f', '1.0.2');\n\nfunction enqueue_max_mega_menu_custom_css_8d123f9f() {\n    wp_enqueue_style(\n        'max-mega-menu-custom-style-8d123f9f', \n        angie_cs_get_snippet_asset_url(__FILE__, 'style.css'),\n        array(),\n        MAX_MEGA_MENU_ASSETS_VERSION_8d123f9f\n    );\n}\nadd_action('wp_enqueue_scripts', 'enqueue_max_mega_menu_custom_css_8d123f9f', 9999);\n\nfunction inject_max_mega_menu_custom_js_8d123f9f() {\n    ?>\n    <script>\n        document.addEventListener('DOMContentLoaded', function() {\n            // Function to apply styles directly to elements\n            function applyGoldStyles() {\n                var menuLinks = document.querySelectorAll('.mega-menu-wrap .mega-sub-menu a, .mega-menu-wrap .mega-sub-menu a.mega-menu-link, .elementor-widget-maxmegamenu .mega-sub-menu a');\n                menuLinks.forEach(function(link) {\n                    link.style.setProperty('color', '#FFD100', 'important');\n                    link.style.setProperty('font-weight', 'bold', 'important');\n                });\n\n                var menuContainers = document.querySelectorAll('.mega-menu-wrap .mega-sub-menu, .mega-menu-wrap .mega-sub-menu li, .elementor-widget-maxmegamenu .mega-sub-menu');\n                menuContainers.forEach(function(container) {\n                    container.style.setProperty('background', 'transparent', 'important');\n                    container.style.setProperty('background-color', 'transparent', 'important');\n                });\n            }\n\n            // Apply immediately\n            applyGoldStyles();\n\n            // Apply repeatedly to catch dynamically rendered submenus (e.g. Pro Addon AJAX)\n            setInterval(applyGoldStyles, 500);\n\n            // Set up a MutationObserver to re-apply styles if the menu changes\n            var observer = new MutationObserver(function(mutations) {\n                applyGoldStyles();\n            });\n\n            // Start observing the body for changes in the DOM\n            observer.observe(document.body, { childList: true, subtree: true });\n        });\n    </script>\n    <?php\n}\nadd_action('wp_footer', 'inject_max_mega_menu_custom_js_8d123f9f', 99999);\n<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://ragapnorthamericamembership.net/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://ragapnorthamericamembership.net/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://ragapnorthamericamembership.net/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://ragapnorthamericamembership.net/wp-sitemap-taxonomies-category-1.xml</loc></sitemap></sitemapindex>
