﻿/* ─── SINGLE BLOG ─── */
.sb-page { padding: 24px 60px 48px; max-width: 1440px; margin: 0 auto; }
.sb-layout { display: flex; gap: 24px; align-items: flex-start; flex-direction: row-reverse; }

/* ─── SIDEBAR ─── */
.sb-sidebar { width: 360px; flex-shrink: 0; display: flex; flex-direction: column; gap: 40px; }
.sb-section { display: flex; flex-direction: column; gap: 0; }
.sb-section-title { font-size: 18px; font-weight: 800; color: #184362; margin-bottom: 16px; text-align: right; position: relative; padding-right: 12px; }
.sb-section-title::before { content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 70%; background: #f2971e; border-radius: 4px; }

.sb-article-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #e7e9eb; text-decoration: none; color: inherit; }
.sb-article-item:last-child { border-bottom: none; }
.sb-article-thumb { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.sb-article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sb-article-text { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.sb-article-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sb-article-cat { font-size: 12px; font-weight: 700; color: #14a8e3; }
.sb-article-date { font-size: 11px; color: #5e6972; }
.sb-article-title { font-size: 13px; font-weight: 700; color: #212529; line-height: 1.5; text-align: right; }

.sb-suggested-card { display: block; border-radius: 20px; overflow: hidden; position: relative; height: 280px; text-decoration: none; }
.sb-suggested-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sb-suggested-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 50%, black 100%); }
.sb-suggested-text { position: absolute; bottom: 16px; right: 16px; left: 16px; z-index: 2; }
.sb-suggested-cat { font-size: 12px; color: #14a8e3; margin-bottom: 6px; }
.sb-suggested-title { font-size: 16px; font-weight: 800; color: #fff; line-height: 1.4; text-align: right; }

/* ─── POST CONTENT ─── */
.sb-content { flex: 1; min-width: 0; }

.sb-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #5e6972; margin-bottom: 16px; justify-content: flex-end; flex-direction: row-reverse; }
.sb-breadcrumb a { color: #5e6972; text-decoration: none; }
.sb-breadcrumb a:hover { color: #184362; }

.sb-post-header { margin-bottom: 24px; }
.sb-post-cat { font-size: 14px; font-weight: 700; color: #14a8e3; text-align: right; margin-bottom: 12px; }
.sb-post-title { font-size: 32px; font-weight: 900; color: #212529; line-height: 1.4; text-align: right; margin-bottom: 20px; }

.sb-post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    direction: rtl; /* 👈 افزوده شد: کل نوار اطلاعات را مجبور به راست‌چین بودن می‌کند */
}

.sb-post-meta-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sb-author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start; /* 👈 اصلاح شد: در محیط rtl، کلمه start به معنی سمت راست است! */
    text-align: right;
}
.sb-author-by { font-size: 13px; color: #212529; }
.sb-author-by strong { font-weight: 700; }
.sb-author-date { font-size: 12px; color: #5e6972; }
.sb-post-meta-left { display: flex; align-items: center; gap: 12px; }
.sb-view-count { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #5e6972; }

.sb-hero-img { width: 100%; height: 400px; border-radius: 24px; overflow: hidden; margin-bottom: 24px; border: 4px solid #fff; box-shadow: 0 4px 24px rgba(0,0,0,0.08); }
.sb-hero-img img { width: 100%; height: 100%; object-fit: cover; }

.sb-video-wrap { width: 100%; height: 0; padding-bottom: 56.25%; position: relative; border-radius: 24px; overflow: hidden; margin-bottom: 24px; background: #000; }
.sb-video-wrap iframe, .sb-video-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; }

.sb-post-body { font-size: 16px; color: #212529; line-height: 1.9; text-align: justify; margin-bottom: 32px; }
.sb-post-body h2 { font-size: 22px; font-weight: 700; color: #184362; margin: 24px 0 12px; text-align: right; }
.sb-post-body h3 { font-size: 18px; font-weight: 700; color: #184362; margin: 20px 0 10px; text-align: right; }
.sb-post-body p { margin-bottom: 16px; }
.sb-post-body img { max-width: 100%; border-radius: 16px; margin: 16px 0; }
.sb-post-body ul, .sb-post-body ol { padding-right: 24px; margin-bottom: 16px; }
.sb-post-body li { margin-bottom: 8px; }
.sb-post-body blockquote { border-right: 4px solid #f2971e; padding: 12px 16px; background: #f8f9fa; border-radius: 8px; margin: 16px 0; font-style: italic; color: #5e6972; }

.sb-tags { margin-bottom: 32px; }
.sb-tags-title { font-size: 18px; font-weight: 800; color: #184362; text-align: right; margin-bottom: 12px; }
.sb-tags-list { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sb-tag { background: rgba(20,168,227,0.1); color: #14a8e3; border-radius: 10px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.sb-tag:hover { background: rgba(20,168,227,0.2); }

.sb-share { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px; background: #f8f9fa; border-radius: 20px; margin-bottom: 32px; }
.sb-share-title { font-size: 18px; font-weight: 800; color: #184362; text-align: center; line-height: 1.5; }
.sb-share-title span { color: #f2971e; }
.sb-share-icons { display: flex; gap: 12px; }
.sb-share-icon { width: 44px; height: 44px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #184362; box-shadow: 0 4px 12px rgba(0,0,0,0.1); text-decoration: none; transition: transform 0.2s; }
.sb-share-icon:hover { transform: translateY(-3px); color: #14a8e3; }

/* responsive */
@media (max-width: 900px) {
    .sb-page { padding: 16px 16px 32px; }
    .sb-layout { flex-direction: column-reverse; }
    .sb-sidebar { width: 100%; }
    .sb-post-title { font-size: 22px; }
    .sb-hero-img { height: 220px; }
}




/* ─── COMMENTS ─── */
.sb-comments { margin-top: 48px; }
.sb-comments-title { font-size: 22px; font-weight: 800; color: #184362; text-align: right; margin-bottom: 24px; border-bottom: 2px solid #e7e9eb; padding-bottom: 12px; }

.sb-comment-form { background: #f8f9fa; border-radius: 20px; padding: 24px; margin-bottom: 32px; }
.sb-form-title { font-size: 18px; font-weight: 700; color: #212529; text-align: right; margin-bottom: 16px; }
.sb-form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.sb-form-input { flex: 1; display: flex; align-items: center; gap: 8px; border: 1px solid #e7e9eb; border-radius: 12px; padding: 12px 16px; background: #fff; }
.sb-form-input i { color: #5e6972; font-size: 16px; flex-shrink: 0; }
.sb-form-input input { flex: 1; border: none; outline: none; font-family: inherit; font-size: 14px; color: #212529; text-align: right; direction: rtl; background: transparent; }
.sb-form-textarea { display: flex; gap: 8px; align-items: flex-start; border: 1px solid #e7e9eb; border-radius: 12px; padding: 12px 16px; background: #fff; margin-bottom: 16px; }
.sb-form-textarea i { color: #5e6972; font-size: 16px; flex-shrink: 0; margin-top: 4px; }
.sb-form-textarea textarea { flex: 1; border: none; outline: none; font-family: inherit; font-size: 14px; color: #212529; text-align: right; direction: rtl; background: transparent; resize: none; min-height: 100px; }
.sb-form-footer { display: flex; align-items: center; justify-content: space-between; }
.sb-submit-btn { background: #184362; color: #fff; border: none; border-radius: 12px; padding: 12px 24px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.sb-submit-btn:hover { background: #14a8e3; }
.sb-form-agree { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #5e6972; }

.sb-comment-card { display: flex; gap: 16px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid #e7e9eb; flex-direction: row-reverse; }
.sb-comment-card:last-child { border-bottom: none; }
.sb-comment-avatar { font-size: 36px; color: #184362; flex-shrink: 0; }
.sb-comment-body { flex: 1; }
.sb-comment-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; justify-content: flex-end; flex-direction: row-reverse; }
.sb-comment-name { font-size: 14px; font-weight: 700; color: #212529; }
.sb-comment-date { font-size: 12px; color: #5e6972; }
.sb-comment-text { font-size: 14px; color: #212529; line-height: 1.6; text-align: right; }

.sb-no-comments { text-align: center; padding: 32px; color: #5e6972; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 12px; }

@media (max-width: 600px) {
    .sb-form-row { flex-direction: column; }
}