/* ===== جزئیات وبلاگ - مطابق نمونه (چپ: محتوا، راست: سایدبار) ===== */

:root {
    --blog-accent: #2563eb;
    --blog-accent-hover: #1d4ed8;
}

.blog-detail-page {
    direction: rtl;
    padding-top: 100px;
    padding-bottom: 60px;
    background: #fafafa;
}

.blog-detail-page .container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.bd-breadcrumb,
.blog-detail-page .ht-breadcrumb {
    padding: 14px 0;
    margin-bottom: 24px;
    font-size: 0.9rem;
    color: #64748b;
}

.bd-breadcrumb a,
.blog-detail-page .ht-breadcrumb a {
    color: var(--blog-accent);
    text-decoration: none;
}

.bd-breadcrumb-sep,
.blog-detail-page .ht-breadcrumb span {
    margin: 0 8px;
    color: #94a3b8;
}

.bd-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 0;
}

/* چیدمان: محتوا چپ، سایدبار راست */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
    align-items: start;
    direction: ltr;
}

.article-main {
    min-width: 0;
    width: 100%;
    direction: rtl;
    background: white;
    border-radius: 16px;
    padding: 32px 36px 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

.article-sidebar {
    direction: rtl;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.article-sidebar .sidebar-widget {
    min-width: 0;
}

/* بلوک زیر تصویر: عنوان + متا */
.article-below-hero {
    margin-bottom: 24px;
}

.article-title {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.4;
    color: #1e293b;
    margin: 0 0 14px 0;
}

.article-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px 24px;
    font-size: 0.9rem;
    color: #64748b;
}

.article-meta-line span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-meta-line i {
    font-size: 1.05rem;
    color: #94a3b8;
}

/* تصویر شاخص */
.article-hero {
    margin-bottom: 28px;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
}

.article-hero img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* خلاصه مقاله */
.article-summary {
    margin-bottom: 28px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
    border-right: 4px solid var(--blog-accent);
}

.article-summary-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
}

.article-summary p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.8;
    color: #475569;
}

/* متن مقاله */
.article-body {
    line-height: 2;
    font-size: 1.05rem;
    color: #334155;
    min-height: 80px;
}

.article-body h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    margin: 28px 0 12px;
}

.article-body p {
    margin-bottom: 14px;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 16px 0;
}

/* اشتراک‌گذاری */
.article-share {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.share-label {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 14px;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 9999px;
    border: 2px solid #e2e8f0;
    background: white;
    font-family: inherit;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn:hover {
    border-color: var(--blog-accent);
    color: var(--blog-accent);
    background: #eff6ff;
}

.share-btn i {
    font-size: 1.1rem;
}

/* سایدبار */
.article-sidebar .sidebar-widget {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.sidebar-widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 18px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-widget-title i {
    font-size: 1.2rem;
    color: var(--blog-accent);
}

/* مقالات مرتبط */
.related-posts {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.related-post {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.related-post:last-child {
    border-bottom: none;
}

.related-post:hover {
    background: #f8fafc;
    padding: 14px 10px;
    margin: 0 -10px;
    border-radius: 10px;
}

.related-post-image {
    width: 72px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.related-post-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.45;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: block;
}

.related-post:hover .related-post-title {
    color: var(--blog-accent);
}

.related-post-date {
    font-size: 0.8rem;
    color: #64748b;
}

/* خبرنامه */
.newsletter-widget .newsletter-desc {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 18px 0;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--blog-accent);
}

.newsletter-btn {
    padding: 12px 20px;
    background: var(--blog-accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.newsletter-btn:hover {
    background: var(--blog-accent-hover);
}

/* بخش نظرات (تمام عرض زیر دو ستون) */
.blog-comments-section {
    margin-top: 40px;
    padding: 32px 36px 40px;
    border-top: 1px solid #e2e8f0;
    direction: rtl;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    width: 100%;
    box-sizing: border-box;
}

.comments-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 24px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-title i {
    color: var(--blog-accent);
}

.blog-comment-form-container {
    margin-bottom: 28px;
}

.blog-comment-form-container h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #475569;
    margin: 0 0 16px 0;
}

.blog-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.blog-form-group {
    margin-bottom: 16px;
}

.blog-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
}

.blog-form-group input,
.blog-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.blog-form-group input:focus,
.blog-form-group textarea:focus {
    outline: none;
    border-color: var(--blog-accent);
}

.blog-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit-comment {
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--blog-accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-submit-comment:hover {
    background: var(--blog-accent-hover);
}

.blog-form-error {
    padding: 12px;
    background: #fef2f2;
    color: #b91c1c;
    border-radius: 10px;
    margin-bottom: 16px;
    border: 1px solid #fecaca;
    font-size: 0.9rem;
}

.blog-field-error {
    color: #b91c1c;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* لیست نظرات */
.blog-comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.blog-comment {
    display: flex;
    gap: 14px;
}

.blog-comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #64748b;
    font-size: 1.2rem;
}

.blog-comment-avatar.small {
    width: 38px;
    height: 38px;
    font-size: 1rem;
}

.blog-comment-content {
    flex: 1;
    min-width: 0;
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
}

.blog-comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.blog-comment-author-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e293b;
}

.blog-comment-date {
    font-size: 0.8rem;
    color: #64748b;
}

.blog-comment-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #475569;
    margin: 0;
}

.blog-comment-replies {
    margin-top: 14px;
    margin-right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.blog-comment-replies .blog-comment-content {
    background: white;
    border-right: 3px solid var(--blog-accent);
}

.blog-comments-empty {
    text-align: center;
    padding: 40px 24px;
    color: #64748b;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #e2e8f0;
}

.blog-comments-empty i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 12px;
    display: block;
}

.blog-comments-empty p {
    margin: 0;
    font-size: 0.95rem;
}

/* ریسپانسیو */
@media (max-width: 992px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        order: 1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .article-main {
        padding: 24px 20px 32px;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .article-meta-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .article-sidebar {
        grid-template-columns: 1fr;
    }

    .blog-comments-section {
        padding: 24px 20px 32px;
    }

    .blog-form-row {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        justify-content: center;
    }
}
