/* Mobile Menu Styles with !important to override any conflicting styles */

/* Hide mobile nav by default on ALL screens */
#mobile-nav {
  display: none !important;
}

/* Hamburger Button Styles */
.navbar-header .mobile-toggle {
  display: none !important; /* Hidden by default on desktop */
  position: absolute !important;
  right: 15px !important;
  top: 15px !important;
  z-index: 1000 !important;
  cursor: pointer !important;
  width: 30px !important;
  height: 30px !important;
  background: transparent !important;
  border: none !important;
}

/* Show hamburger on mobile */
@media (max-width: 767px) {
  .navbar-header .mobile-toggle {
    display: block !important;
  }
  
  /* Hide the default hamburger if it exists */
  .navbar-toggle {
    display: none !important;
  }
}

/* Hamburger Icon Bars */
.navbar-header .mobile-toggle span {
  display: block !important;
  width: 30px !important;
  height: 3px !important;
  margin-bottom: 6px !important;
  background-color: #333 !important;
  transition: transform 0.3s ease !important;
}

.navbar-header .mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px) !important;
}

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

.navbar-header .mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -8px) !important;
}

/* Mobile Menu Container */
@media (max-width: 767px) {
  #mobile-nav {
    display: block !important; /* Show on mobile only */
    /* Change from fixed to absolute to make it scroll with content */
    position: absolute !important; 
    top: 60px !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.5s ease !important;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1) !important;
    z-index: 999 !important;
    width: 100% !important;
  }
  
  /* When menu is open, adjust body padding to prevent content jump */
  body.nav-open {
    padding-top: 215px !important; /* Approximate height of the navbar + mobile menu */
  }
  
  #mobile-nav.open {
    max-height: 500px !important;
  }
  
  #mobile-nav ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  #mobile-nav ul li {
    border-bottom: 1px solid #eee !important;
  }
  
  #mobile-nav ul li:last-child {
    border-bottom: none !important;
  }
  
  #mobile-nav ul li a {
    display: block !important;
    padding: 15px 20px !important;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 16px !important;
  }
  
  /* Hide the original navbar on mobile */
  #huxblog_navbar {
    display: none !important;
  }
}