/**
 * NexaPro — rtl.css
 * Comprehensive RTL (Arabic) layout, font, and direction overrides.
 * This file is ALWAYS loaded; rules apply only when html[dir="rtl"] is set.
 */

/* ============================================================
   ROOT: ARABIC FONTS
   ============================================================ */
html[dir="rtl"],
html[lang="ar"] {
  font-family: 'Tajawal', 'Cairo', sans-serif;
}

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

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
  font-family: 'Cairo', sans-serif;
  letter-spacing: 0 !important;
}

html[dir="rtl"] p,
html[dir="rtl"] span,
html[dir="rtl"] li,
html[dir="rtl"] a,
html[dir="rtl"] label,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select,
html[dir="rtl"] button {
  font-family: 'Tajawal', sans-serif;
  letter-spacing: 0 !important;
}

/* ============================================================
   NAVIGATION RTL
   ============================================================ */
html[dir="rtl"] .nav-menu {
  flex-direction: row-reverse;
}

html[dir="rtl"] .nav-menu .sub-menu {
  left: auto;
  right: 0;
  text-align: right;
}

html[dir="rtl"] .nav-menu > li > a::after {
  left: auto;
  right: 16px;
  transform-origin: right center;
}

html[dir="rtl"] .nav-menu > li:hover > a::after {
  transform: scaleX(1);
}

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

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

