/* Language switcher dropdown — loaded after Tailwind to avoid reset conflicts */



.lang-switcher {

  position: relative;

  flex-shrink: 0;

  z-index: 70;

}



.lang-switcher-toggle {

  display: inline-flex;

  align-items: center;

  gap: 0.35rem;

  padding: 0.45rem 0.75rem;

  font-family: inherit;

  font-size: 0.8125rem;

  font-weight: 600;

  line-height: 1.25;

  color: #e2e8f0 !important;

  background: rgba(255, 255, 255, 0.08);

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: 0.5rem;

  cursor: pointer;

  transition: background 0.2s ease, border-color 0.2s ease;

  white-space: nowrap;

}



.lang-switcher-toggle:hover,

.lang-switcher.is-open .lang-switcher-toggle {

  background: rgba(255, 255, 255, 0.14);

  border-color: rgba(255, 255, 255, 0.2);

}



.lang-switcher-toggle svg {

  width: 0.875rem;

  height: 0.875rem;

  opacity: 0.8;

  transition: transform 0.2s ease;

  flex-shrink: 0;

}



.lang-switcher.is-open .lang-switcher-toggle svg {

  transform: rotate(180deg);

}



/* Desktop dropdown — hidden until opened */

.site-navbar-actions .lang-switcher-menu,

.lang-switcher > .lang-switcher-menu {

  display: none !important;

  position: absolute;

  top: calc(100% + 0.5rem);

  right: 0;

  left: auto;

  min-width: 11rem;

  margin: 0;

  padding: 0.35rem;

  list-style: none !important;

  background: rgba(17, 24, 39, 0.98);

  backdrop-filter: blur(16px);

  -webkit-backdrop-filter: blur(16px);

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: 0.625rem;

  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);

  z-index: 80;

}



html[dir="rtl"] .site-navbar-actions .lang-switcher-menu,

html[dir="rtl"] .lang-switcher > .lang-switcher-menu {

  right: auto;

  left: 0;

}



.site-navbar-actions .lang-switcher.is-open > .lang-switcher-menu,

.lang-switcher.is-open > .lang-switcher-menu {

  display: block !important;

}



.lang-switcher-menu li {

  margin: 0;

  padding: 0;

  list-style: none !important;

}



.lang-switcher-menu a {

  display: block;

  padding: 0.5rem 0.75rem;

  font-size: 0.875rem;

  font-weight: 500;

  color: #e2e8f0 !important;

  text-decoration: none !important;

  border-radius: 0.375rem;

  transition: color 0.15s ease, background 0.15s ease;

}



.lang-switcher-menu a:hover {

  color: #fff !important;

  background: rgba(59, 130, 246, 0.25);

}



.lang-switcher-menu a.is-current {

  color: #7dd3fc !important;

  background: rgba(59, 130, 246, 0.15);

}



/* Mobile menu language switcher */

.site-nav-mobile .lang-switcher {

  width: 100%;

  margin-top: 0.5rem;

  padding-top: 0.75rem;

  border-top: 1px solid rgba(255, 255, 255, 0.08);

}



.site-nav-mobile .lang-switcher-menu {

  position: static !important;

  display: none !important;

  margin-top: 0.35rem;

  box-shadow: none;

  width: 100%;

}



.site-nav-mobile .lang-switcher.is-open > .lang-switcher-menu {

  display: block !important;

}



.site-navbar-actions {

  display: flex;

  align-items: center;

  gap: 0.5rem;

  flex-shrink: 0;

}



@media (max-width: 1023px) {

  .site-navbar-actions .lang-switcher {

    display: block;

  }

}



/* Chinese: wider letter-spacing in nav */

html[lang="zh-CN"] .site-nav-link,

html.lang-zh .site-nav-link {

  letter-spacing: 0.08em;

  padding-left: 1.25rem;

  padding-right: 1.25rem;

}



html[lang="zh-CN"] .lang-switcher-toggle,

html.lang-zh .lang-switcher-toggle {

  letter-spacing: 0.06em;

}



/* Russian: more button padding */

html[lang="ru"] .btn-hero-dl,

html.lang-ru .btn-hero-dl {

  padding: 1.125rem 2.75rem;

}



html[lang="ru"] .btn-hero-ghost,

html.lang-ru .btn-hero-ghost {

  padding: 1.125rem 2rem;

}



html[lang="ru"] .site-cta-btn,

html.lang-ru .site-cta-btn {

  padding: 1.125rem 2.25rem;

}



html[lang="ru"] .site-nav-link {

  padding: 0.5rem 1.25rem;

}



/* Arabic RTL */

html[dir="rtl"] body {

  text-align: right;

}



html[dir="rtl"] .site-navbar-inner {

  flex-direction: row-reverse;

}



html[dir="rtl"] .site-nav {

  flex-direction: row-reverse;

}



html[dir="rtl"] .hero-left {
  text-align: right;
}

html[dir="rtl"] .inner-hero .inner-hero-lead {
  text-align: center;
}



html[dir="rtl"] .hero-description,

html[dir="rtl"] .site-breadcrumb ol {

  text-align: right;

}



html[dir="rtl"] .hero-actions {

  justify-content: center;

}



@media (min-width: 1024px) {

  html[dir="rtl"] .hero-left,

  html[dir="rtl"] .hero-description {

    text-align: right;

  }

  html[dir="rtl"] .hero-actions {

    justify-content: flex-start;

  }

}



html[dir="rtl"] .site-footer-links {

  direction: rtl;

}



html[dir="rtl"] blockquote.text-left {

  text-align: right;

}



html[dir="rtl"] .skip-link {

  left: auto;

  right: 1rem;

}



/* Footer language links */

.site-footer-lang {

  margin-top: 0.75rem;

  font-size: 0.75rem;

}



.site-footer-lang a {

  color: #64748b;

  text-decoration: none;

  margin: 0 0.35rem;

}



.site-footer-lang a:hover {

  color: #2563eb;

}


