/* Scoped RTL corrections for the three Agriland home screens. */
.haganan-home-rtl,
.haganan-home-rtl #page,
.haganan-home-rtl #main,
.haganan-home-rtl .site-content,
.haganan-home-rtl .elementor {
  direction: rtl;
}

.haganan-home-rtl h1,
.haganan-home-rtl h2,
.haganan-home-rtl h3,
.haganan-home-rtl h4,
.haganan-home-rtl h5,
.haganan-home-rtl h6,
.haganan-home-rtl p,
.haganan-home-rtl li,
.haganan-home-rtl blockquote,
.haganan-home-rtl .tm-heading-desc,
.haganan-home-rtl .themetechmount-box-desc,
.haganan-home-rtl .tm-short-desc,
.haganan-home-rtl .tm-serviceboxbox-readmore,
.haganan-home-rtl .tm-box-title,
.haganan-home-rtl .tm-ptablebox-content,
.haganan-home-rtl .tm-testimonial-text {
  direction: rtl;
  unicode-bidi: plaintext;
  text-align: right;
}

/* Preserve components that are deliberately centered in the design. */
.haganan-home-rtl .tm-align-center,
.haganan-home-rtl .tm-align-center h1,
.haganan-home-rtl .tm-align-center h2,
.haganan-home-rtl .tm-align-center h3,
.haganan-home-rtl .tm-align-center p,
.haganan-home-rtl .elementor-align-center,
.haganan-home-rtl .elementor-align-center .elementor-heading-title,
.haganan-home-rtl .elementor-widget-heading .elementor-text-align-center,
.haganan-home-rtl .h3-process .elementor-heading-title,
.haganan-home-rtl .h3-process .elementor-widget-text-editor p {
  text-align: center;
}

.haganan-home-rtl ul,
.haganan-home-rtl ol {
  padding-right: 1.2em;
  padding-left: 0;
}

.haganan-home-rtl .tm-heading-subheading:not(.tm-align-center),
.haganan-home-rtl .tm-serviceboxbox-readmore,
.haganan-home-rtl .tm-box-title,
.haganan-home-rtl .tm-box-desc,
.haganan-home-rtl .tm-ptablebox,
.haganan-home-rtl .testimonial_item,
.haganan-home-rtl .elementor-widget-text-editor,
.haganan-home-rtl .elementor-widget-icon-list {
  text-align: right;
}

.haganan-home-rtl .elementor-icon-list-icon {
  margin-left: 8px;
  margin-right: 0;
}

.haganan-home-rtl .elementor-tabs-wrapper {
  direction: rtl;
}
.haganan-home-rtl .elementor-tab-title,
.haganan-home-rtl .elementor-tab-content {
  direction: rtl;
  text-align: right;
}
.haganan-home-rtl .elementor-tab-content img.alignleft,
.haganan-home-rtl img.alignleft {
  float: right;
  margin: 0 0 18px 24px;
}

/* Keep translated content inside the original Elementor/widget geometry. */
.haganan-home-rtl .elementor-column,
.haganan-home-rtl .elementor-widget-wrap,
.haganan-home-rtl .elementor-widget,
.haganan-home-rtl .themetechmount-boxes,
.haganan-home-rtl .themetechmount-box,
.haganan-home-rtl .tm-servicebox-detials,
.haganan-home-rtl .tm-box-title,
.haganan-home-rtl .tm-box-desc,
.haganan-home-rtl .tm-short-desc {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}
.haganan-home-rtl h1,
.haganan-home-rtl h2,
.haganan-home-rtl h3,
.haganan-home-rtl h4,
.haganan-home-rtl h5,
.haganan-home-rtl h6,
.haganan-home-rtl p,
.haganan-home-rtl a,
.haganan-home-rtl span {
  overflow-wrap: anywhere;
}
.haganan-home-rtl .themetechmount-box-desc,
.haganan-home-rtl .tm-short-desc,
.haganan-home-rtl .elementor-widget-text-editor {
  height: auto;
}

/* Theme icon fonts must never inherit the Hebrew content font. */
.haganan-home-rtl [class^="flaticon-"]::before,
.haganan-home-rtl [class*=" flaticon-"]::before {
  font-family: flaticon !important;
}
.haganan-home-rtl [class^="tm-agriland-icon-"]::before,
.haganan-home-rtl [class*=" tm-agriland-icon-"]::before {
  font-family: tm-agriland-icons !important;
}
.haganan-home-rtl .tm-agriland-icon-bars::before {
  content: "\f0c9" !important;
  font-family: FontAwesome !important;
}

/* Bootstrap's negative row gutter was being counted again inside Slick,
   producing uneven outer spacing and partially clipped cards. */
.haganan-home-rtl .themetechmount-boxes-row-wrapper.row {
  margin-right: 0;
  margin-left: 0;
  width: 100%;
}
.haganan-home-rtl .themetechmount-boxes-row-wrapper .slick-list {
  width: 100%;
}
.haganan-home-rtl .themetechmount-boxes .themetechmount-box-desc,
.haganan-home-rtl .themetechmount-boxes .tm-short-desc,
.haganan-home-rtl .themetechmount-boxes .tm-short-desc p {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin-right: 0;
  margin-left: 0;
}

