/* menu.css */
/* === Reset and Base Styles === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #1a2526; /* Dark midnight blue theme */
}

/* Prevent horizontal scrolling when mobile menu is open */
body.menu-open {
  overflow-x: hidden;
}

/* === Container === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === Main Header === */
.main-header {
  background-color: #1a2526; /* Dark midnight blue */
  padding: 15px 0;
  border-bottom: 1px solid #2a3b3c;
  position: sticky;
  top: 0;
  z-index: 1000; /* Ensure header stays above content */
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-header .logo img {
  height: 40px;
}

.main-header .logo a {
  text-decoration: none; /* Remove underline from logo link */
  display: inline-block; /* Wrap tightly around image */
}

/* === Navigation Menu === */
.nav-menu {
  position: relative;
  line-height: .75;
}

.nav-menu .menu {
  list-style: none;
  display: flex;
  gap: 20px; /* Space between menu items */
}

.nav-menu .menu li {
  position: relative;
}

.nav-menu .menu li a {
  text-decoration: none;
  color: #ffffff; /* White text for contrast */
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-menu .menu li a:hover {
  color: #b0c4de; /* Light blue hover effect */
}

.nav-menu .menu li a.active {
  color: #b0c4de;
  border-bottom: 2px solid #b0c4de; /* Highlight active link */
}

/* === Dropdown Menu === */
.dropdown .dropbtn {
  color: #ffffff;
  font-weight: bold;
  cursor: pointer;
}

.dropdown .dropbtn:hover {
  color: #b0c4de;
}

.dropdown .dropbtn.active {
  color: #b0c4de; /* Highlight active dropdown button */
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #1a2526;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content a {
  color: #ffffff;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #2a3b3c;
  color: #b0c4de;
}

.dropdown:hover .dropdown-content {
  display: block; /* Show dropdown on hover for desktop */
}

/* === Hamburger Menu === */
.hamburger {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  cursor: pointer;
}

.hamburger span {
  background-color: #b0c4de;
  height: 4px;
  width: 100%;
  transition: all 0.3s ease;
}

/* === Main Footer === */
.main-footer {
    background-color: #333;
    color: #fff;
    padding: 20px;
    text-align: center;
}
.main-footer .container {
    max-width: 1200px;
    margin: 0 auto;
}
.main-footer ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}
.main-footer ul li {
    display: inline;
    margin: 0 15px;
}
.main-footer ul li a {
    color: #fff;
    text-decoration: none;
}
.main-footer ul li a:hover {
    text-decoration: underline;
}

/* === Responsive Design (Mobile) === */
@media (max-width: 768px) {
  /* Header and Navigation */
  .main-header .container {
    flex-direction: row; /* Keep logo and hamburger side by side */
    justify-content: space-between;
    align-items: center;
  }

  .hamburger {
    display: flex; /* Show hamburger menu on mobile */
  }

  .nav-menu {
    overflow: visible; /* Prevent clipping */
    position: relative; /* Ensure context */
  }

  .nav-menu .menu {
    display: none; /* Hide horizontal menu by default */
    flex-direction: column;
    position: fixed; /* Use fixed to ignore container padding */
    top: 70px; /* Adjust for header height */
    left: 0;
    right: 0;
    width: 100vw; /* Full viewport width */
    max-width: 100%; /* Prevent overflow */
    background-color: #1a2526; /* Dark midnight blue */
    padding: 20px;
    box-shadow: none;
    z-index: 998; /* Below header but above content */
    overflow: visible; /* Ensure dropdowns aren’t clipped */
    height: auto; /* Prevent height constraints */
  }

  .nav-menu .menu.active {
    display: flex; /* Show menu when toggled */
  }

  .nav-menu .menu li {
    margin: 15px 0; /* Vertical spacing */
    overflow: visible; /* Prevent clipping */
    height: auto; /* Ensure space for dropdowns */
  }

  .nav-menu .menu li a {
    font-size: 1.2em;
    white-space: normal;
    overflow-wrap: break-word;
    display: block;
    padding: 5px 0; /* Better touch targets */
    color: #ffffff; /* Ensure visibility */
  }

  /* Dropdown Menu on Mobile */
  .dropdown {
    overflow: visible; /* Prevent clipping */
    height: auto; /* Ensure space for content */
  }

  .dropdown:hover .dropdown-content {
    display: none; /* Disable hover effect on mobile */
  }

  .dropdown .dropbtn::after {
    content: ' ▼'; /* Dropdown indicator */
    font-size: 0.8em;
  }

  .dropdown .dropbtn.active::after {
    content: ' ▲'; /* Up arrow for open dropdown */
  }

  .nav-menu .menu li.dropdown .dropdown-content {
    position: static; /* Stack naturally */
    display: none; /* Hidden by default */
    background-color: #2a3b3c; /* Contrast background */
    padding: 10px 20px 10px 40px; /* Indent submenu */
    box-shadow: none;
    z-index: 999; /* Above other menu items */
    min-height: 30px; /* Ensure visibility */
    overflow: visible; /* Prevent clipping */
    width: 100%; /* Full width */
  }

  .nav-menu .menu li.dropdown .dropdown-content.active {
    display: block; /* Show when active */
    visibility: visible;
    opacity: 1;
  }

  .nav-menu .menu li.dropdown .dropdown-content a {
    font-size: 1.1em; /* Slightly smaller */
    padding: 8px 0; /* Touch targets */
    color: #ffffff; /* White text */
    display: block; /* Full-width */
    background-color: transparent; /* No background */
    text-decoration: none;
    overflow: visible; /* Prevent clipping */
    line-height: 1.5; /* Ensure text spacing */
  }
}