/* ==========================================================================
   i18n.css — English / Hebrew switcher: pending state, Hebrew typography,
   the language switch, and RTL rules for the SHARED components
   (both headers, mobile nav overlay, contact modal, footer, buttons,
   shared classes from style.css and redesign-shared.css).
   Page-only RTL fixes belong in a marked "/* RTL */" block in that page's own <style>.
   Load AFTER the page's other stylesheets.
   ========================================================================== */

/* ---------- Hebrew is being applied: hide until strings are in place (engine removes the class; 1.5s failsafe) ---------- */
html.i18n-pending body { visibility: hidden; }

/* ---------- Language switch ---------- */
.lang-switch { display: inline-flex; flex-shrink: 0; direction: ltr; unicode-bidi: isolate; }
.lang-switch__group {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border: 1px solid rgba(255, 255, 255, .13); border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.lang-switch__btn {
  appearance: none; -webkit-appearance: none;
  border: 0; border-radius: 999px; background: transparent; color: #94a3b8;
  font: 700 .74rem/1 'Outfit', 'Heebo', sans-serif; letter-spacing: .04em !important; text-transform: none !important;
  padding: 8px 11px; min-height: 30px; cursor: pointer;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}
.lang-switch__btn[lang="he"] { font-family: 'Heebo', 'Outfit', sans-serif; letter-spacing: 0 !important; font-size: .78rem; }
.lang-switch__btn:hover { color: #fff; }
.lang-switch__btn[aria-pressed="true"] {
  color: #e0f2fe; background: rgba(56, 189, 248, .16);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .38), 0 0 18px rgba(56, 189, 248, .12);
}
.lang-switch__btn:focus-visible { outline: 2px solid #38bdf8; outline-offset: 2px; }
@media (max-width: 480px) {
  .lang-switch__group { padding: 2px; }
  .lang-switch__btn { padding: 7px 6px; min-height: 28px; font-size: .68rem; }
  .lang-switch__btn[lang="he"] { font-size: .72rem; }
}

/* Wrapper that keeps [language switch] + [Contact button] together in a header */
.hdr-actions { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
@media (max-width: 480px) { .hdr-actions { gap: 6px; } }
/* style.css pads every <header> by 24px a side on phones; give the redesign header that room back for the switch */
@media (max-width: 760px) {
  html body header.rd-site-header { padding-left: 0; padding-right: 0; }
}
@media (max-width: 480px) {
  .rd-site-header .rd-contact { padding: 9px 11px; font-size: .78rem; }
  .rd-site-header .rd-brand strong { font-size: 1rem; }
}

/* ---------- Hebrew typography ---------- */
html[lang="he"] {
  --font-sans: 'Heebo', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --mono: 'JetBrains Mono', 'Heebo', 'Cascadia Code', Consolas, monospace;
}
html[lang="he"] body,
html[lang="he"] body.redesign-page,
html[lang="he"] .font-sans,
html[lang="he"] button,
html[lang="he"] input,
html[lang="he"] select,
html[lang="he"] textarea,
html[lang="he"] .rd-contact,
html[lang="he"] .btn,
html[lang="he"] .btn-contact-us,
html[lang="he"] .btn-submit {
  font-family: 'Heebo', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
html[lang="he"] .font-sans { font-family: 'Heebo', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important; }
/* Code-like things keep their monospace face */
html[lang="he"] code, html[lang="he"] pre, html[lang="he"] kbd, html[lang="he"] samp,
html[lang="he"] .font-mono { font-family: 'JetBrains Mono', 'Heebo', Consolas, monospace !important; }

/* Wide tracking and capitals look wrong in Hebrew (and shout in the Latin names around it) */
html[lang="he"] *, html[lang="he"] *::before, html[lang="he"] *::after {
  letter-spacing: normal !important;
  text-transform: none !important;
}

/* ---------- Things that stay left-to-right inside a right-to-left page ---------- */
html[dir="rtl"] .ltr,
html[dir="rtl"] [dir="ltr"],
html[dir="rtl"] .fallback-email-link,
html[dir="rtl"] a[href^="mailto:"],
html[dir="rtl"] .logo-title,
html[dir="rtl"] .rd-brand strong,
html[dir="rtl"] code, html[dir="rtl"] pre {
  unicode-bidi: isolate;
}
html[dir="rtl"] .ltr, html[dir="rtl"] code, html[dir="rtl"] pre { direction: ltr; }
html[dir="rtl"] .fallback-email-link { display: inline-block; direction: ltr; }
html[dir="rtl"] .logo-title, html[dir="rtl"] .rd-brand strong { direction: ltr; }

/* ---------- RTL: legacy header (style.css) ---------- */
html[dir="rtl"] .legacy-layout header { direction: rtl; }

/* ---------- RTL: redesign header (redesign-shared.css) ---------- */
/* flex rows flip on their own; only physical values need a swap */
html[dir="rtl"] .rd-brand small { text-align: right; }

/* ---------- RTL: product switcher bar ---------- */
html[dir="rtl"] .rd-product-switcher { padding: 10px 18px 10px 12px; }

/* ---------- RTL: mobile nav overlay ---------- */
html[dir="rtl"] .mobile-nav-links { direction: rtl; }
html[dir="rtl"] .mobile-nav-overlay { text-align: center; }

/* ---------- RTL: contact modal ---------- */
html[dir="rtl"] .modal-close { right: auto; left: 24px; }
html[dir="rtl"] .modal-card { text-align: right; }
html[dir="rtl"] .modal-fallback { text-align: center; }
html[dir="rtl"] .fallback-email-link { margin-left: 0; margin-right: 6px; }
html[dir="rtl"] .form-group select {
  background-position: left 12px center;
  padding-right: 16px;
  padding-left: 40px;
}
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="tel"] { direction: ltr; text-align: right; }
html[dir="rtl"] input[type="email"]::placeholder { text-align: right; }
html[dir="rtl"] .success-message { direction: rtl; }

/* ---------- RTL: footer ---------- */
html[dir="rtl"] .footer-glass-box,
html[dir="rtl"] .footer-top,
html[dir="rtl"] .footer-links-grid { direction: rtl; }

/* ---------- RTL: shared classes from style.css / redesign-shared.css ---------- */
html[dir="rtl"] .section-badge-title,
html[dir="rtl"] .pipeline-section-title { padding-left: 0; padding-right: 8px; }
html[dir="rtl"] .pipeline-badge { right: auto; left: 24px; }
html[dir="rtl"] .glow-cyan, html[dir="rtl"] .glow-purple { right: auto; left: -5%; }
html[dir="rtl"] .glow-dual { left: auto; right: 20%; }
html[dir="rtl"] .product-back-btn:hover { transform: translateX(4px); }
html[dir="rtl"] body.redesign-page .product-hero-section::after { right: auto; left: -110px; }
html[dir="rtl"] .rd-flow-step, html[dir="rtl"] .rd-feature { text-align: right; }
