/* rtl.css - نسخه کامل RTL برای قالب Medica Green */

html[dir="rtl"],
body.rtl {
	direction: rtl;
	unicode-bidi: embed;
	text-align: right;
}

/* پایه */
body.rtl * {
	letter-spacing: normal;
}

body.rtl input,
body.rtl textarea,
body.rtl select,
body.rtl button {
	text-align: right;
}

body.rtl input[type="email"],
body.rtl input[type="url"],
body.rtl input[type="search"],
body.rtl input[type="text"],
body.rtl textarea {
	direction: rtl;
}

body.rtl input[type="email"]::placeholder,
body.rtl input[type="url"]::placeholder,
body.rtl input[type="search"]::placeholder,
body.rtl input[type="text"]::placeholder,
body.rtl textarea::placeholder {
	text-align: right;
}

/* لوگو و برند */
body.rtl .brand,
body.rtl .brand-text,
body.rtl .header-actions,
body.rtl .mini-links,
body.rtl .main-navigation ul,
body.rtl .mobile-menu-panel ul,
body.rtl .hero-actions,
body.rtl .hero-search,
body.rtl .single-meta,
body.rtl .single-tax,
body.rtl .nav-links,
body.rtl .footer-menu ul,
body.rtl .section-head {
	direction: rtl;
}

/* منوها */
body.rtl .main-navigation a,
body.rtl .mobile-menu-panel a,
body.rtl .footer-menu a {
	text-align: right;
}

/* پنل جستجو */
body.rtl .search-panel .search-form {
	flex-direction: row;
}

body.rtl .search-panel input[type="search"] {
	text-align: right;
}

body.rtl .search-panel button {
	white-space: nowrap;
}

/* تیکر خبر */
body.rtl .ticker-item {
	direction: rtl;
}

body.rtl .ticker-item a {
	text-align: right;
}

/* برای اسکرول طبیعی در راست‌به‌چپ */
@keyframes tickerMove {
	from { transform: translateX(0); }
	to   { transform: translateX(-40%); }
}

/* Hero */
body.rtl .hero-content,
body.rtl .hero-panel,
body.rtl .glass-card,
body.rtl .feature-content,
body.rtl .mini-feature,
body.rtl .faq-a {
	text-align: right;
}

body.rtl .hero-search input {
	text-align: right;
}

/* دسته‌بندی‌ها */
body.rtl .cat-tile {
	text-align: right;
}

body.rtl .cat-meta {
	direction: rtl;
}

body.rtl .cat-pill {
	direction: ltr; /* slug انگلیسی بهتر نمایش داده می‌شود */
	font-family: inherit;
}

/* کارت‌ها */
body.rtl .post-card .content,
body.rtl .post-card h3,
body.rtl .post-card .excerpt,
body.rtl .post-row .content,
body.rtl .post-row h2,
body.rtl .post-row .excerpt {
	text-align: right;
}

body.rtl .post-card .meta,
body.rtl .post-row .meta {
	direction: rtl;
}

body.rtl .card-tag {
	right: 10px;
	left: auto;
}

/* آرشیو / سایدبار */
body.rtl .archive-head,
body.rtl .content-area-card,
body.rtl .widget-area,
body.rtl .widget,
body.rtl .widget li a {
	text-align: right;
}

body.rtl .widget ul,
body.rtl .widget ol {
	padding-right: 0;
	padding-left: 0;
}

body.rtl .widget select,
body.rtl .widget input[type="search"],
body.rtl .widget input[type="text"],
body.rtl .widget input[type="email"],
body.rtl .widget textarea {
	text-align: right;
}

/* سایدبار sticky در RTL مشکلی ندارد، ولی جهت را تثبیت می‌کنیم */
body.rtl .widget-area {
	direction: rtl;
}

/* Single / Page */
body.rtl .single-header,
body.rtl .single-body,
body.rtl .single-footer,
body.rtl .author-box {
	text-align: right;
}

body.rtl .single-body ul,
body.rtl .single-body ol {
	padding-right: 20px;
	padding-left: 0;
}

body.rtl .single-body blockquote {
	border-right: 4px solid var(--green);
	border-left: 0;
}

