/* =========================================================
   استایل‌های صفحه لیست مقالات / دسته‌بندی وبلاگ
   Scope: .blog-list-wrapper
========================================================= */

.blog-list-wrapper {
    padding: 40px 20px;
    background-color: transparent;
    font-family: inherit;
    direction: rtl;
}

.blog-list-wrapper .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* -------------------------------------
   لی‌آوت گرید (دو ستونه - مشابه صفحه جزئیات)
------------------------------------- */
.blog-list-wrapper .layout-grid {
    display: grid;
    grid-template-columns: 7fr 3fr; /* 70% محتوا، 30% سایدبار */
    gap: 30px;
    align-items: start;
}

/* کارت‌های سفید عمومی */
.blog-list-wrapper .white-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #eaedf1;
    overflow: hidden;
}

/* -------------------------------------
   مسیر راهنما (Breadcrumb) و هدر صفحه
------------------------------------- */
.blog-list-wrapper .breadcrumb {
    margin-bottom: 20px;
    font-size: var(--fs-sm);
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-list-wrapper .breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-list-wrapper .breadcrumb a:hover {
    color: #12828b;
}

.blog-list-wrapper .breadcrumb .current {
    color: #12828b;
    font-weight: var(--fw-bold);
}

.blog-list-wrapper .page-header {
    padding: 30px;
    margin-bottom: 30px;
    border-left: 5px solid #12828b; /* نوار رنگی کناری برای زیبایی */
}

.blog-list-wrapper .page-title {
    margin: 0 0 10px 0;
    font-size: var(--fs-2xl);
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 12px;
}

.blog-list-wrapper .page-title i {
    color: #12828b;
}

.blog-list-wrapper .page-description {
    margin: 0;
    color: #64748b;
    font-size: var(--fs-base);
    line-height: 1.6;
}

/* -------------------------------------
   شبکه مقالات (لیست کارت‌ها)
------------------------------------- */
.blog-list-wrapper .posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* دو ستون برای کارت‌های مقاله */
    gap: 25px;
    margin-bottom: 40px;
}

/* استایل کارت مقاله */
.blog-list-wrapper .post-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-list-wrapper .post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(18, 130, 139, 0.1);
}

.blog-list-wrapper .post-image-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    background-color: #f1f5f9;
    overflow: hidden;
}

.blog-list-wrapper .post-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-list-wrapper .post-card:hover .post-image-wrapper img {
    transform: scale(1.05); /* زوم ملایم عکس موقع هاور */
}

.blog-list-wrapper .post-category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #12828b;
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    z-index: 2;
}

.blog-list-wrapper .post-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-list-wrapper .post-title {
    margin: 0 0 15px 0;
    font-size: var(--fs-lg);
    line-height: 1.5;
}

.blog-list-wrapper .post-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-list-wrapper .post-title a:hover {
    color: #12828b;
}

.blog-list-wrapper .post-excerpt {
    color: #64748b;
    font-size: var(--fs-sm);
    line-height: 1.8;
    margin: 0 0 20px 0;
    flex: 1;
}

.blog-list-wrapper .post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
    margin-top: auto;
}

.blog-list-wrapper .post-meta {
    font-size: var(--fs-xs);
    color: #94a3b8;
}

.blog-list-wrapper .read-more-btn {
    color: #12828b;
    font-weight: var(--fw-bold);
    font-size: var(--fs-sm);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.blog-list-wrapper .read-more-btn:hover {
    gap: 8px; /* فلش کمی به چپ حرکت می‌کند */
}

/* -------------------------------------
   صفحه‌بندی (Pagination)
------------------------------------- */
.blog-list-wrapper .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.blog-list-wrapper .page-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    background: #ffffff;
    border: 1px solid #eaedf1;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    font-weight: var(--fw-bold);
    transition: all 0.3s ease;
}

.blog-list-wrapper .page-link:hover {
    border-color: #12828b;
    color: #12828b;
}

.blog-list-wrapper .page-link.active {
    background: #12828b;
    color: #ffffff;
    border-color: #12828b;
}

.blog-list-wrapper .page-dots {
    color: #94a3b8;
    font-weight: var(--fw-bold);
}

/* -------------------------------------
   سایدبار (کپی شده برای هماهنگی کامل)
------------------------------------- */
.blog-list-wrapper .widget {
    padding: 25px;
    margin-bottom: 30px;
}

.blog-list-wrapper .widget-title {
    font-size: var(--fs-lg);
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
    position: relative;
}

.blog-list-wrapper .widget-title::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -2px;
    width: 50px;
    height: 2px;
    background-color: #12828b;
}

.blog-list-wrapper .search-form {
    display: flex;
    border: 1px solid #eaedf1;
    border-radius: 8px;
    overflow: hidden;
}

.blog-list-wrapper .search-input {
    flex: 1;
    border: none;
    padding: 12px 15px;
    outline: none;
    font-family: inherit;
    font-size: var(--fs-sm);
}

.blog-list-wrapper .search-btn {
    background: #f8fafc;
    border: none;
    padding: 0 20px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-list-wrapper .search-btn:hover {
    background: #12828b;
    color: #fff;
}

.blog-list-wrapper .widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-list-wrapper .widget-list li { border-bottom: 1px dashed #eaedf1; }
.blog-list-wrapper .widget-list li:last-child { border-bottom: none; }

.blog-list-wrapper .widget-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    color: #475569;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: var(--fs-sm);
}

.blog-list-wrapper .widget-list a:hover {
    color: #12828b;
    padding-right: 5px;
}

.blog-list-wrapper .widget-list .count {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: var(--fs-xs);
    color: #94a3b8;
}

.blog-list-wrapper .recent-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.blog-list-wrapper .recent-post-img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background-color: #f1f5f9;
    flex-shrink: 0;
}

.blog-list-wrapper .recent-post-title {
    display: block;
    color: #2c3e50;
    text-decoration: none;
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    line-height: 1.5;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.blog-list-wrapper .recent-post-title:hover { color: #12828b; }
.blog-list-wrapper .recent-post-date { font-size: var(--fs-xs); color: #94a3b8; }

/* -------------------------------------
   واکنش‌گرایی (Responsive Design)
------------------------------------- */
@media (max-width: 992px) {
    /* انتقال سایدبار به پایین در تبلت */
    .blog-list-wrapper .layout-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* یک ستونه شدن مقالات در موبایل */
    .blog-list-wrapper .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-list-wrapper .page-title {
        font-size: var(--fs-xl);
    }
}
/* این کد باعث می‌شود لیست نتایج از کادر والد خود بیرون بزند و مخفی نشود */
.widget.search-widget.white-card {
    overflow: visible !important;
}
    
.search-form {
overflow: visible !important;
}
    
/* برای اطمینان از اینکه لیست روی بقیه عناصر قرار می‌گیرد */
#blog-search-results {
    z-index: 99999 !important; 
}