/*
 * rtl.css — עד המפתח Child Theme
 * תיקוני RTL לאלמנטור ולתפריט
 */

/* ============================================================
   GLOBAL RTL DIRECTION
   ============================================================ */
html,
body,
.site,
.site-content {
  direction: rtl;
  text-align: right;
  unicode-bidi: embed;
}

/* ============================================================
   ELEMENTOR — CORE RTL FIXES
   ============================================================ */

/* Flip row direction on all Elementor rows */
.elementor-section > .elementor-container {
  flex-direction: row-reverse;
}

/* Inner sections */
.elementor-inner-section > .elementor-container,
.e-con-inner {
  flex-direction: row-reverse;
}

/* Column text alignment */
.elementor-column-wrap,
.elementor-widget-wrap,
.elementor-column > .elementor-widget-wrap {
  text-align: right;
}

/* All Elementor text widgets */
.elementor-widget-text-editor .elementor-widget-container,
.elementor-widget-heading  .elementor-widget-container,
.elementor-text-editor,
.elementor-heading-title {
  text-align: right;
  direction: rtl;
}

/* Paragraph / editor */
.wp-block-paragraph,
p {
  text-align: right;
}

/* ============================================================
   ELEMENTOR — ICON BOX (שירותים) RTL
   ============================================================ */
.elementor-icon-box-wrapper {
  flex-direction: row-reverse;
  text-align: right;
}

.elementor-icon-box-content {
  text-align: right;
}

/* Horizontal icon box: icon on the right */
.elementor-position-right .elementor-icon-box-wrapper {
  flex-direction: row;
}

.elementor-position-left .elementor-icon-box-wrapper {
  flex-direction: row-reverse;
}

.elementor-position-top .elementor-icon-box-wrapper {
  flex-direction: column;
}

/* ============================================================
   ELEMENTOR — IMAGE BOX RTL
   ============================================================ */
.elementor-image-box-wrapper {
  text-align: right;
}

.elementor-image-box-content {
  text-align: right;
}

/* ============================================================
   ELEMENTOR — BUTTON RTL
   ============================================================ */
.elementor-button-wrapper {
  text-align: right;
}

.elementor-button-content-wrapper {
  flex-direction: row-reverse;
}

.elementor-button-icon {
  margin-right: 0;
  margin-left: 8px;
}

/* ============================================================
   NAVIGATION MENU — RTL FIXES
   ============================================================ */

/* Main nav: items flow right-to-left */
.elementor-nav-menu--main > .elementor-nav-menu {
  flex-direction: row-reverse;
  padding: 0;
  margin: 0;
}

.elementor-nav-menu--main .elementor-nav-menu > li {
  float: right;
}

/* Dropdown menus open to the right */
.elementor-nav-menu .sub-menu {
  right: 0;
  left: auto;
  text-align: right;
}

.elementor-nav-menu .sub-menu li a {
  padding-right: 20px;
  padding-left: 12px;
}

/* Dropdown arrow position */
.elementor-nav-menu--main .elementor-item-sub-arrow {
  margin-right: 4px;
  margin-left: 0;
  transform: rotate(180deg); /* flip arrow for RTL */
}

/* Mobile hamburger — align right */
.elementor-nav-menu__toggle {
  margin-right: auto;
  margin-left: 0;
}

/* WordPress default nav */
.main-navigation ul {
  flex-direction: row-reverse;
  text-align: right;
}

.main-navigation ul ul {
  right: 0;
  left: auto;
}

.main-navigation ul ul ul {
  right: 100%;
  left: auto;
}

/* ============================================================
   ELEMENTOR — LISTS & BULLETS
   ============================================================ */
.elementor-widget-icon-list .elementor-icon-list-items {
  text-align: right;
}

