/* ========================= */
/*   Navbar Styles           */
/* ========================= */

/* Reset (optional, keep if no global reset elsewhere) */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Header wrapper */
header {
  border-bottom: 1px solid #ddd;
  position: relative;
}

/* Navbar container */
nav {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 60px; /* fixed navbar height */
}

/* Links */
nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

nav ul li {
  margin-right: 25px;
}

nav ul li a {
  text-decoration: none;
  font-weight: bold;
  color: #0072c6;
  transition: color 0.3s ease;
}

nav ul li a.active {
  color: red;
}

nav ul li a:hover {
  color: #005999;
}

/* Hamburger Menu (Mobile) */
.menu-toggle {
  display: none; /* only show on mobile */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%); /* vertically center */
  width: 35px;
  height: 30px;
  z-index: 1001; /* stays above menu */
}

.menu-toggle span {
  height: 3px;
  width: 25px;
  background: #333;
  margin: 4px 0;
  border-radius: 2px;
  transition: 0.4s ease; /* smoother animation */
}

/* When active -> turns into X */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0; /* hide middle line */
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile menu */
@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border-top: 1px solid #ddd;
    position: absolute;
    top: 60px; /* exactly below navbar line */
    left: 0;
    z-index: 1000;
  }

  nav ul.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  nav ul li {
    margin: 12px 0;
    text-align: center;
  }
}
