﻿.blog-section {
    background-color: #f8f9fa;
}

.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

.blog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

    .blog-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    }

.blog-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.blog-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image {
    transform: scale(1.1);
}

.blog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover .blog-overlay {
    opacity: 1;
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #6c757d;
}

    .blog-meta span {
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }

.blog-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

    .blog-title a {
        color: #2c3e50;
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .blog-title a:hover {
            color: #0d6efd;
        }

.blog-excerpt {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.read-more {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.3s ease;
}

    .read-more:hover {
        gap: 0.6rem;
    }

.comment-count {
    color: #6c757d;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .blog-image-wrapper {
        height: 180px;
    }

    .blog-title {
        font-size: 1.1rem;
    }
}


/* ── Detail Page ────────────────────────────────────────── */
.blog-detail-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.4;
    color: #212529;
}

.blog-detail-meta {
    color: #6c757d;
}

.blog-detail-cover {
    border-radius: 12px;
    overflow: hidden;
}

.blog-detail-excerpt .lead {
    font-size: 1.1rem;
    border-right: 4px solid #0d6efd;
    padding-right: 1rem;
}

[dir="ltr"] .blog-detail-excerpt .lead {
    border-right: none;
    border-left: 4px solid #0d6efd;
    padding-right: 0;
    padding-left: 1rem;
}

/* محتوای اصلی پست */
.blog-detail-body {
    font-size: 1rem;
    line-height: 1.9;
    color: #343a40;
}

    .blog-detail-body h2,
    .blog-detail-body h3 {
        margin-top: 2rem;
        margin-bottom: 1rem;
        font-weight: 700;
    }

    .blog-detail-body img {
        max-width: 100%;
        border-radius: 8px;
        margin: 1.5rem 0;
    }

    .blog-detail-body blockquote {
        border-right: 4px solid #0d6efd;
        padding: 0.75rem 1.25rem;
        background: #f8f9fa;
        border-radius: 0 8px 8px 0;
        color: #495057;
        margin: 1.5rem 0;
    }

[dir="ltr"] .blog-detail-body blockquote {
    border-right: none;
    border-left: 4px solid #0d6efd;
    border-radius: 8px 0 0 8px;
}

/* ── Sidebar ────────────────────────────────────────────── */
.blog-sidebar {
    position: sticky;
    top: 1.5rem;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.sidebar-widget-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0d6efd;
    color: #212529;
}

.sidebar-post-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-post-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #343a40;
    transition: color 0.2s;
}

    .sidebar-post-item a:hover {
        color: #0d6efd;
    }

.sidebar-post-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.sidebar-post-title {
    font-size: 0.875rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
