/* ===== وبلاگ آموزش — با توکن‌های style.css ===== */

/* فهرست مطالب */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.blog-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; text-align: right;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: #cfe0f4; }
.blog-thumb { display: block; height: 190px; background: linear-gradient(135deg, #eef4fb, #dbe8f7); overflow: hidden; position: relative; }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.blog-card:hover .blog-thumb img { transform: scale(1.05); }
.blog-thumb--placeholder { display: flex; align-items: center; justify-content: center; color: var(--navy-2); opacity: .5; }
.blog-thumb--placeholder svg { width: 54px; height: 54px; }
.blog-body { padding: 20px 22px; display: flex; flex-direction: column; flex: 1; }
.blog-body h2 { font-size: 18px; font-weight: 700; color: var(--navy); line-height: 1.6; margin-bottom: 8px; }
.blog-body h2 a { color: inherit; }
.blog-body h2 a:hover { color: var(--blue); }
.blog-excerpt { color: var(--muted); font-size: 14.5px; flex: 1; }
.blog-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.blog-date { color: var(--muted); font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.blog-date svg { width: 15px; height: 15px; }
.blog-more { color: var(--blue); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 5px; }
.blog-more svg { width: 15px; height: 15px; transition: transform .2s ease; }
.blog-card:hover .blog-more svg { transform: translateX(-4px); }

/* تک‌مطلب */
.post-cover { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 30px; max-height: 440px; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-article { max-width: 820px; margin: 0 auto; }
.post-article .post-excerpt { font-size: 17px; color: var(--text); font-weight: 500; line-height: 2; background: var(--blue-light); border-right: 3px solid var(--blue); padding: 16px 20px; border-radius: 10px; margin-bottom: 26px; }
.post-content { color: var(--text); font-size: 16px; line-height: 2.1; }
.post-content h2 { font-size: 23px; font-weight: 800; color: var(--navy); margin: 30px 0 12px; }
.post-content h3 { font-size: 19px; font-weight: 700; color: var(--navy); margin: 24px 0 10px; }
.post-content h4 { font-size: 17px; font-weight: 700; color: var(--navy); margin: 20px 0 8px; }
.post-content p { margin: 0 0 16px; }
.post-content ul, .post-content ol { margin: 0 12px 16px 0; padding-right: 24px; }
.post-content li { margin-bottom: 8px; }
.post-content blockquote { border-right: 4px solid var(--blue); background: var(--bg-soft); margin: 0 0 18px; padding: 14px 20px; border-radius: 10px; color: var(--navy-2); }
.post-content a { color: var(--blue); text-decoration: underline; }
.post-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 14px 0; box-shadow: var(--shadow); }
.post-content iframe { max-width: 100%; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 12px; margin: 16px 0; }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.post-back { text-align: center; margin-top: 40px; }

.blog-empty { text-align: center; color: var(--muted); padding: 50px 20px; font-size: 16px; grid-column: 1 / -1; }

/* دکمه‌های قابل‌مدیریت صفحه */
.page-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 6px 0 34px; }
.page-buttons.bottom { margin: 40px 0 0; }
.btn-line { background: transparent; color: var(--navy); border: 1.5px solid var(--border); }
.btn-line:hover { background: var(--blue-light); border-color: #bcd6f5; transform: translateY(-2px); }

@media (max-width: 980px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .blog-grid { grid-template-columns: 1fr; } .post-content { font-size: 15.5px; } }
