/* ========================================
   NAVBAR
======================================== */
.navbar,
.article-page .navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  padding: 0.75rem 24px;
  z-index: 9999;
  border-bottom: 1px solid #e0e0e0;
  transition: transform 0.3s ease;
  overflow-x: clip;
}

.navbar.hidden,
.article-page .navbar.hidden {
  transform: translateY(-100%);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.navbar-container {
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

.logo-img {
  height: 40px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
}

.logo-text {
  font-family: 'Lora', serif;
  font-size: 1.3rem;
  font-weight: 500;
  color: #84B082;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.6vw, 24px);
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
  flex: 1 1 auto;

}

.nav-links li {
  position: relative;
}

.nav-links li a {
  color: #555;
  font-weight: 500;
  font-size: clamp(0.9rem, 1.25vw, 1rem);
  transition: color 0.2s;
  list-style: none;
  white-space: nowrap;
}

.nav-links li a:hover {
  color: #84B082;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid #d9e8dd;
  border-radius: 999px;
  color: #6a756d;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.language-toggle a {
  color: #555;
  text-decoration: none;
}

.language-toggle a:hover,
.language-toggle a:focus,
.language-toggle .is-active {
  color: #84B082;
}

.product-menu__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.product-menu__chevron {
  display: inline-block;
  font-size: 1em;
  line-height: 1;
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .product-menu__chevron,
.nav-dropdown:focus-within .product-menu__chevron {
  transform: rotate(180deg);
}

.product-submenu {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  width: 240px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  background: #ffffff;
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(30, 43, 36, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.product-submenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 18px;
}

.nav-dropdown:hover .product-submenu,
.nav-dropdown:focus-within .product-submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.product-submenu li a {
  display: block;
  padding: 10px 18px;
  color: #555;
  white-space: nowrap;
}

.product-submenu li a:hover,
.product-submenu li a:focus {
  color: #84B082;
  background: #f4faf6;
}

.signup-link {
  padding: 0.5rem 1.25rem;
  background-color: #84B082;
  border: none;
  border-radius: 6px;
  color: #fff !important;
  font-weight: 600;
}

.signup-link:hover {
  background: #6a9a68;
  color: #fff !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: #333;
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}

/* Mobile Menu */
@media (max-width: 1280px) {
  .navbar,
  .article-page .navbar {
    padding-right: 18px;
    padding-left: 18px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 320px;
    background: #ffffff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    z-index: 999;
    border-radius: 0;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .language-toggle {
    margin-left: auto;
  }

  .nav-toggle {
    display: flex;
  }
}

/*
========================================
   for mobile menu, when the menu is open w/ toggle animation
========================================
*/

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/*
========================================
   for mobile menu, when the menu is open
========================================
*/

.nav-toggle {
  position: relative;
  z-index: 10000;
}

@media (max-width: 1280px) {
  .nav-links {
    z-index: 9998;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .nav-dropdown {
    width: 100%;
    text-align: center;
  }

  .product-submenu {
    position: static;
    width: auto;
    margin-top: 12px;
    padding: 0;
    border: none;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .product-submenu::before {
    display: none;
  }

  .product-submenu li a {
    padding: 7px 12px;
    font-size: 0.95rem;
  }
}
