.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;
    }
}
/* =========================================
   Extracted from inline styles (archive.php / template-blog.php)
========================================= */
.saitima-archive-main {
    padding-top: 120px;
    padding-bottom: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}
.saitima-archive-main .archive-header {
    text-align: center;
    margin-bottom: 3rem;
}
.saitima-archive-main .archive-header .single-title {
    margin-bottom: 1.5rem;
}
.post-card-link {
    display: flex;
    text-decoration: none;
    color: inherit;
}
.post-card-link .card-inner-3d {
    width: 100%;
}
.placeholder-thumb {
    background: var(--border);
    height: 220px;
}
.archive-grid-3d .post-title {
    color: var(--text);
}
.archive-empty-state {
    text-align: center;
    padding: 3rem;
}
.archive-empty-state p {
    color: var(--muted);
    font-size: 1.2rem;
}
.archive-empty-state-full {
    grid-column: 1 / -1;
}

/* =========================================
   بازطراحی صفحه‌ی آرشیو: هیرو + جست‌وجو + کاورفلوی نوشته‌های ویژه + فیلتر
========================================= */
.saitima-archive-hero-main {
    max-width: 1300px;
    margin: 0 auto;
    padding: 110px 5% 5rem;
}

/* ---------- هیرو ---------- */
.archive-hero-3d {
    text-align: center;
    padding: 10px 0 40px;
}

.archive-hero-kicker {
    display: inline-block;
    color: #ff007a;
    font-size: 0.8rem;
    letter-spacing: 3px;
    font-weight: 700;
    padding: 9px 20px;
    background: #fff;
    border: 1px solid rgba(255, 0, 122, 0.25);
    border-radius: 999px;
    margin-bottom: 26px;
    box-shadow: 0 8px 24px rgba(255, 0, 122, 0.1);
}

.archive-hero-title {
    color: #1a1a2e;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 22px;
}

.archive-hero-accent {
    background: linear-gradient(90deg, #ff007a, #7a00ff, #ff007a);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: saitimaArchiveShimmer 6s linear infinite;
}

@keyframes saitimaArchiveShimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.archive-hero-sub {
    color: #6b5a63;
    font-size: 1.1rem;
    line-height: 2;
    max-width: 560px;
    margin: 0 auto 36px;
}

.archive-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid rgba(255, 0, 122, 0.18);
    border-radius: 18px;
    padding: 7px 7px 7px 8px;
    max-width: 560px;
    margin: 0 auto;
    box-shadow: 0 16px 40px rgba(255, 0, 122, 0.1);
}

.archive-search-icon {
    color: #ff007a;
    font-size: 1.2rem;
    padding-right: 12px;
}

.archive-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #1a1a2e;
    font-family: inherit;
    font-size: 1rem;
    padding: 14px 0;
}

.archive-search-btn {
    background: linear-gradient(135deg, #ff007a, #7a00ff);
    color: #fff;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 13px 28px;
    border-radius: 13px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.archive-search-btn:hover { opacity: 0.9; }

/* ---------- کاورفلوی نوشته‌های ویژه ---------- */
.archive-coverflow-section {
    margin: 20px 0 70px;
}

.archive-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
}

.archive-section-head h2 {
    color: #1a1a2e;
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
}

.archive-slide-label {
    color: #999;
    font-size: 0.85rem;
}

.archive-coverflow-stage {
    position: relative;
    height: 420px;
    perspective: 1600px;
    overflow: hidden;
}

.archive-coverflow-track {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
}

.coverflow-card {
    position: absolute;
    top: 50%;
    right: 50%;
    width: min(500px, 82vw);
    height: 380px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #ff8fbf, #7a00ff);
    background-size: cover;
    background-position: center;
    box-shadow: 0 30px 70px rgba(26, 15, 29, 0.25);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 32px;
}

.coverflow-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(26,15,29,0.9) 0%, rgba(26,15,29,0.35) 45%, transparent 75%);
    z-index: 0;
}

.coverflow-card > * {
    position: relative;
    z-index: 1;
}

.coverflow-cat {
    align-self: flex-start;
    background: #fff;
    color: #ff007a;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 13px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.coverflow-card h3 {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 10px;
}

.coverflow-card p {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 10px;
}

.coverflow-meta {
    color: rgba(255,255,255,0.65);
    font-size: 0.8rem;
}

.coverflow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #ff007a;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(255, 0, 122, 0.28);
    transition: transform 0.2s ease;
}
.coverflow-nav:hover { transform: translateY(-50%) scale(1.08); }
.coverflow-prev { right: 8px; }
.coverflow-next { left: 8px; }

.archive-coverflow-dots {
    display: flex;
    gap: 9px;
    justify-content: center;
    margin-top: 22px;
}

.coverflow-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #ffd0e2;
    cursor: pointer;
    transition: all 0.4s ease;
    border: none;
    padding: 0;
}

.coverflow-dot.is-active {
    width: 28px;
    background: linear-gradient(90deg, #ff007a, #7a00ff);
}

/* ---------- فیلتر دسته‌ها (نسخه‌ی جدید) ---------- */
.archive-filter-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-pill {
    display: inline-block;
    padding: 11px 24px;
    background: #fff;
    border: 1px solid rgba(255, 0, 122, 0.18);
    border-radius: 999px;
    color: #6b5a63;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(255, 0, 122, 0.06);
}

.filter-pill:hover {
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: 0 12px 26px rgba(255, 0, 122, 0.18);
}

.filter-pill.is-active {
    background: linear-gradient(135deg, #ff007a, #7a00ff);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 26px rgba(255, 0, 122, 0.28);
}

/* ---------- بج دسته روی تصویر کارت گرید ---------- */
.post-thumb-3d {
    position: relative;
}

.post-thumb-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255,255,255,0.92);
    color: #ff007a;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 999px;
}

@media (max-width: 768px) {
    .archive-coverflow-stage { height: 340px; }
    .coverflow-card { padding: 22px; height: 300px; }
    .coverflow-card h3 { font-size: 1.2rem; }
}
