/* Navigation styles */
.nav-menu {
  text-align: center;
  padding: 12px 20px;
  background-color: white;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0);
}

.nav-menu.floating {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.nav-menu a {
  color: #004080;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-menu a:hover {
  background-color: #f0f4f8;
}

.nav-menu a.active {
  background-color: #004080;
  color: white;
}

/* Hamburger button */
.hamburger {
  display: none;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
}

.hamburger-box {
  width: 24px;
  height: 24px;
  display: inline-block;
  position: relative;
}

.hamburger-inner {
  display: block;
  top: 50%;
  margin-top: -2px;
}

.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
  width: 24px;
  height: 2px;
  background-color: #004080;
  position: absolute;
  transition: transform 0.15s ease;
}

.hamburger-inner::before, .hamburger-inner::after {
  content: "";
  display: block;
}

.hamburger-inner::before {
  top: -8px;
}

.hamburger-inner::after {
  bottom: -8px;
}

/* Hamburger animation */
.hamburger.is-active .hamburger-inner {
  transform: rotate(45deg);
}

.hamburger.is-active .hamburger-inner::before {
  top: 0;
  opacity: 0;
}

.hamburger.is-active .hamburger-inner::after {
  bottom: 0;
  transform: rotate(-90deg);
}

/* Mobile styles */
@media (max-width: 768px) {
  .nav-menu {
    padding: 8px 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  .hamburger {
    display: block;
    z-index: 1001;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background-color: white;
    flex-direction: column;
    justify-content: flex-start;
    padding: 60px 20px 20px;
    transition: right 0.3s ease;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  }

  .nav-links.is-active {
    right: 0;
  }

  .nav-menu a {
    width: 100%;
    padding: 12px;
    text-align: left;
  }
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #004080;
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.3s, background-color 0.2s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 1000;
}

.back-to-top i {
  color: #ffffff;
  font-size: 1.2em;
}

.back-to-top.visible {
  opacity: 1;
  cursor: pointer;
}

.back-to-top:hover {
  background-color: #00509f;
}
