/* Optimized Navbar Styles */
body {
  margin: 0;
  padding: 0;
  background-color: #F8F9FA;
}

body.drawer-open {
  overflow: hidden;
}

/* Navigation Bar */
.navbar {
  background-color: #1E3A8A;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  position: relative;
  contain: layout style;
}

/* Logo and Title */
.navbar-logo {
  display: flex;
  align-items: center;
}

.navbar-logo img {
  width: 60px;
  height: auto;
  margin-right: 10px;
}

.navbar-title {
  font-size: 25px;
  font-weight: bold;
  color: white;
}

/* Navbar Links */
.navbar a {
  color: white;
  text-decoration: none;
  padding: 12px 15px;
  display: inline-block;
  transition: background-color 0.3s ease-in-out;
  font-size: 13px;
  font-weight: bold;
  will-change: background-color;
}

.navbar a:hover {
  background-color: #00ADB5;
  border-radius: 5px;
}

/* Desktop Category Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  background: none;
  border: none;
  color: white;
  padding: 12px 15px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #345a81;
  min-width: 180px;
  z-index: 1000;
  border-radius: 5px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.dropdown-content a {
  color: #EEEEEE;
  padding: 12px;
  display: block;
  transition: background-color 0.3s ease-in-out;
}

.dropdown-content a:hover {
  background-color: #00ADB5;
}

/* Mobile Navigation Drawer */
.menu-icon {
  display: none;
  font-size: 20px;
  color: white;
  cursor: pointer;
  position: relative;
  z-index: 1000;
}

.drawer {
  height: 100%;
  width: 0;
  position: fixed;
  top: 0;
  left: 0;
  background-color: #1E3A8A;
  overflow-x: hidden;
  transition: width 0.3s ease-in-out;
  padding-top: 60px;
  box-shadow: 5px 0 10px rgba(0, 0, 0, 0.2);
  z-index: 1001;
}

.drawer a {
  padding: 12px 20px;
  text-decoration: none;
  font-size: 15px;
  color: white;
  display: block;
  transition: background-color 0.3s;
  font-weight: bold;
}

.drawer a:hover {
  background-color: #00ADB5;
  border-radius: 5px;
}

/* Subcategory Dropdown for Mobile */
.sub-menu {
  display: none;
  background-color: #555555;
  padding-left: 20px;
}

.drawer .category {
  cursor: pointer;
  padding: 12px 20px;
  color: white;
}

.drawer .category:hover {
  background-color: #00ADB5;
  border-radius: 5px;
}

/* Close Button */
.drawer .close-btn {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 30px;
  color: white;
  cursor: pointer;
  z-index: 1002;
}

/* Overlay */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1002;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .menu-icon {
    display: block;
  }
  
  .navbar a:not(.navbar-logo a),
  .dropdown {
    display: none;
  }
  
  .drawer-open .overlay {
    display: block;
  }
}

/* Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
  .navbar a,
  .dropdown-content a,
  .drawer a,
  .drawer {
    transition: none;
  }
}