/* General header styling */
body,
html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0; /* Remove default margin */
}

.header {
  width: 100%;
  background-color: #ffffffb7; /* You can change this to fit your site's theme */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center; /* Ensures vertical centering of child elements */
  justify-content: space-between; /* Distribute space between logo and navigation */
  padding: 0 20px; /* Add some padding to the sides */
}

.logo {
  height: 50px; /* Adjust based on your logo */
  width: auto;
  display: block; /* Ensure the logo is a block level element for proper spacing */
  margin: 10px
}

/* Navigation Container */
.navContainer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-grow: 1; /* Takes up remaining space to push nav to the right */
  position: relative; /* Ensure proper positioning of the hamburger icon */
}

/* Styling for navigation menu */
nav {
  position: relative;
  display: flex;
  align-items: center;
}

.navigation {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 10px; /* Space between menu items */
  align-items: center; /* Aligns navigation items vertically */
}

.navigation li {
  padding: 15px 15px; /* Adjusted padding for better vertical alignment */
}

.navigation a {
  text-decoration: none;
  color: #365E32;
  font-weight: bold;
}

/* Hidden sub-menu */
.hidden {
  display: none;
  position: absolute;
  background-color: #fff;
  max-height: fit-content;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  padding: 2px;
  list-style: none;
}

.navigation li:hover .hidden {
  display: block; /* Show sub-menu on hover */
}

/* Checkbox and menu label for mobile */
input[type="checkbox"] {
  display: none; /* Hide the checkbox */
}

.show-menu {
  display: none;
  font-size: 30px;
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 20px;
}

/* Mobile optimization */
@media (max-width: 768px) {
  .navContainer {
    flex-direction: column;
    align-items: center; /* Center contents horizontally */
    width: 100%;
  }

  .show-menu {
    display: block;
    position: relative; /* Change to relative for proper alignment */
    margin-left: auto; /* Push to the right */
  }

  #menu {
    flex-direction: column;
    align-items: center; /* Center menu items */
    width: 100%;
    display: none; /* Hidden by default */
  }

  input[type="checkbox"]:checked ~ nav #menu {
    display: flex; /* Show menu when checkbox is checked */
  }

  .navigation {
    flex-direction: column;
    align-items: center; /* Center menu items */
    width: 100%;
  }

  .navigation li {
    width: 100%;
  }

  .navigation a {
    width: 100%;
    display: block;
    padding: 10px 20px;
    text-align: center; /* Center text */
  }
}

@media (max-width: 320px) {
  .navContainer {
    flex-direction: column;
    align-items: center; /* Center contents horizontally */
    width: 100%;
  }

  .show-menu {
    display: block;
    position: relative; /* Change to relative for proper alignment */
    margin-left: auto; /* Push to the right */
  }

  #menu {
    flex-direction: column;
    align-items: center; /* Center menu items */
    width: 100%;
    display: none; /* Hidden by default */
  }

  input[type="checkbox"]:checked ~ nav #menu {
    display: flex; /* Show menu when checkbox is checked */
  }

  .navigation {
    flex-direction: column;
    align-items: center; /* Center menu items */
    width: 100%;
  }

  .navigation li {
    width: 100%;
  }

  .navigation a {
    width: 100%;
    display: block;
    padding: 10px 10px;
    text-align: center; /* Center text */
  }
}
