/* ═══════════════════════════════════════════════════════════════
   NAT-COMPACT-V2 — فشرده‌سازی + صفحه‌بندی
   ═══════════════════════════════════════════════════════════════ */

/* ═══ کارت پست — دسکتاپ ═══ */
.cat-card, .editor-card {
    border-radius: 12px !important;
}
.cat-card__body { padding: 12px 14px !important; }
.cat-card__title {
    font-size: .88rem !important;
    line-height: 1.5 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* ═══ دکمه صفحه‌بندی ═══ */
.nat-pg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 26px 0 12px;
    flex-wrap: wrap;
    direction: rtl;
    grid-column: 1 / -1;
    width: 100%;
}
.nat-pg__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    background: #fff;
    color: #0F3641;
    border: 1.5px solid #d8d2be;
    text-decoration: none;
    font-family: inherit;
    font-size: .86rem;
    font-weight: 800;
    transition: all .2s;
    box-shadow: 0 2px 6px rgba(15,31,56,.05);
    cursor: pointer;
}
.nat-pg__btn:hover {
    background: #0F3641;
    color: #fff;
    border-color: #0F3641;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15,54,65,.22);
    text-decoration: none;
}
.nat-pg__btn.is-active {
    background: linear-gradient(135deg, #D99A2B, #8B5E14);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(217,154,43,.35);
    pointer-events: none;
}
.nat-pg__btn.is-disabled {
    opacity: .35;
    pointer-events: none;
    cursor: not-allowed;
}
.nat-pg__btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
}
.nat-pg__info {
    font-size: .78rem;
    color: #8a7d63;
    font-weight: 800;
    padding: 0 10px;
}
.nat-pg__dots {
    display: inline-flex;
    align-items: center;
    color: #b8c1c8;
    font-weight: 900;
    padding: 0 4px;
    user-select: none;
}

@media (max-width: 640px) {
    .nat-pg { gap: 4px; padding: 18px 0 8px; }
    .nat-pg__btn {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
        font-size: .78rem;
        border-radius: 9px;
    }
    .nat-pg__info { font-size: .7rem; padding: 0 4px; }
    .nat-pg__btn--num:not(.is-near) { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   موبایل — فشرده
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 700px) {

    .section { padding: 16px 0 !important; }
    .section__title { font-size: .95rem !important; }

    /* گرید کارت‌ها — ۲ ستونه */
    .cat-wrap,
    .editor-posts,
    .grid,
    .grid--2,
    .grid--3,
    .grid--4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    /* کارت دسته */
    .cat-card {
        border-radius: 10px !important;
    }
    .cat-card__img { aspect-ratio: 16/10 !important; }
    .cat-card__body { padding: 8px 10px 10px !important; }
    .cat-card__meta { font-size: .62rem !important; }
    .cat-card__title {
        font-size: .78rem !important;
        line-height: 1.4 !important;
        -webkit-line-clamp: 2 !important;
        margin: 0 0 4px !important;
    }
    .cat-card__cta {
        font-size: .68rem !important;
        margin-top: 8px !important;
        padding-top: 8px !important;
    }
    .cat-card__cta svg { width: 11px !important; height: 11px !important; }

    /* هیرو دسته */
    .cat-hero { padding: 26px 12px 20px !important; }
    .cat-hero h1 { font-size: 1.2rem !important; margin-bottom: 6px !important; }
    .cat-hero p { font-size: .8rem !important; line-height: 1.7 !important; }

    /* کارت سرمقاله */
    .editor-card {
        border-radius: 10px !important;
    }
    .editor-card__img { aspect-ratio: 16/9 !important; }
    .editor-card--featured .editor-card__img { aspect-ratio: 16/9 !important; }
    .editor-card__body { padding: 10px 12px !important; }
    .editor-card__body h2 {
        font-size: .82rem !important;
        line-height: 1.4 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        margin: 0 0 6px !important;
    }
    .editor-card--featured .editor-card__body h2 { font-size: .95rem !important; }
    .editor-card__body p { font-size: .7rem !important; -webkit-line-clamp: 2 !important; }
    .editor-card__meta { font-size: .64rem !important; padding-top: 8px !important; margin-top: 4px !important; }

    /* هیرو سرمقاله */
    .editor-hero { padding: 28px 12px 22px !important; }
    .editor-hero h1 { font-size: 1.2rem !important; }
    .editor-hero p { font-size: .78rem !important; line-height: 1.7 !important; }
    .editor-hero__badge { font-size: .64rem !important; padding: 4px 12px !important; }

    /* کارت‌های پادکست */
    .podcast { grid-template-columns: 1fr !important; gap: 10px !important; border-radius: 12px !important; }
    .podcast__cover { aspect-ratio: 16/8 !important; min-height: 130px !important; }
    .podcast__body { padding: 12px 14px !important; }
    .podcast__body h3 { font-size: .9rem !important; margin: 0 0 6px !important; }
    .podcast__body p {
        font-size: .72rem !important;
        -webkit-line-clamp: 2 !important;
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        margin: 0 0 8px !important;
    }
    .podcast__audio { height: 34px !important; }
    .podcast__meta { font-size: .68rem !important; }

    /* متن پست */
    .post-content, .article-content, .reader-article-body {
        font-size: .88rem !important;
        line-height: 1.9 !important;
    }
    .post-header__title, .article-title, .reader-modal__content h1 {
        font-size: 1.1rem !important;
        line-height: 1.5 !important;
    }

    /* کتاب‌ها — کوچک‌تر */
    .library .library-grid {
        grid-template-columns: repeat(auto-fill, 110px) !important;
        gap: 8px !important;
    }
    .library .book-card {
        width: 110px !important;
        max-width: 110px !important;
    }
    .library .book-card__title { font-size: .68rem !important; }
    .library .book-card__author { font-size: .6rem !important; }
    .library .book-card__cta { font-size: .62rem !important; padding: 5px 6px !important; }
}

@media (max-width: 400px) {
    .cat-wrap, .grid, .grid--2, .grid--3 { gap: 6px !important; }
    .cat-card__title { font-size: .72rem !important; }
    .library .library-grid { grid-template-columns: repeat(auto-fill, 100px) !important; }
    .library .book-card { width: 100px !important; max-width: 100px !important; }
}