/* Language switcher + first-visit language bar. Uses logical properties so it works unchanged in RTL (Arabic). */
.lang { position: relative; display: inline-block; font-family: var(--font-text, 'Inter', Arial, sans-serif); }
.lang__btn {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border-radius: 99px;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: #fff; cursor: pointer;
  font: 600 .78rem/1 var(--font-display, 'Montserrat', Arial, sans-serif); letter-spacing: .06em;
  transition: background .2s, border-color .2s, color .2s;
}
.lang__btn:hover, .lang__btn[aria-expanded="true"] { background: rgba(255,255,255,.14); border-color: var(--gold, #d3b663); }
.lang__btn:focus-visible { outline: 2px solid var(--gold, #d3b663); outline-offset: 3px; }
.lang__globe { width: 17px; height: 17px; flex: none; }
.lang__chev { width: 9px; height: 6px; flex: none; opacity: .7; transition: transform .25s var(--ease-out, ease); }
.lang__btn[aria-expanded="true"] .lang__chev { transform: rotate(180deg); }

.lang__menu {
  position: absolute; z-index: 1200; top: calc(100% + 10px); inset-inline-end: 0; margin: 0; padding: 8px; list-style: none;
  width: 340px; max-width: calc(100vw - 24px); display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  background: rgba(24,24,26,.97); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.12); border-radius: 16px; box-shadow: 0 24px 60px -12px rgba(0,0,0,.55);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top; pointer-events: none;
  transition: opacity .18s ease, transform .22s var(--ease-out, ease);
}
.lang__menu[hidden] { display: grid; visibility: hidden; }
.lang.is-open .lang__menu { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
.lang__menu a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none;
  color: rgba(255,255,255,.86); font-size: .92rem; line-height: 1.2; transition: background .15s, color .15s;
}
.lang__menu a:hover, .lang__menu a:focus-visible { background: rgba(211,182,99,.16); color: #fff; outline: none; }
.lang__menu a[aria-current="true"] { background: rgba(211,182,99,.22); color: #fff; }
.lang__code { flex: none; min-width: 26px; font: 700 .68rem/1 var(--font-display, Montserrat, Arial, sans-serif); letter-spacing: .08em; color: var(--gold, #d3b663); }
.lang__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang__tick { width: 15px; height: 15px; flex: none; color: var(--gold, #d3b663); }

/* in the dark nav the switcher sits before the CTA button */
.nav__cta .lang { margin-inline-end: 4px; }
@media (max-width: 1080px) { .nav__cta .lang { display: none; } }   /* mobile has its own copy in the drawer */

/* mobile drawer */
.nav__mobile-lang { margin-top: 28px; }
.lang--mobile { display: block; }
.lang--mobile .lang__btn { width: 100%; justify-content: center; height: 48px; font-size: .84rem; }
.lang--mobile .lang__menu { position: static; width: 100%; max-width: none; margin-top: 8px; display: none; opacity: 1; transform: none; pointer-events: auto; visibility: visible; background: rgba(255,255,255,.05); box-shadow: none; }
.lang--mobile.is-open .lang__menu { display: grid; }

/* light backgrounds (login pages) and portal top bar */
.lang--light .lang__btn, .lang--portal .lang__btn { border-color: rgba(0,0,0,.18); background: rgba(0,0,0,.04); color: #1d1f24; height: 36px; }
.lang--light .lang__btn:hover, .lang--light .lang__btn[aria-expanded="true"],
.lang--portal .lang__btn:hover, .lang--portal .lang__btn[aria-expanded="true"] { background: rgba(0,0,0,.08); border-color: var(--gold, #d3b663); }
.lang--portal .lang__btn { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: #fff; }
.lang--footer .lang__menu { top: auto; bottom: calc(100% + 10px); transform-origin: bottom; }
.lang--light .lang__menu, .lang--portal .lang__menu { background: rgba(24,24,26,.98); }
@media (max-width: 420px) { .lang__menu { grid-template-columns: 1fr; width: 220px; } }

/* footer row */
.footer__lang { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 0 4px; }
.footer__legal { margin: 0; font-size: .78rem; color: rgba(255,255,255,.45); max-width: 60ch; }

/* first-visit bar: "Shown in <language> based on your browser" */
.lang-bar {
  position: fixed; z-index: 1100; inset-inline: 16px; bottom: 16px; margin-inline: auto; max-width: 560px;
  display: flex; align-items: center; gap: 14px; padding: 14px 16px 14px 20px; border-radius: 16px;
  background: rgba(24,24,26,.96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff;
  border: 1px solid rgba(211,182,99,.45); box-shadow: 0 18px 50px -10px rgba(0,0,0,.55);
  font-size: .9rem; line-height: 1.35; animation: lang-bar-in .5s var(--ease-out, ease) both;
}
.lang-bar[hidden] { display: none; }
.lang-bar__msg { flex: 1; min-width: 0; }
.lang-bar a { color: var(--gold, #d3b663); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.lang-bar button { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.lang-bar button:hover { background: var(--gold, #d3b663); color: #1d1f24; }
@keyframes lang-bar-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lang-bar, .lang__menu, .lang__chev { animation: none; transition: none; } }

/* No JS: show the language list as a plain inline list */
.no-js .lang__menu, noscript + .lang .lang__menu { position: static; visibility: visible; opacity: 1; transform: none; pointer-events: auto; }

.footer__credit { font-size: .78rem; color: rgba(255,255,255,.5); }
.footer__credit a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer__credit a:hover { color: var(--gold); }
.lang__name[dir="rtl"] { text-align: start; unicode-bidi: isolate; }
