/* Arabic (RTL) Specific Styles */
html[lang="ar"] {
  direction: rtl;
}

html[lang="ar"] body {
  font-family: 'Traditional Arabic', 'Simplified Arabic', 'Arial', sans-serif;
}

/* Navigation adjustments for RTL */
html[lang="ar"] nav {
  flex-direction: row-reverse;
}

html[lang="ar"] nav ul {
  flex-direction: row-reverse;
}

/* Border adjustments for RTL */
html[lang="ar"] .content-section {
  border-left: none;
  border-right: 4px solid var(--accent-blue);
}

html[lang="ar"] blockquote {
  border-left: none;
  border-right: 4px solid var(--primary-light);
  padding-left: 0;
  padding-right: 1.5rem;
}

/* Language selector */
.language-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.language-selector a {
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  color: var(--text-secondary);
  text-decoration: none;
}

.language-selector a:hover {
  background-color: var(--bg-light);
  color: var(--primary-dark);
}

.language-selector a.active {
  background-color: var(--primary-light);
  color: white;
}

/* Adjust tribute cards for RTL in Arabic */
html[lang="ar"] .tribute-modal-text {
  text-align: right;
  direction: rtl;
}

/* Keep English/Latin text LTR even in Arabic pages */
html[lang="ar"] .publication-title,
html[lang="ar"] .video-title {
  direction: ltr;
  text-align: left;
}

@media (max-width: 768px) {
  html[lang="ar"] nav {
    flex-direction: column;
  }

  html[lang="ar"] .language-selector {
    order: 3;
  }

  html[lang="ar"] nav ul {
    order: 2;
  }

  html[lang="ar"] .site-title {
    order: 1;
  }
}
