﻿/* ============================================
   صفحه وبلاگ - با Dropdown سفارشی مرتب‌سازی و فیلتر موبایل
   ============================================ */

.blog-page {
    min-height: 70vh;
    padding: 40px 0;
}

.blog-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

/* ========== سایدبار ========== */
.blog-sidebar {
    background: var(--bg-card);
    border-radius: 24px;
    border: 1px solid var(--border);
    padding: 24px;
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

    .blog-sidebar::-webkit-scrollbar {
        width: 4px;
    }

    .blog-sidebar::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 10px;
    }

    .blog-sidebar::-webkit-scrollbar-track {
        background: var(--bg-hover);
        border-radius: 10px;
    }

.sidebar-section {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

    .sidebar-section:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

.sidebar-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .sidebar-title i {
        color: var(--primary);
        font-size: 18px;
    }

/* ========== جستجو ========== */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

    .search-box input {
        width: 100%;
        padding: 12px 44px 12px 16px;
        background: var(--bg-secondary);
        border: 1px solid var(--border);
        border-radius: 50px;
        color: var(--text-primary);
        font-size: 14px;
        transition: all 0.3s ease;
        outline: none;
    }

        .search-box input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(237, 25, 68, 0.15);
        }

        .search-box input::placeholder {
            color: var(--text-muted);
        }

    .search-box .search-icon {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
        font-size: 18px;
        cursor: pointer;
        transition: all 0.3s ease;
        padding: 4px;
        border-radius: 50%;
        z-index: 2;
    }

        .search-box .search-icon:hover {
            color: var(--primary);
            background: rgba(237, 25, 68, 0.08);
        }

/* ========== دسته‌بندی‌ها ========== */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    width: 100%;
    text-align: right;
}

    .category-item:hover {
        background: var(--bg-hover);
    }

    .category-item.active {
        background: rgba(237, 25, 68, 0.1);
    }

        .category-item.active .category-name {
            color: var(--primary);
            font-weight: 600;
        }

            .category-item.active .category-name i {
                color: var(--primary);
            }

.category-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

    .category-name i {
        color: var(--text-muted);
        font-size: 14px;
    }

.category-count {
    color: var(--text-muted);
    font-size: 12px;
    background: var(--bg-hover);
    padding: 2px 10px;
    border-radius: 50px;
    font-weight: 500;
}

/* ============================================
   تگ‌ها - با هاور و سلکت متفاوت + پشتیبانی از دارک/لایت
   ============================================ */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background: var(--bg-hover);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1.5px solid transparent;
    display: inline-block;
    user-select: none;
}

    /* ===== هاور (Hover) - رنگ ملایم ===== */
    .tag-item:hover {
        background: rgba(237, 25, 68, 0.08);
        color: var(--primary);
        border-color: rgba(237, 25, 68, 0.25);
        transform: translateY(-2px);
    }

    /* ===== سلکت (Active) - رنگ کامل ===== */
    .tag-item.active {
        background: var(--primary);
        color: #ffffff;
        border-color: var(--primary);
        box-shadow: 0 4px 12px rgba(237, 25, 68, 0.3);
        transform: translateY(-2px);
    }

/* ===== پشتیبانی از لایت تم ===== */
body.light-theme .tag-item:hover {
    background: rgba(237, 25, 68, 0.06);
    color: var(--primary);
    border-color: rgba(237, 25, 68, 0.2);
}

body.light-theme .tag-item.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(237, 25, 68, 0.25);
}

/* ============================================
   آرشیو
   ============================================ */
.archive-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.archive-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    width: 100%;
    text-align: right;
}

    .archive-item:hover {
        background: var(--bg-hover);
    }

    .archive-item.active {
        background: rgba(237, 25, 68, 0.1);
    }

        .archive-item.active .archive-month {
            color: var(--primary);
            font-weight: 600;
        }

.archive-month {
    color: var(--text-secondary);
    font-size: 13px;
}

.archive-count {
    color: var(--text-muted);
    font-size: 11px;
    background: var(--bg-hover);
    padding: 2px 10px;
    border-radius: 50px;
    font-weight: 500;
}

