/* ==================================================
   متغیرهای رنگی (برای درک بهتر)
   رنگ اصلی: #2563eb (آبی مدرن)
   رنگ متن تیره: #1e293b (خاکستری سربی)
   رنگ پس‌زمینه ملایم: #f1f5f9
================================================== */

/* ==================================================
   1. Scroll Progress Bar
================================================== */
#scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 99999;
}

#scroll-progress-bar {
    height: 4px;
    background: #2563eb; /* آبی مدرن */
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5); /* درخشش ملایم */
}

/* ==================================================
   2. Hero Section
================================================== */
.custom-single-hero {
    position: relative;
    width: 100%;
    height: 480px;
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: -100px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* گرادینت سرمه‌ای تیره */
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.5) 0%, rgba(15, 23, 42, 0.95) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    max-width: 900px;
    padding: 0 20px;
    transform: translateY(-20px);
}

.hero-category a {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 20px;
    transition: 0.3s;
}

.hero-category a:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

.hero-title {
    color: #ffffff;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.5;
    margin-bottom: 25px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 6px 14px;
    border-radius: 50px; /* کپسولی */
}

.meta-item.author img {
    border-radius: 50%;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255,255,255,0.5);
}
@media (max-width: 450px) {
    .custom-single-hero {
        margin-bottom: 0;
    }
    .single-post #primary {
         box-shadow: 0 0px 0px white;
    }
    #page .site-content {
        background: white;
    }
}
.wp-block-image img {
    border-radius: 15px;
}
.ast-related-posts-wrapper .ast-related-post {
    padding: 5px;
    border: 1px solid #d9d9d9;
    border-radius: 15px;
    background: #ededed;
    box-shadow: 0px 0px 5px 5px #d9d9d9;
    transition: all linear 0.1s;
    img{
        border-radius: 15px;
    }
}
.ast-related-posts-wrapper .ast-related-post:hover{
    transform: scale(1.02);
}
.ast-related-post-content .entry-header .ast-related-post-title a{
    transition: all linear 0.1s;
}
.ast-related-post-content .entry-header .ast-related-post-title a:hover{
    font-weight: bold;
}

/* ==================================================
   3. Main Content Card
================================================== */
.single-post .ast-container {
    position: relative;
    z-index: 10;
}
.comment-form-url{
    display: none;
}

.ast-separate-container .post-navigation {
    display: none;
}
.site .ast-single-related-posts-container {

    margin-top: 0;
}
.single-post #primary {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.03), 0 20px 40px rgba(0,0,0,0.03);
    margin-bottom: 50px;
    padding: 0;
    overflow: hidden;
}

/* Breadcrumbs */
.ast-breadcrumbs-wrapper {
    padding: 20px 50px;
    font-size: 13px;
    color: #64748b;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}
.ast-breadcrumbs-wrapper a {
    color: #64748b;
    transition: 0.2s;
}
.ast-breadcrumbs-wrapper a:hover {
    color: #2563eb;
}

.single-post .entry-content {
    padding: 50px 70px;
}

.entry-content p {
    font-size: 18px;
    line-height: 2;
    color: #334155; /* خاکستری متین */
    margin-bottom: 2em;
    text-align: justify;
}
.ast-related-post-content .entry-meta{
    display:none;
}

/* هدینگ‌ها */
.entry-content h2 {
    font-size: 26px;
    font-weight: 800;
    color: #1e293b;
    margin-top: 25px;
    margin-bottom: 25px;
    position: relative;
    display: flex ;
}
/* خط کوچک زیر تیتر بجای کنارش */
.entry-content h2::before {
    content: '';
    display: block;
    width: 4px;
    height: 40px;
    background: #2563eb;
    margin-left: 10px;
    border-radius: 2px;
}

.entry-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 40px;
}

/* ==================================================
   4. Table of Contents (فهرست با نقاط)
================================================== */
.custom-toc-container {
    background-color: #f8fafc; /* آبی-خاکستری بسیار روشن */
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 50px;
}

.toc-header {
    font-weight: 700;
    font-size: 18px;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}
.toc-header::before {
    content: '\2630';
    margin-left: 10px;
    font-size: 18px;
    color: #64748b;
}

.custom-toc-container ul {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.custom-toc-container li {
    margin-bottom: 12px;
    padding-right: 15px;
    position: relative;
}




.custom-toc-container a {
    text-decoration: none;
    color: #475569;
    font-weight: 500;
    transition: 0.2s;
    font-size: 15px;
}

.custom-toc-container a:hover {
    color: #2563eb;
    margin-right: 5px;
}

/* زیرمنوها */
.toc-sub-item {
    margin-right: 25px !important;
    font-size: 0.95em;
}

/* ==================================================
   5. New Minimal Table Style (اصلاح جدول)
================================================== */
.single-post .entry-content table {
    width: 100%;
    border-collapse: collapse; /* حذف فاصله‌های اضافی */
    border-radius: 25px;
    overflow: hidden; /* برای گرد شدن گوشه‌ها */
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); /* سایه بسیار ملایم */
    border: 1px solid #e2e8f0;
}

