/* ─── NAVIGATION ──────────────────────────────────────── */
/* Matches current amcharts.com nav exactly */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 51px;
  background: #262626;
}

.nav-inner {
  width: 1136px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
}

/* Logo: CSS background image matching original */
.nav-logo {
  display: block;
  width: 75px;
  height: 32px;
  flex-shrink: 0;
  background: url("https://www.amcharts.com/wp-content/themes/amcharts4/css/img/logo3.svg") no-repeat;
  background-size: contain;
  text-indent: -9999px;
  overflow: hidden;
  margin-top: 0;
}

/* Center nav links */
.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  flex: 1;
  justify-content: center;
}
.nav-links li { position: relative; display: block; float: left; }
.nav-links a {
  display: block;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  color: #c4c7d0;
  text-decoration: none;
  padding: 15px 18px;
  transition: color .2s;
  white-space: nowrap;
}
.nav-links a:hover { color: #fff; text-decoration: none; }

/* Search button on the right */
.nav-search {
  flex-shrink: 0;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
.nav-search-btn {
  display: block;
  width: 40px;
  height: 40px;
  border: none;
  cursor: pointer;
  opacity: .7;
  background: none;
  padding: 0;
  transition: opacity .2s;
}
.nav-search-btn:hover { opacity: 1; }
.nav-search-btn svg { width: 18px; height: 18px; color: #c4c7d0; }

.nav-search-input {
  position: absolute;
  width: 180px;
  top: 5px;
  right: 0;
  background: #363645;
  color: #fff;
  border: none;
  border-radius: 0;
  height: 40px;
  outline: 0;
  display: none;
  margin: 0;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0 10px;
}
.nav-search.open .nav-search-input { display: block; }


/* Dropdown panel */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: #262626;
  padding: 0;
  z-index: 300;
}
.has-dropdown:hover .nav-dropdown,
.has-dropdown.open .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  display: block;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  color: #c4c7d0;
  text-decoration: none;
  padding: 10px 18px;
  border-top: 1px solid #494949;
  transition: color .2s;
}
.nav-dropdown a:first-child { border-top: none; }
.nav-dropdown a:hover { color: #fff; text-decoration: none; }

/* Social links in nav (hidden on small screens) */
.nav-social { display: none; }

/* ─── MOBILE HAMBURGER ───────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 11px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: #c4c7d0;
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1136px) {
  .nav-inner {
    width: 100%;
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-search { display: none; }
  .nav-links {
    position: fixed;
    top: 51px; left: 0; right: 0; bottom: 0;
    flex-direction: column;
    background: #262626;
    padding: 10px 0;
    align-items: stretch;
    justify-content: flex-start;
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links li { float: none; }
  .nav-links a { padding: 10px 25px; text-align: left; }
  .nav-dropdown {
    position: static;
    display: none;
    background: #3e4458;
    padding: 5px 0 5px 25px;
  }
  .nav-dropdown a { font-size: 0.85em; border-top: none; padding: 6px 18px; }
  .has-dropdown.open .nav-dropdown { display: block; }
}
