/* Shared navbar styles: identical across all pages */

:root { --nav-height: 60px; }

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--nav-height);
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--nav-bg, rgba(255,255,255,0.8));
  backdrop-filter: blur(15px) saturate(180%);
  border-bottom: 1px solid var(--border-color, rgba(0,0,0,0.1));
  z-index: 1000;
}

.nav-left, .nav-center, .nav-right { display: flex; align-items: center; }
.nav-left { flex: 0 0 auto; }
.nav-center { flex: 1 1 auto; justify-content: center; min-width: 0; }
.nav-right { flex: 0 0 auto; }

.logo {
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-color, #1D1D1F);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1.2rem;
  white-space: nowrap;
}

.nav-link {
  text-decoration: none;
  color: var(--text-color, #1D1D1F);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active { color: var(--accent-color, #0066CC); }

.arrow-icon { font-size: 0.7rem; transition: transform 0.3s ease; }
.nav-item.has-submenu:hover .arrow-icon { transform: rotate(180deg); }

.submenu {
  position: absolute;
  top: var(--nav-height);
  left: 0;
  background: var(--submenu-bg, var(--card-bg, #ffffff));
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  list-style: none;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.98);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding: 0.8rem 0;
  border: 1px solid var(--border-color, rgba(0,0,0,0.1));
}

@media (min-width: 769px) {
  .nav-item.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
}

.submenu-link {
  display: block;
  padding: 0.7rem 1.5rem;
  text-decoration: none;
  color: var(--text-color, #1D1D1F);
  font-size: 0.85rem;
  transition: background 0.2s, color 0.2s;
}

.submenu-link.active {
  color: var(--accent-color, #0066CC);
  font-weight: 600;
}

.submenu-link:hover {
  background: var(--submenu-hover, rgba(0, 102, 204, 0.1));
  color: var(--accent-color, #0066CC);
}

.controls-container { display: flex; align-items: center; gap: 12px; }

.theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color, #1D1D1F);
}

.theme-icon { width: 20px; height: 20px; fill: currentColor; }
.sun-icon { display: none; }
body.dark-mode .sun-icon { display: block; }
body.dark-mode .moon-icon { display: none; }

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

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-color, #1D1D1F);
  border-radius: 99px;
  margin: 4px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger.active .hamburger-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.active .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger.active .hamburger-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile */
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-center { justify-content: flex-end; }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--submenu-bg, var(--card-bg, #ffffff));
    border-bottom: 1px solid var(--border-color, rgba(0,0,0,0.1));
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-item { width: 100%; padding: 0; height: auto; }
  .nav-link { width: 100%; padding: 14px 5%; justify-content: space-between; }

  .submenu {
    position: static;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: max-height 0.25s ease;
  }

  .nav-item.submenu-open .submenu { max-height: 420px; }
  .submenu-link { padding: 12px 8%; }
}
