/* ============================================================
   ویجت آخرین نوشته‌ها — طراحی مینیمال و حرفه‌ای
   نسخه ۲.۰
   ============================================================ */

/* ---------- لیست کارت‌ها ---------- */
.hlpe-posts-list {
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
    margin: 0;
    padding: 0;
}
[data-scheme="dark"] .cs-category-item__title a {
    color: #000 !important;
}
/* ---------- هر کارت ---------- */
.hlpe-post-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #ededed;
    transition: border-color 0.25s ease, box-shadow 0.35s ease, transform 0.3s ease;
}

.hlpe-post-card:hover {
    border-color: #d0d0d0;
    box-shadow: 0 6px 24px -8px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.hlpe-post-card-inner {
    display: flex;
    flex-direction: column;
}

/* ---------- تصویر با نسبت ۴:۳ و حالت کاور ---------- */
.hlpe-post-thumb {
    width: 100%;
    background: #f4f4f4;
    overflow: hidden;
    flex-shrink: 0;
    order: 2; /* در موبایل پایین */
    aspect-ratio: 4 / 3;
}

.hlpe-post-thumb a {
    display: block;
    width: 100%;
    height: 100%;
}

.hlpe-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* حالت کاور */
    display: block;
    transition: transform 0.45s ease;
}

.hlpe-post-card:hover .hlpe-post-thumb img {
    transform: scale(1.04);
}

/* ---------- جایگزین بدون تصویر ---------- */
.hlpe-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    color: #bbb;
}

.hlpe-no-image svg {
    width: 42px;
    height: 42px;
}

/* ---------- محتوای متنی ---------- */
.hlpe-post-content {
    padding: 1.5rem 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    order: 1; /* در موبایل بالا */
}
.cs-category-item__title a,
.cs-category-item__title a:hover,
.cs-category-item__title a:focus,
.cs-category-item__title a:active {
	    display: inline;
    padding-bottom: 0 !important;          /* حذف فاصله زیر متن */
    background: none !important;           /* حذف گرادیان پس‌زمینه */
    background-size: unset;
    background-repeat: unset;
    background-position: unset;
    color: #1a1a1a;                        /* رنگ مورد نظر شما */
    text-decoration: none !important;      /* در صورت وجود آندرلاین معمولی */
    transition: color 0.2s ease;
}
/* حذف کامل افکت گرادیان آندرلاین برای لینک‌های داخل hlpe-post-title */
.entry-content .hlpe-post-title a,
.entry-content .hlpe-post-title a:hover,
.entry-content .hlpe-post-title a:focus,
.entry-content .hlpe-post-title a:active {
    display: inline;
    padding-bottom: 0 !important;          /* حذف فاصله زیر متن */
    background: none !important;           /* حذف گرادیان پس‌زمینه */
    background-size: unset;
    background-repeat: unset;
    background-position: unset;
    color: #1a1a1a;                        /* رنگ مورد نظر شما */
    text-decoration: none !important;      /* در صورت وجود آندرلاین معمولی */
    transition: color 0.2s ease;
}

/* ---------- متا (دسته + تاریخ) ---------- */
.hlpe-post-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.25rem; /* فاصله کم از عنوان */
    flex-wrap: wrap;
}

.hlpe-category {
    background: #f2f2f2;
    padding: 0.1rem 0.55rem;
    border-radius: 20px;
    color: #555;
    text-decoration: none;
    font-weight: 450;
    font-size: 0.5rem; /* فونت بسیار کوچک */
    letter-spacing: 0.3px;
    transition: background 0.2s ease, color 0.2s ease;
    line-height: 1.6;
    white-space: nowrap;
}

.hlpe-category:hover {
    background: #1a1a1a;
    color: red;
}

.hlpe-meta-sep {
    color: #ddd;
    font-size: 0.5rem;
}

