/* RTL Support for Persian Landing Page */

/* IRANSans Font Face */
@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/IRANSans.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Base RTL Styles */
body {
    direction: rtl;
    text-align: right;
    font-family: 'IRANSans', 'Tahoma', 'Arial', sans-serif;
}

/* Force RTL for all text elements */
h1, h2, h3, h4, h5, h6, p, span, div, a, button, input, textarea, label {
    direction: rtl !important;
    unicode-bidi: bidi-override !important;
}

/* Navigation RTL */
.navbar-nav {
    padding-right: 0;
    font-family: 'IRANSans', 'Inter', sans-serif;
}

.navbar-nav .nav-item {
    margin-right: 0;
    margin-left: 30px;
}

.navbar-nav .nav-item:last-child {
    margin-left: 0;
}

/* Hero Section RTL */
.hero-content h1,
.hero-content h1.wow,
.hero-content h1.fadeInLeft {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: bidi-override !important;
}

.hero-content p,
.hero-content p.wow,
.hero-content p.fadeInLeft {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: bidi-override !important;
}

.hero-content .button .btn {
    margin-right: 0;
    margin-left: 15px;
}

.hero-content .button .btn:last-child {
    margin-left: 0;
}

/* Features Section RTL */
.single-feature {
    text-align: center;
}

.single-feature i {
    text-align: center !important;
    display: block !important;
    margin: 0 auto !important;
    margin-bottom: 20px !important;
}

.single-feature h3,
.single-feature h3.wow,
.single-feature h3.fadeInUp {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: bidi-override !important;
}

.single-feature p,
.single-feature p.wow,
.single-feature p.fadeInUp {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: bidi-override !important;
}

/* Section title RTL */
.section-title h2,
.section-title h2.wow,
.section-title h2.fadeInUp {
    direction: rtl !important;
    text-align: center !important;
    unicode-bidi: bidi-override !important;
}

/* Force RTL for all content in features section */
.features .row .col-lg-4,
.features .row .col-md-6,
.features .row .col-12 {
    direction: rtl !important;
}

.features .row .col-lg-4 *,
.features .row .col-md-6 *,
.features .row .col-12 * {
    direction: rtl !important;
    unicode-bidi: bidi-override !important;
}

/* Footer RTL */
.footer .single-footer.f-link ul li {
    text-align: right;
}

/* Contact information with mixed Persian/English text */
.footer .single-footer.f-link ul li a {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: embed !important;
}

/* Force LTR for specific parts within mixed content */
.footer .single-footer.f-link ul li a span,
.footer .single-footer.f-link ul li a .ltr-text {
    direction: ltr !important;
    unicode-bidi: embed !important;
    display: inline-block !important;
}

/* Privacy Policy RTL */
.privacy-content {
    text-align: right;
}

.privacy-content ul {
    margin-right: 20px;
    margin-left: 0;
}

.privacy-toc {
    border-right: 4px solid #255456;
    border-left: none;
}

/* FAQ RTL */
.accordion-button {
    text-align: right;
}

.accordion-body {
    text-align: right;
}

/* Error Page RTL */
.error-content {
    text-align: center;
}

/* Mobile Responsive RTL */
@media (max-width: 767px) {
    .navbar-nav .nav-item {
        margin-left: 0;
        margin-bottom: 10px;
    }
    
    .hero-content .button .btn {
        margin-left: 0;
        margin-bottom: 10px;
        display: block;
        width: 100%;
    }
    
    .hero-content .button .btn:last-child {
        margin-bottom: 0;
    }
}

/* Bootstrap RTL Overrides */
.me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

.ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

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

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

/* Text Alignment */
.text-start {
    text-align: right !important;
}

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

/* Float Overrides */
.float-start {
    float: right !important;
}

.float-end {
    float: left !important;
}

/* Border Radius Adjustments for RTL */
.rounded-start {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
}

.rounded-end {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 0.375rem !important;
    border-bottom-left-radius: 0.375rem !important;
}

/* Button RTL */
.btn {
    font-family: 'IRANSans', 'Inter', sans-serif;
}

/* Icon Positioning for RTL */
.btn i {
    margin-left: 0;
    margin-right: 8px;
}

.btn i:last-child {
    margin-right: 0;
    margin-left: 8px;
}

/* Form Elements RTL */
.form-control {
    text-align: right;
    font-family: 'IRANSans', 'Inter', sans-serif;
}

.form-select {
    text-align: right;
    font-family: 'IRANSans', 'Inter', sans-serif;
}

/* List Styles RTL */
ul {
    padding-right: 0;
    padding-left: 20px;
}

ol {
    padding-right: 0;
    padding-left: 20px;
}

/* Table RTL */
.table th,
.table td {
    text-align: right;
}

/* Modal RTL */
.modal-header .btn-close {
    margin: 0;
    margin-right: auto;
}

/* Dropdown RTL */
.dropdown-menu {
    text-align: right;
}

.dropdown-item {
    text-align: right;
}

/* Breadcrumb RTL */
.breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-left: 0.5rem;
    padding-right: 0;
}

/* Pagination RTL */
.pagination .page-link {
    margin-right: 0;
    margin-left: -1px;
}

/* Alert RTL */
.alert-dismissible .btn-close {
    right: auto;
    left: 0;
}

/* Input Group RTL */
.input-group > .form-control:not(:last-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.input-group > .form-control:not(:first-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

/* Card RTL */
.card-header {
    text-align: right;
}

.card-footer {
    text-align: right;
}

/* Badge RTL */
.badge {
    margin-right: 0;
    margin-left: 5px;
}

/* Tooltip RTL */
.tooltip {
    direction: rtl;
}

/* Popover RTL */
.popover {
    direction: rtl;
    text-align: right;
}

/* Carousel RTL */
.carousel-control-prev {
    right: 0;
    left: auto;
}

.carousel-control-next {
    left: 0;
    right: auto;
}

/* Accordion RTL */
.accordion-button::after {
    margin-right: auto;
    margin-left: 0;
    transform: rotate(180deg);
}

.accordion-button:not(.collapsed)::after {
    transform: rotate(0deg);
}

/* Custom Scrollbar for RTL */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
} 