/* ===== RTL STYLES FOR ARABIC LANGUAGE ===== */
/* This file is loaded when language is Arabic (ar) */

html[dir="rtl"] body {
  font-family: 'Cairo', 'Arial', sans-serif;
  text-align: right;
}

/* Header RTL */
html[dir="rtl"] .header-container {
  flex-direction: row-reverse;
}

html[dir="rtl"] .logo i {
  margin-right: 0;
  margin-left: 10px;
}

html[dir="rtl"] .nav-links {
  flex-direction: row-reverse;
}

html[dir="rtl"] .donate-btn {
  margin-left: 0;
  margin-right: 20px;
}

/* Section Headings RTL */
html[dir="rtl"] h2::after {
  left: auto;
  right: 50%;
  transform: translateX(50%);
}

html[dir="rtl"] .about-text h2::after,
html[dir="rtl"] .donation-text h2::after,
html[dir="rtl"] .contact-info h2::after {
  left: auto;
  right: 0;
  transform: none;
}

/* Mission/Vision RTL */
html[dir="rtl"] .mission-vision,
html[dir="rtl"] .values-list,
html[dir="rtl"] .actions-grid,
html[dir="rtl"] .news-container,
html[dir="rtl"] .stats-container {
  direction: rtl;
}

/* Contact Items RTL */
html[dir="rtl"] .contact-item i {
  margin-right: 0;
  margin-left: 15px;
}

/* Footer RTL */
html[dir="rtl"] .footer-links h3::after,
html[dir="rtl"] .footer-social h3::after {
  left: auto;
  right: 0;
}

html[dir="rtl"] .footer-links ul li a:hover {
  padding-left: 0;
  padding-right: 5px;
}

/* Form Elements RTL */
html[dir="rtl"] .form-group label,
html[dir="rtl"] .form-control {
  text-align: right;
}

html[dir="rtl"] .form-control {
  padding: 14px 14px 14px 40px;
}

html[dir="rtl"] textarea.form-control {
  text-align: right;
}

/* Read More Links RTL */
html[dir="rtl"] .read-more i {
  margin-left: 0;
  margin-right: 5px;
  transform: rotate(180deg);
}

html[dir="rtl"] .read-more:hover i {
  transform: translateX(-5px) rotate(180deg);
}

/* Social Icons RTL */
html[dir="rtl"] .social-icons {
  flex-direction: row-reverse;
}

/* Statistics RTL */
html[dir="rtl"] .stat-box {
  text-align: center;
}

/* Language Selector RTL */
html[dir="rtl"] .language-selector {
  margin-left: 0;
  margin-right: 20px;
}

html[dir="rtl"] .lang-dropdown-content {
  right: auto;
  left: 0;
}

/* Donation Options RTL */
html[dir="rtl"] .amount-options {
  direction: rtl;
}

/* List Items RTL */
html[dir="rtl"] ul {
  padding-right: 20px;
}

html[dir="rtl"] li {
  text-align: right;
}

/* Hero Section RTL */
html[dir="rtl"] .hero-content {
  text-align: center;
}

/* Responsive RTL */
@media (max-width: 768px) {
  html[dir="rtl"] .header-container {
    flex-direction: row;
  }
  
  html[dir="rtl"] .nav-links {
    flex-direction: column;
  }
  
  html[dir="rtl"] .about-content,
  html[dir="rtl"] .donation-container,
  html[dir="rtl"] .contact-container {
    direction: rtl;
  }
}

/* RTL Font Import */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&display=swap');

/* Numbers should remain LTR in RTL text */
html[dir="rtl"] .stat-number,
html[dir="rtl"] .phone-number,
html[dir="rtl"] .date-number {
  direction: ltr;
  display: inline-block;
}

/* Arabic specific typography improvements */
html[dir="rtl"] {
  line-height: 1.8;
}

html[dir="rtl"] h1, 
html[dir="rtl"] h2, 
html[dir="rtl"] h3, 
html[dir="rtl"] h4 {
  letter-spacing: 0;
  font-weight: 700;
}

html[dir="rtl"] p {
  text-align: justify;
}

/* Button alignment for RTL */
html[dir="rtl"] .btn {
  text-align: center;
}

/* Form placeholder alignment */
html[dir="rtl"] .form-control::placeholder {
  text-align: right;
  direction: rtl;
}

/* Checkbox and radio buttons */
html[dir="rtl"] input[type="checkbox"],
html[dir="rtl"] input[type="radio"] {
  margin-right: 0;
  margin-left: 8px;
}

/* Navigation underline animation */
html[dir="rtl"] .nav-links a::after {
  left: auto;
  right: 0;
}

/* Success message alignment */
html[dir="rtl"] .success-message {
  text-align: right;
}

/* Loading animation direction */
html[dir="rtl"] .loading {
  animation-direction: reverse;
}

/* Arabic quotes */
html[dir="rtl"] .quote {
  quotes: "«" "»" "‹" "›";
}

/* Ensure proper text direction for mixed content */
html[dir="rtl"] .mixed-content {
  unicode-bidi: embed;
}

/* Fix for icons in RTL */
html[dir="rtl"] .fas,
html[dir="rtl"] .fab {
  display: inline-block;
}