.hlpe-date {
    color: #aaa;
    font-size: 0.5rem;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

/* ---------- عنوان پست ---------- */
.hlpe-post-title {
    font-size: 1.05rem;
    font-weight: 650;
    line-height: 1.45;
    margin: 0 0 0.35rem 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.hlpe-post-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
    display: block;
        background: none;

}

.hlpe-post-title a:hover {
    color: #6b6b6b;
    background: none;
}

/* ---------- خلاصه ---------- */
.hlpe-post-excerpt {
    font-size: 0.85rem;
    color: #6b6b6b;
    line-height: 1.7;
    margin: 0 0 0.9rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- لینک ادامه ---------- */
.hlpe-post-footer {
    display: flex;
    align-items: center;
        display: flex;
    justify-content: flex-end;
}

.hlpe-read-more {
    font-size: 0.75rem;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    border-bottom: 1.5px solid rgba(26, 26, 26, 0.2);
    padding-bottom: 0.1rem;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.hlpe-read-more:hover {
    border-color: #1a1a1a;
    color: #000;
}

.hlpe-no-posts {
    color: #999;
    font-size: 0.9rem;
    padding: 1.5rem 0;
    text-align: center;
    border: 1px dashed #e0e0e0;
    border-radius: 8px;
}

/* ============================================================
   واکنش‌گرایی
   ============================================================ */

@media (min-width: 768px) {
    .hlpe-post-card-inner {
        flex-direction: row;
    }

    .hlpe-post-thumb {
        width: 50%;
        aspect-ratio: 4 / 3;
        order: 1; /* در دسکتاپ تصویر سمت چپ */
    }

    .hlpe-post-content {
        width: 50%;
        padding: 1.75rem 2rem 1.75rem 2rem;
        order: 2; /* محتوا سمت راست */
    }

    .hlpe-post-title {
        font-size: 1.2rem;
    }

    .hlpe-category {
        font-size: 0.55rem;
        padding: 0.1rem 0.65rem;
    }

    .hlpe-date {
        font-size: 0.55rem;
    }

    .hlpe-meta-sep {
        font-size: 0.55rem;
    }
}

@media (max-width: 767px) {
    .hlpe-posts-list {
        gap: 1.25rem;
    }

    .hlpe-post-content {
        padding: 1.15rem 1.15rem 1rem;
    }

    .hlpe-post-title {
        font-size: 0.95rem;
    }

    .hlpe-post-excerpt {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }

    .hlpe-category {
        font-size: 0.45rem;
        padding: 0.05rem 0.45rem;
    }

    .hlpe-date {
        font-size: 0.45rem;
    }

    .hlpe-meta-sep {
        font-size: 0.45rem;
    }
}

/* ============================================================
   حالت تاریک (اختیاری)
   ============================================================ */

@media (prefers-color-scheme: dark) {
    .hlpe-post-card {
        background: #1a1a1a;
        border-color: #2a2a2a;
    }

    .hlpe-post-card:hover {
        border-color: #444;
        box-shadow: 0 6px 24px -8px rgba(255, 255, 255, 0.03);
    }

    .hlpe-post-thumb {
        background: #242424;
    }

    .hlpe-post-title a {
        color: #ececec;
    }

    .hlpe-post-title a:hover {
        color: #a8a8a8;
    }

    .hlpe-post-excerpt {
        color: #a8a8a8;
    }

    .hlpe-category {
        background: #2a2a2a;
        color: #c0c0c0;
    }

    .hlpe-category:hover {
        background: #444;
        color: #fff;
    }

    .hlpe-read-more {
        color: #ececec;
        border-bottom-color: rgba(255, 255, 255, 0.2);
    }

    .hlpe-read-more:hover {
        border-color: #ececec;
        color: #fff;
    }

    .hlpe-no-image {
        background: #242424;
        color: #555;
    }

    .hlpe-no-posts {
        color: #888;
        border-color: #333;
    }

    .hlpe-date {
        color: #888;
    }

    .hlpe-meta-sep {
        color: #444;
    }
}