body.rtl .single-body th,
body.rtl .single-body td {
	text-align: right;
}

body.rtl .author-box {
	grid-template-columns: auto 1fr;
}

/* FAQ */
body.rtl .faq-q {
	text-align: right;
	flex-direction: row;
}

body.rtl .faq-q .mark {
	flex: 0 0 30px;
}

/* دیدگاه‌ها */
body.rtl .comments-area,
body.rtl .comment-body,
body.rtl .comment-content,
body.rtl .comment-form {
	text-align: right;
}

body.rtl .comment-list,
body.rtl .comment-list ol,
body.rtl .comment-list ul {
	padding-right: 0;
	padding-left: 0;
}

body.rtl .comment-list .children {
	margin: 10px 18px 0 0;
	padding: 0;
}

body.rtl .comment-meta {
	direction: rtl;
}

body.rtl .comment-form input[type="text"],
body.rtl .comment-form input[type="email"],
body.rtl .comment-form input[type="url"],
body.rtl .comment-form textarea {
	text-align: right;
}

/* pagination */
body.rtl .navigation.pagination,
body.rtl .posts-navigation,
body.rtl .post-navigation,
body.rtl .nav-links {
	direction: rtl;
}

body.rtl .page-numbers {
	text-align: center;
}

/* وردپرس - align کلاس‌ها در RTL */
body.rtl .alignleft {
	float: right;
	margin: 0 0 1rem 1rem;
}

body.rtl .alignright {
	float: left;
	margin: 0 1rem 1rem 0;
}

body.rtl .aligncenter {
	margin-right: auto;
	margin-left: auto;
}

body.rtl .wp-caption-text {
	text-align: center;
}

/* فرم جستجو عمومی */
body.rtl .search-form {
	display: flex;
	gap: 10px;
	align-items: center;
}

body.rtl .search-form .search-field {
	flex: 1;
	min-width: 0;
	text-align: right;
}

body.rtl .search-form .search-submit {
	white-space: nowrap;
}

/* جدول‌ها */
body.rtl table,
body.rtl caption,
body.rtl th,
body.rtl td {
	text-align: right;
}

/* لیست‌ها */
body.rtl ul,
body.rtl ol {
	padding-right: 1.2rem;
	padding-left: 0;
}

body.rtl .widget ul,
body.rtl .widget ol,
body.rtl .footer-box ul,
body.rtl .footer-box ol {
	padding-right: 0;
	padding-left: 0;
}

/* فوتر */
body.rtl .footer-box,
body.rtl .footer-bottom .container,
body.rtl .copy {
	text-align: right;
}

/* دکمه بازگشت به بالا - در RTL بهتره سمت راست باشد */
body.rtl .back-to-top {
	right: 16px;
	left: auto;
}

/* آیکون‌ها و ایموجی‌ها در کنار متن */
body.rtl .post-card .meta span,
body.rtl .post-row .meta span,
body.rtl .single-meta span,
body.rtl .badge,
body.rtl .cat-pill,
body.rtl .ticker-item {
	display: inline-flex;
	align-items: center;
}

/* فرم‌ها و اجزای بلوک‌های وردپرس */
body.rtl .wp-block-search__inside-wrapper {
	direction: rtl;
}

body.rtl .wp-block-search__input {
	text-align: right;
}

body.rtl .wp-block-latest-posts,
body.rtl .wp-block-categories,
body.rtl .wp-block-archives {
	padding-right: 0;
	padding-left: 0;
}

body.rtl .wp-block-quote {
	border-right: 4px solid var(--green);
	border-left: 0;
	padding-right: 16px;
	padding-left: 0;
}

/* اگر مرورگر dir را روی html ست نکرده باشد */
html:not([dir="rtl"]) body.rtl {
	direction: rtl;
}

/* ریسپانسیو RTL */
@media (max-width: 860px) {
	body.rtl .header-top .container {
		text-align: right;
	}

	body.rtl .header-main .container {
		direction: rtl;
	}

	body.rtl .footer-bottom .container {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 520px) {
	body.rtl .search-form {
		flex-wrap: wrap;
	}

	body.rtl .search-form .search-field,
	body.rtl .search-form .search-submit {
		width: 100%;
	}
}