/* -----------------------------------------------------------
   GENERAL BODY STYLING
------------------------------------------------------------*/
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  color: #333;
  background: #f7f7f7;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

/* -----------------------------------------------------------
   HEADER STYLING
------------------------------------------------------------*/
header {
  background: #353330;
  color: white;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1200;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);

  /* NEW: Make header the positioned parent */
  position: relative;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

/* nav should not control positioning anymore */
nav {
  position: static;
}

header img.logo {
  width: 110px;
  height: auto;
}

/* -----------------------------------------------------------
   NAVIGATION MENU BASE
------------------------------------------------------------*/
nav .menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
  font-weight: 600;
}

nav .menu li {
  position: relative;
}

nav .menu li a {
  color: white;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 6px;
  transition: 0.3s;
  display: block;
}

nav .menu li a:hover {
  background: #0d8ac2;
}

/* -----------------------------------------------------------
   DESKTOP DROPDOWN
------------------------------------------------------------*/
nav .dropdown-menu {
  display: none;
  position: absolute;
  top: 42px;
  left: 0;
  background: #0d8ac2;
  min-width: 200px;
  border-radius: 8px;
  padding: 8px 0;
  z-index: 1200;
}

nav .dropdown-menu li {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

nav .dropdown-menu li a {
  color: white;
  padding: 10px 16px;
}

/* Show dropdown on hover (desktop only) */
nav .menu li.dropdown:hover > .dropdown-menu,
nav .menu li.dropdown:focus-within > .dropdown-menu {
  display: block;
}

/* -----------------------------------------------------------
   MOBILE MENU (≤768px)
------------------------------------------------------------*/
.menu-toggle {
  display: none;
  flex-direction: column;
  width: 35px;
  height: 26px;
  justify-content: space-between;
  cursor: pointer;
}

.menu-toggle span {
  height: 3px;
  width: 100%;
  background: white;
  border-radius: 3px;
}

@media (max-width: 768px) {

  /* Show hamburger icon */
  .menu-toggle {
    display: flex;
  }

  /* Mobile Menu */
  nav .menu {
  display: none;
  flex-direction: column;
  position: fixed;       /* Change absolute to fixed */
  top: 60px;            /* Same top offset */
  left: 0;              /* Align to left edge of viewport */
  width: 100vw;         /* Full viewport width */
  max-width: 100vw;     /* Prevent horizontal scroll */
  background: #ffffff;
  padding: 10px 0;
  z-index: 2000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);  /* Optional: subtle shadow */
}


  nav .menu.active {
    display: block;
  }

  nav .menu li a {
    color: #222 !important;
    padding: 14px 20px;
  }

  /* -----------------------------------------
     Mobile Dropdown (Override Bootstrap)
  ------------------------------------------*/
  nav .dropdown-menu {
    display: none !important;
    position: static !important;    /* stack below parent */
    background: #f3f3f3;
    border-radius: 0;
    padding-left: 20px;             /* indent submenu */
    padding-top: 5px;
    padding-bottom: 5px;
    box-shadow: none !important;
    inset: unset !important;
    transform: none !important;
    width: 100%;
  }

  nav .menu li.dropdown.open > .dropdown-menu {
    display: block !important;
  }

  /* Disable desktop hover rule on mobile */
  nav .menu li.dropdown:hover > .dropdown-menu {
    display: none !important;
  }
}
