/**
 * Font Definitions
 * B Mitra for Persian/Farsi text
 */

/* B Mitra Font Face */
@font-face {
    font-family: 'B Mitra';
    src: url('../fonts/BMitra.eot');
    src: url('../fonts/BMitra.eot?#iefix') format('embedded-opentype'),
         url('../fonts/BMitra.woff2') format('woff2'),
         url('../fonts/BMitra.woff') format('woff'),
         url('../fonts/BMitra.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'B Mitra';
    src: url('../fonts/BMitraBold.eot');
    src: url('../fonts/BMitraBold.eot?#iefix') format('embedded-opentype'),
         url('../fonts/BMitraBold.woff2') format('woff2'),
         url('../fonts/BMitraBold.woff') format('woff'),
         url('../fonts/BMitraBold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* Fallback to system fonts if B Mitra is not available */
.font-persian {
    font-family: 'B Mitra', 'Tahoma', 'Arial', sans-serif;
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

/* RTL adjustments for common elements */
[dir="rtl"] .space-x-8 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
    margin-right: calc(2rem * var(--tw-space-x-reverse));
    margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse)));
}

[dir="rtl"] .flex-row-reverse {
    flex-direction: row-reverse;
}

[dir="rtl"] .text-left {
    text-align: right;
}

[dir="rtl"] .text-right {
    text-align: left;
}

[dir="rtl"] .ml-auto {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .mr-auto {
    margin-right: 0;
    margin-left: auto;
}

[dir="rtl"] .pl-4 {
    padding-left: 0;
    padding-right: 1rem;
}

[dir="rtl"] .pr-4 {
    padding-right: 0;
    padding-left: 1rem;
}

/* Additional RTL Support */
[dir="rtl"] .ml-2 {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .mr-2 {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .ml-4 {
    margin-left: 0;
    margin-right: 1rem;
}

[dir="rtl"] .mr-4 {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .ml-auto {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .mr-auto {
    margin-right: 0;
    margin-left: auto;
}

/* RTL for flexbox */
[dir="rtl"] .flex-row {
    flex-direction: row-reverse;
}

/* RTL for text alignment */
[dir="rtl"] .text-left {
    text-align: right;
}

[dir="rtl"] .text-right {
    text-align: left;
}

/* RTL for icons */
[dir="rtl"] .fa-arrow-right::before {
    content: "\f060"; /* left arrow */
}

[dir="rtl"] .fa-arrow-left::before {
    content: "\f061"; /* right arrow */
}

[dir="rtl"] .fa-chevron-right::before {
    content: "\f053"; /* chevron-left */
}

[dir="rtl"] .fa-chevron-left::before {
    content: "\f054"; /* chevron-right */
}

/* RTL for borders */
[dir="rtl"] .border-l {
    border-left: 0;
    border-right-width: 1px;
}

[dir="rtl"] .border-r {
    border-right: 0;
    border-left-width: 1px;
}

/* RTL for padding */
[dir="rtl"] .pl-2 {
    padding-left: 0;
    padding-right: 0.5rem;
}

[dir="rtl"] .pr-2 {
    padding-right: 0;
    padding-left: 0.5rem;
}

[dir="rtl"] .pl-6 {
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .pr-6 {
    padding-right: 0;
    padding-left: 1.5rem;
}

/* RTL for rounded corners */
[dir="rtl"] .rounded-l {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

[dir="rtl"] .rounded-r {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.footer-logo {
    filter: brightness(0) invert(1);
}

