:root {
  --site-nav-sage: #678760;
  --site-nav-orange: #fb9b27;
  --site-nav-gold: #fcc15d;
  --site-nav-text: #243126;
  --site-nav-muted: #5e675f;
}

.topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(36, 49, 38, 0.08);
  position: sticky;
  top: 0;
  z-index: 80;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(36, 49, 38, 0.04);
}

.topbar::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--site-nav-orange, #fb9b27),
    var(--site-nav-gold, #fcc15d),
    var(--site-nav-sage, #678760)
  );
}

.nav {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-head {
  display: contents;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(36, 49, 38, 0.08);
  flex-shrink: 0;
  box-shadow: 0 14px 30px rgba(36, 49, 38, 0.06);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-title,
.brand strong {
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: var(--site-nav-text, #243126);
}

.brand-subtitle {
  font-family: Inter, Arial, Helvetica, sans-serif;
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--site-nav-muted, #5e675f);
  line-height: 1.3;
}

.nav-links {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-wrap: wrap;
  transition: all 0.25s ease;
}

.nav-links button,
.nav-links a {
  min-height: 96px;
  padding: 0 26px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--site-nav-text, #243126);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid rgba(36, 49, 38, 0.06);
  transition: 0.18s ease;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
  font-weight: 800;
}

.nav-label {
  display: inline;
  line-height: inherit;
}

.nav-pl {
  display: inline;
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: inherit;
  font-weight: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  line-height: inherit;
}

.nav-item-with-submenu {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}

.nav-item-with-submenu > a {
  position: relative;
  z-index: 2;
}

.nav-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  display: grid;
  gap: 1px;
  background: rgba(36, 49, 38, 0.08);
  border-radius: 0 0 18px 18px;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(36, 49, 38, 0.12);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
}

.nav-submenu a {
  min-height: auto;
  padding: 12px 14px 14px;
  justify-content: center;
  border: 0;
  background: rgba(255, 251, 244, 0.98);
  color: var(--site-nav-text, #243126);
  box-shadow: none;
  white-space: normal;
  text-align: center;
  line-height: 1.15;
  text-transform: none;
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0;
  font-weight: 700;
}

.nav-submenu a:only-child {
  border-radius: 0 0 18px 18px;
}

.menu-toggle {
  display: none;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid rgba(251, 155, 39, 0.3);
  border-radius: 55% 45% 58% 42% / 44% 53% 47% 56%;
  background: linear-gradient(
    135deg,
    rgba(251, 155, 39, 0.42),
    rgba(252, 193, 93, 0.52) 48%,
    rgba(103, 135, 96, 0.3)
  );
  box-shadow:
    0 18px 40px rgba(36, 49, 38, 0.14),
    0 0 0 8px rgba(255, 244, 196, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  animation: organic-toggle-float 4.2s ease-in-out infinite;
  transition:
    transform 0.28s ease,
    border-radius 0.34s ease,
    box-shadow 0.28s ease,
    background 0.28s ease;
}

.menu-toggle::before,
.menu-toggle::after {
  content: "";
  position: absolute;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.28s ease, border-radius 0.35s ease;
}

.menu-toggle::before {
  inset: 4px;
  border-radius: 58% 42% 46% 54% / 48% 58% 42% 52%;
  background: rgba(255, 255, 255, 0.7);
  z-index: 0;
}

.menu-toggle::after {
  width: 84px;
  height: 84px;
  right: -22px;
  top: -26px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0));
  opacity: 1;
  z-index: 0;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2.5px;
  border-radius: 999px;
  background: var(--site-nav-text, #243126);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.28s ease, opacity 0.22s ease, width 0.28s ease;
  position: relative;
  z-index: 1;
}

.menu-toggle span:nth-child(2) {
  width: 18px;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  width: 8px;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

.menu-toggle[aria-expanded="true"] {
  animation: none;
  transform: rotate(10deg) scale(1.12);
}

.nav-links button:hover,
.nav-links a:hover,
.nav-links button.active,
.nav-links a.active,
.nav-links a.current,
.nav-item-with-submenu:hover > a,
.nav-item-with-submenu:focus-within > a,
.nav-item-with-submenu > a.active,
.nav-item-with-submenu > a.current {
  background: var(--site-nav-sage, #678760);
  color: white;
}

.nav-item-with-submenu:hover .nav-submenu,
.nav-item-with-submenu:focus-within .nav-submenu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-submenu a:hover,
.nav-submenu a:focus-visible,
.nav-submenu a.active {
  background: rgba(103, 135, 96, 0.14);
  color: var(--site-nav-text, #243126);
}

.nav-links a.lang-switch,
.nav-links a.lang-switch:visited,
.nav-links a.lang-switch:active,
.nav-links a.lang-link,
.nav-links a.lang-link:visited,
.nav-links a.lang-link:active {
  background: var(--site-nav-orange, #fb9b27) !important;
  color: white !important;
  font-weight: 800;
}

.nav-links a.lang-switch:hover,
.nav-links a.lang-switch:focus-visible,
.nav-links a.lang-link:hover,
.nav-links a.lang-link:focus-visible {
  background: #e68e20 !important;
  color: white !important;
}

@keyframes organic-toggle-float {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  35% { transform: rotate(-3deg) translateY(-1px); }
  70% { transform: rotate(2deg) translateY(1px); }
}

@media (max-width: 900px) {
  .nav {
    min-height: auto;
    padding: 12px 0 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
  }

  .brand {
    flex: 1;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 242, 0.98));
    border: 1px solid rgba(251, 155, 39, 0.12);
    border-radius: 30px 24px 34px 22px;
    box-shadow:
      0 20px 44px rgba(36, 49, 38, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    transform: translateY(-8px) scale(0.985, 0.94);
    transform-origin: top center;
    will-change: max-height, opacity, transform, border-radius;
    transition:
      max-height 0.58s cubic-bezier(0.25, 0.9, 0.3, 1),
      opacity 0.32s ease,
      transform 0.58s cubic-bezier(0.25, 0.9, 0.3, 1),
      border-radius 0.58s cubic-bezier(0.25, 0.9, 0.3, 1);
  }

  .nav-links.active {
    max-height: 760px;
    opacity: 1;
    transform: translateY(0) scale(1);
    border-radius: 28px 26px 32px 24px;
  }

  .nav-links button,
  .nav-links a {
    min-height: 56px;
    width: 100%;
    padding: 0 18px;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid rgba(36, 49, 38, 0.06);
    justify-content: flex-start;
  }

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

  .nav-submenu {
    position: static;
    min-width: 0;
    margin-bottom: 8px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    display: grid;
    box-shadow: none;
  }

  .nav-submenu a,
  .nav-submenu a:first-child,
  .nav-submenu a:last-child,
  .nav-submenu a:only-child {
    border-radius: 0;
    box-shadow: none;
    background: rgba(103, 135, 96, 0.08);
    padding-left: 36px;
    text-align: left;
    justify-content: flex-start;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }
}
