/* ===================================================================
   JESR — RTL-only overrides (loaded after bootstrap.rtl.min.css + site.css)
   Handles Persian-specific styling that Bootstrap RTL doesn't cover.
   =================================================================== */

/* ── Typography ─────────────────────────────────────────── */
body {
    font-family: 'Vazirmatn', 'Inter', system-ui, -apple-system, sans-serif;
}

.skip-link {
    left: auto;
    right: 1rem;
}

/* Reset Latin letter-spacing for Persian headings */
.hero-title,
.section-title,
.navbar-brand-text,
h1, h2, h3, h4, h5, h6 {
    letter-spacing: 0 !important;
}

/* ── Navbar ─────────────────────────────────────────────── */
/* Toggler icon for RTL */
.navbar-toggler-icon {
    transform: scaleX(-1);
}

/* ── Hero CTA buttons — in RTL the me-2 on primary CTA should become ms-2 */
.hero-ctas .btn + .btn {
    margin-right: 0;
    margin-left: 0;
}

.client-chip,
.proof-chip {
    display: inline-flex;
    align-items: center;
}

/* ── Feature Icon — keep direction normal for icons */
.feature-icon i {
    direction: ltr;
}

/* ── List padding for RTL */
.rich-text-content ul,
.rich-text-content ol,
.proof-card ul,
.form-card ul {
    padding-right: 1.2rem;
    padding-left: 0;
}

/* ── Footer links line-height for Persian */
.footer-links li {
    line-height: 2.2;
}

/* ── Form elements — ensure text direction is RTL */
.form-control,
.form-select {
    text-align: right;
}

textarea.form-control {
    text-align: right;
}

input[type="email"],
input[type="tel"],
input[type="url"] {
    direction: ltr;
    text-align: left;
}

/* ── Breadcrumb separator flip */
.breadcrumb-item + .breadcrumb-item::before {
    content: "\F285"; /* bi-chevron-left */
    font-family: "Bootstrap Icons";
}

/* ── Pagination chevrons */
.pagination .page-link .bi-chevron-left {
    transform: scaleX(-1);
}
.pagination .page-link .bi-chevron-right {
    transform: scaleX(-1);
}

/* ── FAQ chevron direction */
.faq-chevron {
    transform: scaleX(-1);
}
.faq-item.open .faq-chevron {
    transform: scaleX(-1) rotate(180deg);
}

/* ── Stat card direction for numbers stays LTR */
.stat-value,
.stat-number {
    direction: ltr;
    unicode-bidi: isolate;
}

/* ── Tech badge keep icon LTR */
.tech-badge i,
.tech-card i {
    direction: ltr;
}

/* ── Card text alignment */
.article-card-body,
.portfolio-card-body {
    text-align: right;
}

.faq-wrap .accordion-button,
.faq-wrap .accordion-body,
.rich-text-content,
.proof-card,
.timeline-card,
.footer,
.navbar-jesr .nav-link,
.navbar-trust {
    text-align: right;
}

.navbar-jesr .navbar-nav {
    padding-right: 0;
}

.navbar-jesr .navbar-collapse {
    text-align: right;
}

@media (max-width: 991.98px) {
    .navbar-jesr .navbar-nav {
        align-items: stretch !important;
        gap: .3rem !important;
    }

    .navbar-jesr .nav-link,
    .navbar-jesr .btn {
        text-align: right;
        justify-content: flex-start;
    }

    .navbar-jesr .nav-item {
        width: 100%;
    }
}

/* Proof-card and footer flex-direction: row is correct in RTL (flows right-to-left naturally) */

/* ── Social links flex stays same */
.social-link {
    margin-left: 0;
}

/* ── Keep numeric content stable without forcing all Persian badges to LTR */
.proof-value {
    direction: ltr;
    unicode-bidi: isolate;
}

/* ── Animations — flip translateX if any */
.animate-fade-up {
    transform: translateY(30px);
}