.elementor-icon-list-item {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.elementor-icon-list-icon {
  margin-right: 0;
  margin-left: 10px;
}

.elementor-icon-list-text {
  text-align: right;
}

/* ============================================================
   ELEMENTOR — ACCORDION & TOGGLE
   ============================================================ */
.elementor-accordion-item,
.elementor-toggle-item {
  text-align: right;
  direction: rtl;
}

.elementor-tab-title {
  direction: rtl;
  text-align: right;
  padding-right: 20px;
  padding-left: 50px;
}

.elementor-tab-title .elementor-accordion-icon {
  left: 20px;
  right: auto;
}

.elementor-tab-content {
  text-align: right;
  direction: rtl;
}

/* ============================================================
   ELEMENTOR — TESTIMONIALS
   ============================================================ */
.elementor-testimonial-wrapper {
  direction: rtl;
}

.elementor-testimonial-content,
.elementor-testimonial-name,
.elementor-testimonial-job {
  text-align: right;
}

/* ============================================================
   ELEMENTOR — COUNTER / STATS
   ============================================================ */
.elementor-counter-wrapper {
  text-align: center; /* stats stay centered */
  direction: rtl;
}

/* ============================================================
   ELEMENTOR — FORMS
   ============================================================ */
.elementor-form,
.elementor-form-fields-wrapper {
  direction: rtl;
}

.elementor-field-group {
  text-align: right;
}

.elementor-field-label {
  text-align: right;
  direction: rtl;
}

.elementor-field {
  direction: rtl;
  text-align: right;
}

.elementor-message {
  text-align: right;
}

/* ============================================================
   ELEMENTOR — POSTS / BLOG
   ============================================================ */
.elementor-post__text,
.elementor-post__title,
.elementor-post__excerpt {
  text-align: right;
  direction: rtl;
}

.elementor-post__meta-data {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

/* ============================================================
   SERVICE CARDS — RTL LAYOUT
   ============================================================ */
.service-card {
  text-align: right;
}

.service-card .service-icon,
.service-card .elementor-icon-box-icon {
  margin-right: 0;
  margin-left: auto;
}

.service-card::before {
  right: 0;
  left: auto;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}

/* ============================================================
   TEAM CARDS — RTL
   ============================================================ */
.team-card {
  text-align: center; /* team cards stay centered */
}

/* ============================================================
   PROCESS STEPS — RTL ARROWS
   ============================================================ */
.process-step:not(:first-child)::after {
  /* Arrow points LEFT (←) for RTL right-to-left flow */
  content: '←';
  left: -14px;
  right: auto;
}

/* ============================================================
   STATS BAR — RTL
   ============================================================ */
.stats-grid {
  flex-direction: row-reverse;
}

/* ============================================================
   FOOTER — RTL
   ============================================================ */
.site-footer,
.footer-grid,
.footer-col {
  direction: rtl;
  text-align: right;
}

.footer-col ul li a:hover {
  padding-right: 8px;
  padding-left: 0;
}

/* ============================================================
   BREADCRUMBS — RTL
   ============================================================ */
.breadcrumbs,
.breadcrumb,
nav.woocommerce-breadcrumb {
  direction: rtl;
  text-align: right;
}

.breadcrumbs .separator::before {
  content: '\\';
}

/* ============================================================
   WOOCOMMERCE (if used later) — RTL BASE
   ============================================================ */
.woocommerce,
.woocommerce-page {
  direction: rtl;
  text-align: right;
}

.woocommerce ul.products li.product {
  text-align: right;
}

/* ============================================================
   MISC ELEMENTOR RTL PATCHES
   ============================================================ */

/* Divider widget */
.elementor-divider {
  direction: rtl;
}

/* Progress bar */
.elementor-progress-bar {
  direction: ltr; /* keep progress-bar LTR for visual fill direction */
}

/* Scroll-to-top button (if used) */
.elementor-button-icon.elementor-align-icon-right {
  margin-right: 8px;
  margin-left: 0;
}

.elementor-button-icon.elementor-align-icon-left {
  margin-left: 8px;
  margin-right: 0;
}

/* ============================================================
   RESPONSIVE RTL — MOBILE
   ============================================================ */
@media (max-width: 768px) {

  /* Nav hamburger aligns right on mobile */
  .elementor-nav-menu__toggle {
    margin-right: auto;
    margin-left: 0;
  }

  .elementor-nav-menu--dropdown .elementor-nav-menu {
    text-align: right;
    direction: rtl;
  }

  .elementor-nav-menu--dropdown .sub-menu {
    text-align: right;
  }

  .elementor-section > .elementor-container {
    flex-direction: column;
  }

  /* Icon lists on mobile */
  .elementor-icon-list-item {
    justify-content: flex-end;
  }
}
