/* ============================================
   SHARE - BLOG
   مدونة قسم الخير
   ============================================ */

.blog-section {
    padding: 40px 0 80px;
    background: var(--gray-50);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* ===== BLOG CARD ===== */
.blog-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.blog-image {
    height: 200px;
    background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 20px;
}

.blog-tag {
    display: inline-block;
    background: rgba(13, 148, 136, 0.1);
    color: var(--charity-primary);
    padding: 2px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.blog-content h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.blog-content h4 a {
    color: var(--gray-900);
    text-decoration: none;
    transition: all 0.3s;
}

.blog-content h4 a:hover {
    color: var(--charity-primary);
}

.blog-content p {
    color: var(--gray-500);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--gray-400);
    margin: 10px 0;
    flex-wrap: wrap;
}

.blog-meta i {
    margin-right: 4px;
}

[dir="rtl"] .blog-meta i {
    margin-right: 0;
    margin-left: 4px;
}

.btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--charity-primary);
    color: var(--white);
    border-radius: 50px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-sm:hover {
    background: var(--charity-primary-dark);
    transform: translateX(4px);
}

[dir="rtl"] .btn-sm:hover {
    transform: translateX(-4px);
}

/* ===== BLOG EMPTY ===== */
.blog-empty {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.blog-empty i {
    font-size: 48px;
    color: var(--gray-300);
    display: block;
    margin-bottom: 16px;
}

.blog-empty p {
    color: var(--gray-500);
    font-size: 16px;
}

/* ===== BLOG DETAIL ===== */
.blog-detail-section {
    padding: 40px 0 80px;
    background: var(--gray-50);
}

.blog-detail {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.blog-detail-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 12px 0;
}

.blog-detail-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--gray-400);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.blog-detail-meta i {
    margin-right: 4px;
}

[dir="rtl"] .blog-detail-meta i {
    margin-right: 0;
    margin-left: 4px;
}

.blog-detail-image {
    margin: 0 -40px 30px;
    overflow: hidden;
}

.blog-detail-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.blog-detail-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--gray-700);
}

.blog-detail-content p {
    margin-bottom: 16px;
}

.blog-detail-content ul {
    margin: 16px 0;
    padding-left: 24px;
}

.blog-detail-content ul li {
    margin-bottom: 8px;
}

.blog-detail-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

/* ===== RELATED POSTS ===== */
.related-posts {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--gray-200);
}

.related-posts h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--gray-800);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-post {
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.3s;
}

.related-post:hover {
    background: var(--charity-accent);
    transform: translateY(-2px);
}

.related-post h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.related-post p {
    font-size: 13px;
    color: var(--gray-500);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.pagination a:hover {
    background: var(--charity-primary);
    color: var(--white);
    border-color: var(--charity-primary);
}

.pagination .pagination-current {
    background: var(--charity-primary);
    color: var(--white);
    border-color: var(--charity-primary);
}

.pagination .pagination-prev,
.pagination .pagination-next {
    width: auto;
    padding: 0 16px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .blog-detail {
        padding: 24px;
    }
    
    .blog-detail-header h1 {
        font-size: 24px;
    }
    
    .blog-detail-image {
        margin: 0 -24px 20px;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination a {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .blog-detail {
        padding: 16px;
    }
    
    .blog-detail-header h1 {
        font-size: 20px;
    }
    
    .blog-detail-image {
        margin: 0 -16px 16px;
    }
    
    .blog-detail-meta {
        font-size: 12px;
        gap: 12px;
    }
    
    .blog-content h4 {
        font-size: 16px;
    }
}

/* ============================================
   DARK MODE
   ============================================ */
@media (prefers-color-scheme: dark) {
    .blog-card {
        background: var(--gray-800);
    }
    
    .blog-content h4 a {
        color: var(--white);
    }
    
    .blog-detail {
        background: var(--gray-800);
    }
    
    .blog-detail-header h1 {
        color: var(--white);
    }
    
    .blog-detail-content {
        color: var(--gray-300);
    }
    
    .blog-detail-footer {
        border-color: var(--gray-700);
    }
    
    .related-posts {
        border-color: var(--gray-700);
    }
    
    .related-posts h3 {
        color: var(--white);
    }
    
    .related-post {
        background: var(--gray-700);
    }
    
    .related-post h4 {
        color: var(--white);
    }
}