/* RTL overrides — الحافظ للاستشارات */
html[dir="rtl"],
html[dir="rtl"] body,
body.rtl {
  direction: rtl;
  text-align: right;
}

body.rtl .text-start {
  text-align: right !important;
}

body.rtl .text-end {
  text-align: left !important;
}

/* Icons / chevrons next to menu labels keep logical order */
body.rtl .main-menu ul li a i {
  margin-left: 0;
  margin-right: 4px;
}

body.rtl .mr-15 {
  margin-right: 0 !important;
  margin-left: 15px !important;
}

body.rtl .offcanvas__contact-icon.mr-15 {
  margin-right: 0 !important;
  margin-left: 15px !important;
}

/* Arabic offcanvas meanmenu — labels from the right, expand (+) on the left */
body.rtl .offcanvas__info .mean-container .mean-nav,
body.hafiz-lang-ar .offcanvas__info .mean-container .mean-nav {
  direction: rtl;
  text-align: right;
  float: none;
  width: 100%;
}

body.rtl .offcanvas__info .mean-container .mean-nav > ul,
body.hafiz-lang-ar .offcanvas__info .mean-container .mean-nav > ul {
  text-align: right;
  width: 100%;
}

body.rtl .offcanvas__info .mean-container .mean-nav ul li,
body.hafiz-lang-ar .offcanvas__info .mean-container .mean-nav ul li {
  float: none;
  width: 100%;
  text-align: right;
}

body.rtl .offcanvas__info .mean-container .mean-nav ul li a,
body.hafiz-lang-ar .offcanvas__info .mean-container .mean-nav ul li a {
  float: none;
  width: 100%;
  text-align: right !important;
  text-transform: none;
  box-sizing: border-box;
}

/* Parent items with submenu: flex row so + sits on physical left (not absolute) */
body.rtl .offcanvas__info .mean-container .mean-nav ul li.menu-item-has-children,
body.hafiz-lang-ar .offcanvas__info .mean-container .mean-nav ul li.menu-item-has-children {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: stretch;
  direction: ltr;
}

body.rtl .offcanvas__info .mean-container .mean-nav ul li.menu-item-has-children > a.mean-expand,
body.hafiz-lang-ar .offcanvas__info .mean-container .mean-nav ul li.menu-item-has-children > a.mean-expand {
  order: 0;
  position: static !important;
  left: auto !important;
  right: auto !important;
  inset: auto !important;
  flex: 0 0 40px;
  width: 40px !important;
  min-height: 48px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 !important;
  float: none !important;
  text-align: center;
}

body.rtl .offcanvas__info .mean-container .mean-nav ul li.menu-item-has-children > a:not(.mean-expand),
body.hafiz-lang-ar .offcanvas__info .mean-container .mean-nav ul li.menu-item-has-children > a:not(.mean-expand) {
  order: 1;
  flex: 1 1 calc(100% - 40px);
  position: relative !important;
  left: auto !important;
  right: auto !important;
  width: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  float: none !important;
}

body.rtl .offcanvas__info .mean-container .mean-nav ul li.menu-item-has-children > ul.sub-menu,
body.rtl .offcanvas__info .mean-container .mean-nav ul li.menu-item-has-children > ul.submenu,
body.hafiz-lang-ar .offcanvas__info .mean-container .mean-nav ul li.menu-item-has-children > ul.sub-menu,
body.hafiz-lang-ar .offcanvas__info .mean-container .mean-nav ul li.menu-item-has-children > ul.submenu {
  order: 2;
  flex: 0 0 100%;
  width: 100%;
  direction: rtl;
  text-align: right;
}

body.rtl .offcanvas__info .mean-container .mean-nav ul li ul.sub-menu li a,
body.hafiz-lang-ar .offcanvas__info .mean-container .mean-nav ul li ul.sub-menu li a,
body.rtl .offcanvas__info .mean-container .mean-nav ul li ul.submenu li a,
body.hafiz-lang-ar .offcanvas__info .mean-container .mean-nav ul li ul.submenu li a {
  padding-right: 1.25rem;
  padding-left: 0;
  text-align: right !important;
}

