/******* Do not edit this file *******
Simple Custom CSS and JS - by Silkypress.com
Saved: Sep 15 2025 | 00:39:26 */
add_action('wp_footer','remover_topo_quebrado', 1000);
function remover_topo_quebrado(){
?>
<script>
(function(){
  var anchors = Array.from(document.querySelectorAll('a'));
  var menuAnchor = anchors.find(a => /^\s*home\s*$/i.test(a.textContent.trim()));
  if(!menuAnchor) menuAnchor = anchors.find(a => /home/i.test(a.textContent.trim()));
  var menuRoot = null;
  if(menuAnchor){
    menuRoot = menuAnchor.closest('nav, [role="navigation"], header, .main-navigation, .navbar, .site-navigation') || menuAnchor.parentElement;
  } else {
    menuRoot = document.querySelector('nav, [role="navigation"], .main-navigation, .navbar, .site-navigation, header');
  }

  if(menuRoot){
    var el = menuRoot;
    while(el.parentElement && el.parentElement !== document.body){
      el = el.parentElement;
    }
    var sibling = document.body.firstElementChild;
    while(sibling && sibling !== el){
      var next = sibling.nextElementSibling;
      sibling.remove();
      sibling = next;
    }
  } else {
    var children = Array.from(document.body.children);
    for(var i=0;i<children.length;i++){
      var c = children[i];
      var rect = c.getBoundingClientRect();
      if(rect.height > 10){
        c.remove();
        break;
      }
    }
  }
})();
</script>
<?php
}

