/* ========================================
   Blog - Hamrah Daftar
======================================== */


/* صفحه */

.hd-blog-page {
    padding-top: 0px;
    background: #f8fafc;
}


/* ========================================
   Blog Hero
======================================== */

.hd-blog-header {
    position: relative;
    overflow: hidden;

    padding: 45px 0 40px;

    background:
        linear-gradient(
            135deg,
            #172554 0%,
            #1e3a8a 55%,
            #2563eb 100%
        );
}


/* دایره‌های پس زمینه */

.hd-blog-header::before {
    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    border-radius: 50%;

    border: 1px solid rgba(255,255,255,.08);

    top: -220px;
    right: -120px;
}


.hd-blog-header::after {
    content: "";

    position: absolute;

    width: 300px;
    height: 300px;

    border-radius: 50%;

    background: rgba(255,255,255,.025);

    bottom: -160px;
    left: 10%;
}


.hd-blog-header-content {
    position: relative;

    z-index: 2;

    text-align: center;

    color: #ffffff;
}


.hd-blog-badge {
    display: inline-flex;

    align-items: center;

    padding: 7px 16px;

    border-radius: 50px;

    border: 1px solid rgba(255,255,255,.15);

    background: rgba(255,255,255,.08);

    color: #dbeafe;

    font-size: 13px;

    margin-bottom: 18px;
}


.hd-blog-header h1 {
    font-size: 40px;

    font-weight: 800;

    margin-bottom: 18px;

    color: #ffffff;
}


.hd-blog-header p {
    max-width: 600px;

    margin: 0 auto;

    color: rgba(255,255,255,.75);

    font-size: 16px;

    line-height: 2;
}


/* ========================================
   Main Section
======================================== */

.hd-blog-section {
    padding: 60px 0 80px;
}


/* عنوان بخش مطالب */

.hd-blog-section-head {
    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    margin-bottom: 35px;
}


.hd-blog-section-head h2 {
    margin: 10px 0 0;

    font-size: 28px;

    font-weight: 700;

    color: #172554;
}


.hd-post-count {
    font-size: 13px;

    color: #64748b;

    background: #ffffff;

    padding: 7px 13px;

    border-radius: 50px;

    border: 1px solid #e2e8f0;
}


/* ========================================
   Blog Card
======================================== */

.hd-blog-card {
    height: 100%;

    display: flex;

    flex-direction: column;

    background: #ffffff;

    border: 1px solid #e8edf5;

    border-radius: 18px;

    overflow: hidden;

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}


.hd-blog-card:hover {
    transform: translateY(-6px);

    border-color: #dbeafe;

    box-shadow: 0 18px 40px rgba(15,23,42,.08);
}


/* تصویر */

.hd-blog-image {
    display: block;
    height: 200px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hd-blog-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}


.hd-blog-card:hover .hd-blog-image img {
    transform: scale(1.06);
}


/* بدون تصویر */

.hd-blog-no-image {
    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #eff6ff,
            #f8fafc
        );

    color: #2563eb;

    font-size: 40px;
}


/* محتوا */

.hd-blog-content {
    display: flex;

    flex-direction: column;

    flex-grow: 1;

    padding: 24px;
}


/* تاریخ */

.hd-blog-meta {
    margin-bottom: 12px;

    font-size: 12px;

    color: #94a3b8;
}


.hd-blog-meta span {
    display: inline-flex;

    align-items: center;

    gap: 6px;
}


/* عنوان */

.hd-blog-title {
    margin-bottom: 13px;

    font-size: 18px;

    font-weight: 700;

    line-height: 1.8;
        text-align: justify;

}


.hd-blog-title a {
    color: #1e293b !important;

    text-decoration: none !important;

    transition: color .2s;
    display: block;
}


.hd-blog-title a:hover {
    color: #2563eb !important;
}


/* خلاصه */

.hd-blog-excerpt {
    flex-grow: 1;

    margin-bottom: 22px;

    color: #64748b;

    font-size: 14px;

    line-height: 2;

    text-align: justify;
}


/* لینک ادامه */

.hd-blog-link {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    width: fit-content;

    color: #2563eb !important;

    font-size: 14px;

    font-weight: 700;

    text-decoration: none !important;

    transition: gap .2s;
}


.hd-blog-link:hover {
    gap: 12px;

    color: #1d4ed8 !important;
}


/* ========================================
   Empty State
======================================== */

.hd-blog-empty {
    padding: 70px 30px;

    text-align: center;

    background: #ffffff;

    border: 1px solid #e8edf5;

    border-radius: 20px;
}


.hd-blog-empty-icon {
    width: 65px;
    height: 65px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin: 0 auto 20px;

    border-radius: 18px;

    background: #eff6ff;

    color: #2563eb;

    font-size: 26px;
}


.hd-blog-empty h3 {
    font-size: 20px;

    color: #1e293b;

    margin-bottom: 10px;
}


