/**
 * RTL (Right-to-Left) Styles for Arabic Language
 * This file contains overrides for RTL layout support
 */

/* Base RTL direction */
body.rtl {
    direction: rtl;
    text-align: right;
}

/* Navbar adjustments */
body.rtl .navbar-nav {
    padding-right: 0;
}

body.rtl .navbar-collapse {
    flex-direction: row-reverse;
}

body.rtl .ms-auto {
    margin-left: unset !important;
    margin-right: auto !important;
}

body.rtl .me-auto {
    margin-right: unset !important;
    margin-left: auto !important;
}

body.rtl .ms-3 {
    margin-left: unset !important;
    margin-right: 1rem !important;
}

body.rtl .me-5 {
    margin-right: unset !important;
    margin-left: 3rem !important;
}

body.rtl .ps-lg-3 {
    padding-left: unset !important;
    padding-right: 1rem !important;
}

body.rtl .pe-lg-0 {
    padding-right: unset !important;
    padding-left: 0 !important;
}

/* Text alignment */
body.rtl .text-start {
    text-align: right !important;
}

body.rtl .text-end {
    text-align: left !important;
}

body.rtl .text-sm-start {
    text-align: right !important;
}

body.rtl .text-md-start {
    text-align: right !important;
}

body.rtl .text-lg-start {
    text-align: right !important;
}

/* List styles */
body.rtl ul {
    padding-right: 0;
    padding-left: 2rem;
}

body.rtl ul li {
    text-align: right;
}

/* Form elements */
body.rtl .form-control,
body.rtl .form-select {
    text-align: right;
}

body.rtl .form-label {
    text-align: right;
    display: block;
}

body.rtl .form-check {
    padding-left: 0;
    padding-right: 1.5em;
}

body.rtl .form-check-input {
    float: right;
    margin-left: 0.5em;
    margin-right: -1.5em;
}

/* Buttons */
body.rtl .btn {
    direction: rtl;
}

/* Cards */
body.rtl .card-body {
    text-align: right;
}

/* Footer */
body.rtl footer ul {
    text-align: right;
}

body.rtl footer .list-unstyled {
    padding-right: 0;
}

/* Offcanvas (mobile menu) */
body.rtl .offcanvas-end {
    right: auto;
    left: 0;
}

body.rtl .offcanvas-body {
    text-align: right;
}

/* Language selector */
body.rtl .language-toggle {
    direction: ltr;
}

/* Contact page specific */
body.rtl .responsive-text-contact {
    text-align: right;
}

body.rtl .email-link {
    direction: ltr;
    unicode-bidi: embed;
}

/* Phone numbers should remain LTR */
body.rtl a[href^="tel:"] {
    direction: ltr;
    unicode-bidi: embed;
}

/* Email addresses should remain LTR */
body.rtl a[href^="mailto:"] {
    direction: ltr;
    unicode-bidi: embed;
}

/* Flex adjustments */
body.rtl .d-flex {
    flex-direction: row-reverse;
}

body.rtl .d-flex.flex-column {
    flex-direction: column;
}

body.rtl .justify-content-start {
    justify-content: flex-end !important;
}

body.rtl .justify-content-end {
    justify-content: flex-start !important;
}

/* Hero sections - keep centered */
body.rtl .hero-section,
body.rtl .hero-section-product,
body.rtl .hero-section-blog,
body.rtl .hero-section-fulfillment,
body.rtl .hero-section-privacy,
body.rtl .hero-section-property-ownership,
body.rtl .hero-section-residents-guide {
    text-align: center;
}

/* Keep centered elements centered */
body.rtl .text-center {
    text-align: center !important;
}

/* Product cards */
body.rtl .card {
    text-align: right;
}

body.rtl .card-title,
body.rtl .card-text {
    text-align: right;
}

/* Blog */
body.rtl .read-more-link {
    float: right;
}

body.rtl .blog-card-img {
    direction: ltr;
}

/* Registration form */
body.rtl .content-container {
    flex-direction: row-reverse;
}

body.rtl .invalid-feedback {
    text-align: right;
}

/* Fix Bootstrap RTL issues */
body.rtl .px-lg-5 {
    padding-left: 3rem !important;
    padding-right: 3rem !important;
}

body.rtl .order-lg-1 {
    order: 2 !important;
}

body.rtl .order-lg-2 {
    order: 1 !important;
}

/* Pagination */
body.rtl .pagination {
    flex-direction: row-reverse;
}

/* Custom section (Join Us) */
body.rtl .custom-section {
    text-align: center;
}

/* Rounded container */
body.rtl .rounded-container {
    text-align: right;
}

/* Fix icon placement */
body.rtl .fa,
body.rtl .fas,
body.rtl .far,
body.rtl .fab {
    margin-left: 0.5rem;
    margin-right: 0;
}