/* ── Language Switcher ── */
#lang-switcher {
  position: relative;
  margin-left: 12px;
  font-size: 0.85rem;
  user-select: none;
  z-index: 1000;
}
.lang-current {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-primary);
}
.lang-current:hover { border-color: var(--accent); }
.lang-code {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  min-width: 200px;
  max-height: 340px;
  overflow-y: auto;
  padding: 6px;
  z-index: 1001;
}
.lang-dropdown.open { display: block; }
.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.85rem;
  color: var(--text-primary);
}
.lang-option:hover { background: var(--bg-secondary); }
.lang-option.active {
  background: rgba(124,109,240,0.1);
  color: var(--accent);
  font-weight: 600;
}

/* RTL support for Arabic */
html[dir="rtl"] { direction: rtl; }
html[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
html[dir="rtl"] .lang-current { flex-direction: row-reverse; }
html[dir="rtl"] .lang-option { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] #lang-switcher { margin-left: 0; margin-right: 12px; }

/* Nav layout for switcher */
nav .container {
  display: flex;
  align-items: center;
  gap: 24px;
}
nav .nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}