.single-post .entry-content table th {
    background-color: #f1f5f9; /* خاکستری خیلی روشن */
    color: #334155; /* متن تیره */
    padding: 18px 20px;
    text-align: right;
    font-weight: 700;
    border-bottom: 2px solid #cbd5e1; /* خط زیر هدر کمی ضخیم‌تر */
    border-right: none;
    border-left: none;
}
.entry-content[data-ast-blocks-layout] > figure {
    margin-bottom: 1em;
    border-radius: 25px;
}

.single-post .entry-content table td {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    background: #fff;
    transition: background 0.2s;
}

.single-post .entry-content table tr:last-child td {
    border-bottom: none;
}

/* هاور روی ردیف‌ها برای تعامل بهتر */
.single-post .entry-content table tr:hover td {
    background-color: #f8fafc;
}

/* ==================================================
   6. Updated In-Content Elements
================================================== */
/* لیست‌های داخل متن (غیر از TOC) */

/* نقل قول */
.single-post .entry-content blockquote {
    background: #f8fafc;
    border-right: 4px solid #2563eb; /* آبی */
    color: #475569;
    border-radius: 4px;
}
.single-post .entry-content blockquote::before {
    color: rgba(37, 99, 235, 0.1); /* آبی بسیار کم‌رنگ */
}

/* ==================================================
   7. Comments & Related Posts (Blue Theme)
================================================== */
.ast-related-posts-title {
    border-right: 4px solid #2563eb;
}

.ast-post-navigation a:hover {
    border-color: #2563eb;
}

.form-submit input[type="submit"] {
    background: #2563eb; /* دکمه آبی */
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.form-submit input[type="submit"]:hover {
    background: #1d4ed8; /* آبی تیره‌تر برای هاور */
}

.reply a:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Input Focus Color */
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Responsive Padding Fixes */
@media (max-width: 768px) {
    .single-post .entry-content {
        padding: 30px 20px;
    }
    .custom-single-hero { height: 400px; }
}
/* ==================================================
   4. Table of Contents (Interactive & Minimal)
================================================== */
.custom-toc-container {
    background-color: #f8fafc; /* پس‌زمینه خیلی روشن */
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0; /* پدینگ را صفر کردیم چون هدر جداست */
    margin-bottom: 50px;
    overflow: hidden; /* مهم برای انیمیشن بسته شدن */
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

/* هدر فهرست (دکمه کلیک) */
.toc-header {
    background: #f1f5f9;
    padding: 15px 25px;
    font-weight: 700;
    font-size: 16px;
    color: #1e293b;
    display: flex;
    justify-content: space-between; /* متن راست، آیکون چپ */
    align-items: center;
    cursor: pointer; /* نشانگر دست */
    user-select: none; /* جلوگیری از انتخاب متن هنگام کلیک */
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.toc-header:hover {
    background: #e2e8f0;
}

/* آیکون فلش */
.toc-icon {
    font-size: 12px;
    color: #64748b;
    transition: transform 0.3s ease; /* انیمیشن چرخش */
    transform: rotate(0deg); /* پیش‌فرض: رو به پایین */
}

/* لیست آیتم‌ها */
.custom-toc-container ul {
    list-style: none !important;
    margin: 0;
    padding: 0 25px; /* پدینگ چپ و راست */
    max-height: 0; /* پیش‌فرض برای انیمیشن (توسط JS مقداردهی می‌شود) */
    overflow: hidden;
    transition: max-height 0.4s ease-out; /* انیمیشن نرم باز و بسته شدن */
    background: #fff;
}

/* فاصله آیتم‌ها */
.custom-toc-container li {
    margin-bottom: 0;
    padding: 12px 0;
    border-bottom: 1px dashed #f1f5f9;
    position: relative;
    padding-right: 20px; /* جا برای نقطه */
}

/* حذف خط آخرین آیتم */
.custom-toc-container li:last-child {
    border-bottom: none;
}

/* نقطه توپر دایره‌ای */
.custom-toc-container li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 20px; /* تنظیم دقیق وسط‌چین عمودی */
    width: 6px;
    height: 6px;
    background-color: #cbd5e1;
    border-radius: 50%;
    transition: 0.3s;
}

.custom-toc-container li:hover::before {
    background-color: #2563eb;
    transform: scale(1.4);
}

.custom-toc-container a {
    text-decoration: none;!important;
    color: #475569;
    font-weight: 500;
    transition: 0.2s;
    font-size: 15px;
    display: block; /* برای اینکه کل خط کلیک‌خور شود */
}
.ast-single-post .entry-content a {
    text-decoration: none;
    font-weight: bold;
}
.custom-toc-container a:hover {
    color: #2563eb;
    transform: translateX(-5px); /* حرکت ریز به چپ */
}
@media (max-width: 428px) {
    .custom-single-hero {
        height: 225px;
    }

}
@media (max-width: 768px) {

    .hero-title {

    display: none;
    }
}