/**
 * HopeWave – RTL Stylesheet (rtl.css)
 * Loaded automatically by WordPress when body is RTL (Arabic, Hebrew, etc.)
 * Augments the main style.css with direction-specific overrides.
 *
 * Typography: Amiri (headings) + Noto Sans Arabic (body) – both loaded via Google Fonts
 */

/* ────────────────────────────────────────────
   Arabic / RTL Typography override
──────────────────────────────────────────── */
body.rtl,
body.rtl p,
body.rtl li,
body.rtl span,
body.rtl input,
body.rtl textarea,
body.rtl select {
  font-family: 'Noto Sans Arabic', 'Source Sans 3', sans-serif;
  letter-spacing: 0; /* Arabic doesn't use letter-spacing */
}

body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl h5,
body.rtl h6 {
  font-family: 'Amiri', 'Playfair Display', serif;
}

/* ────────────────────────────────────────────
   Global RTL adjustments
──────────────────────────────────────────── */
body.rtl { direction: rtl; text-align: right; }

/* Flip horizontal padding/margin helpers */
body.rtl .hero-content { text-align: right; }
body.rtl .section-header { text-align: center; }

/* ────────────────────────────────────────────
   Navigation
──────────────────────────────────────────── */
body.rtl .main-nav {
  flex-direction: row-reverse;
}
body.rtl .main-nav .sub-menu {
  left: auto;
  right: 0;
  text-align: right;
}
body.rtl .main-nav .sub-menu li a:hover {
  padding-inline-start: 22px;
  padding-inline-end: 16px;
}

/* ────────────────────────────────────────────
   Top bar
──────────────────────────────────────────── */
body.rtl .top-bar-inner {
  flex-direction: row-reverse;
}

/* ────────────────────────────────────────────
   Hero
──────────────────────────────────────────── */
body.rtl .hero-overlay {
  background: linear-gradient(270deg, rgba(26,46,68,.95) 45%, rgba(26,46,68,.3) 100%);
}
body.rtl .hero-grid {
  direction: rtl;
}
body.rtl .hero-actions {
  flex-direction: row-reverse;
}
body.rtl .hero-stats {
  direction: rtl;
}

/* ────────────────────────────────────────────
   About section image badge
──────────────────────────────────────────── */
body.rtl .about-image-badge {
  bottom: -24px;
  right: auto;
  left: -24px;
}

/* ────────────────────────────────────────────
   Footer
──────────────────────────────────────────── */
body.rtl .footer-grid {
  direction: rtl;
}
body.rtl .footer-widget h4::after {
  inset-inline-start: auto;
  inset-inline-end: 0;
  right: 0;
  left: auto;
}
body.rtl .footer-contact-item {
  flex-direction: row-reverse;
  text-align: right;
}
body.rtl .footer-social {
  flex-direction: row-reverse;
}

/* ────────────────────────────────────────────
   Form inputs
──────────────────────────────────────────── */
body.rtl input,
body.rtl select,
body.rtl textarea {
  text-align: right;
}
body.rtl input[type="email"],
body.rtl input[type="number"] {
  text-align: left; /* Numbers and emails stay LTR even in RTL context */
  direction: ltr;
}

/* ────────────────────────────────────────────
   Event card
──────────────────────────────────────────── */
body.rtl .event-card {
  flex-direction: row-reverse;
}

/* ────────────────────────────────────────────
   Campaign badge position
──────────────────────────────────────────── */
body.rtl .campaign-badge {
  left: auto;
  right: 14px;
}
body.rtl .blog-card-cat {
  left: auto;
  right: 14px;
}

/* ────────────────────────────────────────────
   About feature
──────────────────────────────────────────── */
body.rtl .about-feature {
  flex-direction: row-reverse;
  text-align: right;
}

/* ────────────────────────────────────────────
   Testimonial quote decoration
──────────────────────────────────────────── */
body.rtl .testimonial-card::before {
  right: auto;
  left: 24px;
  content: '"';
}

/* ────────────────────────────────────────────
   Testimonial author
──────────────────────────────────────────── */
body.rtl .testimonial-author {
  flex-direction: row-reverse;
  text-align: right;
}

/* ────────────────────────────────────────────
   Pagination
──────────────────────────────────────────── */
body.rtl .pagination {
  direction: rtl;
}

/* ────────────────────────────────────────────
   Breadcrumb
──────────────────────────────────────────── */
body.rtl .breadcrumb {
  flex-direction: row-reverse;
}

/* ────────────────────────────────────────────
   Stats bar
──────────────────────────────────────────── */
body.rtl .stats-bar-inner {
  direction: rtl;
}

/* ────────────────────────────────────────────
   Mobile nav RTL
──────────────────────────────────────────── */
@media (max-width: 768px) {
  body.rtl .main-nav.open {
    text-align: right;
  }
  body.rtl .main-nav.open .sub-menu {
    padding-inline-start: 0;
    padding-inline-end: 16px;
  }
  body.rtl .header-inner {
    flex-direction: row-reverse;
  }
}
