html[dir="rtl"] body {
  font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif;
}

/* ==========================================================================
   RTL NAVIGATION & MOBILE RESPONSIVENESS PATCH
   ========================================================================== */

/* 1. Header & Navigation RTL Alignment (Desktop) */
[dir="rtl"] .nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
}

[dir="rtl"] .brand-link {
  margin-left: auto;
  margin-right: 0;
}

[dir="rtl"] .main-nav {
  margin-right: auto;
  margin-left: 0;
}

[dir="rtl"] .main-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.25rem;
  direction: rtl;
}

[dir="rtl"] .main-nav ul li a {
  text-align: right;
  white-space: nowrap;
}

/* 2. Top-Bar Utility RTL Layout */
[dir="rtl"] .top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  direction: rtl;
}

/* Mobile navigation uses the shared responsive drawer in style.css. */
@media screen and (max-width: 991px) {
  [dir="rtl"] .main-nav ul {
    align-items: stretch;
  }

  [dir="rtl"] .main-nav ul li a {
    text-align: right;
  }

  [dir="rtl"] .top-bar .container {
    flex-direction: column;
    gap: 0.35rem;
    text-align: center;
  }
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
  font-family: "Readex Pro", "IBM Plex Sans Arabic", Tahoma, sans-serif;
}

html[dir="rtl"] .page-hero p.motto,
html[dir="rtl"] .motto,
html[dir="rtl"] .hero-slide-content p {
  font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif;
}

html[dir="rtl"] .timeline {
  padding-left: 0;
  padding-right: 32px;
  border-left: 0;
  border-right: 3px solid var(--border-light);
}

html[dir="rtl"] .timeline-dot {
  right: -42px;
  left: auto;
}

html[dir="rtl"] blockquote {
  border-left: 0;
  border-right: 4px solid var(--energy-amber);
  padding-left: 0;
  padding-right: 20px;
}

html[dir="rtl"] .search-box input {
  padding: 12px 45px 12px 20px;
}

html[dir="rtl"] .search-box i {
  right: 18px;
  left: auto;
}

html[dir="rtl"] table {
  direction: rtl;
}

html[dir="rtl"] a[href^="tel:"],
html[dir="rtl"] a[href^="mailto:"] {
  direction: ltr;
  unicode-bidi: isolate;
}

html[dir="rtl"].page-awards .gallery-scroll-container {
  direction: rtl;
}

html[dir="rtl"].page-awards .gallery-item {
  flex: 0 0 min(82vw, 360px);
  min-width: 0;
}

html[dir="rtl"].page-awards .gallery-img-wrap {
  width: 100%;
  min-width: 0;
  aspect-ratio: 4 / 3;
}

html[dir="rtl"].page-awards .gallery-img-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

html[dir="rtl"].page-awards .scroll-nav-btn.prev {
  right: 8px;
  left: auto;
}

html[dir="rtl"].page-awards .scroll-nav-btn.next {
  right: auto;
  left: 8px;
}

@media (max-width: 480px) {
  html[dir="rtl"].page-awards .gallery-item {
    flex-basis: 88vw;
  }
}
