/* ===== Base Navbar ===== */
.navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #e6edf0;
  padding: 20px;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  box-sizing: border-box;
}

/* Logo */
.nav-logo img {
  height: 40px;
}

/* Hamburger (hidden on desktop) */
.hamburger {
  display: none;
  font-size: 28px;
  cursor: pointer;
}

/* Nav links - desktop */
.nav-links {
  display: flex;
  gap: 15px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  text-decoration: none;
  color: #333;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 5px;
  transition: all 0.3s;
}

.nav-links li a:hover {
  background-color: #3498db;
  color: white;
}

/* Active link styling */
.nav-links a.active {
    color: #3498db; /* primary color */
    font-weight: bold;
    background-color: rgba(52, 152, 219, 0.1); /* subtle highlight */
    border-radius: 5px;
    padding: 8px 12px; /* keep consistent with other links */
}

@media (prefers-color-scheme: dark) {
    .nav-links a.active {
        color: #5ab2ff;
        background-color: rgba(90, 178, 255, 0.1);
    }
}



/* Dropdown - desktop */
.nav-links li.dropdown {
  position: relative;
}

.nav-links li.dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 25px;
  left: 0;
  background-color: #e6edf0;
  list-style: none;
  padding: 10px 0;
  min-width: 180px;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 999;
}

.nav-links li.dropdown .dropdown-menu li a {
  display: block;
  padding: 8px 15px;
}

.nav-links li.dropdown:hover .dropdown-menu {
  display: block;
}

/* ===== Mobile Right Slide Menu ===== */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -250px;
    height: 100%;
    width: 250px;
    background-color: #e6edf0;
    flex-direction: column;
    padding-top: 60px;
    gap: 20px;
    transition: right 0.3s ease;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li a {
    padding: 15px 20px;
    font-size: 18px;
  }

  /* Mobile dropdown inside menu */
  .nav-links li.dropdown .dropdown-menu {
    position: static;
    display: none;
    padding-left: 15px;
    box-shadow: none;
    background-color: inherit;
    flex-direction: column;
  }

  .nav-links li.dropdown.active .dropdown-menu {
    display: flex;
  }

  .nav-links li.dropdown a {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

/* ===== Auto Dark Mode ===== */
@media (prefers-color-scheme: dark) {
  .navigation {
    background-color: #1e1e1e;
  }

  .nav-links {
    background-color: #1e1e1e;
  }

  .nav-links li a {
    color: #eee;
  }

  .nav-links li a:hover {
    background-color: #0077cc;
    color: #fff;
  }

  .nav-links li.dropdown .dropdown-menu {
    background-color: #1e1e1e;
  }

  .nav-links li.dropdown .dropdown-menu li a:hover {
    background-color: #0077cc;
    color: #fff;
  }
}

/* ============================
   Footer Styling (Auto-Themed)
   ============================ */
footer.footer {
  background: #e6edf0; /* light mode */
  color: #555;
  padding: 0 20px 0 20px;
  font-family: Arial, sans-serif;
  transition: background 0.3s, color 0.3s;
}

footer.footer .footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
  gap: 40px;
}

footer.footer .footer-col {
  flex: 1 1 260px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px; /* spacing between heading and content */
  align-items: center;
}

footer.footer h2 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #333;
}

footer.footer p,
footer.footer li {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
  margin: 0;
}

footer.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer.footer ul li {
  margin-bottom: 8px;
}

footer.footer ul li a {
  color: #555;
  text-decoration: none;
  transition: color 0.3s;
}

footer.footer ul li a:hover {
  color: #3498db;
}

footer.footer .footer-logo {
  font-size: 22px;
  font-weight: bold;
  color: #3498db;
}

footer.footer .footer-copy {
  text-align: center;
  margin-top: 30px;
  font-size: 13px;
  color: #777;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  footer.footer {
    background: #1e1e1e;
    color: #ccc;
  }

  footer.footer h2 {
    color: #fff;
  }

  footer.footer p,
  footer.footer li {
    color: #ccc;
  }

  footer.footer ul li a {
    color: #ccc;
  }

  footer.footer ul li a:hover {
    color: #5ab2ff;
  }

  footer.footer .footer-logo {
    color: #5ab2ff;
  }

  footer.footer .footer-copy {
    color: #aaa;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  footer.footer .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  footer.footer .footer-col {
    align-items: center; /* centers heading and content */
  }
}
