/* Basic reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f9fb;
  color: #102a43;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, #0057b8, #0077d9);
  box-shadow: 0 4px 18px rgba(0, 50, 120, 0.18);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Navbar layout */
.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  color: #ffffff;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* Main menu */
.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Menu items */
.nav-item {
  position: relative;
}

/* Main category buttons */
.nav-link {
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus {
  background: #38d46a;
  color: #05386b;
  outline: none;
}

/* Dropdown submenu */
.submenu {
  list-style: none;
  position: absolute;
  top: 115%;
  left: 0;
  min-width: 180px;
  background: #ffffff;
  border-radius: 16px;
  padding: 0.5rem;
  box-shadow: 0 14px 35px rgba(0, 45, 100, 0.2);
  display: none;
  animation: dropdownFade 0.18s ease;
}

.submenu li a {
  display: block;
  text-decoration: none;
  color: #05386b;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.submenu li a:hover,
.submenu li a:focus {
  background: #dffbea;
  color: #007a3d;
}

/* Desktop hover functionality */
.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
  display: block;
}

/* Hamburger button */
.menu-toggle {
  display: none;
  border: none;
  background: #38d46a;
  color: #05386b;
  font-size: 1.7rem;
  padding: 0.45rem 0.8rem;
  border-radius: 12px;
  cursor: pointer;
}

/* Simple page content */
.page-content {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.page-content h1 {
  margin-bottom: 1rem;
}

/* Animation */
@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile layout */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
  }

  .nav-menu {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 1rem;
    background: #004c9e;
    border-radius: 18px;
    padding: 0.6rem;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    text-align: left;
    border-radius: 12px;
    padding: 0.9rem 1rem;
  }

  .nav-link::after {
    content: " +";
    float: right;
    font-weight: 700;
  }

  .nav-item.open .nav-link::after {
    content: " −";
  }

  /* On mobile, submenu is no longer absolute */
  .submenu {
    position: static;
    display: none;
    min-width: 100%;
    box-shadow: none;
    background: #eaf8ff;
    border-radius: 14px;
    margin: 0.25rem 0 0.6rem;
    animation: none;
  }

  .nav-item.open .submenu {
    display: block;
  }

  /* Disable desktop hover behavior on mobile */
  .has-submenu:hover .submenu {
    display: none;
  }

  .has-submenu.open:hover .submenu {
    display: block;
  }

  .submenu li a {
    color: #05386b;
  }
}