/* =====================================================
   Homeland Multilingual + RTL + Arabic Font Support
   ===================================================== */

/* Arabic Font - Cairo (DIN-style). For exact DIN Arabic Regular, add licensed font files. */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&family=Tajawal:wght@300;400;500;700&display=swap');

/* Apply Arabic font to text elements only */
html[lang="ar"] body,
html[lang="ar"] p,
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6,
html[lang="ar"] a,
html[lang="ar"] span,
html[lang="ar"] label,
html[lang="ar"] li,
html[lang="ar"] strong,
html[lang="ar"] button,
html[lang="ar"] input,
html[lang="ar"] select,
html[lang="ar"] textarea,
html[lang="ar"] .btn,
html[lang="ar"] .property-title,
html[lang="ar"] .property-location,
html[lang="ar"] .property-price,
html[lang="ar"] .property-specs,
html[lang="ar"] .footer-heading,
html[lang="ar"] .service-heading {
  font-family: "Cairo", "Tajawal", "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

html[lang="ur"] body,
html[lang="ur"] p,
html[lang="ur"] h1,
html[lang="ur"] h2,
html[lang="ur"] h3,
html[lang="ur"] h4,
html[lang="ur"] h5,
html[lang="ur"] h6,
html[lang="ur"] a,
html[lang="ur"] span,
html[lang="ur"] label,
html[lang="ur"] li,
html[lang="ur"] strong,
html[lang="ur"] button,
html[lang="ur"] input,
html[lang="ur"] select,
html[lang="ur"] textarea,
html[lang="ur"] .btn {
  font-family: "Cairo", "Tajawal", "Noto Nastaliq Urdu", "Nunito Sans", sans-serif !important;
}

/* =====================================================
   CRITICAL: Restore icon fonts (must come AFTER Arabic font rules)
   Icons use icomoon / Flaticon / fl-bigmug-line
   ===================================================== */
html[lang="ar"] [class^="icon-"],
html[lang="ar"] [class*=" icon-"],
html[lang="ar"] [class^="icon-"]:before,
html[lang="ar"] [class*=" icon-"]:before,
html[lang="ar"] [class^="icon-"]:after,
html[lang="ar"] [class*=" icon-"]:after,
html[lang="ur"] [class^="icon-"],
html[lang="ur"] [class*=" icon-"],
html[lang="ur"] [class^="icon-"]:before,
html[lang="ur"] [class*=" icon-"]:before,
html[lang="ur"] [class^="icon-"]:after,
html[lang="ur"] [class*=" icon-"]:after,
html[lang="ar"] .icon,
html[lang="ur"] .icon,
html[lang="ar"] span[class*="icon-"],
html[lang="ur"] span[class*="icon-"],
html[lang="ar"] i[class*="icon-"],
html[lang="ur"] i[class*="icon-"],
html[lang="ar"] a[class*="icon-"],
html[lang="ur"] a[class*="icon-"] {
  font-family: 'icomoon' !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Flaticon icons */
html[lang="ar"] [class^="flaticon-"],
html[lang="ar"] [class*=" flaticon-"],
html[lang="ar"] [class^="flaticon-"]:before,
html[lang="ar"] [class*=" flaticon-"]:before,
html[lang="ur"] [class^="flaticon-"],
html[lang="ur"] [class*=" flaticon-"],
html[lang="ur"] [class^="flaticon-"]:before,
html[lang="ur"] [class*=" flaticon-"]:before,
html[lang="ar"] .flaticon,
html[lang="ur"] .flaticon {
  font-family: Flaticon !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
}

/* Bigmug line icons */
html[lang="ar"] [class^="fl-bigmug-line-"],
html[lang="ar"] [class*=" fl-bigmug-line-"],
html[lang="ur"] [class^="fl-bigmug-line-"],
html[lang="ur"] [class*=" fl-bigmug-line-"] {
  font-family: "fl-bigmug-line" !important;
}

/* Owl carousel nav arrows (often use span.icon-*) */
html[lang="ar"] .owl-nav span,
html[lang="ar"] .owl-prev,
html[lang="ar"] .owl-next,
html[lang="ar"] .owl-nav button,
html[lang="ur"] .owl-nav span,
html[lang="ur"] .owl-prev,
html[lang="ur"] .owl-next,
html[lang="ur"] .owl-nav button {
  font-family: 'icomoon' !important;
}

/* Menu toggle icon */
html[lang="ar"] .site-menu-toggle,
html[lang="ar"] .site-menu-toggle span,
html[lang="ar"] .js-menu-toggle,
html[lang="ur"] .site-menu-toggle,
html[lang="ur"] .site-menu-toggle span,
html[lang="ur"] .js-menu-toggle {
  font-family: 'icomoon' !important;
}

/* Property favorite heart */
html[lang="ar"] .property-favorite,
html[lang="ar"] .property-favorite span,
html[lang="ur"] .property-favorite,
html[lang="ur"] .property-favorite span {
  font-family: 'icomoon' !important;
}

/* View module/list icons */
html[lang="ar"] .icon-view,
html[lang="ar"] .icon-view span,
html[lang="ur"] .icon-view,
html[lang="ur"] .icon-view span {
  font-family: 'icomoon' !important;
}

/* Select dropdown arrow icons */
html[lang="ar"] .select-wrap .icon,
html[lang="ur"] .select-wrap .icon {
  font-family: 'icomoon' !important;
}

/* Social icons in footer */
html[lang="ar"] .site-footer [class*="icon-"],
html[lang="ur"] .site-footer [class*="icon-"] {
  font-family: 'icomoon' !important;
}

/* ---------- Top navbar language switcher ---------- */
.lang-switcher {
  display: inline-block;
  margin-left: 12px;
  vertical-align: middle;
}
.lang-switcher select {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  outline: none;
  transition: background 0.2s;
}
.lang-switcher select:hover,
.lang-switcher select:focus {
  background: rgba(255, 255, 255, 0.22);
}
.lang-switcher select option {
  color: #222;
  background: #fff;
}

/* ---------- Fixed Bottom Language Bar ---------- */
.lang-bar-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: #1a1a1a;
  color: #fff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.lang-bar-bottom label {
  margin: 0;
  font-weight: 500;
  opacity: 0.9;
  white-space: nowrap;
}
.lang-bar-bottom select {
  background: #2d2d2d;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  min-width: 160px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.lang-bar-bottom select:hover,
.lang-bar-bottom select:focus {
  border-color: #28a745;
  background: #333;
}
.lang-bar-bottom select option {
  background: #2d2d2d;
  color: #fff;
}
body {
  padding-bottom: 56px !important;
}
@media (max-width: 576px) {
  .lang-bar-bottom {
    padding: 8px 12px;
    font-size: 13px;
    gap: 8px;
  }
  .lang-bar-bottom select {
    min-width: 130px;
    padding: 5px 10px;
  }
}

/* ========== RTL Layout ========== */
html[dir="rtl"] body,
body.rtl {
  direction: rtl;
  text-align: right;
}

/* Keep hero slider LTR so images/layout don't break */
html[dir="rtl"] .site-blocks-cover,
html[dir="rtl"] .site-blocks-cover .row,
html[dir="rtl"] .home-slider,
html[dir="rtl"] .owl-carousel,
html[dir="rtl"] .owl-stage-outer,
html[dir="rtl"] .owl-stage,
html[dir="rtl"] .owl-item {
  direction: ltr !important;
}
html[dir="rtl"] .site-blocks-cover .container,
html[dir="rtl"] .site-blocks-cover .col-md-10 {
  direction: rtl;
  text-align: center !important;
}
html[dir="rtl"] .site-blocks-cover h1,
html[dir="rtl"] .site-blocks-cover p,
html[dir="rtl"] .site-blocks-cover .btn {
  text-align: center !important;
}

/* Force hero dimensions always */
.site-blocks-cover.overlay {
  min-height: 600px !important;
  height: calc(100vh) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

html[dir="rtl"] .site-navigation,
html[dir="rtl"] .text-right,
html[dir="rtl"] .text-md-right {
  text-align: left !important;
}
html[dir="rtl"] .site-menu > li {
  float: right;
}
html[dir="rtl"] .site-menu .has-children > a:after {
  margin-left: 0;
  margin-right: 8px;
}
html[dir="rtl"] .dropdown {
  text-align: right;
  left: auto !important;
  right: 0 !important;
}
html[dir="rtl"] .dropdown.arrow-top:before {
  left: auto;
  right: 20px;
}
html[dir="rtl"] .ml-auto {
  margin-right: auto !important;
  margin-left: 0 !important;
}
html[dir="rtl"] .mr-auto {
  margin-left: auto !important;
  margin-right: 0 !important;
}
html[dir="rtl"] .property-favorite {
  left: 15px;
  right: auto;
}
html[dir="rtl"] .offer-type-wrap {
  left: auto;
  right: 15px;
}
html[dir="rtl"] .property-specs-wrap li {
  margin-left: 0;
  margin-right: 15px;
}
html[dir="rtl"] .form-control,
html[dir="rtl"] select.form-control {
  text-align: right;
}
html[dir="rtl"] .select-wrap .icon {
  left: 10px;
  right: auto;
}
html[dir="rtl"] .site-footer .list-unstyled {
  padding-right: 0;
}
html[dir="rtl"] .view-options .border-right {
  border-right: none !important;
  border-left: 1px solid #dee2e6 !important;
}
html[dir="rtl"] .site-pagination a {
  margin-left: 0;
  margin-right: 5px;
}
html[dir="rtl"] .text-center {
  text-align: center !important;
}
html[dir="rtl"] .lang-switcher {
  margin-left: 0;
  margin-right: 12px;
}
html[dir="rtl"] .lang-bar-bottom {
  flex-direction: row-reverse;
}

/* Ensure site loader hides */
.site-loader {
  display: none !important;
}

/* =====================================================
   ULTRA-STRONG icon font lock (wins over any Arabic font rule)
   ===================================================== */
body.lang-ar [class^="icon-"],
body.lang-ar [class*=" icon-"],
body.lang-ar [class^="icon-"]::before,
body.lang-ar [class*=" icon-"]::before,
body.lang-ar [class^="icon-"]::after,
body.lang-ar [class*=" icon-"]::after,
body.lang-ur [class^="icon-"],
body.lang-ur [class*=" icon-"],
body.lang-ur [class^="icon-"]::before,
body.lang-ur [class*=" icon-"]::before,
body.lang-ur [class^="icon-"]::after,
body.lang-ur [class*=" icon-"]::after,
body.lang-ar .owl-nav span,
body.lang-ar .owl-nav span::before,
body.lang-ur .owl-nav span,
body.lang-ur .owl-nav span::before,
body.lang-ar .site-menu-toggle span,
body.lang-ar .site-menu-toggle span::before,
body.lang-ur .site-menu-toggle span,
body.lang-ur .site-menu-toggle span::before,
body.lang-ar .property-favorite span,
body.lang-ar .property-favorite span::before,
body.lang-ur .property-favorite span,
body.lang-ur .property-favorite span::before,
body.lang-ar .icon-view span,
body.lang-ar .icon-view span::before,
body.lang-ur .icon-view span,
body.lang-ur .icon-view span::before,
body.lang-ar .select-wrap .icon,
body.lang-ar .select-wrap .icon::before,
body.lang-ur .select-wrap .icon,
body.lang-ur .select-wrap .icon::before {
  font-family: "icomoon" !important;
  font-style: normal !important;
  font-weight: normal !important;
  font-variant: normal !important;
  text-transform: none !important;
  line-height: 1 !important;
  speak: none !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

body.lang-ar [class^="flaticon-"],
body.lang-ar [class*=" flaticon-"],
body.lang-ar [class^="flaticon-"]::before,
body.lang-ar [class*=" flaticon-"]::before,
body.lang-ur [class^="flaticon-"],
body.lang-ur [class*=" flaticon-"],
body.lang-ur [class^="flaticon-"]::before,
body.lang-ur [class*=" flaticon-"]::before {
  font-family: "Flaticon" !important;
  font-style: normal !important;
  font-weight: normal !important;
  speak: none !important;
}

body.lang-ar [class^="fl-bigmug-line-"],
body.lang-ar [class*=" fl-bigmug-line-"],
body.lang-ur [class^="fl-bigmug-line-"],
body.lang-ur [class*=" fl-bigmug-line-"] {
  font-family: "fl-bigmug-line" !important;
}