/* Homepage 3 intentionally pulls the service cards upward over the hero.
   Revolution Slider creates its own stacking context, so without an explicit
   layer the icons, action and title sit behind the slide image. */
.page-id-14257 .themetechmount-slider-wrapper {
  z-index: 1 !important;
}
.page-id-14257 .elementor-element-de5da0a {
  position: relative;
  z-index: 20;
  overflow: visible;
}
.page-id-14257 .elementor-element-de5da0a .elementor-container,
.page-id-14257 .elementor-element-de051bf,
.page-id-14257 .elementor-element-de051bf .themetechmount-boxes,
.page-id-14257 .elementor-element-de051bf .themetechmount-boxes-inner,
.page-id-14257 .elementor-element-de051bf .slick-list {
  position: relative;
  z-index: 21;
}

/* Header and menus: logo on the right, actions and menu flow toward the left. */
.haganan-home-rtl .site-header-main,
.haganan-home-rtl #site-header-menu,
.haganan-home-rtl #site-navigation,
.haganan-home-rtl #site-navigation .nav-menu,
.haganan-home-rtl #site-navigation .mega-menu {
  direction: rtl;
}
.haganan-home-rtl #site-navigation .nav-menu > ul,
.haganan-home-rtl #site-navigation .mega-menu {
  text-align: right;
}
.haganan-home-rtl #site-navigation .sub-menu {
  right: 0;
  left: auto;
  text-align: right;
}

/* Slider text is generated after the parent RTL stylesheet. */
.haganan-home-rtl rs-module,
.haganan-home-rtl rs-slide,
.haganan-home-rtl rs-layer-wrap,
.haganan-home-rtl rs-layer,
.haganan-home-rtl .tp-caption {
  direction: rtl !important;
  unicode-bidi: plaintext;
}
.haganan-home-rtl rs-layer:not(.rev-btn),
.haganan-home-rtl .tp-caption:not(.rev-btn) {
  text-align: right !important;
}

/* Let each plugin retain its own RTL carousel geometry. */
.haganan-home-rtl .slick-slide > div,
.haganan-home-rtl .owl-item > * {
  direction: rtl;
}

.haganan-home-rtl input,
.haganan-home-rtl textarea,
.haganan-home-rtl select {
  direction: rtl;
  text-align: right;
}

/* Elementor progress bars calculate their width in LTR. Keep the geometry
   LTR, while placing the RTL title on the right and the percentage on the left. */
.haganan-home-rtl .elementor-widget-progress .elementor-title {
  display: block;
  position: relative;
  direction: rtl;
  unicode-bidi: plaintext;
  text-align: right;
  padding-left: 64px;
  padding-right: 0;
  width: calc(100% - 68px);
  margin-left: 68px;
  line-height: 1.45;
  box-sizing: border-box;
}
.haganan-home-rtl .elementor-progress-wrapper,
.haganan-home-rtl .elementor-progress-bar {
  direction: ltr;
  position: relative;
}
.haganan-home-rtl .elementor-progress-percentage {
  position: absolute;
  left: 0;
  right: auto;
  top: -34px;
  min-width: 54px;
  text-align: left;
  direction: ltr;
  unicode-bidi: isolate;
}
.haganan-home-rtl .elementor-widget-progress,
.haganan-home-rtl .elementor-widget-progress .elementor-widget-container {
  overflow: visible;
}

/* Homepage 2: the project filters were pulled upward over the RTL heading. */
@media (min-width: 768px) {
  .page-id-140 .elementor-element-e683ef7.tm-protfolio-tab {
    margin-top: 0 !important;
    padding-top: 24px;
  }
  .page-id-140 .elementor-element-0ffb703 {
    padding-bottom: 24px;
  }
  .page-id-140 .tm-sortable-wrapper,
  .page-id-140 .tm-sortable-list,
  .page-id-140 .tm-sortable-list ul {
    position: static !important;
    transform: none !important;
    margin: 0 !important;
  }
  .page-id-140 .tm-sortable-list ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px;
    direction: rtl;
  }
}

.haganan-home-rtl .tm-footer2-left,
.haganan-home-rtl .tm-footer2-right,
.haganan-home-rtl .widget,
.haganan-home-rtl .site-footer {
  direction: rtl;
  text-align: right;
}

/* Homepage 3 latest-project carousel: Agriland's LTR stretch calculation
   applies a negative right margin in RTL and pushes the gallery over copy. */
body.rtl.page-id-14257
  .elementor-element-0166aae
  .elementor-element-fe5af2d
  > .elementor-widget-wrap {
  width: 100% !important;
  max-width: 100% !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  box-sizing: border-box;
}

