/*
 Theme Name: GitHub (فارسی)
 RTL stylesheet — Persian / Right-to-Left overrides
*/

/* Base direction & alignment */
html[dir="rtl"] {
	direction: rtl;
	text-align: right;
}

/* Typography — use Persian-friendly stack when RTL */
html[dir="rtl"] body,
html[dir="rtl"] .hero-title,
html[dir="rtl"] .lede {
	font-family: "Vazirmatn", "Mona Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* Header navigation */
html[dir="rtl"] .primary-nav ul {
	flex-direction: row-reverse;
}

/* Mega menu grid */
html[dir="rtl"] .mega-inner {
	direction: rtl;
}

/* Hero form */
html[dir="rtl"] .hero-form,
html[dir="rtl"] .email-group {
	flex-direction: row-reverse;
}

/* Workflow tabs */
html[dir="rtl"] .tab-bar {
	flex-direction: row-reverse;
}

/* Two-column sections */
html[dir="rtl"] .two-col,
html[dir="rtl"] .showcase-content {
	grid-template-columns: 1fr 1fr;
	direction: rtl;
}

/* Footer columns */
html[dir="rtl"] .footer-cols {
	direction: rtl;
}

/* Industry grid */
html[dir="rtl"] .industry-grid {
	direction: rtl;
}

/* Final CTA */
html[dir="rtl"] .final-cta .email-group {
	flex-direction: row-reverse;
}

/* Responsive: keep original responsive behaviour but respect RTL */
@media (max-width: 960px) {
	html[dir="rtl"] .primary-nav ul {
		flex-direction: column;
	}
	html[dir="rtl"] .two-col,
	html[dir="rtl"] .showcase-content,
	html[dir="rtl"] .three-cols,
	html[dir="rtl"] .footer-cols,
	html[dir="rtl"] .industry-grid {
		grid-template-columns: 1fr;
	}
}

/* Ensure all text that should be right-aligned stays right */
html[dir="rtl"] .lede,
html[dir="rtl"] .entry-content,
html[dir="rtl"] .comment-content {
	text-align: right;
}

/* Reverse flex for nav-right on RTL */
html[dir="rtl"] .nav-right {
	flex-direction: row-reverse;
}
