/* General Styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: black;
  color: white;
}

/* Navigation Bar */
nav.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #333;
  padding: 10px 20px;
}

nav.top-bar .title-area {
  margin: 0;
  padding: 0;
}

nav.top-bar .title-area h1 {
  margin: 0;
  font-size: 20px;
}

nav.top-bar .title-area a {
  color: white;
  text-decoration: none;
}

nav.top-bar .top-bar-section {
  display: flex;
  justify-content: flex-end;
  flex-grow: 1;
}

nav.top-bar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

nav.top-bar ul li {
  position: relative;
  display: inline-block;
  margin: 0 10px;
}

nav.top-bar ul li a {
  color: white;
  text-decoration: none;
  padding: 10px;
}

nav.top-bar ul li a:hover {
  color: #ff4747;
}

/* Dropdown Menus */
nav.top-bar ul .has-dropdown:hover > .dropdown {
  display: block;
}

nav.top-bar ul .dropdown {
  display: none;
  position: absolute;
  background-color: #444;
  list-style: none;
  padding: 0;
  margin: 0;
  top: 100%;
  left: 0; /* Dropdown aligns to the left by default */
  z-index: 10;
  min-width: 200px;
  border: 1px solid #555;
}

nav.top-bar ul .dropdown li {
  border-bottom: 1px solid #555;
}

nav.top-bar ul .dropdown li:last-child {
  border-bottom: none;
}

nav.top-bar ul .dropdown li a {
  display: block;
  padding: 10px 15px;
}

nav.top-bar ul .dropdown li a:hover {
  background-color: #575757;
}

/* Nested Dropdowns */
nav.top-bar ul .dropdown .dropdown {
  display: none;
  position: absolute;
  top: 0;
  left: 100%; /* Nested dropdown appears to the right */
}

nav.top-bar ul .dropdown .has-dropdown:hover > .dropdown {
  display: block;
}

/* Align Services Dropdown to Avoid Overflow */
nav.top-bar ul li.has-dropdown:hover > .dropdown {
  right: 0;
  left: auto;
}
