Fullscreen Navigation Overlay Styles

/* Ensure the toggle button stands out against any background */
.nav-toggle {
    cursor: pointer;
    background: none;
    border: none;
    font-size: 24px;
    padding: 10000px;
    z-index: 1000;
    position: relative;
    transition: transform 0.3s ease;
  }
  
  /* Add a subtle animation when toggling */
  .nav-toggle:hover {
    transform: scale(1.1);
  }
  
  /* Create nice transition for the menu links */
  .fullscreen-menu-container li {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.4s forwards;
  }
  
  /* Stagger the animations for each menu item */
  .fullscreen-menu-container li:nth-child(1) { animation-delay: 0.1s; }
  .fullscreen-menu-container li:nth-child(2) { animation-delay: 0.2s; }
  .fullscreen-menu-container li:nth-child(3) { animation-delay: 0.3s; }
  .fullscreen-menu-container li:nth-child(4) { animation-delay: 0.4s; }
  .fullscreen-menu-container li:nth-child(5) { animation-delay: 0.5s; }
  
  @keyframes fadeInUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Style for links in the fullscreen menu */
  .fullscreen-menu-container a {
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
  }
  
  /* Add an underline effect on hover */
  .fullscreen-menu-container a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s ease, left 0.3s ease;
  }
  
  .fullscreen-menu-container a:hover::after {
    width: 100%;
    left: 0;
  }
  
  /* Make sure the overlay covers everything */
  .nav-overlay {
    z-index: 998 !important;
  }
  
  /* On small screens, make sure the toggle is visible and positioned well */
  @media (max-width: 767px) {
    .nav-toggle {
      position: absolute;
      top: 30px;
      right: 20px;
    }
    
    /* Ensure the toggle is white when the menu is open */
    body:has(.nav-overlay[style*="visibility: visible"]) .nav-toggle {
      color: white;
    }
  }
  
  /* Add a subtle fade effect to the page body when menu is open */
  body:has(.nav-overlay[style*="visibility: visible"]) .brain-site > *:not(.site-header):not(.nav-overlay) {
    filter: blur(5px);
    transition: filter 0.3s ease;
  }

  /* Force highest possible z-index */
button.nav-toggle {
    z-index: 2147483647 !important; /* Maximum z-index with !important flag */
    position: absolute !important; /* Ensure positioning is absolute */
  }
  
  /* Override any possible stacking context issues */
  body > button.nav-toggle {
    z-index: 2147483647 !important;
  }
  
  /* Create a new stacking context for the button */
  html, body {
    position: relative;
  }
  
  /* Add pointer-events to ensure clickability */
  button.nav-toggle {
    pointer-events: auto !important;
  }
  
  /* Override any other selectors that might affect z-index */
  * {
    z-index: auto;
  }
  
  /* Fix for any fixed elements that might overlap */
  *:not(button.nav-toggle)[style*="position: fixed"],
  *:not(button.nav-toggle)[style*="position:fixed"] {
    z-index: 2147483646 !important; /* One less than our toggle */
  }