header#site-header nav.site-nav {
  display: flex;
  gap: 1rem;
  position: relative;
  z-index: 10;
}
header#site-header nav.site-nav a,
nav.site-nav .dropdown-content form button {
  text-decoration: none;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
  transition: background-color 0.2s ease-in-out;
}

nav.site-nav .dropdown-content form button {
  all: unset;
  display: block;
  width: 100%;
  padding: 0.3rem 0.6rem;
  color: #2c3e50;
  cursor: pointer;
  font: inherit;
  font-weight: 600; /* Match the link font weight */
  text-align: left;
  user-select: none;
  box-sizing: border-box;
}

header#site-header nav.site-nav > a {
  color: #ecf0f1;
}

header#site-header nav.site-nav a:hover,
header#site-header nav.site-nav a:focus,
nav.site-nav .dropdown-content form button:hover,
nav.site-nav .dropdown-content form button:focus {
  background-color: #34495e;
}

nav.site-nav .dropdown {
  position: relative;
  display: block;
  z-index: 11;
}

nav.site-nav .dropbtn {
  display: inline-block;
  cursor: pointer;
}

nav.site-nav .dropdown-content {
  z-index: 11;
  display: none;
  position: absolute;
  background-color: white;
  min-width: 160px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);

  flex-direction: column;   
  white-space: nowrap; 
  left: 0;
  top: 100%;
}

nav.site-nav .dropdown-content a {
  display: block;
  padding: 0.3rem 0.6rem;
  text-decoration: none;
  color: #2c3e50;
  font-weight: 600; /* Match the button font weight */
}

nav.site-nav .dropdown-content a:hover,
nav.site-nav .dropdown-content form button:hover {
  color: #ecf0f1;
  background-color: #34495e; /* Match the main nav hover color */
}


header#site-header .menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5em;
  padding: 0.5em;
}

nav.site-nav .dropdown-content form {
  margin: 0;
}

/* Navigation row with consistent left alignment */
.nav-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding-left: 64px; /* Same as icon width + gap to align with site title */
}

/* Logo icon that acts as home link - spans from site title to nav */
.nav-logo {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: flex-end;
  position: absolute;
  left: 1rem;
  top: 1rem;
  bottom: 1rem;
}




nav.site-nav .dropdown-content .dropdown-content {
  top: 0;
  left: 100%; /* shift nested submenu to the right */
  margin-left: 0.2rem; /* small gap */
  min-width: 160px;  
  z-index: 12;
}
nav.site-nav .dropdown-content .dropdown:hover > .dropdown-content {
  display: block;
}

nav.site-nav > .dropdown:hover > .dropdown-content {
  display: block;
}

/* Only show direct submenu of nested dropdowns */
nav.site-nav .dropdown-content > .dropdown:hover > .dropdown-content {
  display: block;
}
