/* Public bilingual layout corrections. Artwork pixels, faces and wordmarks stay unreflected. */
html[dir="rtl"] .panoramic-hero .hero-content {
  direction: rtl;
  align-items: flex-start;
  text-align: start;
}
html[dir="rtl"] .panoramic-hero .hero-content > * {
  direction: rtl;
  text-align: start;
  align-self: flex-start;
}
html[dir="rtl"] .panoramic-hero .hero-controls,
html[dir="rtl"] .panoramic-hero .slide-select {
  direction: rtl;
}
html[dir="rtl"] .panoramic-hero .hero-edition {
  margin-left: 0;
  margin-inline-start: auto;
  text-align: start;
  letter-spacing: 0;
}

@media (min-width:801px) {
  html[dir="rtl"] .panoramic-hero .hero-leadership .hero-person {
    left: -2%;
    right: auto;
  }
  html[dir="rtl"] .panoramic-hero .hero-leadership .hero-shade {
    background: linear-gradient(270deg,#10291fce 0%,#10291f80 43%,transparent 70%),linear-gradient(0deg,#10291fcc,transparent 35%);
  }
  /* The Dar Kout logotype is baked into the photo: relocate/crop the media, never reflect it. */
  html[dir="rtl"] .panoramic-hero .hero-creative {
    background: #10291f;
  }
  html[dir="rtl"] .panoramic-hero .hero-creative .hero-background {
    left: 0;
    right: auto;
    width: 58%;
    object-position: 85% 50%;
  }
  html[dir="rtl"] .panoramic-hero .hero-creative .hero-shade {
    background: linear-gradient(270deg,#10291f 0%,#10291fee 38%,#10291f55 59%,transparent 78%),linear-gradient(0deg,#10291fb0,transparent 58%);
  }
  /* Preserve the original right-hand logos by moving their image pane to the left. */
  html[dir="rtl"] .case-arfaj-brand {
    background: #10291f;
  }
  html[dir="rtl"] .case-arfaj-brand > img {
    position: absolute;
    inset-block: 0;
    left: 0;
    right: auto;
    width: 58%;
    object-position: 90% 50%;
  }
  html[dir="rtl"] .case-arfaj-brand .case-shade {
    background: linear-gradient(270deg,#0b231df2 0%,#0b231de6 38%,#0b231d44 62%,transparent 82%),linear-gradient(0deg,#0b231dd9,transparent 80%);
  }
}
html[dir="rtl"] .case-arfaj-brand .case-title {
  align-items: flex-start;
}
html[dir="rtl"] .case-arfaj-brand .case-title > * {
  margin-inline-start: 0;
  margin-inline-end: auto;
  text-align: start;
}
@media (max-width:800px) {
  html[dir="rtl"] .panoramic-hero .hero-leadership .hero-person {
    left: -9%;
    right: auto;
  }
}
@media (max-width:360px) {
  html[dir="rtl"] .panoramic-hero .hero-leadership .hero-person {
    left: -14%;
    right: auto;
  }
}

/* These are forward link affordances with the native right-arrow path, not generic SVGs. */
html[dir="rtl"] :is(main,.contact-section) :is(a.button,a.text-link,a.slive-button,a.slive-text-link,a.cp-invitation-link,a.client-mark) > svg.icon:has(> path[d="M5 12h14m-6-6 6 6-6 6"]),
html[dir="rtl"] main a.studio-exhibit > .exhibit-caption > svg.icon:has(> path[d="M5 12h14m-6-6 6 6-6 6"]),
html[dir="rtl"] .blog-home-heading a.button > svg.icon:has(> path[d="M5 12h14m-6-6 6 6-6 6"]),
html[dir="rtl"] .blog-section-heading > a > svg.icon:has(> path[d="M5 12h14m-6-6 6 6-6 6"]),
html[dir="rtl"] .blog-footer > a:last-child > svg.icon:has(> path[d="M5 12h14m-6-6 6 6-6 6"]) {
  transform: scaleX(-1);
}

/* Copy begins at the reading edge; the portrait remains its original, unreflected photograph. */
@media (min-width:801px) {
  .about-opening {
    grid-template-columns: minmax(0,1.4fr) minmax(0,1fr);
  }
  .about-opening > .about-lead {
    grid-column: 1;
    grid-row: 1;
  }
  .about-opening > .about-portrait {
    grid-column: 2;
    grid-row: 1;
  }
}
@media (max-width:800px) {
  .about-opening {
    display: flex;
    flex-direction: column;
  }
  .about-opening > .about-lead { order: 0; }
  .about-opening > .about-portrait { order: 1; }
}

/* Riwaq already selects localized composition and transport icons; its photos must retain their pixels. */
html[dir="ltr"] .rw-hs-art img {
  transform: none;
}

/* Preserve the full language label and 44px menu at narrow Arabic widths. */
@media(max-width:360px){
  html[dir="rtl"] .site-header{gap:8px;padding-left:max(12px,env(safe-area-inset-left,0px));padding-right:max(12px,env(safe-area-inset-right,0px))}
  html[dir="rtl"] .site-header .header-actions{gap:6px}
  html[dir="rtl"] .site-header .menu-toggle{width:44px;height:44px;flex-shrink:0}
}