/* ========== دکمه‌های فیلتر ========== */
.filter-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-reset-filter {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

    .btn-reset-filter:hover {
        background: var(--bg-hover);
        border-color: var(--primary);
        color: var(--primary);
    }

/* ========== دکمه فیلتر برای موبایل ========== */
.filter-button-mobile {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 40px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

    .filter-button-mobile i {
        font-size: 18px;
        color: var(--primary);
    }

    .filter-button-mobile:hover {
        background: var(--bg-hover);
        border-color: var(--primary);
    }

/* ========== سایدبار فیلتر (برای موبایل) ========== */
.filter-sidebar-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

    .filter-sidebar-header h3 {
        font-size: 18px;
        font-weight: 700;
        color: var(--text-primary);
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
    }

        .filter-sidebar-header h3 i {
            color: var(--primary);
        }

.close-filter-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .close-filter-btn:hover {
        background: var(--danger);
        color: white;
        border-color: var(--danger);
    }

.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .filter-overlay.show {
        display: block;
        opacity: 1;
    }

/* ========== محتوای اصلی ========== */
.blog-header {
    margin-bottom: 30px;
}

.blog-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 24px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(237, 25, 68, 0.2);
}

    .blog-banner h1 {
        font-size: 32px;
        font-weight: 800;
        color: white;
        margin-bottom: 12px;
    }

    .blog-banner p {
        color: rgba(255, 255, 255, 0.85);
        font-size: 16px;
    }

/* ========== تولبار ========== */
.blog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.posts-count {
    color: var(--text-muted);
    font-size: 14px;
}

    .posts-count i {
        color: var(--primary);
    }

    .posts-count span {
        color: var(--text-primary);
        font-weight: 600;
    }

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .sort-wrapper label {
        color: var(--text-muted);
        font-size: 13px;
        font-weight: 500;
    }

/* ============================================
   Dropdown سفارشی برای مرتب‌سازی - مشابه search.css
   ============================================ */
.custom-sort-dropdown {
    position: relative;
    min-width: 150px;
}

.sort-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 9px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 30px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

    .sort-trigger i:first-child {
        color: var(--primary);
        font-size: 14px;
    }

    .sort-trigger i:last-child {
        color: var(--text-muted);
        font-size: 14px;
        transition: transform 0.2s ease;
    }

    .sort-trigger:hover {
        border-color: var(--primary);
        background: var(--bg-hover);
    }

    .sort-trigger span {
        flex: 1;
        text-align: right;
    }

.sort-options-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
}

    .sort-options-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

.sort-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border);
}

    .sort-option:last-child {
        border-bottom: none;
    }

    .sort-option:hover {
        background: var(--bg-hover);
    }

    .sort-option i:first-child {
        font-size: 14px;
        color: var(--text-muted);
    }

    .sort-option span {
        flex: 1;
        font-size: 13px;
        font-weight: 500;
        color: var(--text-secondary);
    }

    .sort-option .check-icon {
        color: var(--primary);
        font-size: 14px;
    }

    .sort-option.active {
        background: var(--bg-hover);
    }

        .sort-option.active span {
            color: var(--primary);
        }

        .sort-option.active i:first-child {
            color: var(--primary);
        }

/* ============================================
   کارت‌های پست - جمع‌وجور و زیبا
   ============================================ */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ===== کارت پست ===== */
.post-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .post-card:hover {
        transform: translateY(-4px);
        border-color: var(--primary);
        box-shadow: var(--shadow-xl);
    }

/* ===== تصویر ===== */
.post-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-hover);
    flex-shrink: 0;
}

    .post-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-category {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--primary);
    color: white;
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
    white-space: nowrap;
    max-width: calc(100% - 20px);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== محتوای کارت ===== */
.post-content {
    padding: 14px 16px 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ===== عنوان ===== */
.post-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex-shrink: 0;
}

    .post-title a {
        color: var(--text-primary);
        text-decoration: none;
        transition: color 0.2s ease;
    }

        .post-title a:hover {
            color: var(--primary);
        }

/* ===== توضیحات ===== */
.post-excerpt {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 10px;
    height: 62px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    flex-shrink: 0;
}

