/* ============================================================
   لایهٔ سازگاری وردپرس — قالب ZNSabt v2.0.0
   (منوی چندسطحی، صفحه‌بندی، دیدگاه‌ها، ادمین‌بار، محتوای ادیتور)
   ============================================================ */

/* ---------------- ادمین‌بار و هدر چسبان ---------------- */
body.admin-bar .site-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .site-header {
		top: 46px;
	}
}

html {
	scroll-padding-top: 140px;
}

/* ---------------- لوگوی سفارشی وردپرس در برند ---------------- */
.brand__logo img {
	width: 40px;
	height: 40px;
	object-fit: contain;
	border-radius: 12px;
}

.site-footer .brand__logo img {
	width: 28px;
	height: 28px;
}

/* ---------------- سطح سوم منوی اصلی (dropdown-sub) ---------------- */
.dropdown-sub {
	margin: 0.25rem 1.1rem 0.6rem;
	padding-top: 0.4rem;
	border-top: 1px dashed rgba(20, 176, 127, 0.22);
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.dropdown-sub a {
	display: block;
	font-size: 12.5px;
	color: var(--muted-foreground, #8aa096);
	padding: 0.3rem 0.5rem;
	border-radius: 0.5rem;
	transition: color 0.2s, background 0.2s;
}

.dropdown-sub a:hover {
	color: var(--primary, #14b07f);
	background: rgba(20, 176, 127, 0.08);
}

/* سطح سوم به بعد داخل dropdown-sub */
.dropdown-sub .dropdown-sub a {
	font-size: 12px;
	opacity: 0.9;
}

/* لینک‌های زیرمنوی موبایل عمیق‌تر */
.mobile-sub .mobile-sub {
	padding-inline-start: 0.9rem;
	border-inline-start: 1px dashed rgba(20, 176, 127, 0.18);
	margin: 0.25rem 0.75rem;
}

/* ---------------- صفحه‌بندی ---------------- */
.zs-pagination,
.pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 2.75rem;
}

.zs-pagination .nav-links,
.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.zs-pagination .page-numbers,
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-width: 2.6rem;
	height: 2.6rem;
	padding: 0 0.85rem;
	border-radius: 0.75rem;
	background: var(--card, #0a130f);
	border: 1px solid rgba(20, 176, 127, 0.18);
	color: var(--foreground, #e4f1e9);
	font-size: 0.9rem;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.zs-pagination .page-numbers .icon,
.pagination .page-numbers .icon {
	width: 15px;
	height: 15px;
}

.zs-pagination .page-numbers:hover,
.pagination .page-numbers:hover {
	border-color: var(--primary, #14b07f);
	color: var(--primary, #14b07f);
	transform: translateY(-2px);
}

.zs-pagination .page-numbers.current,
.pagination .page-numbers.current {
	background: linear-gradient(135deg, var(--primary, #14b07f), #0e9468);
	color: var(--primary-foreground, #04130d);
	border-color: transparent;
	font-weight: 700;
	box-shadow: 0 10px 24px -10px var(--primary-glow, rgba(20, 176, 127, 0.35));
}

.zs-pagination .page-numbers.dots,
.pagination .page-numbers.dots {
	background: transparent;
	border-color: transparent;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--card, #0a130f);
	clip: auto !important;
	clip-path: none;
	color: var(--foreground, #e4f1e9);
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	right: 8px;
	line-height: normal;
	padding: 14px 20px;
	width: auto;
	z-index: 100000;
	border-radius: 10px;
	border: 1px solid rgba(20, 176, 127, 0.4);
	top: 8px;
	left: auto;
}

/* ---------------- اخبار مرتبط (جزئیات خبر) ---------------- */
.detail-related {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.related-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.75rem;
	border-radius: 0.9rem;
	background: var(--card, #0a130f);
	border: 1px solid rgba(20, 176, 127, 0.14);
	text-decoration: none;
	transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.related-item:hover {
	border-color: rgba(20, 176, 127, 0.45);
	transform: translateY(-2px);
}

.related-item__img {
	flex-shrink: 0;
	width: 76px;
	height: 56px;
	border-radius: 0.6rem;
	overflow: hidden;
}

.related-item__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.related-item__body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.related-item__date {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 11.5px;
	color: var(--muted-foreground, #8aa096);
}

.related-item__date .icon {
	width: 12px;
	height: 12px;
}

.related-item__title {
	font-size: 0.83rem;
	font-weight: 600;
	line-height: 1.7;
	color: var(--foreground, #e4f1e9);
	transition: color 0.2s;
}

.related-item:hover .related-item__title {
	color: var(--primary, #14b07f);
}

.related-empty {
	font-size: 0.85rem;
	color: var(--muted-foreground, #8aa096);
	padding: 0.75rem;
	border: 1px dashed rgba(20, 176, 127, 0.2);
	border-radius: 0.9rem;
	text-align: center;
}

/* ---------------- تاریخ بروزرسانی فوتر ---------------- */
.footer-update-row {
	display: flex;
	justify-content: flex-start;
	padding-block: 0 0.9rem;
}

.footer-update {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.45rem 0.95rem;
	border-radius: 999px;
	background: rgba(20, 176, 127, 0.12);
	border: 1px solid rgba(20, 176, 127, 0.3);
	color: #6fdcb8;
	font-size: 12.5px;
	line-height: 1.8;
}

.footer-update .icon {
	width: 13px;
	height: 13px;
	flex-shrink: 0;
}

.footer-update strong {
	color: #e4f1e9;
	font-weight: 600;
}

/* ---------------- محتوای ادیتور (prose-fa) ---------------- */
.prose-fa img {
	max-width: 100%;
	height: auto;
	border-radius: 1rem;
	margin: 1rem auto;
	display: block;
}

.prose-fa ul,
.prose-fa ol {
	padding-inline-start: 1.4rem;
	margin: 1rem 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.prose-fa ul li {
	list-style: none;
	position: relative;
	padding-inline-start: 1.1rem;
}

.prose-fa ul li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 0.85em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--primary, #14b07f);
}

.prose-fa ol li {
	list-style: persian;
}

.prose-fa blockquote {
	border-inline-start: 3px solid var(--primary, #14b07f);
	background: rgba(20, 176, 127, 0.07);
	padding: 0.9rem 1.1rem;
	border-radius: 0.75rem;
	margin: 1.25rem 0;
}

.prose-fa table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.25rem 0;
	font-size: 0.9rem;
}

.prose-fa table th,
.prose-fa table td {
	border: 1px solid rgba(20, 176, 127, 0.2);
	padding: 0.6rem 0.8rem;
	text-align: right;
}

.prose-fa table th {
	background: rgba(20, 176, 127, 0.1);
	font-weight: 700;
}

.prose-fa code {
	background: rgba(20, 176, 127, 0.12);
	padding: 0.15rem 0.45rem;
	border-radius: 0.4rem;
	font-size: 0.85em;
}

.prose-fa h2,
.prose-fa h3,
.prose-fa h4 {
	color: var(--foreground, #e4f1e9);
	margin-top: 1.6em;
	line-height: 1.6;
}

.prose-fa a {
	color: var(--primary, #14b07f);
}

/* ترازبندی وردپرس */
.alignleft {
	float: right;
	margin: 0.4rem 0 1rem 1.4rem;
}

.alignright {
	float: left;
	margin: 0.4rem 1.4rem 1rem 0;
}

.aligncenter {
	display: block;
	margin: 1rem auto;
}

.alignwide {
	max-width: min(72rem, 96vw);
	margin-inline: auto;
}

.alignfull {
	max-width: 100vw;
	margin-inline: calc(50% - 50vw);
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text {
	font-size: 12px;
	color: var(--muted-foreground, #8aa096);
	text-align: center;
	margin-top: 0.4rem;
}

/* ---------------- کارت برگه و جستجوی بی‌تصویر ---------------- */
.page-panel {
	max-width: 60rem;
	margin-inline: auto;
}

.ncard--plain {
	display: block;
	background: var(--card, #0a130f);
	border: 1px solid rgba(20, 176, 127, 0.14);
	border-radius: 1.1rem;
	overflow: hidden;
	transition: border-color 0.2s, transform 0.2s;
}

.ncard--plain:hover {
	border-color: rgba(20, 176, 127, 0.45);
	transform: translateY(-4px);
}

/* نظرسنجی افزونه‌ای (شورت‌کد) */
.poll__custom {
	padding: 0.5rem 0;
}

.poll__custom form,
.poll__custom input,
.poll__custom button,
.poll__custom select,
.poll__custom textarea {
	max-width: 100%;
}

/* ---------------- دیدگاه‌ها ---------------- */
.comments-area .panel {
	margin-bottom: 1.5rem;
}

.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.comment-list .comment-body {
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid rgba(20, 176, 127, 0.14);
	border-radius: 1rem;
	padding: 1rem 1.1rem;
}

.comment-list .children {
	list-style: none;
	margin: 0.9rem 0 0;
	padding-inline-start: 1.2rem;
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
}

.comment-list .comment-author {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-weight: 600;
}

.comment-list .comment-author img {
	border-radius: 50%;
}

.comment-list .comment-metadata {
	font-size: 11.5px;
	color: var(--muted-foreground, #8aa096);
	margin-top: 0.2rem;
}

.comment-list .comment-metadata a {
	color: inherit;
}

.comment-list .comment-content {
	margin-top: 0.6rem;
	font-size: 0.92rem;
	line-height: 2;
}

.comment-list .reply a {
	font-size: 12px;
	color: var(--primary, #14b07f);
	text-decoration: none;
}

.comment-respond {
	background: var(--card, #0a130f);
	border: 1px solid rgba(20, 176, 127, 0.14);
	border-radius: 1.1rem;
	padding: 1.5rem;
}

.comment-respond .comment-reply-title {
	margin: 0 0 1rem;
	font-size: 1.05rem;
	font-weight: 700;
}

.comment-respond label {
	display: block;
	font-size: 0.85rem;
	margin-bottom: 0.35rem;
	color: var(--muted-foreground, #8aa096);
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
	width: 100%;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(20, 176, 127, 0.2);
	border-radius: 0.75rem;
	color: var(--foreground, #e4f1e9);
	padding: 0.7rem 0.9rem;
	font-family: inherit;
	font-size: 0.9rem;
	transition: border-color 0.2s;
}

.comment-respond input:focus,
.comment-respond textarea:focus {
	outline: none;
	border-color: var(--primary, #14b07f);
}

.comment-respond .submit {
	cursor: pointer;
	border: 0;
	background: linear-gradient(135deg, var(--primary, #14b07f), #0e9468);
	color: var(--primary-foreground, #04130d);
	font-weight: 700;
	font-family: inherit;
	font-size: 0.9rem;
	padding: 0.7rem 1.6rem;
	border-radius: 0.8rem;
	box-shadow: 0 12px 28px -12px var(--primary-glow, rgba(20, 176, 127, 0.4));
	transition: transform 0.2s, box-shadow 0.2s;
}

.comment-respond .submit:hover {
	transform: translateY(-2px);
}

.no-comments {
	color: var(--muted-foreground, #8aa096);
	font-size: 0.9rem;
}

/* ---------------- پیوندهای برگه‌بندی ---------------- */
.page-links {
	margin-top: 1.5rem;
	font-size: 0.9rem;
	color: var(--muted-foreground, #8aa096);
}

.page-links a {
	color: var(--primary, #14b07f);
}

/* ---------------- حالت فوکوس دسترس‌پذیری ---------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
	outline: 2px solid var(--primary, #14b07f);
	outline-offset: 2px;
	border-radius: 6px;
}

/* ---------------- گزینش متن ---------------- */
::selection {
	background: rgba(20, 176, 127, 0.35);
	color: #fff;
}

/* ---------------- اسکرول‌بار ---------------- */
::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}

::-webkit-scrollbar-track {
	background: var(--background, #050b09);
}

::-webkit-scrollbar-thumb {
	background: rgba(20, 176, 127, 0.35);
	border-radius: 999px;
	border: 2px solid var(--background, #050b09);
}

::-webkit-scrollbar-thumb:hover {
	background: rgba(20, 176, 127, 0.6);
}
