/* ============================================================
   language.css — Sélecteur de langue + support RTL
   ============================================================ */

/* ============ SÉLECTEUR DE LANGUE (DROPDOWN COMPACT) ============ */
.lang-dropdown {
  position: relative;
  display: inline-block;
  margin-right: 10px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(255, 180, 0, .05);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.lang-toggle:hover {
  border-color: var(--gold);
  background: rgba(255, 180, 0, .1);
}

.lang-toggle .lang-flag {
  font-size: .95rem;
  line-height: 1;
  display: inline-block;
}

.lang-toggle .lang-code {
  font-weight: 700;
  color: var(--gold);
  display: inline-block;
}

.lang-toggle .caret {
  font-size: .6rem;
  color: var(--text-dim);
  transition: transform .3s ease;
  display: inline-block;
}

.lang-dropdown.open .lang-toggle .caret {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: rgba(10, 20, 40, .98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 0 30px rgba(255, 180, 0, .15);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  list-style: none;
  margin: 0;
}

.lang-dropdown.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-menu li { list-style: none; margin: 0; padding: 0; }

.lang-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  white-space: nowrap;
  line-height: 1.3;
}

.lang-menu button:hover {
  background: rgba(255, 180, 0, .1);
  color: var(--gold);
}

.lang-menu button.active {
  color: var(--gold);
  background: rgba(255, 180, 0, .08);
  font-weight: 700;
}

.lang-menu button .lang-flag {
  font-size: 1rem;
  line-height: 1;
  display: inline-block;
}

.lang-menu button .lang-name {
  flex: 1;
  text-align: left;
}

.lang-menu button.active::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: .7rem;
  color: var(--gold);
}

.nav-mobile-lang {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all .5s .45s;
}

.nav-mobile.open .nav-mobile-lang {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .lang-toggle .lang-code { display: none; }
}

@media (max-width: 900px) {
  .lang-dropdown { margin-right: 6px; }
  .lang-toggle { padding: 6px 10px; }
}

@media (max-width: 520px) {
  .lang-toggle { padding: 5px 8px; }
  .lang-toggle .lang-flag { font-size: .95rem; }
}

/* ============ SUPPORT RTL (ARABE) ============ */
body.rtl {
  direction: rtl;
  text-align: right;
  font-family: 'Inter', 'Tajawal', 'Cairo', -apple-system, sans-serif;
}

body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl .logo {
  font-family: 'Tajawal', 'Cairo', 'Orbitron', sans-serif;
  letter-spacing: 0;
}

body.rtl .nav-mobile a::after { content: '\f060'; }
body.rtl .footer ul a:hover { transform: translateX(-4px); }
body.rtl .footer ul a i,
body.rtl .nav-mobile a::after { transform: scaleX(-1); }
body.rtl .axis-card-icon,
body.rtl .tech-card-icon { left: auto; right: 24px; }

body.rtl .axis-card-body p,
body.rtl .section-header,
body.rtl .hero-content,
body.rtl .split-content,
body.rtl .footer,
body.rtl .contact-info { text-align: right; }

body.rtl .hero-actions,
body.rtl .cta-actions,
body.rtl .contact-actions { flex-direction: row-reverse; }

body.rtl .nav-desktop,
body.rtl .nav-mobile { direction: rtl; }

body.rtl .btn i { transform: scaleX(-1); }

body.rtl .header-inner { direction: ltr; }
body.rtl .header-inner .logo,
body.rtl .header-inner .nav-desktop,
body.rtl .header-inner .header-right { direction: rtl; }

body.rtl .lang-menu { right: auto; left: 0; }
body.rtl .lang-menu button { text-align: right; direction: rtl; }
body.rtl .lang-menu button .lang-name { text-align: right; }

body.rtl p, body.rtl li, body.rtl span { letter-spacing: 0; }

body.rtl .btn .fa-arrow-right,
body.rtl .btn .fa-arrow-up-right-dots,
body.rtl .btn .fa-paper-plane,
body.rtl .btn .fa-rocket { transform: scaleX(-1); }