/* ===== پایین کارت ===== */
.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 11px;
    color: var(--text-muted);
    padding-top: 10px;
    border-top: 1px solid var(--border);
    margin-top: auto;
    flex-shrink: 0;
}

    .post-meta span {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .post-meta i {
        font-size: 13px;
    }

    .post-meta .post-tags {
        font-size: 10px;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        gap: 4px;
        flex-wrap: wrap;
        max-width: 100%;
    }

        .post-meta .post-tags i {
            font-size: 11px;
            color: var(--primary);
        }

        .post-meta .post-tags span {
            background: var(--bg-hover);
            padding: 1px 7px;
            border-radius: 10px;
            font-size: 9px;
            color: var(--text-muted);
            white-space: nowrap;
        }

/* ========== صفحه‌بندی ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .page-btn:hover:not(.disabled):not(.active) {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
        transform: translateY(-2px);
    }

    .page-btn.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
        box-shadow: 0 4px 15px rgba(237, 25, 68, 0.3);
    }

    .page-btn.disabled {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: none;
    }

/* ========== حالت‌های خاص ========== */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    grid-column: 1/-1;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-secondary);
    border-radius: 24px;
    grid-column: 1/-1;
}

    .empty-state i {
        font-size: 64px;
        color: var(--text-muted);
        margin-bottom: 16px;
        display: block;
    }

    .empty-state h3 {
        font-size: 20px;
        color: var(--text-primary);
        margin-bottom: 8px;
    }

    .empty-state p {
        color: var(--text-muted);
    }

/* ========== نوتیفیکیشن ========== */
.toast-notify {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    border: 1px solid var(--border);
}

    .toast-notify.show {
        transform: translateX(-50%) translateY(0);
    }

/* ============================================
   ریسپانسیو کامل (با فیلتر موبایل)
   ============================================ */

/* ===== تبلت و دسکتاپ کوچک ===== */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 280px 1fr;
        gap: 20px;
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }

    .post-title {
        font-size: 14px;
        height: 38px;
    }

    .post-excerpt {
        font-size: 12px;
        height: 56px;
        line-height: 1.5;
    }

    .post-content {
        padding: 12px 14px 12px 14px;
    }

    .post-meta {
        font-size: 10px;
        padding-top: 8px;
    }

        .post-meta i {
            font-size: 12px;
        }
}

/* ===== تبلت عمودی و موبایل ===== */
@media (max-width: 820px) {
    .blog-page {
        padding: 20px 0;
    }

    .blog-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* سایدبار به حالت عادی در دسکتاپ */
    .blog-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 340px;
        height: 100%;
        max-height: 100vh;
        border-radius: 24px 0 0 24px;
        z-index: 1000;
        padding: 20px;
        overflow-y: auto;
        transition: right 0.3s ease;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
        position: fixed;
        border: none;
        border-left: 1px solid var(--border);
    }

        .blog-sidebar.open {
            right: 0;
        }

        /* هدر سایدبار برای موبایل */
        .blog-sidebar .filter-sidebar-header {
            display: flex;
        }

    /* دکمه فیلتر برای موبایل */
    .filter-button-mobile {
        display: flex;
    }

    /* Overlay */
    .filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 999;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

        .filter-overlay.show {
            display: block;
            opacity: 1;
        }

    .blog-banner {
        padding: 28px 20px;
        border-radius: 20px;
    }

        .blog-banner h1 {
            font-size: 24px;
        }

        .blog-banner p {
            font-size: 14px;
        }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .post-title {
        font-size: 14px;
        height: 38px;
        margin-bottom: 4px;
    }

    .post-excerpt {
        font-size: 12px;
        height: 54px;
        margin-bottom: 8px;
        -webkit-line-clamp: 3;
    }

    .post-content {
        padding: 10px 12px 10px 12px;
    }

    .post-meta {
        font-size: 10px;
        gap: 4px 8px;
        padding-top: 8px;
    }

        .post-meta i {
            font-size: 12px;
        }

    .blog-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 0;
    }

    .sort-wrapper {
        width: 100%;
        justify-content: space-between;
    }

    .custom-sort-dropdown {
        min-width: 130px;
    }

    .sort-trigger {
        padding: 7px 12px;
        font-size: 12px;
    }

    .filter-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn-reset-filter {
        width: 100%;
        padding: 12px;
    }

    .sidebar-section {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .pagination {
        gap: 6px;
        margin-top: 30px;
    }

    .page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .post-card {
        border-radius: 14px;
    }

    .toast-notify {
        font-size: 13px;
        padding: 10px 20px;
        white-space: normal;
        max-width: 90%;
        text-align: center;
    }
}

/* ===== موبایل ===== */
@media (max-width: 576px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .post-title {
        font-size: 15px;
        height: 40px;
    }

    .post-excerpt {
        font-size: 13px;
        height: 56px;
        -webkit-line-clamp: 3;
    }

    .post-content {
        padding: 12px 14px 12px 14px;
    }

    .post-meta {
        font-size: 11px;
        flex-wrap: wrap;
        gap: 4px 10px;
    }

        .post-meta .post-tags span {
            font-size: 9px;
            padding: 1px 6px;
        }

    .post-card {
        border-radius: 14px;
    }

    .custom-sort-dropdown {
        min-width: 120px;
    }

    .sort-trigger {
        padding: 6px 10px;
        font-size: 11px;
    }

    .sort-option {
        padding: 8px 12px;
    }

        .sort-option span {
            font-size: 12px;
        }

    .blog-sidebar {
        max-width: 300px;
    }
}

