/**
 * RTL (Right-to-Left) Support for Arabic Language
 */

[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .container,
[dir="rtl"] .row {
    direction: rtl;
}

[dir="rtl"] .col,
[dir="rtl"] [class*="col-"] {
    direction: rtl;
    text-align: right;
}

/* Header RTL */
[dir="rtl"] .header-top .row {
    flex-direction: row-reverse;
}

[dir="rtl"] .top-nav ul {
    flex-direction: row-reverse;
}

[dir="rtl"] .header-bottom .row {
    flex-direction: row-reverse;
}

[dir="rtl"] .header-actions {
    justify-content: flex-start;
}

[dir="rtl"] .search-element form input {
    padding-left: 80px;
    padding-right: 15px;
}

[dir="rtl"] .search-element form button {
    left: 0;
    right: auto;
    border-radius: 5px 0px 0px 5px;
}

/* Main Menu RTL */
[dir="rtl"] .main-menu ul {
    flex-direction: row-reverse;
}

/* Breadcrumb RTL */
[dir="rtl"] .breadcrumb {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

/* Product Grid RTL */
[dir="rtl"] .product .thumb,
[dir="rtl"] .product .content {
    text-align: right;
}

/* Buttons RTL */
[dir="rtl"] .btn-group {
    flex-direction: row-reverse;
}

/* Forms RTL */
[dir="rtl"] .form-group {
    text-align: right;
}

[dir="rtl"] .form-control {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] textarea.form-control {
    direction: rtl;
    text-align: right;
}

/* Footer RTL */
[dir="rtl"] .footer-area .row {
    direction: rtl;
}

[dir="rtl"] .footer-links ul {
    text-align: right;
}

[dir="rtl"] .link-follow {
    direction: rtl;
}

[dir="rtl"] .link-follow li {
    margin-left: 0;
    margin-right: 7px;
}

/* Offcanvas RTL */
[dir="rtl"] .offcanvas {
    right: auto;
    left: 0;
    transform: translateX(-100%);
}

[dir="rtl"] .offcanvas.offcanvas-open {
    transform: translateX(0);
}

/* Mobile Menu RTL */
[dir="rtl"] .offcanvas-menu ul {
    text-align: right;
}

/* Adjustments for text alignment */
[dir="rtl"] p,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6 {
    text-align: right;
}

/* Float adjustments */
[dir="rtl"] .float-left {
    float: right !important;
}

[dir="rtl"] .float-right {
    float: left !important;
}

/* Margin adjustments for common spacing */
[dir="rtl"] .ml-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

[dir="rtl"] .mr-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}
