/* RTL (Right-to-Left) Styles for Arabic */

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

/* Reverse flex directions */
.rtl .flex-row-reverse {
    flex-direction: row-reverse;
}

.rtl .space-x-2>*+*,
.rtl .space-x-3>*+*,
.rtl .space-x-4>*+*,
.rtl .space-x-6>*+*,
.rtl .space-x-8>*+* {
    margin-left: 0;
}

.rtl .space-x-2>*:not(:last-child) {
    margin-right: 0.5rem;
}

.rtl .space-x-3>*:not(:last-child) {
    margin-right: 0.75rem;
}

.rtl .space-x-4>*:not(:last-child) {
    margin-right: 1rem;
}

.rtl .space-x-6>*:not(:last-child) {
    margin-right: 1.5rem;
}

.rtl .space-x-8>*:not(:last-child) {
    margin-right: 2rem;
}

/* Reverse padding and margins */
.rtl .pl-4 {
    padding-left: 0;
    padding-right: 1rem;
}

.rtl .pr-4 {
    padding-right: 0;
    padding-left: 1rem;
}

.rtl .ml-auto {
    margin-left: 0;
    margin-right: auto;
}

.rtl .mr-auto {
    margin-right: 0;
    margin-left: auto;
}

/* Reverse text alignment */
.rtl .text-left {
    text-align: right;
}

.rtl .text-right {
    text-align: left;
}

/* Navigation */
.rtl nav ul {
    flex-direction: row-reverse;
}

/* Language switcher positioning */
.rtl .absolute.right-0 {
    right: auto;
    left: 0;
}

.rtl .absolute.left-0 {
    left: auto;
    right: 0;
}

/* Icons reverse */
.rtl .fa-chevron-right:before {
    content: "\f053";
    /* chevron-left */
}

.rtl .fa-chevron-left:before {
    content: "\f054";
    /* chevron-right */
}

.rtl .fa-arrow-right:before {
    content: "\f060";
    /* arrow-left */
}

.rtl .fa-arrow-left:before {
    content: "\f061";
    /* arrow-right */
}

/* Rounded corners */
.rtl .rounded-l-\[20px\] {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}

.rtl .rounded-r-\[20px\] {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

/* Form inputs */
.rtl input[type="text"],
.rtl input[type="email"],
.rtl input[type="search"],
.rtl textarea,
.rtl select {
    text-align: right;
}

/* Dropdowns */
.rtl .group:hover .absolute {
    left: 0;
    right: auto;
}