/**
 * RTL CSS for Hebrew and Right-to-Left Languages
 */

:root[dir="rtl"] {
  --text-direction: rtl;
}

/* Text direction */
body.rtl {
  direction: rtl;
  text-align: right;
}

body.rtl p,
body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl h5,
body.rtl h6,
body.rtl li,
body.rtl a,
body.rtl span,
body.rtl button {
  direction: rtl;
}

/* Navigation */
body.rtl .nav-menu {
  flex-direction: row-reverse;
}

body.rtl .nav-link {
  padding: 0 0.75rem;
}

body.rtl .btn {
  margin-left: 0;
  margin-right: 1rem;
}

/* Hero section */
body.rtl .hero-content {
  text-align: right;
}

body.rtl .hero h1 {
  text-align: right;
}

body.rtl .hero p {
  text-align: right;
}

/* Grid layouts */
body.rtl .tech-differentiators-grid {
  direction: rtl;
}

body.rtl .tech-card {
  direction: rtl;
  text-align: right;
}

body.rtl .tech-card-icon {
  margin-left: 0;
  margin-right: 1rem;
}

body.rtl .features-grid,
body.rtl .evidence-grid {
  direction: rtl;
}

body.rtl .feature-card,
body.rtl .evidence-card {
  direction: rtl;
  text-align: right;
}

body.rtl .feature-card-icon,
body.rtl .evidence-card-icon {
  margin-left: 0;
  margin-right: 1rem;
}

/* Forms */
body.rtl .form-group {
  direction: rtl;
  text-align: right;
}

body.rtl .form-group label {
  text-align: right;
  padding-right: 0;
  padding-left: 1rem;
}

body.rtl .form-group input,
body.rtl .form-group textarea,
body.rtl .form-group select {
  text-align: right;
  direction: rtl;
  padding-right: 1rem;
  padding-left: 0.75rem;
}

body.rtl .form-group input::placeholder,
body.rtl .form-group textarea::placeholder {
  text-align: right;
}

/* Comparison infographic */
body.rtl .comparison-left {
  order: 2;
  padding-left: 0;
  padding-right: 2rem;
  border-left: 3px solid var(--primary-color);
  border-right: none;
}

body.rtl .comparison-right {
  order: 1;
  padding-right: 0;
  padding-left: 2rem;
  border-right: 3px solid var(--primary-color);
  border-left: none;
}

/* Language switcher */
body.rtl .language-switcher-btn {
  padding-right: 0.75rem;
  padding-left: 0.5rem;
}

body.rtl .lang-flag {
  margin-left: 0.5rem;
  margin-right: 0;
}

body.rtl .language-menu {
  right: auto;
  left: 0;
}

/* Footer */
body.rtl footer {
  text-align: right;
}

body.rtl .footer-content {
  flex-direction: row-reverse;
}

body.rtl .footer-section {
  text-align: right;
}

body.rtl .footer-links li a {
  text-align: right;
}

/* Lists */
body.rtl ul,
body.rtl ol {
  padding-right: 2rem;
  padding-left: 0;
}

body.rtl li {
  text-align: right;
  margin-right: 0;
}

/* Buttons in lists */
body.rtl .nav-menu li:last-child .btn {
  margin-left: 0;
  margin-right: 1rem;
}

/* Alignment for inline elements */
body.rtl .button-group {
  flex-direction: row-reverse;
}

body.rtl .button-group .btn {
  margin-left: 0;
  margin-right: 1rem;
}

body.rtl .button-group .btn:last-child {
  margin-right: 0;
}

/* Menu toggle for mobile */
body.rtl .menu-toggle {
  margin-left: auto;
  margin-right: 0;
}

/* Cards and sections */
body.rtl .card {
  direction: rtl;
  text-align: right;
}

body.rtl .card-title {
  text-align: right;
}

body.rtl .card-description {
  text-align: right;
}

/* Helper text */
body.rtl .text-secondary,
body.rtl .text-muted {
  text-align: right;
}

/* Spacing adjustments for RTL */
body.rtl .mb-md {
  text-align: right;
}

body.rtl .section {
  direction: rtl;
}

/* Links */
body.rtl a {
  direction: rtl;
  unicode-bidi: isolate;
}

/* Animations */
@keyframes fadeInUpRTL {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.rtl .animate-fade-in-up {
  animation: fadeInUpRTL 0.8s ease-out forwards;
}
