/* ==========================================================================
   Abra Diesel — RTL overlay.
   Loaded ONLY by /ar/ pages, AFTER main.css. Every selector is scoped to
   [dir="rtl"] so this file is inert if it is ever loaded on an English page.
   main.css is never edited — the English site cannot regress from this file.
   ========================================================================== */

/* --- typeface ------------------------------------------------------------- */
[dir="rtl"] {
  --font-head: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  line-height: 1.85;
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { line-height: 1.4; }
/* Arabic is a joined script — tracking breaks the connecting strokes. */
[dir="rtl"] * { letter-spacing: normal; }
[dir="rtl"] .cred b, [dir="rtl"] .header-phone,
[dir="rtl"] .statgrid b, [dir="rtl"] .prose thead th { white-space: normal; }

/* --- bidi isolation for LTR data ------------------------------------------
   Phone numbers, emails, hours and cert numbers must not be reordered by the
   paragraph direction, or the + migrates to the wrong end of the number. */
[dir="rtl"] a[href^="tel:"], [dir="rtl"] a[href^="mailto:"],
[dir="rtl"] .header-phone, [dir="rtl"] [dir="ltr"], [dir="rtl"] .ltr {
  direction: ltr; unicode-bidi: isolate; text-align: start;
}

/* --- utility bar ---------------------------------------------------------- */
[dir="rtl"] .utility .wrap::after {
  content: "مقرنا الشارقة · نخدم دولة الإمارات";
  padding: 0.28rem 2.75rem 0.28rem 0.68rem;
  background-position: right 0.68rem center, right 1.1rem center, 0 0;
}
@media (max-width: 520px) {
  [dir="rtl"] .utility .wrap::after {
    content: "الإمارات";
    padding: 0.2rem 2rem 0.2rem 0.45rem;
    background-position: right 0.45rem center, right 0.75rem center, 0 0;
  }
}

/* --- header --------------------------------------------------------------- */
[dir="rtl"] .header-tagline {
  padding-left: 0; padding-right: 1.5rem;
  border-left: 0; border-right: 1px solid var(--line);
}
[dir="rtl"] .header-nav li:first-child a { padding-left: 1.05rem; padding-right: 0; }
[dir="rtl"] .header-nav li:first-child a:hover {
  padding-left: 1.05rem; padding-right: 1.05rem;
  margin-left: 0; margin-right: -1.05rem;
}

/* --- hero shades: the gradient encodes which side the copy sits on -------- */
[dir="rtl"] .page-hero-media::after {
  background: linear-gradient(270deg, rgba(10,21,70,0.96) 0%, rgba(10,21,70,0.88) 38%,
              rgba(10,21,70,0.5) 75%, rgba(10,21,70,0.3) 100%);
}
[dir="rtl"] .page-hero__shade {
  background:
    linear-gradient(270deg, rgba(10,21,70,0.98) 0%, rgba(10,21,70,0.92) 42%,
                    rgba(10,21,70,0.48) 76%, rgba(10,21,70,0.25) 100%),
    linear-gradient(0deg, rgba(10,21,70,0.48), transparent 45%);
}
@media (max-width: 850px) {
  [dir="rtl"] .page-hero__shade {
    background: linear-gradient(270deg, rgba(10,21,70,0.97), rgba(10,21,70,0.75));
  }
}

/* --- credentials strip ---------------------------------------------------- */
[dir="rtl"] .cred + .cred::before { left: auto; right: 0; }
@media (max-width: 580px) {
  [dir="rtl"] .cred:nth-child(odd)::before  { display: none !important; }
  [dir="rtl"] .cred:nth-child(even)::before { display: block !important; }
}

/* --- service proof band --------------------------------------------------- */
[dir="rtl"] .service-proof div > div {
  border-left: 0; border-right: 1px solid rgba(255,255,255,0.16);
}
[dir="rtl"] .service-proof div > div:last-child {
  border-right: 1px solid rgba(255,255,255,0.16);
  border-left: 1px solid rgba(255,255,255,0.16);
}
@media (max-width: 1050px) {
  [dir="rtl"] .service-proof div > div:nth-child(2) {
    border-right: 1px solid rgba(255,255,255,0.16);
    border-left: 1px solid rgba(255,255,255,0.16);
  }
}

/* --- contrast block, bullets --------------------------------------------- */
[dir="rtl"] .contrast > div + div { border-left: 0; border-right: 1px solid var(--line); }
@media (max-width: 760px) {
  [dir="rtl"] .contrast > div + div { border-right: 0; border-top: 1px solid var(--line); }
}
[dir="rtl"] .contrast ul.tight li { padding-left: 0; padding-right: 1.4rem; }
[dir="rtl"] .contrast ul.tight li::before { left: auto; right: 0; }
[dir="rtl"] .pillars b::before { margin-right: 0; margin-left: 0.65rem; }

/* --- every left-accent bar in the system, flipped ------------------------- */
[dir="rtl"] .measure-note      { border-left: 0; border-right: 5px solid var(--gold); }
[dir="rtl"] .service-intro     { border-left: 0; border-right: 4px solid var(--red); }
[dir="rtl"] .disclaimer        { border-left: 0; border-right: 3px solid var(--gold);
                                 padding-left: 0; padding-right: 1rem; }
[dir="rtl"] .bay-change        { border-left: 0; border-right: 4px solid var(--red); }
[dir="rtl"] .keypoint          { border-left: 0; border-right: 5px solid var(--red); }
[dir="rtl"] .honest            { border-left: 0; border-right: 5px solid var(--gold); }
[dir="rtl"] .cert-scope-big    { border-left: 0; border-right: 5px solid var(--red); }
[dir="rtl"] .toast             { border-left: 0; border-right: 5px solid var(--red); }
[dir="rtl"] .analytics-consent { border-left: 0; border-right: 5px solid var(--navy); }
[dir="rtl"] .form-status.ok    { border-left: 0; border-right: 4px solid #2e7d32; }
[dir="rtl"] .form-status.error { border-left: 0; border-right: 4px solid var(--red); }
[dir="rtl"] .prose blockquote  { border-left: 0; border-right: 4px solid var(--gold);
                                 padding: 0.6rem 1.3rem 0.6rem 0; }

/* --- chevrons point the other way ---------------------------------------- */
[dir="rtl"] .caps a::before,
[dir="rtl"] .index-col a::before { content: "‹"; margin-right: 0; margin-left: 0.55rem; }
[dir="rtl"] .index-col a:hover { padding-left: 0; padding-right: 0.3rem; }

/* --- FAQ ------------------------------------------------------------------ */
[dir="rtl"] .faq summary { padding: 1.15rem 0 1.15rem 3rem; }
[dir="rtl"] .faq .answer { padding: 0 0 1.35rem 3rem; }
[dir="rtl"] .faq summary::after {
  right: auto; left: 1rem;
  border-right: 0; border-left: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: rotate(-45deg);
}
[dir="rtl"] .faq details[open] summary::after { transform: rotate(135deg); }
[dir="rtl"] .faq-item summary { padding: 1.25rem 0 1.25rem 3rem; }
[dir="rtl"] .faq-item summary::after { right: auto; left: 0.25rem; }
[dir="rtl"] .faq-item > div { padding: 0 0 1.4rem 2.5rem; }

/* --- reveal animations ---------------------------------------------------- */
[dir="rtl"] .js-reveal .r-left  { transform: translateX(26px); }
[dir="rtl"] .js-reveal .r-right { transform: translateX(-26px); }
[dir="rtl"] .sec-head::after,
[dir="rtl"] .hero-progress i::after { transform-origin: right; }

/* --- underlines and markers that grow from the start --------------------- */
[dir="rtl"] .ind-grid a::after, [dir="rtl"] .indtile::after,
[dir="rtl"] .step::after, [dir="rtl"] .vstep figure::after { left: auto; right: 0; }
[dir="rtl"] .step::before { left: auto; right: 1.15rem; }
[dir="rtl"] .flow li::before, [dir="rtl"] ul.tick li::before,
[dir="rtl"] .approve li::before, [dir="rtl"] .ops-group li::before { left: auto; right: 0; }
[dir="rtl"] .flow li      { padding: 0.75rem 2.9rem 0.75rem 0; }
[dir="rtl"] ul.tick li    { padding-left: 0; padding-right: 1.8rem; }
[dir="rtl"] .approve li   { padding: 0.9rem 3rem 0.9rem 0; }
[dir="rtl"] .ops-group li { padding-left: 0; padding-right: 1rem; }
[dir="rtl"] ul.tick li::before {
  border-left: 0; border-right: 2px solid var(--red);
  border-bottom: 2px solid var(--red); transform: rotate(45deg);
}

/* --- tables and alignment ------------------------------------------------- */
[dir="rtl"] .data-table caption, [dir="rtl"] .data-table th, [dir="rtl"] .data-table td,
[dir="rtl"] .prose thead th, [dir="rtl"] .cert-table caption,
[dir="rtl"] .cert-table th { text-align: right; }
[dir="rtl"] .data-table th, [dir="rtl"] .data-table td,
[dir="rtl"] .cap-item { border-right: 0; border-left: 1px solid var(--line); }
[dir="rtl"] .data-table tr > *:last-child { border-left: 0; }
[dir="rtl"] .reference-gallery__head span { text-align: left; }
@media (max-width: 580px) {
  [dir="rtl"] .reference-gallery__head span { text-align: right; }
}

/* --- prose lists ---------------------------------------------------------- */
[dir="rtl"] .prose ul, [dir="rtl"] .prose ol {
  margin-left: 0; margin-right: 1.35rem; padding-left: 0; padding-right: 1.3rem;
}
[dir="rtl"] .prose li { padding-left: 0; padding-right: 0.35rem; }

/* --- sticky bars and fixed overlays --------------------------------------- */
[dir="rtl"] .action-bar a { border-left: 0; border-right: 1px solid rgba(255,255,255,0.14); }
[dir="rtl"] .action-bar a:first-child { border-right: none; }
[dir="rtl"] .skip-link      { left: auto; right: 1rem; }
[dir="rtl"] .hp             { left: auto; right: -9999px; }
[dir="rtl"] .lightbox-close { right: auto; left: 1.3rem; }
[dir="rtl"] .toast          { left: auto; right: clamp(1rem,3vw,2rem); }
[dir="rtl"] .toast-close    { right: auto; left: .5rem; }
[dir="rtl"] .analytics-consent { right: auto; left: clamp(1rem,3vw,2rem); }
@media (max-width: 760px) {
  [dir="rtl"] .toast { right: 1rem; left: 1rem; }
  [dir="rtl"] .analytics-consent { left: 1rem; right: auto; }
}
[dir="rtl"] .related-card   { padding: 1.35rem 1.35rem 1.35rem 2.5rem; }
[dir="rtl"] .related-card i { right: auto; left: 1.2rem; }
