/* ===== Blog + tagging styles (added for blog feature) ===== */
.blog .container,
.blog-post .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 6rem 1.25rem 3.5rem; /* top space clears the fixed navbar */
}

.blog-header { text-align: center; margin-bottom: 2rem; }
.blog-header h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin: 0 0 .5rem; }
.blog-intro { color: var(--muted); font-size: 1.05rem; max-width: 640px; margin: 0 auto; }

/* Tag cloud + tag chips */
.tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 1.5rem 0 2rem; }
.tag {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .32rem .75rem; border-radius: 999px;
    background: var(--brand-soft); color: var(--brand-700); font-size: .85rem; font-weight: 500;
    text-decoration: none; border: 1px solid transparent; transition: all .15s ease;
}
.tag:hover { background: #ffe1bd; }
.tag.is-active { background: var(--brand); color: #fff; }
.tag .tag-count { font-size: .72rem; opacity: .7; }
.blog-filter-note { text-align: center; color: #5a6b73; margin-bottom: 1.5rem; }

/* Post grid + cards */
.post-grid {
    display: grid; gap: 1.75rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.post-card {
    display: flex; flex-direction: column;
    border-radius: 14px; overflow: hidden; background: #fff;
    box-shadow: 0 4px 18px rgba(16, 42, 67, .08); transition: transform .15s ease, box-shadow .15s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(16, 42, 67, .14); }
.post-card-image { display: block; aspect-ratio: 16 / 9; background: #eef2f5; overflow: hidden; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 1.1rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .55rem; }
.post-card-meta { font-size: .8rem; color: #8895a0; }
.post-card-title { font-size: 1.2rem; margin: 0; line-height: 1.3; }
.post-card-title a { color: var(--ink); text-decoration: none; }
.post-card-title a:hover { color: var(--brand); }
.post-card-summary { color: #5a6b73; font-size: .95rem; margin: 0; }
.post-card-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.post-card-tags .tag { font-size: .75rem; padding: .2rem .55rem; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin-top: 2.5rem; }
.pagination a { color: var(--brand-700); text-decoration: none; font-weight: 600; }
.pagination .page-status { color: #8895a0; font-size: .9rem; }
.blog-empty { text-align: center; color: #8895a0; padding: 2rem 0; }

/* Single post */
.blog-post-header { text-align: center; margin-bottom: 1.5rem; }
.blog-post-back a { color: var(--brand-700); text-decoration: none; font-size: .9rem; }
.blog-post-header h1 { font-size: 2.2rem; margin: .5rem 0; }
.blog-post-meta { color: #8895a0; font-size: .9rem; }
.blog-post-hero { margin: 0 0 2rem; border-radius: 16px; overflow: hidden; }
.blog-post-hero img { width: 100%; height: auto; display: block; }
.blog-post-body { max-width: 760px; margin: 0 auto; font-size: 1.05rem; line-height: 1.75; color: #2c3a42; }
.blog-post-body .rte-block { margin-bottom: 1.25rem; }
.blog-post-body img { max-width: 100%; height: auto; border-radius: 10px; }
.blog-post-tags { max-width: 760px; margin: 2rem auto 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.blog-post-tags .label { color: #8895a0; font-size: .85rem; }

[dir="rtl"] .tag-cloud, [dir="rtl"] .post-card-tags, [dir="rtl"] .blog-post-tags { direction: rtl; }
