/* Arabic-only content and layout corrections — 2026-09-10. */

html[lang="ar"][dir="rtl"] body.projects-page .midz-page-hero-copy h1 {
  font-size: clamp(42px, 4.2vw, 62px) !important;
  line-height: 1.14 !important;
  letter-spacing: 0 !important;
}

html[lang="ar"][dir="rtl"] body.projects-page .midz-page-hero-lead {
  color: #fff !important;
  opacity: 1 !important;
}

/* Prevent the mixed Arabic/English project title from flashing at the generic
   88px size before the title-classification script finishes. */
html[lang="ar"][dir="rtl"] body.midz-project-page .midz-project-hero-title {
  font-family: "Cairo", sans-serif !important;
  font-size: 30px !important;
  line-height: 1.35 !important;
}

html[lang="ar"][dir="rtl"] body.contact-page .midz-page-hero-lead {
  font-size: 16px !important;
  line-height: 1.8 !important;
}

html[lang="ar"][dir="rtl"] body.about-page .midz-services-copy > p:not(.midz-services-lead-spacer) {
  display: block !important;
  max-width: 680px !important;
  margin: 18px 0 0 auto !important;
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: clamp(17px, 1.35vw, 22px) !important;
  line-height: 1.85 !important;
  text-align: right !important;
}

html[lang="ar"][dir="rtl"] body.about-page .awards-sec .awards-inner h4 {
  font-size: clamp(26px, 2.7vw, 42px) !important;
  line-height: 1.35 !important;
}

@media (min-width: 992px) {
  html[lang="ar"][dir="rtl"] body.services-page:not(.about-page) .midz-service-card-media {
    left: clamp(118px, 8vw, 168px) !important;
    right: auto !important;
  }
}

@media (max-width: 991px) {
  html[lang="ar"][dir="rtl"] body.projects-page .midz-page-hero-copy h1 {
    font-size: clamp(30px, 7.6vw, 40px) !important;
    line-height: 1.22 !important;
  }

  html[lang="ar"][dir="rtl"] body.contact-page .floating-social {
    top: 72% !important;
  }

  html[lang="ar"][dir="rtl"] body.contact-page .midz-page-hero-copy,
  html[lang="ar"][dir="rtl"] body.contact-page .midz-page-hero-lead {
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
    box-sizing: border-box !important;
  }

  html[lang="ar"][dir="rtl"] body.contact-page .midz-page-hero-copy h1 {
    width: 100% !important;
    max-width: none !important;
    white-space: nowrap !important;
    font-size: clamp(38px, 10.2vw, 52px) !important;
    line-height: 1.12 !important;
  }

  html[lang="ar"][dir="rtl"] body.contact-page .midz-page-hero-lead {
    font-size: 14px !important;
    line-height: 1.75 !important;
  }

  html[lang="ar"][dir="rtl"] body.midz-project-page .midz-project-hero-title {
    font-size: 28px !important;
    line-height: 1.4 !important;
  }

  html[lang="ar"][dir="rtl"] body.services-page:not(.about-page) .midz-service-card-media {
    position: relative !important;
    inset: auto !important;
    align-self: center !important;
    margin: 20px auto 0 !important;
  }

  html[lang="ar"][dir="rtl"] body.about-page .midz-services-copy > p:not(.midz-services-lead-spacer) {
    max-width: 100% !important;
    margin-top: 14px !important;
    font-size: clamp(15px, 4.3vw, 18px) !important;
    line-height: 1.8 !important;
  }

  html[lang="ar"][dir="rtl"] body.about-page .awards-sec .awards-inner h4 {
    font-size: clamp(20px, 5.6vw, 27px) !important;
    line-height: 1.5 !important;
  }
}

/* 2026-09-16 — Arabic service detail wide-screen continuity fix.
   The base service stylesheet switches out of its compact desktop layout at 1441px,
   which causes an abrupt alignment/spacing jump. Keep the same stable geometry for
   Arabic service detail pages on wider laptop/desktop screens without touching type. */
@media (min-width: 1441px) {
  html[lang="ar"][dir="rtl"] body.service-single-page .midz-service-single-hero > .custom-container,
  html[lang="ar"][dir="rtl"] body.service-single-page .midz-service-detail-wrap > .custom-container,
  html[lang="ar"][dir="rtl"] body.service-single-page .midz-service-process > .custom-container,
  html[lang="ar"][dir="rtl"] body.service-single-page .midz-service-related > .custom-container,
  html[lang="ar"][dir="rtl"] body.service-single-page .midz-service-clients > .custom-container,
  html[lang="ar"][dir="rtl"] body.service-single-page .midz-service-tools > .custom-container,
  html[lang="ar"][dir="rtl"] body.service-single-page .midz-service-journey > .custom-container,
  html[lang="ar"][dir="rtl"] body.service-single-page .midz-service-work-sec > .custom-container {
    width: min(calc(100% - 96px), 1400px) !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    box-sizing: border-box !important;
  }

  html[lang="ar"][dir="rtl"] body.service-single-page .midz-service-single-hero {
    padding: clamp(104px, 8vw, 124px) 0 clamp(32px, 4vw, 48px) !important;
  }

  html[lang="ar"][dir="rtl"] body.service-single-page .midz-service-single-hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.76fr) !important;
    gap: clamp(18px, 2.8vw, 32px) !important;
    align-items: center !important;
  }

  html[lang="ar"][dir="rtl"] body.service-single-page .midz-service-single-copy h1 {
    max-width: 12ch !important;
  }

  html[lang="ar"][dir="rtl"] body.service-single-page .midz-service-single-copy p {
    max-width: 500px !important;
    margin-top: 12px !important;
  }

  html[lang="ar"][dir="rtl"] body.service-single-page .midz-services-actions {
    margin-top: 22px !important;
    gap: 12px !important;
  }

  html[lang="ar"][dir="rtl"] body.service-single-page .midz-service-single-hero-shape {
    width: min(100%, clamp(220px, 28vw, 360px)) !important;
    max-height: 380px !important;
  }

  html[lang="ar"][dir="rtl"] body.service-single-page .midz-service-clients,
  html[lang="ar"][dir="rtl"] body.service-single-page .midz-service-tools,
  html[lang="ar"][dir="rtl"] body.service-single-page .midz-service-journey,
  html[lang="ar"][dir="rtl"] body.service-single-page .midz-service-work-sec {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
  }
}
