.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}

.topbar.scrolled {
  background: rgba(28, 22, 17, 0.97);
  box-shadow: var(--shadow-dark);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
  transition: min-height var(--t-base) var(--ease-out);
}

.topbar.scrolled .topbar-inner {
  min-height: 60px;
}

.brand-logo {
  transition: width var(--t-base) var(--ease-out), height var(--t-base) var(--ease-out);
}

.topbar.scrolled .brand-logo {
  width: 38px;
  height: 38px;
}

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

.brand-logo {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.brand-text strong,
.brand-text small {
  display: block;
}

.brand-text strong {
  color: var(--white);
  font-size: var(--fs-base);
  letter-spacing: 0.02em;
}

.brand-text small {
  margin-top: 2px;
  color: var(--muted-light);
  font-size: 0.8rem;
  font-weight: 400;
  max-width: 340px;
}

.nav {
  display: flex;
  gap: var(--s-1);
  font-size: var(--fs-sm);
}

.nav a {
  position: relative;
  padding: 10px 13px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--t-quick) var(--ease-out);
}

.nav a:hover {
  color: var(--gold-light);
}

.nav a.active {
  color: var(--gold);
}

.nav a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-dark);
  border-radius: var(--r-pill);
  background: transparent;
  font: 600 0.9rem var(--sans);
  color: var(--white);
  cursor: pointer;
  white-space: nowrap;
  transition:
    color var(--t-base) var(--ease-out),
    border-color var(--t-base) var(--ease-out),
    transform var(--t-base) var(--ease-out);
}

.lang-toggle:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 11px;
  border: 1px solid var(--line-dark);
  border-radius: var(--r-sm);
  background: transparent;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 22, 17, 0.97);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base) var(--ease-out), visibility var(--t-base) var(--ease-out);
}

.mobile-nav.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.mobile-nav a {
  padding: 12px 28px;
  font-family: var(--display);
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--cream);
  transition: color var(--t-quick) var(--ease-out);
}

.mobile-nav a:hover {
  color: var(--gold);
}

.mobile-nav .button {
  margin-top: var(--s-4);
  font-family: var(--sans);
}

.mobile-nav-close {
  position: absolute;
  top: 22px;
  right: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  transition: color var(--t-quick) var(--ease-out), border-color var(--t-quick) var(--ease-out);
}

.mobile-nav-close:hover {
  color: var(--gold);
  border-color: var(--gold);
}

html[dir="rtl"] .mobile-nav-close {
  right: auto;
  left: 22px;
}