html[dir="rtl"] .mobile-nav {
  left: -100%;
  right: auto;
  transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html[dir="rtl"] .mobile-nav.open {
  left: 0;
  right: auto;
}

html[dir="rtl"] .hamburger {
  flex-direction: column;
}

/* ============================================================
   HERO RTL
   ============================================================ */
html[dir="rtl"] .hero-slide-overlay {
  background: linear-gradient(
    -105deg,
    rgba(7,26,62,0.92) 0%,
    rgba(7,26,62,0.65) 55%,
    rgba(7,26,62,0.25) 100%
  );
}

html[dir="rtl"] .hero-content {
  text-align: right;
}

html[dir="rtl"] .hero-actions {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

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

html[dir="rtl"] .hero-scroll-hint {
  right: auto;
  left: 40px;
}

html[dir="rtl"] .hero-title {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
}

/* ============================================================
   SECTION LABELS & HEADINGS RTL
   ============================================================ */
html[dir="rtl"] .section-label {
  flex-direction: row-reverse;
}

html[dir="rtl"] .section-label::before {
  order: 1;
}

html[dir="rtl"] .section-title,
html[dir="rtl"] .section-subtitle {
  text-align: right;
}

html[dir="rtl"] .text-center .section-title,
html[dir="rtl"] .text-center .section-subtitle {
  text-align: center;
}

/* ============================================================
   ABOUT SECTION RTL
   ============================================================ */
html[dir="rtl"] .about-grid {
  direction: rtl;
}

html[dir="rtl"] .about-image-badge {
  right: auto;
  left: -20px;
}

html[dir="rtl"] .vm-card {
  border-inline-start: none;
  border-inline-end: 4px solid var(--color-accent);
  text-align: right;
}

html[dir="rtl"] .vm-card:hover {
  transform: translateX(-4px);
}

html[dir="rtl"] .vm-card h4 {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

/* ============================================================
   STATS RTL
   ============================================================ */
html[dir="rtl"] .stat-number {
  font-family: 'Cairo', sans-serif;
}

html[dir="rtl"] .stat-label {
  font-family: 'Tajawal', sans-serif;
  letter-spacing: 0;
}

/* ============================================================
   SERVICES RTL
   ============================================================ */
html[dir="rtl"] .service-card-number {
  right: auto;
  left: 14px;
}

html[dir="rtl"] .service-card-body {
  text-align: right;
}

html[dir="rtl"] .service-card-link {
  flex-direction: row-reverse;
}

html[dir="rtl"] .service-card:hover .service-card-link svg {
  transform: translateX(-4px);
}

/* ============================================================
   CEO SECTION RTL
   ============================================================ */
html[dir="rtl"] .ceo-section::before {
  left: auto;
  right: 5%;
  content: '"';
}

html[dir="rtl"] .ceo-grid {
  grid-template-columns: 1fr 380px;
  direction: rtl;
}

html[dir="rtl"] .ceo-quote {
  border-inline-start: none;
  border-inline-end: 3px solid var(--color-accent);
  padding-inline-start: 0;
  padding-inline-end: 24px;
  text-align: right;
}

html[dir="rtl"] .ceo-content {
  text-align: right;
}

/* ============================================================
   NEWS CARDS RTL
   ============================================================ */
html[dir="rtl"] .news-card-category {
  left: auto;
  right: 14px;
}

html[dir="rtl"] .news-card-body {
  text-align: right;
}

html[dir="rtl"] .news-card-meta {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

html[dir="rtl"] .news-card-footer {
  flex-direction: row-reverse;
}

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

html[dir="rtl"] .read-more:hover {
  gap: 10px;
}

/* ============================================================
   CONTACT FORM RTL
   ============================================================ */
html[dir="rtl"] .contact-grid {
  direction: rtl;
}

html[dir="rtl"] .contact-info {
  text-align: right;
}

html[dir="rtl"] .contact-info-item {
  flex-direction: row-reverse;
  text-align: right;
}

html[dir="rtl"] .contact-info-text h4,
html[dir="rtl"] .contact-info-text p,
html[dir="rtl"] .contact-info-text a {
  text-align: right;
}

html[dir="rtl"] .contact-social {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

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

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

html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group select,
html[dir="rtl"] .form-group textarea {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .form-row {
  direction: rtl;
}

/* CF7 RTL overrides */
html[dir="rtl"] .wpcf7-form {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .wpcf7-form input[type="text"],
html[dir="rtl"] .wpcf7-form input[type="email"],
html[dir="rtl"] .wpcf7-form input[type="tel"],
html[dir="rtl"] .wpcf7-form textarea,
html[dir="rtl"] .wpcf7-form select {
  direction: rtl;
  text-align: right;
  font-family: 'Tajawal', sans-serif;
}

html[dir="rtl"] .wpcf7-form .wpcf7-submit {
  font-family: 'Cairo', sans-serif;
}

/* ============================================================
   FOOTER RTL
   ============================================================ */
html[dir="rtl"] .footer-grid {
  direction: rtl;
}

html[dir="rtl"] .footer-brand {
  text-align: right;
}

html[dir="rtl"] .footer-social {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

html[dir="rtl"] .footer-widget {
  text-align: right;
}

html[dir="rtl"] .footer-widget h4 {
  letter-spacing: 0;
}

html[dir="rtl"] .footer-widget h4::after {
  left: auto;
  right: 0;
}

html[dir="rtl"] .footer-links {
  text-align: right;
}

html[dir="rtl"] .footer-links a {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

html[dir="rtl"] .footer-links a:hover {
  padding-inline-start: 0;
  padding-inline-end: 4px;
}

html[dir="rtl"] .footer-contact-item {
  flex-direction: row-reverse;
  text-align: right;
}

html[dir="rtl"] .footer-contact-item p,
html[dir="rtl"] .footer-contact-item a {
  text-align: right;
}

html[dir="rtl"] .footer-bottom-inner {
  flex-direction: row-reverse;
}

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

html[dir="rtl"] .btn:hover .btn-arrow {
  transform: translateX(-4px);
}

/* ============================================================
   FLOATING WIDGET RTL
   ============================================================ */
html[dir="rtl"] .float-cta {
  right: auto;
  left: 30px;
  align-items: flex-start;
}

html[dir="rtl"] .float-popup {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .float-popup input,
html[dir="rtl"] .float-popup select {
  direction: rtl;
  text-align: right;
  font-family: 'Tajawal', sans-serif;
}

html[dir="rtl"] .float-popup-close {
  right: auto;
  left: 12px;
}

html[dir="rtl"] .float-cta-btn {
  flex-direction: row-reverse;
  font-family: 'Cairo', sans-serif;
}

/* ============================================================
   BACK TO TOP RTL
   ============================================================ */
html[dir="rtl"] #back-to-top {
  left: auto;
  right: 30px;
}

/* ============================================================
   ELEMENTOR RTL OVERRIDES
   ============================================================ */
html[dir="rtl"] .elementor-widget-container {
  font-family: 'Tajawal', sans-serif;
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .elementor-heading-title {
  font-family: 'Cairo', sans-serif;
  letter-spacing: 0;
}

html[dir="rtl"] .elementor-text-editor {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .elementor-icon-list-items {
  direction: rtl;
}

html[dir="rtl"] .elementor-icon-list-item {
  flex-direction: row-reverse;
}

/* ============================================================
   RESPONSIVE RTL FIXES
   ============================================================ */
@media (max-width: 1024px) {
  html[dir="rtl"] .ceo-grid {
    grid-template-columns: 1fr;
    direction: rtl;
  }
  html[dir="rtl"] .about-grid {
    direction: rtl;
  }
  html[dir="rtl"] .about-image-badge {
    left: 50%;
    right: auto;
    transform: translateX(50%);
  }
}

@media (max-width: 640px) {
  html[dir="rtl"] .hero-actions {
    flex-direction: column;
    align-items: flex-end;
  }
  html[dir="rtl"] .float-cta {
    left: 16px;
    right: auto;
  }
  html[dir="rtl"] #back-to-top {
    right: auto;
    left: 16px;
  }
}
