/* ==========================================
   Single Post Base
   ========================================== */

body.single-post {
	overflow-x: hidden;
	background: #fcfcfc; /* پس‌زمینه ملایم‌تر برای برجسته شدن محتوا */
}

body.single-post .zt-single-page {
	width: 100%;
	max-width: 100%;
}

body.single-post .zt-single-wrapper {
	width: 100%;
	max-width: 100%;
	padding: 40px 16px;
	box-sizing: border-box;
}

body.single-post .zt-single-container {
	width: 100%;
	max-width: 850px; /* عرض مناسب‌تر برای خوانایی بهتر متن */
	margin: 0 auto;
	box-sizing: border-box;
    background: #ffffff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04); /* سایه شیک برای کل مقاله */
}

/* تصویر شاخص مقاله */
body.single-post .zt-single-thumbnail {
    margin: -40px -40px 32px -40px; /* چسبیدن عکس به لبه‌های بالای باکس */
    border-radius: 24px 24px 0 0;
    overflow: hidden;
}

body.single-post .zt-single-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

body.single-post .zt-single-header {
	margin-bottom: 32px;
	text-align: center;
}

body.single-post .zt-single-title {
	margin: 0;
	color: #1f1f1f;
	font-size: 36px;
	font-weight: 900;
	line-height: 1.6;
}

/* ==========================================
   Remove Extra Header Meta
   ========================================== */

body.single-post .breadcrumb,
body.single-post .breadcrumbs,
body.single-post .entry-meta,
body.single-post .post-meta,
body.single-post .post-date,
body.single-post .post-author,
body.single-post .post-category,
body.single-post .cat-links,
body.single-post .byline,
body.single-post .posted-on,
body.single-post .entry-header .entry-meta {
	display: none !important;
}

/* ==========================================
   Content
   ========================================== */

body.single-post .zt-single-content {
	width: 100%;
	max-width: 100%;
	color: #3b3b3b; /* رنگ خاکستری تیره برای جلوگیری از خستگی چشم */
	font-size: 17px;
	line-height: 2.2;
	overflow-wrap: break-word;
	word-break: normal;
	box-sizing: border-box;
}

body.single-post .zt-single-content p {
	margin: 0 0 24px;
}

body.single-post .zt-single-content h2,
body.single-post .zt-single-content h3,
body.single-post .zt-single-content h4 {
	margin: 40px 0 20px;
	color: #1a1a1a;
	font-weight: 800;
	line-height: 1.7;
}

body.single-post .zt-single-content h2 { font-size: 30px; }
body.single-post .zt-single-content h3 { font-size: 24px; }
body.single-post .zt-single-content h4 { font-size: 20px; }

body.single-post .zt-single-content ul,
body.single-post .zt-single-content ol {
	margin: 0 0 24px;
	padding-right: 24px;
}

body.single-post .zt-single-content li {
	margin-bottom: 12px;
}

body.single-post .zt-single-content a {
	color: #6f4ef6;
	text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dashed #6f4ef6;
}

body.single-post .zt-single-content img {
	display: block;
	margin: 32px auto;
	border-radius: 16px;
}

/* ==========================================
   Desktop Tables
   ========================================== */

/* کدهای جدول بدون تغییر نسبت به نسخه سالم شما، فقط برای خوانایی کمی فاصله‌ها مرتب شده است */
body.single-post .zt-single-content .zt-table-responsive {
	width: 100%;
	max-width: 100%;
	margin: 32px 0;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	border: 1px solid #e8e8e8;
	border-radius: 16px;
	background: #ffffff;
	box-sizing: border-box;
}

body.single-post .zt-single-content table {
	width: max-content;
	min-width: 100%;
	margin: 0;
	border-collapse: collapse;
	border-spacing: 0;
	table-layout: auto;
	display: table !important;
	background: #ffffff;
}

body.single-post .zt-single-content th,
body.single-post .zt-single-content td {
	display: table-cell !important;
	padding: 16px 20px;
	border: 1px solid #ececec;
	text-align: center;
	vertical-align: middle;
	white-space: nowrap;
	font-size: 15px;
	line-height: 1.8;
}

body.single-post .zt-single-content th {
	background: #f8f6ff;
	color: #6f4ef6;
	font-weight: 800;
}

