/* فونت‌های فارسی برای سایت */

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* اعمال فونت فارسی به تمام المان‌ها */
*,
*::before,
*::after {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

body,
html {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* تنظیمات RTL */
html,
body {
    direction: rtl !important;
    text-align: right !important;
}

/* تنظیمات برای اعداد انگلیسی */
.en-number {
    direction: ltr;
    display: inline-block;
}

/* تنظیمات منو */
#mainmenu {
    direction: rtl !important;
}

#mainmenu ul {
    text-align: right !important;
    right: 0 !important;
    left: auto !important;
}

#mainmenu li {
    text-align: right !important;
}

/* تنظیمات فرم‌ها */
.form-control,
.form-underline,
input,
textarea,
select {
    text-align: right !important;
    direction: rtl !important;
}

/* تنظیمات دکمه‌ها */
.btn-main,
.btn-main *,
.btn,
button,
a span,
.btn span,
.btn-main span,
.fx-slide,
.fx-slide span,
.btn-line,
.btn-line span {
    font-family: 'Vazirmatn', sans-serif !important;
}

/* فاصله‌گذاری درست برای RTL */
.ms-80px {
    margin-right: 80px !important;
    margin-left: 0 !important;
}

.me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

.me-3 {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}

.ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

.text-start,
.text-left {
    text-align: right !important;
}

.text-end,
.text-right {
    text-align: left !important;
}

/* تنظیمات pagination */
.pagination {
    direction: rtl !important;
}

/* تنظیمات accordion */
.accordion-button {
    text-align: right !important;
}

.accordion-button::after {
    margin-right: auto !important;
    margin-left: 0 !important;
}

/* تنظیمات social icons */
.social-icons a {
    margin: 0 5px;
}

/* تنظیمات header */
.de-flex {
    flex-direction: row-reverse !important;
}

.header-col-mid {
    margin-right: auto !important;
    margin-left: 0 !important;
}

/* تنظیمات لیست */
ul,
ol {
    padding-right: 20px !important;
    padding-left: 0 !important;
}

.list-inline-item:not(:last-child) {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

/* تنظیمات آیکون‌ها */
.icofont-arrow-right::before {
    content: "\eac8" !important;
}

.fa-chevron-left::before {
    content: "\f054" !important;
}

.fa-chevron-right::before {
    content: "\f053" !important;
}

/* تنظیمات input group */
.input-group {
    flex-direction: row-reverse !important;
}

/* تراز متن */
.text-justify {
    text-align: justify !important;
}

/* تنظیمات alert */
.alert {
    text-align: right !important;
    padding-right: 1rem !important;
    padding-left: 3rem !important;
}

.alert-success {
    background-color: rgba(46, 184, 92, 0.15) !important;
    border: 1px solid rgba(46, 184, 92, 0.3) !important;
    color: #2eb85c !important;
}

.alert-error,
.alert-danger {
    background-color: rgba(231, 76, 60, 0.15) !important;
    border: 1px solid rgba(231, 76, 60, 0.3) !important;
    color: #e74c3c !important;
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.15) !important;
    border: 1px solid rgba(52, 152, 219, 0.3) !important;
    color: #3498db !important;
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.15) !important;
    border: 1px solid rgba(243, 156, 18, 0.3) !important;
    color: #f39c12 !important;
}

.btn-close {
    margin-right: auto !important;
    margin-left: 0 !important;
    position: absolute;
    left: 1rem;
    right: auto;
    opacity: 0.7;
}

.btn-close:hover {
    opacity: 1;
}

/* تنظیمات dropdown */
.dropdown-menu {
    text-align: right !important;
    right: 0 !important;
    left: auto !important;
}

/* تنظیمات card */
.card-body {
    text-align: right !important;
}

/* Fix absolute positioning for RTL */
.abs {
    right: auto !important;
}

.absolute {
    text-align: right !important;
}