/* ==========================================================
   Blog Styles (Clean & Editorial Layout)
   ========================================================== */

.blog-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    direction: rtl;
}

.blog-header {
    text-align: center;
    margin-bottom: 35px;
}

.blog-header h1 {
    font-size: 2.2rem;
    color: #111;
    font-weight: 800;
}

.blog-header p {
    color: #666;
    margin-top: 8px;
}

/* فیلتر دسته‌بندی‌ها */
.category-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 18px;
    background-color: #f3f4f6;
    color: #4b5563;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
    background-color: #111;
    color: #fff;
}

/* شبکه کارتی مقالات */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.post-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eef2f6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.post-image {
    position: relative;
    height: 190px;
    background-color: #f9fafb;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(17, 24, 39, 0.85);
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.post-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-date {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 8px;
}

.post-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s;
}

.post-title a:hover {
    color: #2563eb;
}

.post-excerpt {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more {
    margin-top: auto;
    font-size: 0.85rem;
    font-weight: 600;
    color: #111;
    text-decoration: none;
}

/* ==========================================================
   Article Detail Page
   ========================================================== */

.article-single {
    max-width: 760px;
    margin: 40px auto;
    padding: 0 20px;
    direction: rtl;
}

.article-header {
    text-align: center;
    margin-bottom: 30px;
}

.article-category {
    color: #2563eb;
    font-size: 0.9rem;
    font-weight: 600;
}

.article-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #111;
    margin: 10px 0 15px;
    line-height: 1.3;
}

.article-meta {
    font-size: 0.85rem;
    color: #6b7280;
}

.article-cover {
    width: 100%;
    max-height: 420px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 40px;
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body {
    font-size: 1.1rem;
    line-height: 2;
    color: #374151;
    margin-bottom: 40px;
}

.article-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
    margin-top: 40px;
}

.tag-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.88rem;
    background-color: #f3f4f6;
    padding: 4px 10px;
    border-radius: 6px;
}

.tag-link:hover {
    color: #111;
    background-color: #e5e7eb;
}

.related-section {
    max-width: 1100px;
    margin: 60px auto 40px;
    padding: 0 20px;
    border-top: 1px solid #eee;
    padding-top: 40px;
    direction: rtl;
}

.related-section h3 {
    margin-bottom: 25px;
    font-size: 1.3rem;
}