body.single-post .zt-single-content tr:nth-child(even) td {
	background: #fdfdfd;
}

/* ==========================================
   CTA
   ========================================== */
body.single-post .zt-single-cta {
	margin-top: 48px;
}
/* کدهای اختصاصی CTA شما بدون تغییر */
body.single-post .zt-single-cta__inner { padding: 32px 24px; border-radius: 20px; background: linear-gradient(135deg, #6f4ef6 0%, #8f75ff 100%); text-align: center; color: #ffffff; }
body.single-post .zt-single-cta__badge { display: inline-block; margin-bottom: 12px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); color: #ffffff; font-size: 12px; font-weight: 700; }
body.single-post .zt-single-cta__title { margin: 0 0 16px; font-size: 26px; line-height: 1.6; font-weight: 800; color: #ffffff; }
body.single-post .zt-single-cta__text { margin: 0 0 24px; font-size: 16px; line-height: 1.9; color: rgba(255, 255, 255, 0.9); }
body.single-post .zt-single-cta__button { display: inline-block; padding: 14px 32px; border-radius: 999px; background: #ffffff; color: #6f4ef6; text-decoration: none; font-weight: 800; border: none; transition: transform 0.2s ease, box-shadow 0.2s ease; }
body.single-post .zt-single-cta__button:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); }

/* ==========================================
   Related Posts & Comments (بخش‌های جدید)
   ========================================== */

.zt-related-posts, .zt-comments-wrapper {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 2px dashed #f0f0f0;
}

.zt-related-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 24px;
    color: #1f1f1f;
}

.zt-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.zt-related-card {
    display: block;
    text-decoration: none !important;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.zt-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
    border-color: #6f4ef6;
}

.zt-related-thumb img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.zt-related-post-title {
    padding: 16px;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #2d2d2d;
    line-height: 1.7;
}

/* ==========================================
   Mobile
   ========================================== */

@media (max-width: 768px) {
    body.single-post .zt-single-container {
        padding: 24px 16px;
        border-radius: 16px;
    }
    
    body.single-post .zt-single-thumbnail {
        margin: -24px -16px 24px -16px;
        border-radius: 16px 16px 0 0;
    }

	body.single-post .zt-single-title {
		font-size: 26px;
	}

	body.single-post .zt-single-content {
		font-size: 16px;
	}

	/* Card View Styles */
	body.single-post .zt-single-content .zt-table-responsive.is-card {
		overflow: visible;
		border: none;
		background: transparent;
	}

	body.single-post .zt-single-content .zt-table-responsive.is-card table,
	body.single-post .zt-single-content .zt-table-responsive.is-card tbody,
	body.single-post .zt-single-content .zt-table-responsive.is-card tr,
	body.single-post .zt-single-content .zt-table-responsive.is-card td {
		display: block !important;
		width: 100%;
		height: auto !important;
		min-height: min-content !important;
	}

	body.single-post .zt-single-content .zt-table-responsive.is-card thead {
		display: none !important;
	}

	body.single-post .zt-single-content .zt-table-responsive.is-card tr {
		margin: 0 0 16px;
		padding: 14px 12px;
		border: 1px solid #e8e8e8;
		border-radius: 14px;
		background: #ffffff;
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
		box-sizing: border-box;
		clear: both;
	}
    
    /* 🔴 حل مشکل سربرگ تکراری با افزایش اولویت (Specificity) 🔴 */
    body.single-post .zt-single-content .zt-table-responsive.is-card tr.zt-hidden-header {
        display: none !important;
    }

	body.single-post .zt-single-content .zt-table-responsive.is-card td {
		display: grid !important;
		grid-template-columns: 40% 1fr;
		gap: 12px;
		padding: 10px 0;
		border: 0;
		border-bottom: 1px solid #f1f1f1;
		background: transparent !important;
		text-align: right;
		white-space: normal;
		font-size: 14px;
		line-height: 1.9;
		box-sizing: border-box;
	}

	body.single-post .zt-single-content .zt-table-responsive.is-card td::before {
		content: attr(data-label);
		color: #6f4ef6;
		font-weight: 800;
		text-align: right;
		word-break: normal;
		overflow-wrap: break-word;
	}

	body.single-post .zt-single-content .zt-table-responsive.is-card td:last-child {
		border-bottom: 0;
	}
}
