/* ═══════════════════════════════════════════════════════
   NAVBAR.CSS — Top Navigation Bar
═══════════════════════════════════════════════════════ */

/* ── MAIN NAV WRAPPER ── */
#nl-mainNav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 0;
  border-bottom: 1px solid var(--nav-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

/* ── LEFT SIDE UL ── */
#header-left-side {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  height: 100%;
  flex: 1;
}

/* ── LOGO ── */
#HomeTopNav-wrapper { margin-right: 12px; }
#HomeTopNav { display: flex; align-items: center; }

.logo-link {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: var(--r-md);
  transition: opacity var(--t-fast);
}
.logo-link:hover { opacity: 0.9; }

.smc-logo-svg {
  height: 38px;
  width: auto;
}

/* ── NAV ITEMS ── */
#header-left-side > li {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

#header-left-side > li > a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 0 12px;
  height: 100%;
  white-space: nowrap;
  transition: color var(--t-fast), background var(--t-fast);
  border-bottom: 3px solid transparent;
  letter-spacing: 0.1px;
}

#header-left-side > li > a:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
  border-bottom-color: var(--red);
}

#header-left-side > li.active > a,
#header-left-side > li > a.active {
  color: #fff;
  border-bottom-color: var(--red);
}

/* Nav icons */
.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.75;
}

/* Chevron arrow */
.chevron {
  width: 10px;
  height: 10px;
  opacity: 0.55;
  transition: transform var(--t-fast);
  margin-left: 2px;
}
.has-dropdown:hover .chevron { transform: rotate(180deg); }

/* ── DROPDOWN WRAPPER ── */
.dropdown-wrapper {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 230px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--t-normal), transform var(--t-normal), visibility var(--t-normal);
  z-index: 2000;
  pointer-events: none;
}

.has-dropdown:hover .dropdown-wrapper {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
}

/* White dropdown box */
.whiteDropdown {
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
}

.whiteDropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  color: var(--text-700);
  font-size: 13.5px;
  font-weight: 400;
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
  border-left: 3px solid transparent;
}

.whiteDropdown a:hover {
  background: var(--red-light);
  color: var(--red);
  border-left-color: var(--red);
}

.whiteDropdown a span { flex: 1; }

/* Tools dropdown grid */
.tools-dropdown { min-width: 280px; }

.tools-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  padding: 8px;
  gap: 4px;
}

.tools-grid a {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px !important;
  border-radius: var(--r-md);
  border-left: none !important;
  text-align: center;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.tools-grid a:hover {
  background: var(--red-light) !important;
  color: var(--red) !important;
}

.tools-grid a svg {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.tools-grid a:hover svg { opacity: 1; }

/* ── SPACER ── */
#spaceNav { flex: 1; }

/* ── RIGHT SIDE ── */
#header-right-side {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  height: 100%;
}

#header-right-side li {
  display: flex;
  align-items: center;
  height: 100%;
}

/* Search */
.nl-navAction.nl-search { position: relative; }

.nl-searchContainer {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--r-md);
  padding: 7px 12px;
  transition: background var(--t-fast), border-color var(--t-fast);
  cursor: text;
}

.nl-searchContainer:hover,
.nl-searchContainer:focus-within {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.22);
}

.nl-searchContainer svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.6;
}

#nl-searchField {
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13px;
  font-family: 'Rubik', sans-serif;
  width: 140px;
  font-weight: 400;
}

#nl-searchField::placeholder { color: rgba(255,255,255,0.38); }

/* Dark mode toggle */
#lights-out {
  padding: 0 10px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--t-fast);
}
#lights-out:hover { opacity: 1; }
.lights-out-img { width: 18px; height: 18px; }

/* Language picker */
.nl-languagesPicker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
}
.nl-languagesPicker:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* Upgrade button */
.upgrade-btn {
  display: inline-flex;
  align-items: center;
  background: var(--red);
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: var(--r-full);
  text-decoration: none;
  transition: background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  white-space: nowrap;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 8px rgba(219,63,89,0.35);
}
.upgrade-btn:hover {
  background: var(--red-dark);
  box-shadow: 0 4px 14px rgba(219,63,89,0.45);
  transform: translateY(-1px);
}

/* User avatar */
.stock-avatar-container { display: flex; align-items: center; }
.stock-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  cursor: pointer;
  transition: border-color var(--t-fast);
}
.stock-avatar:hover { border-color: var(--red); }

/* ── MOBILE HAMBURGER ── */
#header-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  margin-left: auto;
}
#header-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  transition: all var(--t-normal);
}

/* ── MOBILE NAV ── */
@media (max-width: 1024px) {
  #header-left-side > li > a { padding: 0 9px; font-size: 13px; }
  #nl-searchField { width: 100px; }
}

@media (max-width: 860px) {
  #nl-mainNav { padding: 0 14px; }

  #header-left-side li:not(#HomeTopNav-wrapper) { display: none; }
  #header-hamburger { display: flex; }

  #header-right-side .nl-search { display: none; }
  #lights-out { display: none; }

  /* Mobile menu open state */
  #nl-mainNav.mobile-open #header-left-side li { display: flex; }
  #nl-mainNav.mobile-open {
    flex-wrap: wrap;
    height: auto;
    padding-bottom: 12px;
  }
  #nl-mainNav.mobile-open #header-left-side {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    height: auto;
    padding: 8px 0;
    border-top: 1px solid var(--nav-border);
    margin-top: 8px;
  }
  #nl-mainNav.mobile-open #header-left-side > li {
    width: 100%;
    height: auto;
  }
  #nl-mainNav.mobile-open #header-left-side > li > a {
    width: 100%;
    height: 44px;
    border-bottom: none;
    border-radius: var(--r-md);
    padding: 0 14px;
  }
  .dropdown-wrapper { position: static; opacity: 1; visibility: visible; transform: none; display: none; }
  .has-dropdown.open .dropdown-wrapper { display: block; }
  .whiteDropdown { border-radius: var(--r-md); margin: 4px 0 4px 14px; }
}

/* ── SMC COMPACT LOGO ── */
.smc-logo-svg {
  height: 42px;
  width: auto;
}
