/* ============================
   blog.css — تصميم المدونة
   الروبي ستور v2
   ============================ */

/* ============================
   قائمة المقالات — Blog Index
   ============================ */
.blog-card {
    display: flex;
    gap: 24px;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--gray);
    margin-bottom: 24px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.blog-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.blog-card-img-wrap {
    flex-shrink: 0;
    width: 280px;
}

.blog-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================
   Meta — التاريخ والمشاهدات
   ============================ */
.blog-card-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text3);
}

/* ============================
   عنوان الكارد
   ============================ */
.blog-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.5;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-title a:hover {
    color: var(--orange);
}

/* ============================
   مقتطف المحتوى
   ============================ */
.blog-card-excerpt {
    font-size: 15px;
    color: var(--text2);
    line-height: 1.7;
    margin: 0;
}

/* ============================
   زر اقرأ أكتر
   ============================ */
.blog-card-btn {
    display: inline-block;
    color: var(--orange);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    margin-top: auto;
    transition: gap 0.2s;
}

.blog-card-btn:hover {
    text-decoration: underline;
}

/* ============================
   Empty State
   ============================ */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text3);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--text2);
    margin-bottom: 8px;
}

/* ============================
   Pagination
   ============================ */
.blog-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

/* ============================
   صفحة المقال — Blog Show
   ============================ */
.blog-single {
    max-width: 820px;
    margin: 0 auto;
}

/* ============================
   رأس المقال
   ============================ */
.blog-single-header {
    margin-bottom: 32px;
}

.blog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text3);
    margin-bottom: 20px;
}

.blog-breadcrumb a {
    color: var(--text2);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-breadcrumb a:hover {
    color: var(--orange);
}

.blog-single-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 16px;
}

.blog-single-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text3);
}

/* ============================
   صورة المقال
   ============================ */
.blog-single-img-wrap {
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
}

.blog-single-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

/* ============================
   محتوى المقال
   ============================ */
.blog-single-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text);
    margin-bottom: 40px;
}

.blog-single-content h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--navy);
    margin: 36px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--orange);
    display: inline-block;
}

.blog-single-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    margin: 28px 0 12px;
}

.blog-single-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 20px 0 10px;
}

.blog-single-content p {
    margin-bottom: 18px;
}

.blog-single-content ul,
.blog-single-content ol {
    padding-right: 28px;
    margin-bottom: 18px;
}

.blog-single-content li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.blog-single-content img {
    max-width: 100%;
    border-radius: 10px;
    margin: 20px auto;
    display: block;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.blog-single-content strong {
    font-weight: 700;
    color: var(--navy);
}

/* ============================
   جداول جوه المقال
   ============================ */
.blog-single-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.blog-single-content table th {
    background: var(--navy);
    color: #fff;
    padding: 12px 16px;
    text-align: right;
    font-weight: 700;
    font-size: 14px;
}

.blog-single-content table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--gray);
    color: var(--text2);
}

.blog-single-content table tr:nth-child(even) td {
    background: var(--off);
}

.blog-single-content table tr:last-child td {
    border-bottom: none;
}

/* ============================
   Blockquote جوه المقال
   ============================ */
.blog-single-content blockquote {
    border-right: 4px solid var(--orange);
    padding: 16px 20px;
    margin: 24px 0;
    background: var(--off);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text2);
}

/* ============================
   الكلمات الدلالية
   ============================ */
.blog-single-keywords {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    padding: 16px;
    background: var(--off);
    border-radius: 8px;
}

.keywords-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text2);
}

.keyword-tag {
    background: var(--white);
    border: 1px solid var(--gray);
    color: var(--text2);
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 99px;
}

/* ============================
   مشاركة المقال
   ============================ */
.blog-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
    padding: 20px;
    background: var(--off);
    border-radius: 12px;
}

.share-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text2);
}

.share-btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
}

.share-btn:hover {
    opacity: 0.85;
}

.share-fb {
    background: #1877F2;
    color: #fff;
}

.share-wa {
    background: #25D366;
    color: #fff;
}

/* ============================
   مقالات ذات صلة
   ============================ */
.blog-related {
    border-top: 2px solid var(--gray);
    padding-top: 40px;
}

.blog-related-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 24px;
}

.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.related-card {
    border-radius: 10px;
    border: 1px solid var(--gray);
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow 0.2s;
    background: var(--white);
}

.related-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.related-card-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.related-card-body {
    padding: 12px;
}

.related-card-body h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card-body span {
    font-size: 12px;
    color: var(--text3);
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 768px) {
    .blog-card {
        flex-direction: column;
    }

    .blog-card-img-wrap {
        width: 100%;
    }

    .blog-card-img {
        height: 200px;
    }

    .blog-single-title {
        font-size: 22px;
    }

    .blog-related-grid {
        grid-template-columns: 1fr;
    }

    .blog-single-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
}