/* Custom Mobile Menu Implementation - Replacing MeanMenu */

/* Enhanced Mobile Menu Styles - Right Side Slide */
.custom-mobile-menu {
  position: relative;
}

.mobile-menu-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #004d00 0%, #006400 100%); /* Changed to dark green gradient */
  border-radius: 25px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 12px;
  z-index: 1000001; /* Increased z-index to ensure visibility */
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: #2bcf02;
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100vh;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  z-index: 999999;
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow-y: auto;
  border-radius: 20px 0 0 20px;
  box-shadow: -5px 0 30px rgba(0,0,0,0.4);
}

.mobile-nav-panel.active {
  right: 0;
}

.mobile-menu-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.mobile-logo {
  max-width: 120px;
  height: auto;
}

.mobile-menu-close {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.mobile-menu-close:hover {
  background: rgba(255,255,255,0.2);
  transform: rotate(90deg);
}

.mobile-nav-panel ul {
  padding: 20px;
  margin: 0;
  list-style: none;
}

.mobile-nav-panel ul li {
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav-panel ul li:last-child {
  border-bottom: none;
}

.mobile-nav-panel ul li a {
  display: block;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 18px;
  padding: 18px 15px !important;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.mobile-nav-panel ul li a:hover {
  background-color: rgba(255,255,255,0.15);
  transform: translateX(8px);
  padding-left: 20px !important;
}

.mobile-nav-panel .has-submenu {
  position: relative;
}

.mobile-nav-panel .submenu-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 35px;
  height: 35px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: #ffffff;
  text-align: center;
  line-height: 35px;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.mobile-nav-panel .submenu-toggle:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-50%) scale(1.1);
}

.mobile-nav-panel .sub-menu {
  display: none;
  padding-left: 25px;
  margin-top: 5px;
  border-left: 2px solid rgba(255,255,255,0.2);
}

.mobile-nav-panel .sub-menu li {
  border-bottom: none;
  margin-bottom: 5px;
}

.mobile-nav-panel .sub-menu li a {
  font-size: 16px;
  padding: 15px 15px !important;
  font-weight: 500;
  opacity: 0.9;
}

.mobile-nav-panel .sub-menu li a:hover {
  opacity: 1;
  transform: translateX(5px);
}

/* Overlay for mobile menu */
.mean-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 999998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mean-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Body class for when mobile menu is open */
body.mobile-menu-open {
  overflow: hidden;
}

/* Hide main menu on mobile */
@media only screen and (max-width: 992px) {
  nav.main-menu {
    display: none;
  }
  
  .custom-mobile-menu {
    display: block;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
}

/* Show main menu on desktop */
@media only screen and (min-width: 993px) {
  .custom-mobile-menu {
    display: none;
  }
  
  nav.main-menu {
    display: block;
  }
  
  .mobile-menu-toggle {
    display: none;
  }
}
