/* Shared navigation CSS for mobile navbar, sidebar, overlay, desktop menu, and submenu behavior */

/* Mobile Navbar */
.mobile-navbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #003366;
  color: white;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.mobile-navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
}

.mobile-logo img {
  height: 60px;
  width: auto;
}

.hamburger-menu {
  font-size: 24px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  pointer-events: auto !important;
  z-index: 1002;
  position: relative;
}

/* Mobile Sidebar */
.mobile-sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background-color: #003366;
  z-index: 1001;
  transition: left 0.3s ease;
  overflow-y: auto;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
}

.mobile-sidebar.open {
  left: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.close-sidebar {
  font-size: 24px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

.sidebar-menu {
  padding: 0;
  margin: 0;
  list-style: none;
}
.sidebar-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-menu a {
  display: block;
  padding: 15px;
  color: white !important;
  text-decoration: none;
  font-family: "Oswald", sans-serif;
  font-size: 16px;
}
.sidebar-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Submenu: hidden by default so nav.js can slideToggle */
.sidebar-submenu {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: rgba(0, 0, 0, 0.2);
}
.sidebar-submenu li {
  border-bottom: none;
}
.sidebar-submenu a {
  padding-left: 30px;
  font-size: 14px;
}

.sidebar-menu .has-submenu {
  position: relative;
}
.submenu-toggle {
  position: absolute;
  right: 15px;
  top: 15px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

/* Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}
.sidebar-overlay.active {
  display: block;
}

/* Desktop menu fixes */
.sub-menu {
  display: none !important;
}
.menu > li:hover > .sub-menu,
.sub-menu > li:hover > .sub-menu {
  display: block !important;
}

/* Prevent duplicate Aircraft Fleet links */
.jqueryslidemenu ul li a.for_mobile,
.jqueryslidemenu ul li a.for_desktop {
  display: none !important;
}

@media only screen and (max-width: 767px) {
  .jqueryslidemenu ul li a.for_mobile {
    display: block !important;
  }
}
@media only screen and (min-width: 768px) {
  .jqueryslidemenu ul li a.for_desktop {
    display: block !important;
  }
}

/* Immediate application without waiting for JS */
html.js-loaded .jqueryslidemenu ul li a.for_mobile,
html.js-loaded .jqueryslidemenu ul li a.for_desktop {
  transition: none !important;
}

/* Mobile visibility rules */
@media screen and (max-width: 768px) {
  .mobile-navbar {
    display: block;
  }
  #menu-wrap {
    display: none;
  }
  body {
    padding-top: 60px;
  }
  .selectnav {
    display: none !important;
  }
}