.hd-blog-empty p {
    margin: 0;

    color: #64748b;
}


/* ========================================
   Sidebar
======================================== */

.hd-sidebar {
    position: sticky;

    top: 95px;
}


.hd-sidebar-box {
    margin-bottom: 24px;

    padding: 25px;

    background: #ffffff;

    border: 1px solid #e8edf5;

    border-radius: 18px;
}


/* عنوان سایدبار */

.hd-sidebar-heading {
    display: flex;

    align-items: center;

    gap: 10px;

    padding-bottom: 16px;

    margin-bottom: 20px;

    border-bottom: 1px solid #eef2f7;
}


.hd-sidebar-heading > span {
    width: 34px;
    height: 34px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: #eff6ff;

    color: #2563eb;
}


.hd-sidebar-heading h3 {
    margin: 0;

    color: #1e293b;

    font-size: 17px;

    font-weight: 700;
}


/* ========================================
   Latest Posts
======================================== */

.hd-latest-posts {
    padding: 0;
    margin: 0;

    list-style: none;
}


.hd-latest-posts li {
    padding-bottom: 16px;

    margin-bottom: 16px;

    border-bottom: 1px solid #f1f5f9;
}


.hd-latest-posts li:last-child {
    padding-bottom: 0;

    margin-bottom: 0;

    border-bottom: none;
}


.hd-latest-posts a {
    display: flex;

    gap: 12px;

    text-decoration: none !important;
}


/* تصویر */

.hd-latest-thumb {
    width: 68px;
    height: 68px;

    flex-shrink: 0;

    overflow: hidden;

    border-radius: 12px;

    background: #f1f5f9;
}


.hd-latest-thumb img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .3s;
}

/*
.hd-latest-posts a:hover img {
    transform: scale(1.08);
}
*/

.no-thumb {
    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #eff6ff;

    color: #2563eb;
}


/* اطلاعات */

.hd-latest-info h4 {
    margin: 0 0 7px;

    color: #334155;

    font-size: 13px;

    font-weight: 600;

    line-height: 1.7;

    transition: color .2s;
}


.hd-latest-posts a:hover h4 {
    color: #2563eb;
}


.hd-latest-info span {
    color: #94a3b8;

    font-size: 11px;
}


/* ========================================
   Tags
======================================== */

.hd-tags {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;
}


.hd-tag {
    display: inline-flex;

    align-items: center;

    padding: 7px 13px;

    border-radius: 9px;

    background: #f8fafc;

    border: 1px solid #e8edf5;

    color: #475569 !important;

    font-size: 12px;

    text-decoration: none !important;

    transition: .2s;
}


.hd-tag:hover {
    background: #eff6ff;

    border-color: #bfdbfe;

    color: #2563eb !important;
}


/* ========================================
   Help Box
======================================== */

.hd-sidebar-help {
    padding: 28px;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            #172554,
            #1e40af
        );

    color: #ffffff;
}


.hd-sidebar-help > span {
    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 18px;

    border-radius: 12px;

    background: rgba(255,255,255,.1);

    color: #dbeafe;

    font-size: 18px;
}


.hd-sidebar-help h3 {
    font-size: 18px;

    font-weight: 700;

    margin-bottom: 10px;

    color: #ffffff;
}


.hd-sidebar-help p {
    color: rgba(255,255,255,.7);

    font-size: 13px;

    line-height: 2;

    margin-bottom: 20px;
}


.hd-sidebar-help a {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 10px 16px;

    border-radius: 9px;

    background: #ffffff;

    color: #1e3a8a !important;

    font-size: 13px;

    font-weight: 700;

    text-decoration: none !important;
}


/* ========================================
   Pagination
======================================== */

.hd-pagination {
    display: flex;

    justify-content: center;

    margin-top: 45px;
}


.hd-pagination nav {
    width: 100%;
}


.hd-pagination ul {
    justify-content: center;
}


.hd-pagination .page-link {
    width: 40px;
    height: 40px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin: 0 3px;

    border-radius: 10px !important;

    border: 1px solid #e2e8f0;

    background: #ffffff;

    color: #475569;

    box-shadow: none;
}


.hd-pagination .page-item.active .page-link {
    background: #2563eb;

    border-color: #2563eb;

    color: #ffffff;
}


.hd-pagination .page-link:hover {
    background: #eff6ff;

    color: #2563eb;
}


/* ========================================
   Responsive
======================================== */

@media (max-width: 991px) {

    .hd-sidebar {
        position: static;

        margin-top: 50px;
    }

}


@media (max-width: 767px) {

    .hd-blog-page {
        padding-top: 65px;
    }


    .hd-blog-header {
        padding: 65px 0 60px;
    }


    .hd-blog-header h1 {
        font-size: 30px;
    }


    .hd-blog-header p {
        font-size: 14px;
    }


    .hd-blog-section {
        padding: 55px 0 70px;
    }


    .hd-blog-section-head h2 {
        font-size: 24px;
    }

}


