.saitima-archive-wrapper {
    max-width: 1400px;
    margin: 150px auto 100px;
    padding: 0 5%;
    perspective: 1500px;
}
.archive-categories-3d {
    margin-bottom: 60px;
    text-align: center;
}
.cat-title-glow {
    font-size: 2rem;
    background: linear-gradient(135deg, #ff007a, #7a00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
    text-shadow: 0 10px 30px rgba(255, 0, 122, 0.3);
}

.cat-list-3d {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.cat-pill-3d {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    color: #333; /* برای تم تاریک به #fff تغییر دهید */
    text-decoration: none;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.cat-pill-3d:hover {
    transform: translateY(-5px) scale(1.05);
    background: linear-gradient(135deg, rgba(255,0,122,0.8), rgba(122,0,255,0.8));
    color: #fff;
    box-shadow: 0 15px 25px rgba(255, 0, 122, 0.3);
    border-color: transparent;
}

.cat-count {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* ================= گرید مقالات ================= */
.archive-grid-3d {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

/* کارت‌ها با قابلیت حفظ سه‌بعدی بودن فرزندان */
.post-card-3d {
    position: relative;
    border-radius: 24px;
    transform-style: preserve-3d;
    transition: transform 0.1s ease; /* برای اسکریپت موس */
    will-change: transform;
}

.card-inner-3d {
    padding: 20px;
    border-radius: 24px;
    transform-style: preserve-3d;
    background: rgba(255, 255, 255, 0.7); /* شیشه‌ای */
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* بیرون زدن عکس از کارت */
.post-thumb-3d {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    transform: translateZ(50px); /* عمق 3D */
    transition: all 0.4s ease;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.post-thumb-3d img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.post-card-3d:hover .post-thumb-3d img {
    transform: scale(1.1);
}

/* بیرون زدن محتوا از کارت */
.post-content-3d {
    transform: translateZ(30px); /* عمق 3D کمتر از عکس */
    transform-style: preserve-3d;
}

.post-date {
    font-size: 0.85rem;
    color: #888;
    display: block;
    margin-bottom: 10px;
    transform: translateZ(20px);
}

.post-title {
    font-size: 1.4rem;
    line-height: 1.4;
    margin-bottom: 15px;
    transform: translateZ(40px);
}

.post-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #ff007a;
}

.post-excerpt {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    transform: translateZ(20px);
}
.btn-read-more-3d {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #111;
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    transform: translateZ(60px); /* بالاترین سطح */
    transition: all 0.3s ease;
}

.btn-read-more-3d:hover {
    background: linear-gradient(135deg, #ff007a, #7a00ff);
    box-shadow: 0 10px 20px rgba(255, 0, 122, 0.4);
    gap: 12px; /* حرکت فلش به جلو */
}

/* ================= صفحه‌بندی ================= */
.pagination-3d {
    margin-top: 60px;
    text-align: center;
}

.saitima-pagination .nav-links {
    display: inline-flex;
    gap: 10px;
    background: rgba(255,255,255,0.5);
    padding: 10px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.saitima-pagination a, .saitima-pagination span {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 30px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.saitima-pagination .current {
    background: linear-gradient(135deg, #ff007a, #7a00ff);
    color: #fff;
    box-shadow: 0 5px 15px rgba(255, 0, 122, 0.3);
}
.saitima-pagination a:hover {
    background: rgba(0,0,0,0.05);
    transform: translateY(-3px);
}
/* =========================================
   Mobile Optimization for Archive Page
========================================= */
@media (max-width: 768px) {
    /* تک ستونه کردن ساختار گرید مقالات */
    .archive-container, .archive-grid, .posts-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 30px !important;
        padding: 20px 4% !important;
        width: 100% !important;
    }

    /* بهینه‌سازی کارت‌های مقاله */
    .post-card, .archive-card, .blog-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        transform: none !important; /* غیرفعال کردن چرخش سه بعدی */
        backdrop-filter: none !important; /* حذف تاری شیشه‌ای جهت رفع لگ */
        -webkit-backdrop-filter: none !important;
        background: #ffffff !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.06) !important;
    }

    /* غیرفعال کردن افکت‌های هاور سنگین */
    .post-card:hover, .archive-card:hover {
        transform: translateY(-5px) !important;
    }

    /* تنظیم سایز فونت عنوان آرشیو */
    .archive-header h1, .page-title {
        font-size: 1.8rem !important;
        text-align: center !important;
        line-height: 1.4 !important;
        margin-bottom: 20px !important;
    }
}