/* صفحه‌های /blog — آرشیو، دسته، مقاله (Pages/Blog/*) */

.blog {
    --bl-red: #d71921;
    --bl-ink: #16191d;
    --bl-ink-2: #3a3f4a;
    --bl-lo: #6b7280;
    --bl-line: #e6e8eb;
    --bl-soft: #f6f7f9;
    --bl-ease: cubic-bezier(.16, 1, .3, 1);
    direction: rtl;
    color: var(--bl-ink);
    padding-block: clamp(1.25rem, 3vw, 2.25rem) clamp(2.5rem, 6vw, 4rem);
}

.blog *, .blog *::before, .blog *::after { box-sizing: border-box; }

.bl-shell, .bp-shell {
    width: min(1240px, 100%);
    margin-inline: auto;
    padding-inline: clamp(16px, 3vw, 32px);
}

.ct-body .ct-name{
    font-size:15.5px !important;
}

.bp-shell {
    width: min(860px, 100%);
}

/* ═══ مسیر صفحه ═══ */
.bl-crumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    font-size: .8rem;
    color: var(--bl-lo);
}

    .bl-crumbs li { display: inline-flex; align-items: center; min-width: 0; }
    .bl-crumbs li + li::before { content: "/"; margin-inline: 8px; color: #c3c8cf; }
    .bl-crumbs a { color: var(--bl-lo); text-decoration: none; }
    .bl-crumbs a:hover { color: var(--bl-red); }
    .bl-crumbs [aria-current] { color: var(--bl-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42ch; }

/* ═══ سربرگ آرشیو ═══ */
.bl-head {
    position: relative;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--bl-line);
}

    .bl-head::after {
        content: "";
        position: absolute;
        bottom: -1px;
        right: 0;
        width: 96px;
        height: 1px;
        background: linear-gradient(to left, var(--bl-red), transparent);
    }

.bl-title {
    margin: 0 0 6px;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: -.015em;
    text-wrap: balance;
}

.bl-lead { margin: 0; color: var(--bl-lo); font-size: .92rem; line-height: 1.9; }

/* ═══ دسته‌ها ═══ */
.bl-cats {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}

    .bl-cats::-webkit-scrollbar { display: none; }

.bl-cat {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--bl-line);
    border-radius: 999px;
    background: #fff;
    color: var(--bl-ink-2);
    font-size: .84rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .2s, color .2s, background-color .2s;
}

    .bl-cat b {
        min-width: 20px;
        padding: 0 6px;
        border-radius: 99px;
        background: var(--bl-soft);
        color: var(--bl-lo);
        font-size: .7rem;
        line-height: 18px;
        text-align: center;
    }

    .bl-cat:hover { border-color: var(--bl-red); color: var(--bl-red); }
    .bl-cat.is-on { background: var(--bl-ink); border-color: var(--bl-ink); color: #fff; }
    .bl-cat.is-on b { background: var(--bl-red); color: #fff; }

/* ═══ کارت‌ها ═══ */
.bl-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 20px;
}

.bl-card { min-width: 0; }

.bl-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--bl-line);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color .3s, box-shadow .35s, transform .35s var(--bl-ease);
}

    .bl-card-link:hover, .bl-card-link:focus-visible {
        border-color: #d9dde2;
        box-shadow: 0 16px 34px -20px rgba(16, 19, 23, .4);
        transform: translateY(-3px);
    }

    .bl-card-link:focus-visible { outline: 2px solid var(--bl-red); outline-offset: 2px; }

.bl-card-media {
    position: relative;
    aspect-ratio: 16 / 9;
    max-width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #1b2330, #10151d);
}

    .bl-card-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .9s var(--bl-ease);
    }

.bl-card-link:hover .bl-card-media img { transform: scale(1.04); }

.bl-card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }

.bl-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    align-self: flex-start;
    color: var(--bl-red);
    font-size: .74rem;
    font-weight: 800;
    text-decoration: none;
}

    .bl-kicker::before { content: ""; width: 14px; height: 2px; border-radius: 2px; background: currentColor; }

.bl-card-title {
    margin: 0;
    font-size: 1rem !important;
    font-weight: 800 !important;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .25s;
}

.bl-card-link:hover .bl-card-title { color: var(--bl-red); }

.bl-card-summary {
    margin: 0;
    color: var(--bl-lo);
    font-size: .85rem;
    line-height: 1.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bl-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin-top: auto;
    padding-top: 4px;
    color: var(--bl-lo);   /* تاریخ و زمان مطالعه روی سفید: ‎#8b919b کنتراست ۳.۱۷ داشت، --bl-lo ‏۴.۸ (حداقل ۴.۵) */
    font-size: .74rem;
}

.bl-empty { padding: 40px 0; text-align: center; color: var(--bl-lo); }

/* ═══ صفحه‌بندی ═══ */
.bl-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 32px; }

.bl-pg, .bl-pg-step, .bl-pg-gap {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    font-size: .86rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--bl-ink-2);
}

.bl-pg, .bl-pg-step { border: 1px solid var(--bl-line); background: #fff; }
.bl-pg:hover, .bl-pg-step:hover { border-color: var(--bl-red); color: var(--bl-red); }
.bl-pg.is-on { background: var(--bl-red); border-color: var(--bl-red); color: #fff; }

/* ═══ صفحه‌ی مقاله ═══ */
.bp-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }

.bp-title {
    margin: 0;
    font-size: clamp(1.55rem, 3.4vw, 2.3rem);
    font-weight: 900;
    line-height: 1.5;
    letter-spacing: -.015em;
    text-wrap: balance;
}

.bp-lead { margin: 0; color: var(--bl-ink-2); font-size: 1.02rem; line-height: 2; }
.bp-meta { margin-top: 2px; padding-top: 0; font-size: .8rem; }

.bp-cover { margin: 0 0 28px; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; background: var(--bl-soft); }
.bp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* متن مقاله: کلاس prose در content.css (مشترک با صفحه‌ها) */

.bp-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--bl-line);
}

.bp-foot-link {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 16px;
    border: 1px solid #d5d9df;
    border-radius: 6px;
    color: var(--bl-ink);
    font-size: .84rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .25s, border-color .25s, color .25s;
}

    .bp-foot-link:hover { background: var(--bl-red); border-color: var(--bl-red); color: #fff; }

.bl-related { margin-top: clamp(2.5rem, 6vw, 4rem); padding-top: clamp(1.5rem, 4vw, 2.5rem); border-top: 1px solid var(--bl-line); }
.bl-related-title { margin: 0 0 18px; font-size: 1.3rem; font-weight: 800; }

/* ═══ واکنش‌گرا ═══ */
@media (max-width: 991.98px) {
    .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 599.98px) {
    .bl-grid { grid-template-columns: minmax(0, 1fr); }
    .bl-crumbs [aria-current] { max-width: 24ch; }
}

@media (prefers-reduced-motion: reduce) {
    .blog *, .blog *::before, .blog *::after { transition: none !important; }
}
