/* Arabic locale: right-to-left flow for shared English-based CMS templates. */
html[dir="rtl"],
html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
  font-family: "Noto Naskh Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}

html[dir="rtl"] body { unicode-bidi: plaintext; }
html[dir="rtl"] .container,
html[dir="rtl"] main,
html[dir="rtl"] section,
html[dir="rtl"] footer { direction: rtl; }
html[dir="rtl"] .row { direction: rtl; }
html[dir="rtl"] .row > [class*="col-"] { float: right; }
html[dir="rtl"] .text-left { text-align: right !important; }
html[dir="rtl"] .text-right { text-align: left !important; }
html[dir="rtl"] .pull-left { float: right !important; }
html[dir="rtl"] .pull-right { float: left !important; }

/* Desktop header: keep the brand at the right and the menu flowing RTL. */
html[dir="rtl"] .navbar-header { float: right; }
html[dir="rtl"] .navbar-nav { float: right; }
html[dir="rtl"] .navbar-nav > li { float: right; }
html[dir="rtl"] .navbar-nav.navbar-right { float: left !important; }
html[dir="rtl"] .navbar .dropdown-menu { right: 0; left: auto; text-align: right; }
html[dir="rtl"] .navbar .dropdown-menu .dropdown-menu { right: 100%; left: auto; }
html[dir="rtl"] #navbar .xl-language-switcher > a { margin: 0 10px 0 0; }
html[dir="rtl"] .navbar-toggle { float: left; margin-right: 0; margin-left: 15px; }

/* Keep media/text layouts balanced when the reading direction is reversed. */
html[dir="rtl"] .product-hub-hero-grid,
html[dir="rtl"] .product-hub-card,
html[dir="rtl"] .contact-page-grid,
html[dir="rtl"] .project-detail-grid,
html[dir="rtl"] .gh-detail-layout,
html[dir="rtl"] .irrigation-page .intro-box { direction: rtl; }
html[dir="rtl"] .product-hub-card-media,
html[dir="rtl"] .product-hub-card-copy { direction: rtl; text-align: right; }
html[dir="rtl"] .home-product-grid,
html[dir="rtl"] .home-product-card,
html[dir="rtl"] .footer-contact-list,
html[dir="rtl"] .footer-contact-item { direction: rtl; }
html[dir="rtl"] .footer-contact-item { flex-direction: row; }
html[dir="rtl"] .footer-contact-item svg { flex: 0 0 18px; }
html[dir="rtl"] .home-video-content,
html[dir="rtl"] .home-product-heading,
html[dir="rtl"] .home-product-copy,
html[dir="rtl"] .adv_bg,
html[dir="rtl"] .about_bg,
html[dir="rtl"] .news_bg,
html[dir="rtl"] .projectlist-page,
html[dir="rtl"] .contact-page,
html[dir="rtl"] .product-hub-page,
html[dir="rtl"] .irrigation-page,
html[dir="rtl"] .machinery-page { text-align: right; }

html[dir="rtl"] .home-product-link span,
html[dir="rtl"] .home-video-cta span,
html[dir="rtl"] .product-hub-link span { display: inline-block; transform: scaleX(-1); }
html[dir="rtl"] .crumbs { direction: rtl; }
html[dir="rtl"] .form-control,
html[dir="rtl"] textarea { direction: rtl; text-align: right; }
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="url"] { direction: ltr; text-align: left; }
html[dir="rtl"] table { direction: rtl; }
html[dir="rtl"] th, html[dir="rtl"] td { text-align: right; }
html[dir="rtl"] .footer_nav { direction: rtl; }
html[dir="rtl"] .footer_nav .foot_nav { float: right; }
html[dir="rtl"] .online_service { direction: rtl; }
html[dir="rtl"] .online_service .onlineMenu { text-align: right; }

@media (max-width: 767px) {
  html[dir="rtl"] .navbar-header { float: none; }
  html[dir="rtl"] .navbar-nav,
  html[dir="rtl"] .navbar-nav > li { float: none; }
  html[dir="rtl"] #navbar .navbar-nav { text-align: right; }
  html[dir="rtl"] .navbar .dropdown-menu,
  html[dir="rtl"] .navbar .dropdown-menu .dropdown-menu { right: auto; left: auto; }
  html[dir="rtl"] .product-hub-hero-grid,
  html[dir="rtl"] .contact-page-grid,
  html[dir="rtl"] .irrigation-page .intro-box { grid-template-columns: minmax(0, 1fr); }
  html[dir="rtl"] .home-product-card { text-align: right; }
  html[dir="rtl"] .footer_nav { display: flex; flex-direction: row-reverse; }
  html[dir="rtl"] .footer_nav .foot_nav { float: none; }
  html[dir="rtl"] .online_service { left: 0; right: auto; }
}
