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

/* Header + nav alignment */
html[dir="rtl"] .header-inner,
body.is-rtl .header-inner{
  flex-direction: row-reverse;
}
html[dir="rtl"] .nav,
body.is-rtl .nav{
  flex-direction: row-reverse;
}
html[dir="rtl"] .header-right,
body.is-rtl .header-right{
  flex-direction: row-reverse;
}
html[dir="rtl"] .social,
html[dir="rtl"] .footer-social,
html[dir="rtl"] .drawer-social,
body.is-rtl .social,
body.is-rtl .footer-social,
body.is-rtl .drawer-social{
  flex-direction: row-reverse;
}

/* Dropdown panels should align to the right edge */
html[dir="rtl"] .nav-dd .dd-panel,
body.is-rtl .nav-dd .dd-panel{
  left: auto;
  right: 0;
}

/* Text blocks */
html[dir="rtl"] .hero-copy,
html[dir="rtl"] .contact-copy,
html[dir="rtl"] .section .container,
body.is-rtl .hero-copy,
body.is-rtl .contact-copy,
body.is-rtl .section .container{
  text-align: right;
}

/* Keep buttons centered where needed */
html[dir="rtl"] .hero-actions,
html[dir="rtl"] .center,
html[dir="rtl"] .footer-top-grid,
html[dir="rtl"] .footer-bottom-grid{
  text-align: initial;
}

/* Contact form: keep inputs LTR for email/phone but labels RTL */
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
body.is-rtl input[type="email"],
body.is-rtl input[type="tel"]{
  direction: ltr;
  text-align: left;
}

/* Form selects: keep option text RTL, move caret to the left */
html[dir="rtl"] select.form-select,
html[dir="rtl"] .contact-form select,
body.is-rtl select.form-select,
body.is-rtl .contact-form select{
  direction: rtl;
  text-align: right;
  padding-right: .75rem;
  padding-left: 2.25rem;
  background-position: left .75rem center;
}

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


/* RTL: swap reveal directions */
html[dir="rtl"] .reveal.from-left{ transform: translateX(60px); }
html[dir="rtl"] .reveal.from-right{ transform: translateX(-60px); }
html[dir="rtl"] .reveal.is-visible{ transform: translateX(0); }

/* RTL buttons: keep consistent spacing */
html[dir="rtl"] .btn{ letter-spacing: 0; }


/* Flip common Bootstrap rows to mirror LTR layouts */
html[dir="rtl"] .row,
body.is-rtl .row{
  flex-direction: row-reverse !important;
}

/* Breadcrumbs */
html[dir="rtl"] .breadcrumb,
body.is-rtl .breadcrumb{
  flex-direction: row-reverse;
}

/* Home: swap the two-column grid blocks */
html[dir="rtl"] .home-two .panel-shadow,
body.is-rtl .home-two .panel-shadow{ order: 2; }
html[dir="rtl"] .home-two .panel-no-shadow,
body.is-rtl .home-two .panel-no-shadow{ order: 1; }

/* Generic: force common flex utilities to mirror */
html[dir="rtl"] .ms-auto,
body.is-rtl .ms-auto{ margin-left: 0 !important; margin-right: auto !important; }
html[dir="rtl"] .me-auto,
body.is-rtl .me-auto{ margin-right: 0 !important; margin-left: auto !important; }

html[dir="rtl"] .text-start,
body.is-rtl .text-start{ text-align: right !important; }
html[dir="rtl"] .text-end,
body.is-rtl .text-end{ text-align: left !important; }

/* === LTR FIX FOR PHONE NUMBERS IN RTL MODE === */
.ltr-num,
a[href^="tel:"],
a[href*="wa.me"] {
    direction: ltr !important;
    unicode-bidi: isolate !important;
    display: inline-block;
    text-align: left !important;
}