body.rtl.page-id-14257
  .elementor-element-0166aae
  .elementor-element-6d321f9 {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

body.rtl.page-id-14257
  .elementor-element-0166aae
  .elementor-element-5bfa406 {
  position: relative;
  z-index: 2;
}

/* Keep the complete portfolio copy inside the compact 185px carousel cards. */
body.rtl.page-id-14257
  .elementor-element-0166aae
  .themetechmount-portfoliobox-style2
  .themetechmount-box-overlay {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 14px 16px !important;
  display: flex !important;
  align-items: center;
  box-sizing: border-box;
  overflow: hidden !important;
}

body.rtl.page-id-14257
  .elementor-element-0166aae
  .themetechmount-portfoliobox-style2
  .themetechmount-box-content {
  width: 100% !important;
  height: auto !important;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow: hidden !important;
  text-align: right;
}

body.rtl.page-id-14257
  .elementor-element-0166aae
  .themetechmount-portfoliobox-style2
  .themetechmount-box-category {
  margin: 0 !important;
  min-height: 0;
}

body.rtl.page-id-14257
  .elementor-element-0166aae
  .themetechmount-portfoliobox-style2
  .themetechmount-box-title h4 {
  margin: 0 0 5px !important;
  font-size: 17px !important;
  line-height: 1.25 !important;
}

body.rtl.page-id-14257
  .elementor-element-0166aae
  .themetechmount-portfoliobox-style2
  .themetechmount-box-category p {
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden !important;
}

body.rtl.page-id-14257
  .elementor-element-0166aae
  .themetechmount-portfoliobox-style2
  .tm-project-readmore-btn {
  margin: 0 !important;
  line-height: 1.3;
  flex: 0 0 auto;
}

@media (max-width: 767px) {
  /* The custom process row on the restored front page cannot remain a
     three-column desktop grid: Hebrew labels otherwise get 31px each. */
  .page-id-4876 .elementor-element-a3f0005 > .elementor-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .page-id-4876 .elementor-element-a3f0005 > .elementor-container > .elementor-column,
  .page-id-4876 .elementor-element-a3f0011,
  .page-id-4876 .elementor-element-a3f0021,
  .page-id-4876 .elementor-element-a3f0031 {
    width: 100% !important;
    max-width: 100% !important;
  }
  .page-id-4876 .elementor-element-a3f0013,
  .page-id-4876 .elementor-element-a3f0023,
  .page-id-4876 .elementor-element-a3f0033,
  .page-id-4876 .elementor-element-a3f0014,
  .page-id-4876 .elementor-element-a3f0024,
  .page-id-4876 .elementor-element-a3f0034 {
    width: auto !important;
    max-width: none !important;
  }

  /* Stretched Agriland sections add a negative Bootstrap gutter on the
     right in RTL. Neutralise it so cards and icons stay inside the viewport. */
  .page-id-14257 .elementor-element-de5da0a .elementor-widget-wrap,
  .page-id-14257 .elementor-element-0166aae .elementor-widget-wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }
  .page-id-14257 .elementor-element-de051bf,
  .page-id-14257 .elementor-element-de051bf .themetechmount-boxes,
  .page-id-14257 .elementor-element-de051bf .slick-list {
    width: 100% !important;
    max-width: 100% !important;
  }
  .page-id-14257 .themetechmount-element-servicebox-stylethree .themetechmount-box-bottom-content {
    padding: 28px 24px 24px;
  }
  .page-id-14257 .themetechmount-element-servicebox-stylethree .tm-servicebox-detials {
    width: 100%;
  }

  /* Homepage 2 uses desktop-only spacer columns as image masks. Once the
     columns stack on mobile they become two empty 600px bands. */
  .page-id-140 .elementor-element-262f10d,
  .page-id-140 .elementor-element-b3c717c {
    display: none !important;
  }
  .page-id-140 .elementor-element-c1204a6 > .elementor-container {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .page-id-140 .elementor-element-c1204a6 > .elementor-container > .elementor-column {
    margin-block: 0 !important;
  }
  .haganan-home-rtl .elementor-tab-title,
  .haganan-home-rtl .elementor-tab-content,
  .haganan-home-rtl .tm-heading-subheading,
  .haganan-home-rtl .themetechmount-box-desc {
    text-align: right;
  }
}

@media (max-width: 1024px) {
  .page-id-14257 .elementor-element-de5da0a .elementor-widget-wrap,
  .page-id-14257 .elementor-element-0166aae .elementor-widget-wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }
  .haganan-home-rtl .tm-element-content-heading,
  .haganan-home-rtl .elementor-heading-title {
    max-width: 100%;
  }
  .haganan-home-rtl .themetechmount-boxes-row-wrapper,
  .haganan-home-rtl .slick-list {
    box-sizing: border-box;
  }
}

/* Homepage 3 service points: keep 01/02 on the edge of the centre image,
   mirroring 03/04, while the copy itself remains RTL. */
@media (min-width: 1025px) {
  body.rtl.page-id-14257
    .elementor-element-9497078
    .elementor-element-243a09e
    .tm-iconbox-wrapper {
    direction: ltr;
  }

  body.rtl.page-id-14257
    .elementor-element-9497078
    .elementor-element-243a09e
    .themetechmount-iconbox-heading {
    direction: rtl;
    text-align: right;
  }
}