/* Phone numbers: always LTR digit order in RTL layout */
body.rtl .hafiz-phone-ltr,
body.rtl .hafiz-phone-link {
  direction: ltr;
  unicode-bidi: isolate;
}

body.rtl .offcanvas__contact-text .hafiz-phone-ltr {
  display: inline-block;
}

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

body.rtl .breadcrumb-items {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

body.rtl .swiper {
  direction: ltr;
}

body.rtl .swiper-slide {
  direction: rtl;
}

body.rtl .feature-info-box ul {
  padding-right: 0;
}

body.rtl .service-list-items ul {
  padding-right: 0;
}

/* عناوين GSAP SplitText — العربية: تقسيم كلمات فقط من JS؛ اتجاه العرض والخط */
body.rtl h1 .split-line,
body.rtl h2 .split-line,
body.rtl h3 .split-line,
body.rtl .tz-itm-title .split-line,
body.rtl .tz-sub-tilte .split-line,
body.rtl .text-anim .split-line {
  direction: rtl;
  unicode-bidi: isolate;
  text-align: inherit;
}

body.rtl h2.tx-title,
body.rtl h2.tx-title.sec_title,
body.rtl .tz-itm-title {
  direction: rtl;
  unicode-bidi: isolate;
}

body.rtl .text-anim {
  direction: rtl;
  unicode-bidi: isolate;
}

/* كلمات مجزأة للأنيميشن تبقى في سياق عربي صحيح */
body.rtl .split-line div[style*="inline-block"] {
  direction: rtl;
}

/* تبديل الوضع الداكن/الفاتح (بدل أيقونة البحث) */
.theme-mode-toggle {
  flex-shrink: 0;
}

.theme-mode-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.header-3 .theme-mode-toggle,
.header-4 .theme-mode-toggle,
.header-5 .theme-mode-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  color: inherit;
}

/* Nice Select (jquery.nice-select) — RTL: النص يمين، السهم على اليسار */
html[dir="rtl"] .nice-select,
body.rtl .nice-select {
  text-align: right !important;
  direction: rtl;
  float: none;
}

html[dir="rtl"] .nice-select .current,
body.rtl .nice-select .current {
  text-align: right;
}

html[dir="rtl"] .nice-select:after,
html[dir="rtl"] .nice-select::after,
body.rtl .nice-select:after,
body.rtl .nice-select::after {
  right: auto !important;
  left: 12px !important;
}

html[dir="rtl"] .nice-select.open:after,
body.rtl .nice-select.open:after {
  -webkit-transform-origin: 34% 66%;
  transform-origin: 34% 66%;
}

html[dir="rtl"] .nice-select .list,
body.rtl .nice-select .list {
  left: auto !important;
  right: 0 !important;
}

html[dir="rtl"] .nice-select.wide .list,
body.rtl .nice-select.wide .list {
  left: 0 !important;
  right: 0 !important;
}

html[dir="rtl"] .nice-select .option,
body.rtl .nice-select .option {
  text-align: right !important;
  padding-right: 18px !important;
  padding-left: 29px !important;
}

/* نماذج التواصل — تعويض مساحة السهم (main.css يثبت السهم يميناً) */
html[dir="rtl"] .contact-wrapper .contact-box-items .contact-form-box .form-clt .form .single-select,
html[dir="rtl"] .contact-wrapper .contact-box-items.style-2 .contact-form-box .form-clt .form .single-select,
body.rtl .contact-wrapper .contact-box-items .contact-form-box .form-clt .form .single-select,
body.rtl .contact-wrapper .contact-box-items.style-2 .contact-form-box .form-clt .form .single-select,
html[dir="rtl"] .team-details-wrapper .team-bottom-items .team-right-items .contact-form-box .form-clt .form .single-select,
body.rtl .team-details-wrapper .team-bottom-items .team-right-items .contact-form-box .form-clt .form .single-select {
  padding-left: 36px;
  padding-right: 4px;
}

