* {
  margin: 0 padding: 0;
}
.navbar .logo svg path, .navbar .logo svg polygon, .navbar .logo svg rect {
  fill: #fff;
}
.navbar  a {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  position: relative;
  z-index: 9999;
}
.navbar {
  background-color: #7383F8; /* Primary blue color */
  padding: 15px 20px; /* Adjusted padding */
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
  box-shadow: 0 1px 10px rgba(0, 0, 0, .15);
  position: fixed; /* Make navbar fixed */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1100; /* Ensure navbar is above submenus */
}
.header--stuck  .navbar {
  padding: 0px 20px;
  height: 75px;
}
/* Logo Styling */
.logo {
  font-size: 1.6em; /* Slightly smaller for responsiveness */
  font-weight: bold;
  color: #ffffff;
  display: flex;
  align-items: center;
}

.logo i {
  margin-right: 8px;
  font-size: 1.1em;
}

/* Hamburger Menu Button */
.menu-toggle {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.8em;
  cursor: pointer;
}

/* Main Menu List Styling */
.main-menu {
  list-style: none;
  display: flex;
  height: 100%;
  margin-bottom: 0;
}

/* Main Menu Item Styling */
.main-menu > li {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

/* Main Menu Link Styling */
.main-menu > li > a {
  color: #ffffff;
  text-decoration: none;
  padding: 0 22px; /* Adjusted padding */
  display: flex;
  align-items: center;
  height: 100%;
  transition: background-color 0.3s ease, color 0.3s ease;
  font-size: 0.9em; /* Slightly smaller */
  white-space: nowrap; /* Prevent wrapping */
  font-family: Roboto Mono, monospace;
}

/* Arrow for items with submenus */
.main-menu > li.has-submenu > a::after {
  content: '\f078'; /* Font Awesome down arrow */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-left: 8px;
  font-size: 0.7em;
  transition: transform 0.3s ease;
}

/* Rotate arrow on active (used for both hover/click) */
.main-menu > li.has-submenu.active > a::after,
.main-menu > li.has-submenu.active-hover > a::after { /* Rotate arrow on desktop hover too */
  transform: rotate(180deg);
}

/* Submenu Styling (Common) */
.submenu {
  display: none; /* Hidden by default */
  list-style: none;
  background-color: #7383F8;
  padding: 10px 0 0; /* Adjusted padding */
  min-width: 260px; /* Adjusted width */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  z-index: 1000; /* Below navbar but above content */
}

/* Submenu Item Styling */
.submenu li {
  padding: 0 0px; /* Adjusted padding */
}

/* Submenu Link Styling */
.submenu li a {
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 10px 15px; /* Adjusted padding */
  font-size: 0.85em; /* Adjusted size */
  transition: background-color 0.3s ease;
}


.submenu li a img {
  margin-right: 12px;
}

.submenu li a .text-content {
  display: flex;
  flex-direction: column;
}

.submenu li a .title {
  font-weight: 500;
  font-family: Roboto Mono, monospace;
  margin-bottom: 2px;
}

.submenu li a .description {
  font-family: Roboto, sans-serif;
  font-weight: 300;
  white-space: normal; /* Allow description text to wrap */
  font-size: 13px;
}
.header svg path, .header svg polygon, .header svg rect {
  fill:transparent;
}
/* --- Desktop Styles (Breakpoint: 992px) --- */
@media (min-width: 992px) {
  .main-menu > li > a {
    border: 1px solid transparent;
  }
  /* Hover/Active state for Main Menu Links */
  .main-menu > li:hover > a, /* Standard hover */
  .main-menu > li.active-hover > a { /* Class added by JS for consistency */
    border: 1px solid #fff;
    border-radius: 4px;
  }

  /* Highlight style for active menu item on hover */
  .main-menu > li.active-hover {
    border-top: none;
    border-bottom: none;
  }
  .main-menu > li.active-hover > a {
    /*     padding: 0 14px; /* Adjust padding for border */ */
  }

  /* Submenu Positioning */
  .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0px;
  }

  /* Show submenu on hover using CSS */
  .main-menu > li.has-submenu:hover > .submenu {
    display: block; /* This rule controls desktop visibility */
  }

  /* Submenu Link Hover */
  .submenu li:hover a {
    background-color: #4849d0;
  }
}

/* --- Tablet & Mobile Styles --- */
@media (max-width: 991.98px) {
  .navbar {
    padding: 0 15px; /* Reduce padding */
  }

  .logo {
    font-size: 1.4em; /* Smaller logo */
  }
  .logo i {
    font-size: 1em;
  }

  .menu-toggle {
    display: block; /* Show hamburger */
  }

  .main-menu {
    /* display: none; Will be controlled by JS/active class */
    position: absolute;
    top: 70px; /* Position below navbar */
    left: 0;
    width: 100%;
    background-color: #4a4eee;
    height: auto; /* Auto height */
    flex-direction: column; /* Stack items vertically */
    padding-bottom: 10px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    border-top: 1px solid #5a5eff; /* Separator from navbar */
    padding-left: 0;
  }

  /* Initially hide mobile menu via CSS */
  .main-menu:not(.active) {
    display: none;
  }
  /* Display when active class is added by JS */
  .main-menu.active {
    display: flex;
  }


  .main-menu > li {
    flex-direction: column;
    height: auto; /* Auto height for list items */
    width: 100%;
    border-bottom: 1px solid #5a5eff; /* Separator */
  }
  .main-menu > li:last-child {
    border-bottom: none;
  }

  .main-menu > li > a {
    height: 50px; /* Fixed height for main links */
    width: 100%;
    justify-content: space-between; /* Push arrow to the right */
    padding: 0 20px; /* Adjust padding */
  }

  /* Highlight active mobile menu item */
  .main-menu > li.active > a {
    background-color: #3a3dbb; /* Active background */
  }
  /* Remove desktop-only border style */
  .main-menu > li.active {
    border: none;
  }
  .main-menu > li.active > a {
    padding: 0 20px; /* Reset padding */
  }


  /* Submenu Styling for Mobile */
  .submenu {
    position: static; /* Remove absolute positioning */
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    background-color: #3f42c4; /* Slightly different bg for nesting */
    /* display: none; is default and controlled by JS slideToggle */
  }

  .submenu li {
    padding: 0 20px 0 20px; /* Indent submenu items */
    border-bottom: 1px solid #5a5eff;
  }
  .submenu li:last-child {
    border-bottom: none;
  }


  .submenu li a {
    padding: 12px 0; /* Adjust padding */
    font-size: 0.8em;
    border-bottom: none; /* Remove inner borders */
  }

  .submenu li a i {
    font-size: 1.2em;
  }

  /* Remove hover effects specific to desktop when in mobile view */
  .main-menu > li:hover > a {
    background-color: transparent;
  }
  .submenu li:hover a {
    background-color: transparent;
  }
  .main-menu > li.active-hover { /* Remove desktop border */
    border: none;
  }
  .main-menu > li.active-hover > a {
    padding: 0 20px;
  }
}
