.elementor-574 .elementor-element.elementor-element-f62cf20{--display:flex;}/* Start custom CSS for shortcode, class: .elementor-element-0f02ab9 *//* شبکه کارت‌ها (۳ ستون و ۳ ردیف) */
.custom-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    direction: rtl;
    max-width: 1200px; /* حداکثر عرض شبکه */
    margin: 0 auto;    /* وسط‌چین کردن گرید در صفحه */
    padding: 0 20px;   /* فاصله از چپ و راست در موبایل و صفحات کوچک */
}

.post-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* تصویر شاخص و بج دسته‌بندی */
.post-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumb img {
    transform: scale(1.05);
}

.post-category-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: #e60023;
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: bold;
}

/* محتوای متنی کارت */
.post-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 8px;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 0 0 10px 0;
}

.post-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.2s;
}

.post-title a:hover {
    color: #e60023;
}

.post-excerpt {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* دکمه مطالعه بیشتر */
.post-footer {
    display: flex;
    justify-content: center;
    margin-top: auto;
}

.read-more-btn {
    background: #e60023;
    color: #ffffff !important;
    padding: 8px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
    transition: background 0.3s ease;
}

.read-more-btn:hover {
    background: #b3001b;
}

/* صفحه‌بندی (Pagination) */
.custom-posts-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    direction: rtl;
}

.custom-posts-pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 8px;
    align-items: center;
}

.custom-posts-pagination a, 
.custom-posts-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 6px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.custom-posts-pagination .current {
    background: #e60023;
    color: #fff;
}

/* واکنش‌گرایی (Responsive) */
@media (max-width: 992px) {
    .custom-posts-grid {
        grid-template-columns: repeat(2, 1fr); /* ۲ ستون در تبلت */
    }
}

@media (max-width: 600px) {
    .custom-posts-grid {
        grid-template-columns: 1fr; /* ۱ ستون در موبایل */
    }
}/* End custom CSS */