/* DEVASA MEDIA — Arabic (RTL) production typography & layout hardening */

html[lang="ar"],
html[dir="rtl"][lang="ar"] {
  --dm-ar-font: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

html[lang="ar"] body,
html[lang="ar"] .page-wrapper,
html[lang="ar"] .banner-section,
html[lang="ar"] .banner-section .title,
html[lang="ar"] .banner-section h1,
html[lang="ar"] .banner-section h2,
html[lang="ar"] .sec-title .title,
html[lang="ar"] .sec-title h2,
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6,
html[lang="ar"] p,
html[lang="ar"] .btn-title,
html[lang="ar"] .dm-premium-topbar,
html[lang="ar"] .footer-section,
html[lang="ar"] input,
html[lang="ar"] textarea,
html[lang="ar"] select,
html[lang="ar"] .dm-quote-popup {
  font-family: var(--dm-ar-font) !important;
  letter-spacing: 0 !important;
  word-spacing: normal;
  font-feature-settings: "liga" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Hero: keep Arabic shaping intact (no letter-spacing / no char split) */
html[lang="ar"] .banner-section .title,
html[lang="ar"] .banner-section .title em,
html[lang="ar"] .banner-section .title strong,
html[lang="ar"] .banner-section .title span {
  letter-spacing: 0 !important;
  word-break: normal;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.35;
  unicode-bidi: plaintext;
}

html[dir="rtl"] .dm-premium-topbar__slogan {
  letter-spacing: 0.02em;
}

/* Hero title: orange underline must stay under em word — never bleed into strong / description */
html[lang="ar"] .dm-hero-slider .hero-1 .hero-content .hero-title,
html[dir="rtl"] .dm-hero-slider .hero-1 .hero-content .hero-title {
  gap: 46px !important;
  row-gap: 46px !important;
}

html[lang="ar"] .dm-hero-slider .hero-1 .hero-content .hero-title > span,
html[dir="rtl"] .dm-hero-slider .hero-1 .hero-content .hero-title > span {
  line-height: 1.38 !important;
  padding-bottom: 14px !important;
}

html[lang="ar"] .dm-hero-slider .hero-1 .hero-content .hero-title > strong,
html[dir="rtl"] .dm-hero-slider .hero-1 .hero-content .hero-title > strong {
  line-height: 1.3 !important;
  margin-top: 10px !important;
  padding-top: 4px !important;
}

html[lang="ar"] .dm-hero-slider .hero-1 .hero-content .line-ani,
html[dir="rtl"] .dm-hero-slider .hero-1 .hero-content .line-ani {
  z-index: 0 !important;
  max-height: 14px !important;
  height: 14px !important;
  overflow: hidden !important;
  pointer-events: none;
}

html[lang="ar"] .dm-hero-slider .hero-1 .hero-content .line-ani svg,
html[dir="rtl"] .dm-hero-slider .hero-1 .hero-content .line-ani svg {
  max-height: 12px !important;
  height: 12px !important;
  display: block;
}

html[lang="ar"] .dm-hero-slider .hero-1 .hero-content .content-items,
html[dir="rtl"] .dm-hero-slider .hero-1 .hero-content .content-items {
  margin-top: 16px;
}

/* Eastern Arabic numerals — native RTL flow (do NOT force LTR Western digits) */
html[lang="ar"] .count-text,
html[lang="ar"] .dm-counter-prefix,
html[lang="ar"] .dm-google-review-count,
html[lang="ar"] .dm-quote-trust-value,
html[lang="ar"] .dm-locale-digits,
html[lang="ar"] .service-block-one .inner-block .number,
html[lang="ar"] .award-box-items-one .year,
html[lang="ar"] .work-process-section .step,
html[lang="ar"] .footer-section .phone,
html[lang="ar"] .footer-bottom-wrapper,
html[lang="ar"] .dm-mobile-contact-line,
html[lang="ar"] .dm-testimonial-count-highlight,
html[lang="ar"] .choose-client-info p,
html[lang="ar"] .choose-counter .count-box,
html[lang="ar"] .testi-counter .count-box,
html[lang="ar"] .about-thumb-items .count-box,
html[lang="ar"] .award-right-items-1 .count-box {
  font-variant-numeric: normal;
  unicode-bidi: plaintext;
  direction: inherit;
}

/* Overflow guards */
html[lang="ar"] .sec-title .title,
html[lang="ar"] .dm-home-team-heading,
html[lang="ar"] .working-block-one .title,
html[lang="ar"] .testimonial-block-one .text {
  overflow-wrap: anywhere;
  word-break: normal;
  max-width: 100%;
}

html[lang="ar"] .dm-service-index-card-h__cta-label,
html[lang="ar"] .btn-title {
  white-space: normal;
  line-height: 1.3;
}

/* Footer RTL spacing */
html[dir="rtl"] .footer-bottom-wrapper,
html[dir="rtl"] .footer-info,
html[dir="rtl"] .social-icon {
  direction: rtl;
}

html[dir="rtl"] .social-icon a {
  margin-left: 0;
  margin-right: 10px;
}

/* Forms */
html[dir="rtl"] .form-clt input,
html[dir="rtl"] .form-clt textarea,
html[dir="rtl"] .dm-quote-form input,
html[dir="rtl"] .dm-quote-form textarea {
  text-align: right;
  direction: rtl;
}

/* —— Eastern Arabic numeral glyphs (Paralucent has none) —— */
html[lang="ar"] .count-box,
html[lang="ar"] .count-text,
html[lang="ar"] .dm-counter-prefix,
html[lang="ar"] .dm-locale-digits,
html[lang="ar"] .award-right-items-1 .content .count-box,
html[lang="ar"] .award-right-items-1 .content .count-text,
html[lang="ar"] .award-box-items-one .year,
html[lang="ar"] .service-block-one .inner-block .number,
html[lang="ar"] .work-process-section .step,
html[lang="ar"] .choose-counter .count-box,
html[lang="ar"] .testi-counter .count-box,
html[lang="ar"] .about-thumb-items .count-box,
html[lang="ar"] .footer-section .phone,
html[lang="ar"] .dm-google-review-count {
  font-family: "Noto Sans Arabic", "DM Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif !important;
  font-feature-settings: "liga" 1, "calt" 1;
  letter-spacing: 0 !important;
}

/* —— Awards: ٢٤ MUST render (WOW + font + z-index) —— */
html[lang="ar"] .award-right-items-1 {
  overflow: visible !important;
  position: relative !important;
}

html[lang="ar"] .award-right-items-1 .award-thumb {
  position: relative;
  z-index: 1 !important;
  opacity: 0.42 !important;
  pointer-events: none !important;
}

html[lang="ar"] .award-right-items-1 .content,
html[lang="ar"] .award-right-items-1 .content.wow,
html[lang="ar"] .award-right-items-1 .dm-award-counter-content {
  position: relative !important;
  z-index: 80 !important;
  opacity: 1 !important;
  visibility: visible !important;
  animation: none !important;
  -webkit-animation: none !important;
  transform: translateY(-40px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 18px !important;
  overflow: visible !important;
  pointer-events: auto !important;
}

html[lang="ar"] .award-right-items-1 .content .count-box,
html[lang="ar"] .award-right-items-1 .content .count-text,
html[lang="ar"] .award-right-items-1 .dm-award-years-count,
html[lang="ar"] .award-right-items-1 .dm-award-years-count.is-ar-static,
html[lang="ar"] .award-right-items-1 .dm-award-years-count .count-text,
html[lang="ar"] .award-right-items-1 .dm-award-years-static {
  display: inline-block !important;
  direction: ltr !important;
  opacity: 1 !important;
  visibility: visible !important;
  color: #ff6b1e !important;
  -webkit-text-fill-color: #ff6b1e !important;
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  font-family: Tahoma, "Segoe UI", "Noto Sans Arabic", sans-serif !important;
  font-size: 140px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  min-width: 1.6em !important;
  min-height: 1em !important;
  text-align: center !important;
  position: relative !important;
  z-index: 81 !important;
  text-shadow: 0 0 1px rgba(255, 107, 30, 0.35) !important;
}

/* —— Testimonials: arrows LEFT, names RIGHT —— */
html[dir="rtl"] .testimonial-one .slider-box .array-button {
  direction: ltr !important;
  right: auto !important;
  left: 42px !important;
  bottom: 34px !important;
  justify-content: flex-start !important;
}

html[dir="rtl"] .testimonial-one .testimonial-block-one .inner-box .infu {
  left: 150px !important;
  right: 44px !important;
}

html[dir="rtl"] .testimonial-one .testimonial-block-one .inner-box .infu .name-info {
  align-items: flex-end !important;
  text-align: right !important;
}

html[dir="rtl"] .testimonial-one .testimonial-block-one .inner-box .infu .name-info .name {
  display: inline-block !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin-inline-start: auto !important;
  text-align: right !important;
}

html[dir="rtl"] .testimonial-one .testimonial-block-one .inner-box .infu .name-info span {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  margin-inline-start: auto !important;
  text-align: right !important;
}

html[dir="rtl"] .page-wrapper .testimonial-block-one .inner-box .infu .name::after,
html[lang="ar"] .page-wrapper .testimonial-block-one .inner-box .infu .name::after {
  left: auto !important;
  right: 0 !important;
  width: 0;
}

html[dir="rtl"] .page-wrapper .testimonial-block-one .inner-box:hover .infu .name::after,
html[dir="rtl"] .page-wrapper .testimonial-block-one .inner-box .infu .name:hover::after,
html[lang="ar"] .page-wrapper .testimonial-block-one .inner-box:hover .infu .name::after,
html[lang="ar"] .page-wrapper .testimonial-block-one .inner-box .infu .name:hover::after {
  width: 100% !important;
}

html[dir="rtl"] .dm-testimonial-count-highlight,
html[lang="ar"] .dm-testimonial-count-highlight {
  unicode-bidi: isolate;
  direction: ltr !important;
}

/* Footer / topbar phone: + on the RIGHT (RTL start) */
html[dir="rtl"] .dm-footer-phone,
html[lang="ar"] .dm-footer-phone,
html[dir="rtl"] a.phone.dm-footer-phone,
html[lang="ar"] a.phone.dm-footer-phone,
html[dir="rtl"] .dm-topbar-phone,
html[lang="ar"] .dm-topbar-phone {
  display: inline-flex !important;
  flex-direction: row !important;
  direction: rtl !important;
  align-items: center !important;
  gap: 0 !important;
  unicode-bidi: isolate;
}

html[dir="rtl"] .dm-topbar-phone .dm-premium-topbar__icon,
html[lang="ar"] .dm-topbar-phone .dm-premium-topbar__icon {
  order: 2;
  margin-inline: 0 8px;
}

html[dir="rtl"] .dm-topbar-phone__text,
html[lang="ar"] .dm-topbar-phone__text {
  display: inline-flex !important;
  flex-direction: row !important;
  direction: rtl !important;
  align-items: center !important;
  order: 1;
}

html[dir="rtl"] .dm-footer-phone .dm-phone-plus,
html[lang="ar"] .dm-footer-phone .dm-phone-plus,
html[dir="rtl"] .dm-topbar-phone .dm-phone-plus,
html[lang="ar"] .dm-topbar-phone .dm-phone-plus {
  order: 0;
  flex: 0 0 auto;
}

html[dir="rtl"] .dm-footer-phone .dm-phone-digits,
html[lang="ar"] .dm-footer-phone .dm-phone-digits,
html[dir="rtl"] .dm-topbar-phone .dm-phone-digits,
html[lang="ar"] .dm-topbar-phone .dm-phone-digits {
  direction: ltr !important;
  unicode-bidi: isolate;
  order: 1;
  font-family: "Noto Sans Arabic", Tahoma, "Segoe UI", sans-serif !important;
  letter-spacing: 0 !important;
}

/* Devasa Media brand chip: keep Latin brand, do NOT shatter Arabic sentence flow */
html[lang="ar"] .dm-brand-orange,
html[dir="rtl"] .dm-brand-orange,
html[lang="ar"] .dm-brand-paragraph-accent,
html[dir="rtl"] .dm-brand-paragraph-accent {
  display: inline !important;
  width: auto !important;
  max-width: none !important;
  white-space: nowrap !important;
  unicode-bidi: isolate;
  vertical-align: baseline;
}

html[lang="ar"] .dm-brand-orange::after,
html[dir="rtl"] .dm-brand-orange::after,
html[lang="ar"] .dm-brand-paragraph-accent::after,
html[dir="rtl"] .dm-brand-paragraph-accent::after {
  left: auto !important;
  right: 0 !important;
}

/* Percent / plus stay on the visual right of the digits */
html[lang="ar"] .count-box {
  direction: ltr !important;
  unicode-bidi: isolate;
}

html[lang="ar"] .count-box .dm-counter-prefix {
  order: 2;
}

html[lang="ar"] .count-box {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: baseline !important;
}

html[lang="ar"] .count-box .count-text {
  order: 1;
}

/* —— Feature brand-identity card: NEVER overlap image + text —— */
html[dir="rtl"] .feature-box-style3 {
  padding-right: 40px;
  padding-left: 40px;
  overflow: hidden;
}

html[dir="rtl"] .feature-box-style3 .row {
  align-items: center;
}

html[dir="rtl"] .feature-box-style3 .image {
  left: auto !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 320px !important;
  transform: scale(0.86);
  transform-origin: center center;
  z-index: 1;
  pointer-events: none;
}

html[dir="rtl"] .feature-box-style3 .image img {
  object-fit: contain;
  max-height: 100%;
}

html[dir="rtl"] .feature-box-style3 .content,
html[dir="rtl"] .feature-box-style3 .content-style-2 {
  position: relative;
  z-index: 2;
  padding-inline: 8px 4px;
}

html[dir="rtl"] .feature-box-style3 .content .title {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
  padding-bottom: 28px !important;
  text-align: right !important;
}

html[dir="rtl"] .feature-box-style3 .content .text {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
  text-align: right !important;
  position: relative;
  z-index: 2;
}

@media (max-width: 1199.98px) {
  html[dir="rtl"] .feature-box-style3 .content .text {
    margin-right: 0 !important;
  }
}

@media (max-width: 767.98px) {
  html[dir="rtl"] .feature-box-style3 .content .text {
    margin-right: 0 !important;
  }
}

html[dir="rtl"] .feature-section .dm-brand-identity-title-right {
  text-align: right !important;
}

html[dir="rtl"] .feature-section .feature-box-style1 > .btn-style-one {
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* —— Slider / testimonial / services arrows: restore LTR order (stop >< facing) —— */
html[dir="rtl"] .dm-hero-slider-controls,
html[dir="rtl"] .array-button,
html[dir="rtl"] .dm-home-services-nav,
html[dir="rtl"] .dm-home-projects-nav,
html[dir="rtl"] .testimonial-one .slider-box .array-button {
  direction: ltr !important;
}

html[dir="rtl"] .dm-home-services-nav.array-button {
  right: auto !important;
  left: 0 !important;
}

html[dir="rtl"] .dm-home-project-actions {
  direction: ltr;
  justify-content: flex-start !important;
  margin-right: 0 !important;
  margin-left: -24px;
}

html[dir="rtl"] .service-block-one .inner-block .number,
html[lang="ar"] .service-block-one .inner-block .number {
  left: 28px;
  right: auto;
  z-index: 1;
  pointer-events: none;
}
html[dir="rtl"] .about-content {
  margin-left: 0 !important;
  margin-right: clamp(16px, 4vw, 70px);
  overflow: visible;
}

/* About: restore overhanging rotating icon ABOVE next section (TR parity) */
html[dir="rtl"] .about-section,
html[lang="ar"] .about-section {
  position: relative !important;
  z-index: 6 !important;
  overflow: visible !important;
  isolation: auto !important;
}

/* Kill orange light glow only — do not bury the icon */
html[dir="rtl"] .about-section .light-shape-1,
html[dir="rtl"] .about-section .light-shape-2,
html[lang="ar"] .about-section .light-shape-1,
html[lang="ar"] .about-section .light-shape-2 {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Match theme original: bottom overhang + high z-index */
html[dir="rtl"] .about-section .about-shape-2,
html[lang="ar"] .about-section .about-shape-2 {
  left: -8% !important;
  right: auto !important;
  bottom: -25% !important;
  z-index: 22 !important;
  opacity: 1 !important;
  filter: none !important;
  pointer-events: none !important;
  position: absolute !important;
}

html[dir="rtl"] .about-section .about-shape-1,
html[lang="ar"] .about-section .about-shape-1 {
  top: -40px !important;
  right: -200px !important;
  left: auto !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

html[dir="rtl"] .about-section .container,
html[lang="ar"] .about-section .container {
  position: relative;
  z-index: 2;
}

/* Services must stay UNDER the overhanging about icon */
html[dir="rtl"] .about-section + .service-section,
html[lang="ar"] .about-section + .service-section,
html[dir="rtl"] .service-section,
html[lang="ar"] .service-section {
  position: relative !important;
  z-index: 1 !important;
}

html[dir="rtl"] .about-image-1 {
  width: 100% !important;
  max-width: 560px;
  margin-inline: auto;
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: transparent !important;
  box-shadow: none !important;
}

html[dir="rtl"] .about-content .about-list-items,
html[dir="rtl"] .about-content .about-text,
html[dir="rtl"] .about-content .about-thumb-items {
  max-width: 100%;
  position: relative;
  z-index: 2;
}

html[dir="rtl"] .about-content .about-thumb-items {
  flex-direction: row;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

html[dir="rtl"] .about-content .about-thumb-items .content {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  flex: 1 1 auto !important;
  justify-content: flex-start !important;
  gap: 18px !important;
  padding-inline: 28px !important;
}

html[dir="rtl"] .about-content .about-thumb-items .thumb1 {
  flex: 0 0 auto;
  max-width: 46%;
}

html[dir="rtl"] .about-section .about-content > .btn-style-one {
  margin-left: 0 !important;
  margin-right: auto !important;
}

@media (max-width: 1199.98px) {
  html[dir="rtl"] .about-content {
    margin-right: 0 !important;
  }
}

/* —— Choose / Neden: client rail between image + text (match TR) —— */
html[dir="rtl"] .dm-choose-subtitle-brand,
html[lang="ar"] .dm-choose-subtitle-brand {
  unicode-bidi: isolate;
}

html[dir="rtl"] .choose-us-content-1,
html[lang="ar"] .choose-us-content-1 {
  position: relative;
  z-index: 2;
}

html[dir="rtl"] .choose-us-content-1 .choose-client-info {
  right: auto !important;
  left: -85px !important;
}

html[dir="rtl"] .choose-us-image-1 {
  margin-left: 0 !important;
  margin-right: 85px !important;
}

@media (max-width: 1199.98px) {
  html[dir="rtl"] .choose-us-image-1 {
    margin-right: 0 !important;
  }
}

/* —— Feature brand-identity: earlier block is SSOT (no negative margin overlap) —— */

html[dir="rtl"] .service-block-one .inner-block .content-box .icon,
html[lang="ar"] .service-block-one .inner-block .content-box .icon {
  position: relative;
  z-index: 2;
}

html[dir="rtl"] .service-block-one .inner-block .dot {
  left: auto;
  right: 40px;
}

/* —— Marquee bands: keep scroll loop stable under RTL —— */
html[dir="rtl"] .marquee-area2 .marquee-two,
html[lang="ar"] .marquee-area2 .marquee-two {
  direction: ltr;
  --duration: 18s;
}

html[dir="rtl"] .marquee-area2 .marquee-two .text,
html[lang="ar"] .marquee-area2 .marquee-two .text {
  direction: rtl;
  unicode-bidi: isolate;
  letter-spacing: 0 !important;
  font-family: var(--dm-ar-font) !important;
}

html[dir="rtl"] .marquee-section.style-2,
html[dir="rtl"] .marquee-section.style-3 {
  transform-origin: center center;
}

html[dir="rtl"] .marquee-area2 .marquee-two .marquee-group {
  animation-play-state: running;
}

/* —— Awards counter visibility —— */
html[lang="ar"] .award-right-items-1 .count-box,
html[lang="ar"] .award-right-items-1 .count-text {
  opacity: 1 !important;
  visibility: visible !important;
  display: inline-block;
}

/* —— Hamburger: stable bars in RTL —— */
html[dir="rtl"] .header-1 .mobile-nav-toggler span,
html[dir="rtl"] .sticky-header .mobile-nav-toggler span {
  left: auto !important;
  right: 10px !important;
}

html[dir="rtl"] .mobile-menu .menu-box {
  border-left: 0;
  border-right: 2px solid rgba(255, 107, 30, 0.42);
  box-shadow: 24px 0 70px rgba(0, 0, 0, 0.52), 0 0 46px rgba(255, 107, 30, 0.16) !important;
}

html[dir="rtl"] .mobile-menu .contact-list-one,
html[dir="rtl"] .dm-mobile-address-group,
html[dir="rtl"] .dm-mobile-office-card {
  direction: rtl;
  text-align: right;
}

@media (max-width: 767px) {
  html[lang="ar"] .banner-section .title {
    font-size: clamp(1.35rem, 6vw, 2rem);
    line-height: 1.4;
  }
}
