/* ===== BLOG PAGE WRAPPER ===== */
.blog-page-wrapper {
    width: 100%;
    background-color: #f8fafc;
    padding-bottom: 5rem;
}

/* ===== BANNER ===== */
.blog-hero-banner {
    width: 100%;
    max-height: 480px;
    overflow: hidden;
    background-color: #1d2128;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-hero-banner img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* ===== CONTAINER ===== */
.blog-container {
    max-width: 1240px;
    margin: 3.5rem auto 0; /* حذف مارجین منفی برای جلوگیری از تداخل با بنر */
    padding: 0 24px;
}

/* ===== GRID SYSTEM ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* ===== MODERN BLOG CARD ===== */
.blog-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

/* بخش عکس کارت با نسبت استاندارد 16:9 */
.blog-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #e2e8f0;
}

.blog-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.06);
}

/* نشان شناور دسته‌بندی روی عکس */
.blog-card-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(29, 33, 40, 0.85);
    backdrop-filter: blur(8px);
    color: #eab308;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

/* محتوای متنی کارت */
.blog-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-post-meta {
    margin-bottom: 0.75rem;
}

.meta-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

.meta-date svg {
    color: #cbd5e1;
}

/* عنوان مقاله (محدود به دو خط برای یکدست ماندن ارتفاع کارت‌ها) */
.blog-post-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.2em;
}

.blog-post-title a {
    color: #1e293b;
    transition: color 0.25s ease;
}

.blog-card:hover .blog-post-title a {
    color: #eab308;
}

/* خلاصه متن (محدود به سه خط) */
.blog-post-excerpt {
    font-size: 14px;
    line-height: 1.8;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* فوتر کارت */
.blog-card-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.25s ease;
}

.blog-read-more svg {
    transition: transform 0.25s ease;
}

.blog-card:hover .blog-read-more {
    color: #eab308;
}

.blog-card:hover .blog-read-more svg {
    transform: translateX(-4px);
}

/* ===== PAGINATION ===== */
.blog-pagination {
    margin-top: 4rem;
    text-align: center;
}

.blog-pagination .nav-links {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.25s ease;
}

.blog-pagination .page-numbers.current,
.blog-pagination .page-numbers:hover {
    background: #1d2128;
    border-color: #1d2128;
    color: #eab308;
    box-shadow: 0 4px 12px rgba(29, 33, 40, 0.15);
}

.blog-no-posts {
    text-align: center;
    padding: 4rem 1rem;
    color: #64748b;
    font-size: 16px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .blog-container {
        margin-top: 2rem;
        padding: 0 16px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .blog-card-content {
        padding: 1.25rem;
    }
}