/* ===== موبایل کوچک ===== */
@media (max-width: 480px) {
    .blog-page {
        padding: 12px 0;
    }

    .blog-sidebar {
        padding: 16px;
        max-width: 280px;
    }

    .blog-banner {
        padding: 20px 16px;
    }

        .blog-banner h1 {
            font-size: 20px;
        }

        .blog-banner p {
            font-size: 13px;
        }

    .posts-grid {
        gap: 12px;
    }

    .post-card {
        border-radius: 12px;
    }

    .post-content {
        padding: 10px 12px 10px 12px;
    }

    .post-title {
        font-size: 14px;
        height: 36px;
        margin-bottom: 4px;
    }

    .post-excerpt {
        font-size: 12px;
        height: 48px;
        margin-bottom: 6px;
        -webkit-line-clamp: 3;
    }

    .post-meta {
        font-size: 10px;
        gap: 4px 8px;
        padding-top: 6px;
    }

        .post-meta i {
            font-size: 11px;
        }

        .post-meta .post-tags span {
            font-size: 8px;
            padding: 1px 5px;
        }

    .sidebar-title {
        font-size: 14px;
    }

    .category-item {
        padding: 6px 10px;
    }

    .category-name {
        font-size: 13px;
    }

    .tag-item {
        font-size: 11px;
        padding: 4px 12px;
    }

    .page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        border-radius: 8px;
    }

    .pagination {
        gap: 4px;
    }

    .custom-sort-dropdown {
        min-width: 110px;
    }

    .sort-trigger {
        padding: 5px 8px;
        font-size: 10px;
    }

    .sort-options-menu {
        border-radius: 12px;
    }

    .sort-option {
        padding: 6px 10px;
    }

        .sort-option span {
            font-size: 11px;
        }

        .sort-option i:first-child {
            font-size: 12px;
        }

    .loading-container {
        padding: 40px 20px;
    }

    .spinner {
        width: 36px;
        height: 36px;
        border-width: 3px;
    }

    .empty-state {
        padding: 40px 16px;
    }

        .empty-state i {
            font-size: 48px;
        }

        .empty-state h3 {
            font-size: 18px;
        }

        .empty-state p {
            font-size: 13px;
        }

    .toast-notify {
        font-size: 12px;
        padding: 8px 16px;
        bottom: 20px;
        max-width: 95%;
    }
}

/* ===== موبایل خیلی کوچک ===== */
@media (max-width: 360px) {
    .post-title {
        font-size: 13px;
        height: 34px;
    }

    .post-excerpt {
        font-size: 11px;
        height: 42px;
        -webkit-line-clamp: 2;
    }

    .post-content {
        padding: 8px 10px 8px 10px;
    }

    .post-meta {
        font-size: 9px;
        gap: 3px 6px;
        padding-top: 6px;
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-banner h1 {
        font-size: 18px;
    }

    .blog-banner p {
        font-size: 12px;
    }

    .post-card {
        border-radius: 10px;
    }

    .custom-sort-dropdown {
        min-width: 100px;
    }

    .sort-trigger {
        padding: 4px 6px;
        font-size: 9px;
    }

        .sort-trigger i:first-child {
            font-size: 11px;
        }

        .sort-trigger i:last-child {
            font-size: 11px;
        }

    .sort-option {
        padding: 5px 8px;
    }

        .sort-option span {
            font-size: 10px;
        }

    .blog-sidebar {
        max-width: 260px;
    }
}

/* ===== دسکتاپ - فیلتر به حالت عادی ===== */
@media (min-width: 821px) {
    .blog-sidebar {
        position: sticky;
        right: auto;
        width: auto;
        height: fit-content;
        max-height: calc(100vh - 120px);
        border-radius: 24px;
        border: 1px solid var(--border);
        padding: 24px;
        box-shadow: var(--shadow-sm);
    }

        .blog-sidebar.open {
            right: auto;
        }

    .filter-overlay {
        display: none !important;
    }

    .filter-button-mobile {
        display: none !important;
    }

    .blog-sidebar .filter-sidebar-header {
        display: none !important;
    }
}
