/* Arabic Fonts */
@font-face {
    font-family: 'Handi';
    src: url('/static/handi_regular.otf') format('opentype');
    font-weight: 400;
}

@font-face {
    font-family: 'Handi';
    src: url('/static/handi_semibold.otf') format('opentype');
    font-weight: 600;
}

@font-face {
    font-family: 'Handi';
    src: url('/static/handi_bold.otf') format('opentype');
    font-weight: 700;
}

/* RTL Body Styles */
html[dir="rtl"],
html[dir="rtl"] * {
    direction: rtl;
    font-family: 'Handi', Arial, sans-serif !important;
}

/* Fix for Icons in RTL */
html[dir="rtl"] [class^="ri-"],
html[dir="rtl"] [class*=" ri-"],
html[dir="rtl"] .lucide {
    font-family: 'remixicon', 'Lucide' !important;
    direction: ltr; /* Reset direction for icons if needed */
}

html[dir="rtl"] body {
    text-align: right;
}

/* Flip flex containers */
html[dir="rtl"] .flex-row {
    flex-direction: row-reverse;
}

/* Flip margins/paddings for common patterns */
html[dir="rtl"] .ml-2 {
    margin-left: 0;
    margin-right: 0.5rem;
}

html[dir="rtl"] .mr-2 {
    margin-right: 0;
    margin-left: 0.5rem;
}

html[dir="rtl"] .ml-4 {
    margin-left: 0;
    margin-right: 1rem;
}

html[dir="rtl"] .mr-4 {
    margin-right: 0;
    margin-left: 1rem;
}

html[dir="rtl"] .pl-2 {
    padding-left: 0;
    padding-right: 0.5rem;
}

html[dir="rtl"] .pr-2 {
    padding-right: 0;
    padding-left: 0.5rem;
}

html[dir="rtl"] .pl-4 {
    padding-left: 0;
    padding-right: 1rem;
}

html[dir="rtl"] .pr-4 {
    padding-right: 0;
    padding-left: 1rem;
}

/* Text alignment */
html[dir="rtl"] .text-left {
    text-align: right;
}

html[dir="rtl"] .text-right {
    text-align: left;
}

/* Sidebar positioning */
html[dir="rtl"] #sidebar {
    left: auto;
    right: 0;
    transform: translateX(100%);
}

html[dir="rtl"] #sidebar.lg\:translate-x-0 {
    transform: translateX(0);
}

/* Absolute positioning flips */
html[dir="rtl"] .left-0 {
    left: auto;
    right: 0;
}

html[dir="rtl"] .right-0 {
    right: auto;
    left: 0;
}

/* Force LTR on video marquee so infinite scroll animation works correctly */
html[dir="rtl"] .video-marquee-container,
html[dir="rtl"] .video-marquee-container * {
    direction: ltr !important;
}