/* RTL (Right-to-Left) Support for Farsi/Persian — rusvpn.site
 * Loaded only when body has class lang-fa
 * Version: 1.0.0 — April 2026
 */

/* === Base RTL Direction === */
body.lang-fa {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
}

/* === Header === */
body.lang-fa .header-content {
    flex-direction: row-reverse;
}

body.lang-fa .main-nav ul {
    flex-direction: row-reverse;
}

body.lang-fa .header-auth {
    flex-direction: row-reverse;
}

body.lang-fa .logo a {
    flex-direction: row-reverse;
}

/* Language dropdown — flip to left */
body.lang-fa .lang-dropdown {
    right: auto;
    left: 0;
}

/* User menu dropdown — flip to left */
body.lang-fa .user-menu-dropdown {
    right: auto;
    left: 0;
}

/* === Navigation active indicator === */
body.lang-fa .main-nav a.active::before {
    left: 50%;
    transform: translateX(-50%); /* centered — no change needed */
}

/* === Footer === */
body.lang-fa .footer-grid {
    direction: rtl;
}

body.lang-fa .footer-col {
    text-align: right;
}

body.lang-fa .footer-col ul {
    padding-right: 0;
    padding-left: 0;
}

body.lang-fa .social-links {
    flex-direction: row-reverse;
}

/* === Buttons === */
body.lang-fa .btn-primary::before {
    /* Shine animation — reverse direction */
    animation-direction: reverse;
}

/* === Feature Content === */
body.lang-fa .feature-content li {
    padding-right: 1.5rem;
    padding-left: 0;
}

body.lang-fa .feature-content li::before {
    right: 0;
    left: auto;
    content: "◂"; /* RTL arrow */
}

body.lang-fa .feature-content th,
body.lang-fa .feature-content td {
    text-align: right;
}

/* === Pricing === */
body.lang-fa .plans-grid {
    direction: rtl;
}

body.lang-fa .pricing-card {
    text-align: right;
}

body.lang-fa .plan-features li {
    padding-right: 1.5rem;
    padding-left: 0;
}

body.lang-fa .plan-features li::before {
    right: 0;
    left: auto;
}

/* === FAQ === */
body.lang-fa .faq-item {
    text-align: right;
}

/* === Hero Section === */
body.lang-fa .hero,
body.lang-fa .hero-section {
    background: url('/assets/images/hero-bg-iran.webp') center center / cover no-repeat;
}

body.lang-fa .pricing-header {
    background: url('/assets/images/hero-bg-iran.webp') center center / cover no-repeat !important;
}

body.lang-fa .pricing-header::before {
    background: url('/assets/images/hero-bg-iran.webp') center center / cover no-repeat;
}

body.lang-fa .hero-content {
    text-align: right;
}

body.lang-fa .hero-buttons {
    flex-direction: row-reverse;
}

body.lang-fa .trust-indicators {
    flex-direction: row-reverse;
}

/* === Download Page === */
body.lang-fa .download-card {
    text-align: right;
}

body.lang-fa .download-features li {
    padding-right: 1.5rem;
    padding-left: 0;
}

/* === Auth Forms === */
body.lang-fa .auth-form {
    text-align: right;
}

body.lang-fa .auth-form input {
    text-align: right;
    direction: ltr; /* Keep email/password LTR for input */
}

body.lang-fa .auth-form input::placeholder {
    text-align: right;
}

body.lang-fa .oauth-buttons {
    flex-direction: row-reverse;
}

/* === SPA Dashboard RTL === */
body.lang-fa .spa-sidebar {
    right: 0;
    left: auto;
    border-right: none;
    border-left: 1px solid var(--border);
}

body.lang-fa .spa-content {
    margin-right: 260px;
    margin-left: 0;
}

body.lang-fa .spa-nav-item {
    text-align: right;
    flex-direction: row-reverse;
}

body.lang-fa .spa-nav-item svg {
    margin-left: 0.75rem;
    margin-right: 0;
}

/* === Cookie Banner === */
body.lang-fa #cookie-banner {
    direction: rtl;
    text-align: right;
}

/* === Mobile Menu === */
@media (max-width: 768px) {
    body.lang-fa .mobile-nav {
        text-align: right;
    }
    
    body.lang-fa .mobile-nav a {
        text-align: right;
    }
}

/* === Utility: Force LTR for numbers, emails, URLs === */
body.lang-fa .ltr,
body.lang-fa [dir="ltr"],
body.lang-fa .price-amount,
body.lang-fa .email-text,
body.lang-fa code,
body.lang-fa pre {
    direction: ltr;
    text-align: left;
}

/* === Crypto payment addresses — always LTR === */
body.lang-fa .crypto-address,
body.lang-fa .wallet-address {
    direction: ltr;
    text-align: left;
    font-family: 'Courier New', monospace;
}


/* === Article Page RTL === */
body.lang-fa .article-breadcrumb {
    direction: rtl;
    text-align: right;
}

body.lang-fa .article-breadcrumb .breadcrumb-sep {
    margin: 0 0.5rem;
}

body.lang-fa .article-content {
    text-align: right;
}

body.lang-fa .article-content ul,
body.lang-fa .article-content ol {
    padding-right: 1.5rem;
    padding-left: 0;
}

body.lang-fa .article-layout {
    flex-direction: row-reverse;
}

body.lang-fa .article-sidebar {
    order: -1;
}

/* === News Page RTL === */
body.lang-fa .news-hero {
    text-align: right;
}

body.lang-fa .news-card-body {
    text-align: right;
}

body.lang-fa .news-card-meta {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

body.lang-fa .news-card-tags {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

body.lang-fa .news-card-read {
    margin-right: 0;
    margin-left: auto;
}

/* === Terms Page RTL === */
body.lang-fa .terms-content {
    text-align: right;
}

body.lang-fa .terms-content ul {
    padding-right: 1.5rem;
    padding-left: 0;
}

body.lang-fa .terms-content ul li::before {
    right: 0;
    left: auto;
}

body.lang-fa .terms-updated {
    text-align: right;
}

/* === Auth Page RTL === */
body.lang-fa .auth-card {
    text-align: right;
}

body.lang-fa .auth-links {
    text-align: center;
}

body.lang-fa .form-group label {
    text-align: right;
    display: block;
}

body.lang-fa .form-error {
    text-align: right;
}

body.lang-fa .form-message {
    text-align: right;
}
