/* =============================================
   استایل‌های سفارشی قالب آکادمی رویش
   مکمل کلاس‌های Tailwind CSS و تنظیمات functions.php
   ============================================= */

/* ---------------------------------------------
   تنظیمات پایه
   --------------------------------------------- */
html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	min-width: 320px;
	margin: 0;
	overflow-x: hidden;
	color: #334155;
	background-color: #f8fafc;
	font-family: "Vazirmatn", sans-serif;
}

img {
	max-width: 100%;
	height: auto;
}

button,
input,
textarea,
select {
	font: inherit;
}

button,
a,
input,
textarea,
select {
	-webkit-tap-highlight-color: transparent;
}

button {
	cursor: pointer;
}

::selection {
	color: #ffffff;
	background-color: #10b981;
}

:focus-visible {
	outline: 2px solid #059669;
	outline-offset: 3px;
}

/* ---------------------------------------------
   اسکرول‌بار
   --------------------------------------------- */
::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-track {
	background: #022c22;
}

::-webkit-scrollbar-thumb {
	border-radius: 4px;
	background: linear-gradient(135deg, #059669, #10b981);
}

::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(135deg, #047857, #059669);
}

/* ---------------------------------------------
   نوار پیشرفت مطالعه مقاله
   --------------------------------------------- */
#reading-progress {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 9999;
	width: 0;
	height: 4px;
	border-radius: 0 0 0 6px;
	background: linear-gradient(90deg, #059669, #10b981, #fbbf24);
	transition: width 0.1s linear;
}

/* ---------------------------------------------
   پس‌زمینه‌های Mesh
   --------------------------------------------- */
.bg-mesh-light {
	background-image:
		radial-gradient(
			at 15% 15%,
			rgba(16, 185, 129, 0.08) 0,
			transparent 50%
		),
		radial-gradient(
			at 85% 85%,
			rgba(245, 158, 11, 0.06) 0,
			transparent 50%
		);
}

.bg-mesh-dark {
	background-image:
		radial-gradient(
			at 20% 20%,
			rgba(16, 185, 129, 0.15) 0,
			transparent 50%
		),
		radial-gradient(
			at 80% 80%,
			rgba(245, 158, 11, 0.1) 0,
			transparent 50%
		);
}

/* ---------------------------------------------
   انیمیشن‌های عمومی
   --------------------------------------------- */
@keyframes blob {
	0%,
	100% {
		transform: translate(0, 0) scale(1);
	}

	33% {
		transform: translate(30px, -50px) scale(1.1);
	}

	66% {
		transform: translate(-20px, 20px) scale(0.9);
	}
}

.animate-blob {
	animation: blob 10s ease-in-out infinite alternate;
}

.animation-delay-2000 {
	animation-delay: 2s;
}

@keyframes pulse-ring {
	0% {
		box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
	}

	70% {
		box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
	}
}

.pulse-dot {
	animation: pulse-ring 2s infinite;
}

/* ---------------------------------------------
   نمایش عناصر در اسکرول
   --------------------------------------------- */
.reveal-up,
.reveal-right,
.reveal-left {
	opacity: 0;
	will-change: transform, opacity;
}

.reveal-up {
	transform: translateY(40px);
	transition:
		opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right {
	transform: translateX(40px);
	transition:
		opacity 0.8s ease-out,
		transform 0.8s ease-out;
}

.reveal-left {
	transform: translateX(-40px);
	transition:
		opacity 0.8s ease-out,
		transform 0.8s ease-out;
}

.reveal-up.active,
.reveal-right.active,
.reveal-left.active {
	opacity: 1;
	transform: translate3d(0, 0, 0);
}

/* ---------------------------------------------
   کارت‌های Bento
   --------------------------------------------- */
.bento-card {
	position: relative;
	overflow: hidden;
}

.bento-card::before {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 1;
	height: 4px;
	content: "";
	transform: scaleX(0);
	transform-origin: right;
	background: linear-gradient(135deg, #059669, #10b981);
	transition: transform 0.4s ease;
}

.bento-card:hover::before {
	transform: scaleX(1);
}

/* ---------------------------------------------
   Preloader و FAQ (بهینه‌سازی شده برای موبایل)
   --------------------------------------------- */
#preloader {
	transition:
		opacity 0.5s ease,
		visibility 0.5s ease;
}

.preloader-hidden {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

/* بهینه‌سازی تاچ و لمس برای آکاردئون‌ها */
.faq-item {
	transform: translateZ(0); /* شتاب‌دهنده گرافیکی موبایل */
}

.faq-btn {
	position: relative;
	z-index: 10;
	touch-action: manipulation; /* رفع تاخیر ۳۰۰ میلی‌ثانیه‌ای در گوشی‌ها */
	cursor: pointer;
}

.faq-content {
	overflow: hidden;
	transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
}

/* ---------------------------------------------
   متن چندخطی کارت‌ها
   --------------------------------------------- */
.line-clamp-2 {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.line-clamp-3 {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

/* ---------------------------------------------
   فرم‌ها
   --------------------------------------------- */
input::placeholder,
textarea::placeholder {
	opacity: 1;
}

input:focus,
textarea:focus,
select:focus {
	outline: none;
}

/* ---------------------------------------------
   مسیر دسته‌بندی مقاله
   --------------------------------------------- */
.academy-breadcrumbs {
	width: 100%;
}

.academy-breadcrumbs ol {
	scrollbar-width: none;
}

.academy-breadcrumbs ol::-webkit-scrollbar {
	display: none;
}

.academy-breadcrumbs li:last-child {
	display: block;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.academy-breadcrumbs a {
	text-decoration: none;
}

.academy-breadcrumbs a:hover {
	text-decoration: none;
}

/* ---------------------------------------------
   صفحه و هدر مقاله
   --------------------------------------------- */
.single-article-page {
	scroll-margin-top: 100px;
}

.single-article-card {
	min-width: 0;
}

.article-header {
	position: relative;
}

.article-title {
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: normal;
}

.article-title a {
	text-decoration: none;
}

.article-title a:hover,
.article-title a:focus {
	text-decoration: none;
}

/* ---------------------------------------------
   ابزار مطالعه مقاله
   --------------------------------------------- */
.article-reading-tools {
	min-height: 44px;
}

.article-tool-button {
	display: inline-flex;
	width: 38px;
	height: 38px;
	align-items: center;
	justify-content: center;
	padding: 0;
	color: #475569;
	border: 1px solid #e2e8f0;
	border-radius: 0.75rem;
	background-color: #ffffff;
	font-size: 0.78rem;
	line-height: 1;
	transition:
		color 0.2s ease,
		border-color 0.2s ease,
		background-color 0.2s ease,
		transform 0.2s ease,
		box-shadow 0.2s ease;
}

.article-tool-button:hover {
	color: #ffffff;
	border-color: #059669;
	background-color: #059669;
	box-shadow: 0 8px 16px -8px rgba(5, 150, 105, 0.8);
	transform: translateY(-1px);
}

.article-tool-button:focus-visible {
	outline: 2px solid #059669;
	outline-offset: 2px;
}

/* ---------------------------------------------
   فهرست مطالب داخلی مقاله
   --------------------------------------------- */
.article-toc {
	scroll-margin-top: 110px;
}

.article-toc h2 {
	font-family: inherit;
}

.article-toc-toggle {
	padding: 0;
}

.article-toc.is-collapsed .article-toc-content {
	display: none;
}

.article-toc.is-collapsed .article-toc-toggle i {
	transform: rotate(180deg);
}

.article-toc-link {
	text-decoration: none;
}

.article-toc-link:hover,
.article-toc-link:focus-visible {
	text-decoration: none;
}

.article-toc-link:focus-visible {
	border-radius: 0.5rem;
	outline: 2px solid #059669;
	outline-offset: 2px;
}

.article-toc-link.is-active {
	position: relative;
	padding-right: 0.5rem;
	color: #047857;
	font-weight: 800;
}

.article-toc-link.is-active::before {
	position: absolute;
	top: 50%;
	right: -1.35rem;
	width: 8px;
	height: 8px;
	content: "";
	border-radius: 999px;
	background: #10b981;
	box-shadow: 0 0 0 4px #d1fae5;
	transform: translateY(-50%);
}

/* ---------------------------------------------
   محتوای مقاله و برگه
   تایپوگرافی و اندازه‌ها از functions.php
   و سفارشی‌ساز کنترل می‌شوند.
   --------------------------------------------- */
.entry-content,
.wp-block-post-content {
	min-width: 0;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.entry-content > :first-child,
.wp-block-post-content > :first-child {
	margin-top: 0;
}

.entry-content > :last-child,
.wp-block-post-content > :last-child {
	margin-bottom: 0;
}

.entry-content > * {
	max-width: 100%;
}

.entry-content hr,
.wp-block-post-content hr {
	height: 1px;
	margin: 3rem 0;
	border: 0;
	background: #e2e8f0;
}

.entry-content strong,
.entry-content b,
.wp-block-post-content strong,
.wp-block-post-content b {
	color: #1e293b;
	font-weight: 800;
}

.entry-content mark,
.wp-block-post-content mark {
	padding: 0.1em 0.25em;
	color: inherit;
	border-radius: 0.25rem;
	background: #fef3c7;
}

/* ---------------------------------------------
   باکس‌های هوش مصنوعی (AI Semantic Boxes)
   طراحی مستقل، مقیاس‌پذیر و واکنش‌گرا
   --------------------------------------------- */

.ar-box-tip,
.ar-box-warning,
.ar-box-success {
	position: relative;
	margin: 2.5rem 0;
	padding: 1.5rem 2rem 1.5rem 1.5rem;
	border-radius: 1.25rem;
	font-size: 0.95rem;
	font-weight: 800;
	line-height: 2.1;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
	border-right: 4px solid transparent;
}

/* نکته (آبی) */
.ar-box-tip {
	background-color: #eff6ff;
	color: #1e3a8a;
	border-right-color: #3b82f6;
}
.ar-box-tip::before {
	content: "\f05a"; /* fa-info-circle */
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	margin-left: 0.75rem;
	font-size: 1.25rem;
	color: #3b82f6;
	vertical-align: middle;
}

/* هشدار (قرمز) */
.ar-box-warning {
	background-color: #fef2f2;
	color: #7f1d1d;
	border-right-color: #ef4444;
}
.ar-box-warning::before {
	content: "\f071"; /* fa-exclamation-triangle */
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	margin-left: 0.75rem;
	font-size: 1.25rem;
	color: #ef4444;
	vertical-align: middle;
}

/* موفقیت / راهکار (سبز/کله‌غازی) */
.ar-box-success {
	background-color: #f0fdf4;
	color: #064e3b;
	border-right-color: #10b981;
}
.ar-box-success::before {
	content: "\f058"; /* fa-check-circle */
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	margin-left: 0.75rem;
	font-size: 1.25rem;
	color: #10b981;
	vertical-align: middle;
}

/* نقل قول اختصاصی سایت (گلد) */
.ar-quote {
	position: relative;
	margin: 2.5rem 0;
	padding: 2rem 2.5rem;
	background: linear-gradient(135deg, #fffbeb, #ffffff);
	border-right: 4px solid #f59e0b;
	border-radius: 1.25rem 0 0 1.25rem;
	color: #334155;
	font-size: 1.05rem;
	font-style: italic;
	font-weight: 600;
	line-height: 2.2;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}
.ar-quote::before {
	content: "\f10e"; /* fa-quote-left */
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	position: absolute;
	top: 1.25rem;
	right: 1.25rem;
	font-size: 2rem;
	color: #fde68a;
	opacity: 0.5;
}

/* ---------------------------------------------
   رسانه‌ها و تصویرهای متن
   --------------------------------------------- */
.entry-content figure,
.wp-block-post-content figure {
	position: relative;
	max-width: 100%;
	margin: 2rem auto;
}

.entry-content figure img,
.wp-block-post-content figure img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	border-radius: 1.25rem;
}

.entry-content iframe,
.entry-content video,
.entry-content embed,
.entry-content object,
.wp-block-post-content iframe,
.wp-block-post-content video,
.wp-block-post-content embed,
.wp-block-post-content object {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 2rem auto;
	border: 0;
	border-radius: 1.25rem;
}

.entry-content .wp-block-embed,
.wp-block-post-content .wp-block-embed {
	margin: 2rem auto;
}

.entry-content .wp-block-embed__wrapper,
.wp-block-post-content .wp-block-embed__wrapper {
	overflow: hidden;
	border-radius: 1.25rem;
}

/*
 * کپشن تصویرهای داخل محتوا:
 * فقط figureهایی که در single.php کلاس academy-image-caption-effect
 * می‌گیرند، افکت تیره‌شدن و نمایش کپشن خواهند داشت.
 */
.entry-content figure.academy-image-caption-effect,
.wp-block-post-content figure.academy-image-caption-effect,
.article-featured-image.academy-image-caption-effect {
	overflow: hidden;
	border-radius: 1.25rem;
	background: #0f172a;
}

.entry-content figure.academy-image-caption-effect::after,
.wp-block-post-content figure.academy-image-caption-effect::after,
.article-featured-image.academy-image-caption-effect::after {
	position: absolute;
	inset: 0;
	z-index: 1;
	content: "";
	opacity: 0;
	background: linear-gradient(
		to top,
		rgba(2, 6, 23, 0.85) 0%,
		rgba(2, 6, 23, 0.28) 48%,
		rgba(2, 6, 23, 0.02) 75%
	);
	transition: opacity 0.35s ease;
	pointer-events: none;
}

.entry-content figure.academy-image-caption-effect img,
.wp-block-post-content figure.academy-image-caption-effect img,
.article-featured-image.academy-image-caption-effect img {
	position: relative;
	z-index: 0;
	transition:
		filter 0.35s ease,
		transform 0.6s ease;
}

.entry-content figure.academy-image-caption-effect figcaption,
.wp-block-post-content figure.academy-image-caption-effect figcaption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	margin: 0;
	padding: 3.75rem 1.25rem 1.1rem;
	color: #ffffff;
	background: transparent;
	font-size: 0.84rem;
	font-weight: 500;
	line-height: 1.9;
	text-align: right;
	transform: translateY(105%);
	transition:
		transform 0.35s ease,
		opacity 0.35s ease;
	opacity: 0;
	pointer-events: none;
}

.entry-content figure.academy-image-caption-effect:hover::after,
.entry-content figure.academy-image-caption-effect:focus-within::after,
.wp-block-post-content figure.academy-image-caption-effect:hover::after,
.wp-block-post-content figure.academy-image-caption-effect:focus-within::after,
.article-featured-image.academy-image-caption-effect:hover::after,
.article-featured-image.academy-image-caption-effect:focus-within::after {
	opacity: 1;
}

.entry-content figure.academy-image-caption-effect:hover img,
.entry-content figure.academy-image-caption-effect:focus-within img,
.wp-block-post-content figure.academy-image-caption-effect:hover img,
.wp-block-post-content figure.academy-image-caption-effect:focus-within img,
.article-featured-image.academy-image-caption-effect:hover img,
.article-featured-image.academy-image-caption-effect:focus-within img {
	filter: brightness(0.7);
	transform: scale(1.025);
}

.entry-content figure.academy-image-caption-effect:hover figcaption,
.entry-content figure.academy-image-caption-effect:focus-within figcaption,
.wp-block-post-content figure.academy-image-caption-effect:hover figcaption,
.wp-block-post-content figure.academy-image-caption-effect:focus-within figcaption {
	transform: translateY(0);
	opacity: 1;
}

/* کپشن معمولی تصویرهایی که افکت ندارند */
.entry-content figure:not(.academy-image-caption-effect) figcaption,
.wp-block-post-content figure:not(.academy-image-caption-effect) figcaption {
	margin-top: 0.75rem;
	padding: 0 0.5rem;
	color: #64748b;
	font-size: 0.8rem;
	line-height: 1.9;
	text-align: center;
}

/* تصویر شاخص مقاله */
.article-featured-image {
	position: relative;
}

.article-featured-image .academy-image-caption {
	pointer-events: none;
}

.article-featured-image:hover::after,
.article-featured-image:focus-within::after {
	opacity: 1;
}

.article-featured-image:hover .academy-image-caption,
.article-featured-image:focus-within .academy-image-caption {
	transform: translateY(0);
}

/* ---------------------------------------------
   نقل‌قول پیش‌فرض وردپرس (پشتیبان)
   --------------------------------------------- */
.entry-content blockquote:not(.ar-quote),
.wp-block-post-content blockquote:not(.ar-quote) {
	position: relative;
	margin: 2.5rem 0;
	padding: 1.75rem 2rem;
	color: #334155;
	border-right: 4px solid #f59e0b;
	border-radius: 1rem 0 0 1rem;
	background: linear-gradient(135deg, #f8fafc, #ffffff);
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.entry-content blockquote p,
.wp-block-post-content blockquote p {
	margin-bottom: 0;
	text-align: right;
}

.entry-content blockquote cite,
.wp-block-post-content blockquote cite {
	display: block;
	margin-top: 1rem;
	color: #1e293b;
	font-size: 0.875rem;
	font-style: normal;
	font-weight: 800;
}

/* ---------------------------------------------
   جدول
   --------------------------------------------- */
.entry-content .wp-block-table,
.wp-block-post-content .wp-block-table {
	max-width: 100%;
	margin: 2rem 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.entry-content table,
.wp-block-post-content table {
	width: 100%;
	min-width: 600px;
	margin: 2rem 0;
	border-spacing: 0;
	border-collapse: separate;
	overflow: hidden;
	border: 1px solid #e2e8f0;
	border-radius: 1rem;
}

.entry-content .wp-block-table table,
.wp-block-post-content .wp-block-table table {
	margin: 0;
}

.entry-content table th,
.entry-content table td,
.wp-block-post-content table th,
.wp-block-post-content table td {
	padding: 0.85rem 1rem;
	border-bottom: 1px solid #e2e8f0;
	border-left: 1px solid #e2e8f0;
	text-align: right;
	vertical-align: top;
}

.entry-content table th:last-child,
.entry-content table td:last-child,
.wp-block-post-content table th:last-child,
.wp-block-post-content table td:last-child {
	border-left: 0;
}

.entry-content table tr:last-child td,
.wp-block-post-content table tr:last-child td {
	border-bottom: 0;
}

.entry-content table th,
.wp-block-post-content table th {
	color: #0f172a;
	background: #f8fafc;
	font-weight: 800;
}

/* ---------------------------------------------
   کد
   --------------------------------------------- */
.entry-content pre,
.wp-block-post-content pre {
	margin: 2rem 0;
	padding: 1.25rem;
	overflow-x: auto;
	color: #e2e8f0;
	border-radius: 1rem;
	background: #0f172a;
	direction: ltr;
	text-align: left;
	tab-size: 4;
}

.entry-content code,
.wp-block-post-content code {
	padding: 0.15em 0.35em;
	color: #be123c;
	border-radius: 0.35rem;
	background: #fff1f2;
	font-size: 0.9em;
	direction: ltr;
}

.entry-content pre code,
.wp-block-post-content pre code {
	padding: 0;
	color: inherit;
	border-radius: 0;
	background: transparent;
}

/* ---------------------------------------------
   باکس اطلاع‌رسانی مقاله (پیش‌فرض وردپرس)
   --------------------------------------------- */
.entry-content .wp-block-info,
.wp-block-post-content .wp-block-info,
.academy-content-box {
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
	margin: 2.5em 0;
	padding: 1.5rem 2rem;
	border: 1px solid #a7f3d0;
	border-right: 4px solid #10b981;
	border-radius: 1rem;
	background: linear-gradient(135deg, #ecfdf5, #f8fafc);
}

.entry-content .wp-block-info > i,
.wp-block-post-content .wp-block-info > i {
	flex: 0 0 auto;
	margin-top: 0.15rem;
	color: #059669;
	font-size: 1.75rem;
}

.entry-content .wp-block-info h4,
.wp-block-post-content .wp-block-info h4 {
	margin-top: 0;
	margin-bottom: 0.5rem;
}

.entry-content .wp-block-info p:last-child,
.wp-block-post-content .wp-block-info p:last-child,
.academy-content-box p:last-child {
	margin-bottom: 0;
}

/* ---------------------------------------------
   کارت مطالب پیشنهادی
   --------------------------------------------- */
.related-posts article {
	min-width: 0;
}

.related-posts article a {
	text-decoration: none;
}

.related-posts img {
	display: block;
}

.related-posts h3 {
	display: -webkit-box;
	overflow: hidden;
	margin: 0;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

/* ---------------------------------------------
   اشتراک‌گذاری مقاله
   --------------------------------------------- */
.article-share-button {
	display: inline-flex;
	width: 36px;
	height: 36px;
	align-items: center;
	justify-content: center;
	padding: 0;
	color: #475569;
	border: 1px solid #e2e8f0;
	border-radius: 0.7rem;
	background: #ffffff;
	text-decoration: none;
	transition:
		color 0.2s ease,
		border-color 0.2s ease,
		background-color 0.2s ease,
		transform 0.2s ease;
}

.article-share-button:hover {
	color: #ffffff;
	transform: translateY(-2px);
	text-decoration: none;
}

.article-share-button:focus-visible {
	outline: 2px solid #059669;
	outline-offset: 2px;
}

.article-share-button.is-copied {
	color: #ffffff;
	border-color: #059669;
	background: #059669;
}

.article-share-button.is-copied i::before {
	content: "\f00c";
}

/* ---------------------------------------------
   دیدگاه‌ها و پاسخ‌های تو در تو
   --------------------------------------------- */
.comments-area {
	scroll-margin-top: 120px;
}

.comment-list,
.comment-list .children {
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.comment-list > .comment-item {
	display: block;
	width: 100%;
	margin: 0 0 1.5rem;
}

.comment-list .children {
	display: block;
	width: 100%;
	margin-top: 1.25rem;
	padding-right: 3.5rem;
}

.comment-list .children .comment-item {
	display: block;
	width: 100%;
	margin-bottom: 1rem;
}

.comment-list .comment-body {
	display: flex;
	width: 100%;
	align-items: flex-start;
	gap: 1rem;
}

.comment-list .comment-avatar {
	display: block;
	flex: 0 0 auto;
	width: 3rem;
	max-width: 3rem;
}

.comment-list .comment-avatar img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
}

.comment-list .comment-content {
	min-width: 0;
	flex: 1 1 auto;
}

.comment-list .comment-content p:last-child {
	margin-bottom: 0;
}

.comment-list .comment-text {
	overflow-wrap: anywhere;
	word-break: break-word;
}

.comment-list .comment-reply a,
.comment-navigation a {
	text-decoration: none;
}

.comment-respond {
	margin-top: 2.5rem;
	padding-top: 2.5rem;
	border-top: 1px solid #e2e8f0;
}

/* عنوان «ثبت دیدگاه» کوچک‌تر و استاندارد */
.comment-respond .comment-reply-title {
	margin: 0 0 0.65rem;
	color: #0f172a;
	font-size: 1.125rem;
	font-weight: 800;
	line-height: 1.8;
}

.comment-respond .comment-reply-title small {
	display: inline-block;
	margin-right: 0.75rem;
	font-size: 0.78rem;
	font-weight: 700;
}

.comment-respond .comment-reply-title small a {
	color: #dc2626;
	text-decoration: none;
}

.comment-form-cookies-consent {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
	margin: 0;
}

.comment-form-cookies-consent input {
	flex: 0 0 auto;
	width: 1rem;
	height: 1rem;
	margin-top: 0.2rem;
	accent-color: #059669;
}

.comment-form-cookies-consent label {
	color: #64748b;
	font-size: 0.75rem;
	line-height: 1.8;
	cursor: pointer;
}

.comment-form .form-submit {
	margin: 0;
}

.comment-form .form-submit input[type="submit"] {
	font-family: inherit;
}

/* ---------------------------------------------
   افزونه WP-PostRatings
   --------------------------------------------- */
.post-ratings {
	display: inline-flex !important;
	gap: 0.2rem;
	align-items: center;
	margin: 0 !important;
	direction: ltr;
	vertical-align: middle;
}

.post-ratings img,
.post-ratings-image {
	display: inline-block !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

.post-ratings-text {
	margin-right: 0.75rem !important;
	color: #64748b !important;
	font-size: 0.8rem !important;
	font-weight: 600 !important;
	direction: rtl;
}

.post-ratings-loading {
	display: none !important;
}

/* ---------------------------------------------
   حالت چاپ
   --------------------------------------------- */
@media print {
	*,
	*::before,
	*::after {
		color: #000 !important;
		background: transparent !important;
		box-shadow: none !important;
		text-shadow: none !important;
	}

	html,
	body {
		background: #ffffff !important;
		font-size: 12pt;
	}

	.no-print,
	header,
	aside,
	.comments-area,
	.related-posts,
	.article-reading-tools,
	.article-rating,
	.article-footer,
	.article-toc,
	#reading-progress,
	footer {
		display: none !important;
	}

	main,
	.single-article-page {
		padding: 0 !important;
		background: #ffffff !important;
	}

	.single-article-card {
		border: 0 !important;
		border-radius: 0 !important;
	}

	.article-header,
	.article-main-content {
		padding: 0 !important;
	}

	.entry-content,
	.wp-block-post-content {
		color: #000 !important;
	}

	.entry-content a::after,
	.wp-block-post-content a::after {
		margin-right: 0.25rem;
		content: " (" attr(href) ")";
		color: #555 !important;
		font-size: 90%;
	}

	.entry-content h1,
	.entry-content h2,
	.entry-content h3,
	.entry-content h4,
	.entry-content h5,
	.entry-content h6,
	.wp-block-post-content h1,
	.wp-block-post-content h2,
	.wp-block-post-content h3,
	.wp-block-post-content h4,
	.wp-block-post-content h5,
	.wp-block-post-content h6 {
		page-break-after: avoid;
		break-after: avoid;
	}

	.entry-content img,
	.entry-content figure,
	.entry-content table,
	.entry-content blockquote,
	.wp-block-post-content img,
	.wp-block-post-content figure,
	.wp-block-post-content table,
	.wp-block-post-content blockquote {
		max-width: 100% !important;
		page-break-inside: avoid;
		break-inside: avoid;
	}

	.entry-content figure.academy-image-caption-effect figcaption,
	.wp-block-post-content figure.academy-image-caption-effect figcaption {
		position: static;
		padding: 0.5rem 0;
		color: #000 !important;
		transform: none;
		opacity: 1;
	}
}

/* ---------------------------------------------
   تبلت
   --------------------------------------------- */
@media (max-width: 1023px) {
	.article-featured-image .academy-image-caption {
		transform: translateY(0);
	}

	.entry-content figure.academy-image-caption-effect figcaption,
	.wp-block-post-content figure.academy-image-caption-effect figcaption {
		transform: translateY(0);
		opacity: 1;
	}

	.entry-content figure.academy-image-caption-effect::after,
	.wp-block-post-content figure.academy-image-caption-effect::after {
		opacity: 1;
	}
}

/* ---------------------------------------------
   موبایل
   --------------------------------------------- */
@media (max-width: 767px) {
	#reading-progress {
		height: 3px;
	}

	.reveal-up,
	.reveal-right,
	.reveal-left {
		transform: translateY(20px);
	}

	.reveal-up.active,
	.reveal-right.active,
	.reveal-left.active {
		transform: translate3d(0, 0, 0);
	}

	/* تنظیم مقیاس باکس‌های هوش مصنوعی برای موبایل */
	.ar-box-tip,
	.ar-box-warning,
	.ar-box-success {
		margin: 2rem 0;
		padding: 1.25rem 1.25rem 1.25rem 1rem;
		border-radius: 1rem;
		font-size: 0.85rem;
	}
	
	.ar-quote {
		margin: 2rem 0;
		padding: 1.5rem 1.75rem;
		border-radius: 1rem 0 0 1rem;
		font-size: 0.95rem;
	}

	/* فاصله امن و استاندارد برای عنوان مقاله در موبایل */
	.single-article-page {
		padding-top: 1.25rem;
		padding-bottom: 2.5rem;
	}

	.single-article-card {
		border-radius: 1.25rem;
	}

	.article-header {
		padding-right: 1.25rem;
		padding-left: 1.25rem;
	}

	.article-main-content {
		padding-right: 1.25rem;
		padding-left: 1.25rem;
	}

	.article-title {
		margin-right: 0;
		margin-left: 0;
		font-size: var(--academy-h1-size) !important;
		line-height: 1.8 !important;
	}

	.academy-breadcrumbs ol {
		gap: 0.4rem;
		font-size: 0.7rem;
	}

	.academy-breadcrumbs ol > li:not(:last-child) {
		flex-shrink: 0;
	}

	.article-reading-tools {
		align-items: center;
	}

	.article-reading-tools > span {
		flex-basis: 100%;
		margin-bottom: 0.15rem;
	}

	.article-tool-button {
		width: 36px;
		height: 36px;
	}

	.article-toc {
		margin-bottom: 2rem;
		border-radius: 1.25rem;
	}

	.article-toc-content {
		padding-right: 1rem;
		padding-left: 1rem;
	}

	.article-toc-link {
		line-height: 1.9;
	}

	.article-toc-link.is-active::before {
		right: -1.05rem;
	}

	.entry-content figure,
	.wp-block-post-content figure {
		margin: 1.5rem auto;
	}

	.entry-content figure img,
	.wp-block-post-content figure img {
		border-radius: 1rem;
	}

	.entry-content figure.academy-image-caption-effect,
	.wp-block-post-content figure.academy-image-caption-effect,
	.article-featured-image.academy-image-caption-effect {
		border-radius: 1rem;
	}

	/*
	 * موبایل hover واقعی ندارد؛ بنابراین کپشن همیشه در پایین تصویر
	 * قابل‌مشاهده می‌ماند.
	 */
	.entry-content figure.academy-image-caption-effect::after,
	.wp-block-post-content figure.academy-image-caption-effect::after,
	.article-featured-image.academy-image-caption-effect::after {
		opacity: 1;
	}

	.entry-content figure.academy-image-caption-effect figcaption,
	.wp-block-post-content figure.academy-image-caption-effect figcaption {
		padding: 2.8rem 1rem 0.85rem;
		font-size: 0.76rem;
		line-height: 1.8;
		transform: translateY(0);
		opacity: 1;
	}

	.article-featured-image .academy-image-caption {
		padding: 3rem 1rem 0.9rem;
		font-size: 0.78rem;
		line-height: 1.8;
		transform: translateY(0);
	}

	.entry-content blockquote:not(.ar-quote),
	.wp-block-post-content blockquote:not(.ar-quote) {
		margin: 2rem 0;
		padding: 1.25rem;
	}

	.entry-content .wp-block-info,
	.wp-block-post-content .wp-block-info,
	.academy-content-box {
		gap: 0.9rem;
		padding: 1.25rem;
	}

	.entry-content .wp-block-info > i,
	.wp-block-post-content .wp-block-info > i {
		font-size: 1.35rem;
	}

	.entry-content table,
	.wp-block-post-content table {
		min-width: 520px;
		font-size: 0.88em;
	}

	.related-posts {
		border-radius: 1.25rem;
	}

	.related-posts h2.related-posts-title {
		font-size: 1.25rem;
		line-height: 1.8;
	}

	.comments-area {
		border-radius: 1.25rem;
	}

	.comment-list .children {
		padding-right: 1rem;
	}

	.comment-list .comment-body {
		gap: 0.75rem;
	}

	.comment-list .comment-avatar {
		width: 2.5rem;
		max-width: 2.5rem;
	}

	.comment-list .comment-content > div {
		padding: 0.9rem;
	}

	.comment-respond {
		margin-top: 2rem;
		padding-top: 2rem;
	}

	/* عنوان «ثبت دیدگاه» در موبایل */
	.comment-respond .comment-reply-title {
		font-size: 1.05rem;
		line-height: 1.8;
	}

	.comment-form .form-submit input[type="submit"] {
		width: 100%;
	}

	.article-share-button {
		width: 35px;
		height: 35px;
	}
}

/* ---------------------------------------------
   احترام به تنظیمات کاهش حرکت سیستم‌عامل
   --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}

	.reveal-up,
	.reveal-right,
	.reveal-left {
		opacity: 1;
		transform: none;
	}
}