/* استایل کلی نوشته */
.single-postz {
	background:#fff;
	padding:10px;
	border-radius:5px;
    line-height: 1.8;
    color: #333;
	margin:0 0 10px 0;
}

.post-header h1 {
    font-size: 28px;
    color: #222;
    margin-bottom: 15px;
}

.post-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}



/* استایل پاراگراف و لینک */
.post-content p {
	  font-size: 14px;
    margin-bottom: 20px;
    text-align: justify;
}

.post-content a {
    color: #ff4b2b;
    text-decoration: none;
    border-bottom: 1px dashed #ff4b2b;
    transition: 0.3s;
}

.post-content a:hover {
    background-color: #ff4b2b;
    color: #fff;
}

/* استایل نقل‌قول (Blockquote) */
.post-content blockquote {
    background: #f9f9f9;
    border-right: 10px solid #ccc;
    margin: 30px 0;
    padding: 20px;
    font-style: italic;
    color: #666;
}

/* --- استایل بخش کدها --- */



/* متای پایین مطلب */
.post-footer-meta {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    margin-top: 40px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #666;
}

.post-cats a {
    color: #ff4b2b;
    text-decoration: none;
    font-weight: bold;
}

/* باکس اشتراک‌گذاری */
.share-box {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.share-box span { font-size: 14px; font-weight: bold; }

.share-buttons { display: flex; gap: 10px; }

.share-item {
    padding: 6px 15px;
    border-radius: 5px;
    font-size: 12px;
    text-decoration: none;
    color: #fff;
    transition: 0.3s;
}

.telegram { background: #0088cc; }
.whatsapp { background: #25d366; }
.twitter { background: #1da1f2; }
.share-item:hover { opacity: 0.8; transform: translateY(-2px); }

/* باکس نویسنده */
.author-box {
    display: flex;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 25px;
    margin-top: 30px;
    align-items: center;
    gap: 20px;
}

.author-avatar img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #eee;
}

.author-info h4 {
    margin: 0 0 10px 0;
    font-size: 17px;
    color: #333;
}

.author-info p {
    font-size: 14px;
    color: #777;
    line-height: 1.7;
    margin-bottom: 10px;
}

.author-socials a {
    font-size: 12px;
    color: #ff4b2b;
    text-decoration: none;
    font-weight: bold;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 600px) {
    .author-box { flex-direction: column; text-align: center; }
    .post-footer-meta { flex-direction: column; gap: 10px; }
    .share-box { flex-direction: column; align-items: flex-start; }
}

/* فقط عنوان‌هایی که داخل ظرف single-post هستند */


.single-postz h2, 
.single-postz h3, 
.single-postz h4, 
.single-postz h5, 
.single-postz h6 {
  
    font-weight: bold;
    line-height: 1.6;
    color: #222;
    margin-top: 1.8em;
    margin-bottom: 0.8em;
}



.single-postz h2 {
    font-size: 22px;
    padding-right: 15px;
    border-right: 5px solid #ff4b2b;
    background: linear-gradient(to left, #fcfcfc, transparent);
    padding-top: 8px;
    padding-bottom: 8px;
}

.single-postz h3 {
    font-size: 19px;
    display: flex;
    align-items: center;
}

.single-postz h3::before {
    content: "◈";
    margin-left: 8px;
    color: #ff4b2b;
}

.single-postz h4 {
    font-size: 18px;
    border-bottom: 1px dashed #ddd;
    display: inline-block;
}

.single-postz h5 { font-size: 16px; color: #555; }
.single-postz h6 { font-size: 14px; color: #777; }



.download-container {
    background: #fff;
    border: 2px solid #f0f2f5;
    border-radius: 5px;
    margin: 30px 0;
    overflow: hidden;
}

.download-header {
    background: #f8f9fa;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eee;
}

.download-header h3 {
    margin: 0 !important;
    font-size: 18px !important;
    color: #333 !important;
    border: none !important; /* خنثی کردن استایل h3 که قبلا نوشتیم */
}

.download-header h3::before {
    content: "";
}

.download-list {
    padding: 10px 20px;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px dashed #ddd;
}

.download-item:last-child {
    border-bottom: none;
}

.file-name {
    display: block;
    font-weight: bold;
    font-size: 15px;
    color: #444;
    margin-bottom: 5px;
}

.file-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #888;
}

.download-button {
    background: #4caf50;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    transition: 0.3s;
}

.download-button:hover {
    background: #388e3c;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    color: #fff;
}

.download-footer {
    background: #fffbe6;
    padding: 12px 20px;
    border-top: 1px solid #ffe58f;
    color: #856404;
    font-size: 13px;
}



/* استایل کلی تصاویر داخل متن */
.post-content img {
    max-width: 100%; /* جلوگیری از بیرون زدن عکس از کادر */
    height: auto;    /* حفظ تناسب ابعاد عکس */
    display: block;
    margin: 25px auto; /* وسط‌چین کردن و فاصله از متن بالا و پایین */
    border-radius: 12px; /* گرد کردن گوشه‌ها */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* سایه ملایم */
    transition: transform 0.3s ease;
}

/* افکت زوم ملایم وقتی موس روی عکسه */
.post-content img:hover {
    transform: scale(1.02);
}

/* استایل برای عکس‌هایی که کپشن (توضیحات) دارند */
.post-content figure {
    margin: 30px auto;
    text-align: center;
    max-width: 100%;
}

.post-content figure img {
    margin: 0 auto 10px auto; /* فاصله فقط از پایین (توضیحات) */
}

.post-content figcaption {
    font-size: 13px;
    color: #777;
    font-style: italic;
    background: #f9f9f9;
    padding: 8px;
    display: inline-block;
    border-right: 3px solid #ff4b2b;
    border-radius: 4px;
}


.related-posts {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;

}

.related-title {
    margin-bottom: 20px;
}

.related-title span {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.related-title span::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: #ff4b2b; /* رنگ سازمانی سایتت */
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-card {
    text-decoration: none;
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    transition: 0.3s;
    border: 1px solid #eee;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

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

.related-info {
    padding: 15px 15px 5px 15px;
}

.related-info h4 {
    font-size: 14px !important;
    color: #444 !important;
    margin: 0 0 0px 0 !important;
    line-height: 1.6 !important;
   
    overflow: hidden;
    border: none !important; /* خنثی کردن استایل h4 قبلی */
}



/* ریسپانسیو برای تبلت و موبایل */
@media (max-width: 992px) {
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .related-grid { grid-template-columns: 1fr; }
}


.toc-container {
    width: 100%;
    box-sizing: border-box; /* این خط جادویی مشکل بیرون‌زدگی را حل می‌کند */
    background: #fcfcfc;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px;
    margin: 15px 0; /* کمی فاصله بیشتر برای زیبایی */
    display: block;
    
}

.toc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.toc-title {
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

.toc-toggle {
    background: none;
    border: none;
    color: #ff4b2b;
    font-size: 12px;
    cursor: pointer;
    font-family: 'Tahoma';
}

.toc-list {
list-style: none;
    padding: 0;
    margin: 0;
    display: none; /* در حالت پیش‌فرض مخفی باشد */
    padding-top: 15px;
}

.toc-list li {
    margin: 8px 0;
}

.toc-list li a {
    text-decoration: none;
    color: #555;
    font-size: 14px;
    transition: 0.2s;
}

.toc-list li a:hover {
    color: #ff4b2b;
    padding-right: 5px;
}

/* استایل زیرمجموعه‌ها (مثلاً H3 ها) */
.toc-list ul {
    list-style: none;
    padding-right: 20px;
    margin-top: 5px;
    border-right: 1px solid #ddd;
}



/* Minimal Modern Separator */
.wp-block-separator {
    border: none;
    height: 1px;
    background-image: linear-gradient(to right, transparent, #ccc, transparent);
    position: relative;
    margin: 40px auto;
    overflow: visible;
    width: 60%;
}

.wp-block-separator::after {
    content: "";
    width: 8px;
    height: 8px;
    background: #555;
    display: inline-block;
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
}

/* Fading Gradient Separator */
.wp-block-separator.is-style-wide, 
.wp-block-separator {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #e0e0e0 50%, transparent 100%);
    margin: 50px auto;
    max-width: 80%;
}

/* Three Dots Separator */
.wp-block-separator.has-dots {
    border: none;
    background: none;
    height: auto;
    text-align: center;
}

.wp-block-separator.has-dots::before {
    content: "···";
    color: #333;
    font-size: 30px;
    letter-spacing: 15px;
    font-family: serif;
}




.login-required {
    background-color: #999;
    cursor: pointer;
}
.login-required:hover {
    background-color: #777;
}




.forum-banner {
    font-family: Vazir, Tahoma, "DejaVu Sans", helvetica, arial, freesans, sans-serif;
    direction: rtl;
    background: linear-gradient(135deg, #1D9E75, #5DCAA5);
    border: none;
    border-radius:5px;
    padding: 2rem;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.forum-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.forum-icon {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.forum-icon svg {
    width: 26px;
    height: 26px;
    fill: #fff;
}

.forum-text h4 {
    font-size: 17px;
    font-weight: 700;
   color: #fff;
    margin-bottom: 4px;
    margin-top:0px !important;
    border-bottom:0px !important;
}

.forum-text p {
    font-size: 13px;
   color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin: 0;
}

.forum-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #0F6E56;
    text-decoration: none;
    padding: 13px 24px;
    border-radius: 10px;
    font-family: Vazir, Tahoma, "DejaVu Sans", helvetica, arial, freesans, sans-serif;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.18s ease;
}

.forum-btn:hover {
     background: rgba(255, 255, 255, 0.88);
    
}

.forum-btn svg {
    width: 16px;
    height: 16px;
    fill: #0F6E56;
}

@media (max-width: 560px) {
    .forum-banner {
        flex-direction: column;
        text-align: center;
    }
    .forum-right {
        flex-direction: column;
        align-items: center;
    }
    .forum-btn {
        width: 100%;
        justify-content: center;
    }
}