html[dir="rtl"] .contact-wrapper .contact-box-items .contact-form-box .form-clt .form .single-select::after,
html[dir="rtl"] .contact-wrapper .contact-box-items.style-2 .contact-form-box .form-clt .form .single-select::after,
body.rtl .contact-wrapper .contact-box-items .contact-form-box .form-clt .form .single-select::after,
body.rtl .contact-wrapper .contact-box-items.style-2 .contact-form-box .form-clt .form .single-select::after,
html[dir="rtl"] .team-details-wrapper .team-bottom-items .team-right-items .contact-form-box .form-clt .form .single-select::after,
body.rtl .team-details-wrapper .team-bottom-items .team-right-items .contact-form-box .form-clt .form .single-select::after {
  right: auto !important;
  left: 12px !important;
}

/* نفس المحاذاة تحت الوضع الداكن (dark-mode.css يثبت السهم يميناً بخصوصية أعلى) */
html[dir="rtl"] .dark-body .page-wrapper .contact-wrapper .contact-box-items .contact-form-box .form-clt .form .single-select,
body.rtl.dark-body .page-wrapper .contact-wrapper .contact-box-items .contact-form-box .form-clt .form .single-select {
  padding-left: 36px;
  padding-right: 4px;
}

html[dir="rtl"] .dark-body .page-wrapper .contact-wrapper .contact-box-items .contact-form-box .form-clt .form .single-select::after,
body.rtl.dark-body .page-wrapper .contact-wrapper .contact-box-items .contact-form-box .form-clt .form .single-select::after {
  right: auto !important;
  left: 12px !important;
}

html[dir="rtl"] .dark-body .page-wrapper .team-details-wrapper .team-bottom-items .team-right-items .contact-form-box .form-clt .form .single-select,
body.rtl.dark-body .page-wrapper .team-details-wrapper .team-bottom-items .team-right-items .contact-form-box .form-clt .form .single-select {
  padding-left: 36px;
  padding-right: 4px;
}

html[dir="rtl"] .dark-body .page-wrapper .team-details-wrapper .team-bottom-items .team-right-items .contact-form-box .form-clt .form .single-select::after,
body.rtl.dark-body .page-wrapper .team-details-wrapper .team-bottom-items .team-right-items .contact-form-box .form-clt .form .single-select::after {
  right: auto !important;
  left: 12px !important;
}

/* Homepage — خدماتنا intro: force center (RTL body defaults to text-align: right) */
.hafiz-services-intro .section-title,
.hafiz-services-intro .section-title h2,
.hafiz-services-intro .section-title h3,
.hafiz-services-intro .section-title h6.sub-title,
.hafiz-services-intro .section-title p {
  text-align: center !important;
}

.hafiz-services-intro .section-title .sub-title {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  text-align: center !important;
}

body.rtl .hafiz-services-intro .section-title .sub-title img,
html[dir="rtl"] .hafiz-services-intro .section-title .sub-title img {
  margin-right: 5px;
  margin-left: 5px;
}

.hafiz-services-intro .section-title h2,
.hafiz-services-intro .section-title p {
  margin-left: auto;
  margin-right: auto;
  max-width: 52rem;
}

body.rtl .hafiz-services-intro .section-title h2.tx-title,
body.rtl .hafiz-services-intro .section-title h2.sec_title {
  direction: rtl;
  text-align: center !important;
}

/* Homepage service cards: center rows with 1–2 items (e.g. الاتفاقيات) */
.hafiz-services-cards-row.justify-content-center {
  justify-content: center !important;
}

/* Phone numbers — enforce LTR direction and isolate bidi to prevent reversing in RTL */
a[href^="tel:"],
.hafiz-phone-ltr,
.hafiz-phone-link,
.contact-list a[href^="tel:"] {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  display: inline-block;
}

/* Hero height & overlay */
.hero-1 {
  height: 900px !important;
  min-height: 700px !important;
}

