/* Persian / RTL overrides — load AFTER assets/css/style.css */
html[lang="fa"], html[lang="fa"] body{
  font-family:'Vazirmatn','Inter',system-ui,sans-serif;
  direction:rtl;
}
html[lang="fa"] body{text-align:right}

/* Sidebar flips to the right */
html[lang="fa"] .sidebar{inset:0 0 0 auto;border-right:none;border-left:1px solid var(--border)}
html[lang="fa"] .main{margin-left:0;margin-right:var(--sidebar-w)}
html[lang="fa"] .nav-link.active::before{left:auto;right:-22px}

/* Brand dot spacing */
html[lang="fa"] .brand span{margin-right:2px}

/* Headings — tighter letter-spacing for Persian script */
html[lang="fa"] h1,
html[lang="fa"] h2,
html[lang="fa"] h3{letter-spacing:0;line-height:1.35}
html[lang="fa"] h1{line-height:1.25}

/* Eyebrow & tag — remove uppercase (no case in Persian) and loosen tracking */
html[lang="fa"] .eyebrow,
html[lang="fa"] .tag,
html[lang="fa"] .course-badge{text-transform:none;letter-spacing:.05em}

/* Hero glow flips */
html[lang="fa"] .hero-glow{right:auto;left:-10%}

/* Read more arrow flips visually */
html[lang="fa"] .read-more,
html[lang="fa"] .section-link{direction:rtl}

/* Filters / cards already work in RTL via flex/grid */

/* Stats — keep numbers LTR-readable */
html[lang="fa"] .stats strong{direction:ltr;unicode-bidi:isolate}

/* Mobile */
@media (max-width: 900px){
  html[lang="fa"] .sidebar{
    transform:translateX(100%);
    inset:0 0 0 auto;
  }
  html[lang="fa"] .sidebar.open{transform:translateX(0)}
  html[lang="fa"] .main{margin-right:0}
}

/* ---------- Single-course RTL ---------- */
html[lang="fa"] .course-cta-btn{margin-left:0;margin-right:auto}

/* ---------- Course-player RTL ---------- */
html[lang="fa"] .player-title{
  padding-left:0;padding-right:8px;
  border-left:none;border-right:1px solid var(--border);
  margin-left:0;margin-right:4px;
}
html[lang="fa"] .player-sidebar{border-left:none;border-right:1px solid var(--border)}
html[lang="fa"] .player-lecture{
  padding:11px 24px 11px 20px;
  border-left:3px solid transparent;border-right:3px solid transparent;
}
html[lang="fa"] .player-lecture.active{
  border-left-color:transparent;border-right-color:var(--accent);
}
html[lang="fa"] .player-speed{right:auto;left:14px}
html[lang="fa"] .player-sidebar-toggle{right:auto;left:18px}

@media (max-width:900px){
  html[lang="fa"] .player-sidebar{
    right:auto;left:0;
    transform:translateX(-100%);
    box-shadow:10px 0 30px -10px rgba(0,0,0,.5);
  }
  html[lang="fa"] .player-sidebar.open{transform:translateX(0)}
}
@media (max-width:640px){
  html[lang="fa"] .player-speed{right:auto;left:10px}
}

/* ---------- Single-blog RTL ---------- */
html[lang="fa"] .post-body ul,
html[lang="fa"] .post-body ol{padding-left:0;padding-right:22px}

html[lang="fa"] .post-body blockquote{
  border-left:none;border-right:3px solid var(--accent);
  padding:6px 22px 6px 0;
  font-style:normal;
}
html[lang="fa"] .post-body blockquote cite::before{content:"— "}

html[lang="fa"] .post-share{margin-left:0;margin-right:auto}

/* Keep code blocks LTR — code is always left-to-right */
html[lang="fa"] .code-block pre,
html[lang="fa"] .code-block pre code{direction:ltr;text-align:left;unicode-bidi:isolate}
html[lang="fa"] .post-body code{direction:ltr;unicode-bidi:isolate;display:inline-block}

/* Comment reply indent flips */
html[lang="fa"] .comment.reply{margin-left:0;margin-right:54px}

/* Urgency cards RTL alignment */
html[lang="fa"] .urgency-btn{margin-right:8px;margin-left:0}

@media (max-width:720px){
  html[lang="fa"] .comment.reply{margin-right:24px;margin-left:0}
  html[lang="fa"] .post-share{margin-right:0}
}

/* Form submit-row alignment */
html[lang="fa"] .comment-form .submit-row{justify-content:flex-start !important}

/* Breadcrumb separator stays the same; only directions auto-flip via RTL */

/* Inline code colour tweak — keep accent color readable on dark in FA too (no change needed) */
