/* ============================================================================
   UNO CREATIVE GROUP — rtl.css
   Arabic right-to-left overrides. Loaded on every page; activates only when
   <html dir="rtl"> is set by lang.js. Logical properties handle most flips;
   this file fixes the few places that use physical direction or fixed columns.
   ========================================================================== */

[dir="rtl"] {
  font-family: var(--f-d); /* Archivo has basic Arabic fallback; system Arabic takes over */
}

/* Arabic reads better slightly looser; relax the tight Latin tracking */
[dir="rtl"] .display,
[dir="rtl"] .hero-type h1,
[dir="rtl"] .page-head h1,
[dir="rtl"] .r-name,
[dir="rtl"] .cta h2,
[dir="rtl"] .mark {
  letter-spacing: 0;
  line-height: 1.05;
}

/* Grid is symmetric, but the hero border sits on the left in LTR; move it */
[dir="rtl"] .hero-grid { border-left: none; border-right: 1px solid var(--line); }
[dir="rtl"] .hero-type { border-right: none; border-left: 1px solid var(--line); }
@media (max-width: 900px) {
  [dir="rtl"] .hero-type { border-left: none; border-bottom: 1px solid var(--line); }
}

/* Register columns mirror: index on the right, entity on the left */
[dir="rtl"] .reg-head .lbl.l-no   { grid-column: 12 / 13; text-align: right; }
[dir="rtl"] .reg-head .lbl.l-name { grid-column: 8 / 12; }
[dir="rtl"] .reg-head .lbl.l-desc { grid-column: 1 / 8; }
[dir="rtl"] .r-no   { grid-column: 12 / 13; text-align: right; }
[dir="rtl"] .r-name { grid-column: 8 / 12; }
[dir="rtl"] .r-desc { grid-column: 2 / 8; }
[dir="rtl"] .r-ent  { grid-column: 1 / 2; text-align: left; }

@media (max-width: 900px) {
  [dir="rtl"] .reg-head .lbl.l-no   { grid-column: 6 / 7; }
  [dir="rtl"] .reg-head .lbl.l-name { grid-column: 1 / 6; }
  [dir="rtl"] .r-no   { grid-column: 6 / 7; }
  [dir="rtl"] .r-name { grid-column: 1 / 6; }
  [dir="rtl"] .r-desc { grid-column: 1 / 7; text-align: right; }
  [dir="rtl"] .r-ent  { grid-column: 1 / 7; text-align: right; }
}

/* Services columns mirror */
[dir="rtl"] .svc-no   { grid-column: 12 / 13; text-align: right; }
[dir="rtl"] .svc-main { grid-column: 7 / 12; }
[dir="rtl"] .svc-list { grid-column: 1 / 6; }
@media (max-width: 900px) {
  [dir="rtl"] .svc-no   { grid-column: 6 / 7; }
  [dir="rtl"] .svc-main { grid-column: 1 / 6; }
  [dir="rtl"] .svc-list { grid-column: 1 / 7; }
}

/* Split editorial mirror */
[dir="rtl"] .split .col-head { grid-column: 9 / 13; }
[dir="rtl"] .split .col-body { grid-column: 1 / 8; }
@media (max-width: 900px) {
  [dir="rtl"] .split .col-head, [dir="rtl"] .split .col-body { grid-column: 1; }
}

/* Contact mirror */
[dir="rtl"] .contact-aside { grid-column: 9 / 13; border-right: none; border-left: 1px solid var(--line); }
[dir="rtl"] .contact-main  { grid-column: 1 / 9; }
@media (max-width: 900px) {
  [dir="rtl"] .contact-aside { grid-column: 1; border-left: none; border-bottom: 1px solid var(--line); }
  [dir="rtl"] .contact-main  { grid-column: 1; }
}

/* Work grid: flip which column loses its right border */
[dir="rtl"] .work-item { border-right: none; border-left: 1px solid var(--line); }
[dir="rtl"] .work-item:nth-child(2n) { border-left: none; }
@media (max-width: 900px) {
  [dir="rtl"] .work-item { border-left: none; }
}

/* Button arrow points left in RTL */
[dir="rtl"] .btn-arrow::after { content: ' ←'; }

/* Clients label spans mirror */
[dir="rtl"] .clients .lbl { grid-column: 11 / 13; }
[dir="rtl"] .clients .names { grid-column: 1 / 11; }
@media (max-width: 900px) {
  [dir="rtl"] .clients .lbl, [dir="rtl"] .clients .names { grid-column: 1; }
}