@media (max-width: 575px) {

    .hd-blog-section-head {
        align-items: flex-start;

        flex-direction: column;

        gap: 15px;
    }


    .hd-blog-card {
        margin-bottom: 5px;
    }


    .hd-blog-image {
        height: 220px;
    }

}
/* ========================================
   Blog Post Page
======================================== */

/* =========================================
   صفحه داخلی مطلب
========================================= */

/* ---------- هدر مطلب ---------- */

.hd-post-hero {
    background: linear-gradient(
        135deg,
        #263b6b 0%,
        #304a82 50%,
        #3b5fa8 100%
    );
    padding: 55px 0 45px;
    position: relative;
    overflow: hidden;
}

.hd-post-hero::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    top: -280px;
    right: -100px;
}

.hd-post-hero::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.025);
    border-radius: 50%;
    bottom: -220px;
    left: -100px;
}

.hd-post-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hd-post-hero h1 {
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.9;
    margin: 0 0 15px;
}

.hd-post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.hd-meta-dot {
    opacity: 0.6;
}


/* ---------- نوار اطلاعات زیر هدر ---------- */

.hd-post-info-bar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

.hd-post-info {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}


/* مسیر */

.hd-post-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #94a3b8;
}

.hd-post-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hd-post-breadcrumb a:hover {
    color: #2563eb;
}

.hd-post-breadcrumb span:last-child {
    color: #94a3b8;
}


/* موضوعات بالای مطلب */

.hd-post-top-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.hd-post-top-tags a {
    display: inline-flex;
    align-items: center;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hd-post-top-tags a:hover {
    background: #2563eb;
    color: #fff;
}


/* ---------- بخش اصلی ---------- */

.hd-post-section {
    padding: 45px 0 70px;
    background: #f1f5f9;
}


/* کارت مقاله */

.hd-post-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 25px rgba(15, 23, 42, 0.05);
}


/* تصویر */

.hd-post-image {
    padding: 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
}

.hd-post-image img {
    display: block;
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    border-radius: 10px;
    margin: 0 auto;
}


/* محتوای مقاله */

.hd-post-content {
    padding: 35px 45px;
    color: #334155;
    font-size: 15px;
    line-height: 2.2;
    text-align: justify;
}

.hd-post-content p {
    margin-bottom: 22px;
}

.hd-post-content h2,
.hd-post-content h3,
.hd-post-content h4 {
    color: #1e293b;
    font-weight: 700;
    margin-top: 35px;
    margin-bottom: 18px;
}

.hd-post-content h2 {
    font-size: 23px;
}

.hd-post-content h3 {
    font-size: 20px;
}

.hd-post-content a {
    color: #2563eb;
}

.hd-post-content img {
    max-width: 100%;
    height: auto;
}


/* ---------- موضوعات پایین مقاله ---------- */

.hd-post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 22px 45px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.hd-tags-label {
    font-size: 13px;
    color: #64748b;
    margin-left: 4px;
}

.hd-post-tags a {
    display: inline-block;
    background: #fff;
    border: 1px solid #dbeafe;
    color: #2563eb;
    font-size: 12px;
    padding: 6px 13px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hd-post-tags a:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}


/* ---------- بازگشت ---------- */

.hd-post-back {
    margin-top: 28px;
    text-align: center;
}

.hd-post-back a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #dbeafe;
    color: #2563eb;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hd-post-back a:hover {
    background: #2563eb;
    color: #fff;
    transform: translateY(-2px);
}


/* ---------- موبایل ---------- */

@media (max-width: 767px) {

    .hd-post-hero {
        padding: 40px 0 35px;
    }

    .hd-post-hero h1 {
        font-size: 23px;
        line-height: 1.8;
    }

    .hd-post-meta {
        font-size: 12px;
    }

    .hd-post-info {
        padding: 15px 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .hd-post-section {
        padding: 25px 0 50px;
    }

    .hd-post-content {
        padding: 25px 20px;
        font-size: 14px;
        line-height: 2.1;
    }

    .hd-post-tags {
        padding: 18px 20px;
    }

}
/* =========================
   Post Sidebar
========================= */

.hd-post-sidebar {
    position: sticky;
    top: 100px;
}

.hd-search-form {
    display: flex;
    gap: 8px;
}

.hd-search-form input {
    width: 100%;
    height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 14px;
    outline: none;
    font-family: inherit;
    transition: 0.2s;
}

.hd-search-form input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.hd-search-form button {
    border: none;
    background: #2563eb;
    color: #fff;
    padding: 0 18px;
    border-radius: 10px;
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s;
}

.hd-search-form button:hover {
    background: #1d4ed8;
}


@media (max-width: 991px) {

    .hd-post-sidebar {
        position: static;
        margin-top: 30px;
    }

}