/* =====================================================
   BLOG PAGE
===================================================== */

.didaf-blog-page {
    direction: rtl;
    width: 100%;
    background: #fff;

    padding: 55px 0 80px;

    font-family:
        "yekan-bakh-fn",
        "IRANYekan",
        Tahoma,
        sans-serif !important;
}


/* =====================================================
   CONTAINER
===================================================== */

.didaf-blog-container {
    width: 1200px;
    max-width: calc(100% - 40px);

    margin: 0 auto;
}


/* =====================================================
   BREADCRUMB
===================================================== */

.didaf-blog-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 18px;

    margin-bottom: 50px;

    font-size: 13px;
}

.didaf-blog-breadcrumb a {
    color: #222;
    text-decoration: none;
}

.didaf-blog-breadcrumb span {
    color: #777;
    font-size: 20px;
}

.didaf-blog-breadcrumb strong {
    color: #ed1c24;
    font-weight: 700;
}


/* =====================================================
   LAYOUT
===================================================== */

.didaf-blog-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        230px;

    gap: 40px;

    align-items: start;
}


/* =====================================================
   MAIN
===================================================== */

.didaf-blog-main {
    min-width: 0;
}


/* =====================================================
   FILTERS
===================================================== */

.didaf-blog-filters {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 34px;
}

.didaf-filter {
    display: flex;

    align-items: center;
    justify-content: center;

    height: 41px;

    padding: 0 27px;

    background: #f1f1f1;

    border-radius: 25px;

    color: #999;

    text-decoration: none;

    font-family: Arial, sans-serif;

    font-size: 13px;

    transition: .25s ease;
}

.didaf-filter:hover {
    background: #e5e5e5;
    color: #555;
}


/* =====================================================
   ARTICLES GRID
===================================================== */

.didaf-blog-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 24px 20px;
}


/* =====================================================
   ARTICLE CARD
===================================================== */

.didaf-blog-card {
    min-width: 0;

    height: 415px;

    overflow: hidden;

    background: #fff;

    border: 1px solid #bdbdbd;

    border-radius: 22px;

    display: flex;
    flex-direction: column;

    transition:
        box-shadow .3s ease,
        transform .3s ease,
        border-color .3s ease;
}

.didaf-blog-card:hover {
    border-color: #999;

    box-shadow:
        0 10px 30px rgba(0,0,0,.10);

    transform: translateY(-3px);
}


/* =====================================================
   IMAGE
===================================================== */

.didaf-blog-image {
    display: block;

    width: calc(100% - 40px);

    height: 145px;

    margin: 40px auto 0;

    overflow: hidden;

    background: #f7f7f7;
}

.didaf-blog-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .35s ease;
}

.didaf-blog-card:hover
.didaf-blog-image img {
    transform: scale(1.04);
}


.didaf-blog-no-image {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fafafa;

    color: #aaa;

    font-size: 12px;
}


/* =====================================================
   CARD CONTENT
===================================================== */

.didaf-blog-card-content {
    flex: 1;

    display: flex;
    flex-direction: column;

    padding: 12px 24px 22px;
}


/* =====================================================
   TITLE
===================================================== */

.didaf-blog-card h2 {
    margin: 0 0 8px;

    font-size: 15px;

    font-weight: 700;

    line-height: 1.8;
}

.didaf-blog-card h2 a {
    color: #444;

    text-decoration: none;

    transition: color .25s ease;
}

.didaf-blog-card h2 a:hover {
    color: #222;
}


/* =====================================================
   EXCERPT
===================================================== */

.didaf-blog-excerpt {
    color: #777;

    font-size: 13px;

    line-height: 2.15;

    height: 82px;

    overflow: hidden;
}


/* =====================================================
   META
===================================================== */

.didaf-blog-meta {
    margin-top: auto;

    width: 100%;

    min-height: 50px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 13px;

    box-sizing: border-box;

    background: #ddd;

    border-radius: 17px;

    color: #fff;

    font-size: 11px;
}

.didaf-blog-date,
.didaf-blog-comments {
    display: flex;

    align-items: center;

    gap: 6px;
}

.didaf-blog-meta svg {
    width: 18px;
    height: 18px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.7;

    stroke-linecap: round;

    stroke-linejoin: round;
}


/* =====================================================
   SIDEBAR SEARCH
===================================================== */

.didaf-sidebar-search {
    width: 100%;

    height: 80px;

    padding: 12px;

    box-sizing: border-box;

    background: #f3f3f3;

    border: 1px solid #ddd;

    border-radius: 16px;

    margin-bottom: 22px;
}

.didaf-sidebar-search form {
    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;

    gap: 8px;
}

.didaf-sidebar-search input {
    min-width: 0;
    flex: 1;

    height: 55px;

    padding: 0 15px;

    border: 0;

    outline: none;

    background: #fff;

    border-radius: 13px;

    text-align: right;

    font-family:
        "yekan-bakh-fn",
        "IRANYekan",
        Tahoma,
        sans-serif !important;

    font-size: 13px;
}

.didaf-sidebar-search button {
    width: 53px;
    height: 53px;

    flex-shrink: 0;

    border: 0;

    border-radius: 50%;

    background: #ed1c24;

    display: flex;

    align-items: center;
    justify-content: center;

    cursor: pointer;
}

.didaf-sidebar-search button svg {
    width: 25px;
    height: 25px;

    fill: none;

    stroke: #fff;

    stroke-width: 2;

    stroke-linecap: round;
}


/* =====================================================
   SIDEBAR BOX
===================================================== */

.didaf-sidebar-box {
    width: 100%;

    box-sizing: border-box;

    background: #f5f5f5;

    border: 1px solid #ddd;

    border-radius: 16px;

    overflow: hidden;

    margin-bottom: 22px;
}


/* =====================================================
   SIDEBAR TITLE
===================================================== */

.didaf-sidebar-box > h3 {
    margin: 0;

    padding: 22px 20px;

    text-align: center;

    font-size: 17px;

    line-height: 1.5;

    color: #444;

    border-bottom: 1px solid #ddd;
}


/* =====================================================
   CATEGORIES
===================================================== */

.didaf-category-list {
    padding: 10px 20px 18px;
}

.didaf-category-list label {
    display: flex;

    align-items: center;

    justify-content: flex-start;

    gap: 10px;

    padding: 7px 0;

    color: #555;

    font-size: 14px;

    cursor: pointer;
}

.didaf-category-list input {
    width: 20px;
    height: 20px;

    appearance: none;

    border: 2px solid #aaa;

    border-radius: 5px;

    background: #fff;

    cursor: pointer;
}

.didaf-category-list input:checked {
    background: #ed1c24;

    border-color: #ed1c24;

    position: relative;
}

.didaf-category-list input:checked::after {
    content: "✓";

    color: #fff;

    font-size: 13px;

    position: absolute;

    left: 3px;
    top: -2px;
}


/* =====================================================
   LATEST POSTS
===================================================== */

.didaf-latest-posts {
    padding-bottom: 10px;
}

.didaf-latest-item {
    display: flex;

    flex-direction: row;

    gap: 10px;

    padding: 13px 15px;

    text-decoration: none;

    border-bottom: 1px solid #ddd;

    transition: background .25s ease;
}

.didaf-latest-item:last-child {
    border-bottom: 0;
}

.didaf-latest-item:hover {
    background: #ececec;
}


/* تصویر مقاله */

.didaf-latest-thumb {
    width: 52px;
    height: 52px;

    flex-shrink: 0;

    overflow: hidden;

    background: #eee;

    border-radius: 5px;
}

.didaf-latest-thumb img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


/* متن */

.didaf-latest-content {
    min-width: 0;
}

.didaf-latest-content h4 {
    margin: 0 0 5px;

    color: #555;

    font-size: 12px;

    line-height: 1.8;

    font-weight: 600;
}

.didaf-latest-content small {
    color: #aaa;

    font-size: 9px;
}


/* =====================================================
   PAGINATION
===================================================== */

.didaf-blog-pagination {
    margin-top: 65px;

    display: flex;

    justify-content: center;
}

.didaf-blog-pagination ul {
    list-style: none;

    display: flex;

    align-items: center;

    gap: 10px;

    margin: 0;
    padding: 0;
}

.didaf-blog-pagination li {
    margin: 0;
    padding: 0;
}

.didaf-blog-pagination a,
.didaf-blog-pagination span {
    width: 43px;
    height: 43px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f2f2f2;

    color: #888;

    text-decoration: none;

    font-size: 13px;

    box-sizing: border-box;
}

.didaf-blog-pagination .current {
    background: #eee;

    color: #555;

    box-shadow:
        0 5px 15px rgba(0,0,0,.06);
}


/* =====================================================
   EMPTY
===================================================== */

.didaf-blog-empty {
    grid-column: 1 / -1;

    padding: 60px;

    text-align: center;

    color: #777;
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 1000px) {

    .didaf-blog-layout {
        grid-template-columns: 1fr;
    }

    .didaf-blog-sidebar {
        order: -1;

        display: grid;

        grid-template-columns: repeat(2, 1fr);

        gap: 20px;
    }

    .didaf-sidebar-search {
        grid-column: 1 / -1;
    }

    .didaf-blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 650px) {

    .didaf-blog-page {
        padding-top: 30px;
    }

    .didaf-blog-container {
        max-width: calc(100% - 25px);
    }

    .didaf-blog-layout {
        display: block;
    }

    .didaf-blog-sidebar {
        display: block;
    }

    .didaf-sidebar-box,
    .didaf-sidebar-search {
        margin-bottom: 20px;
    }

    .didaf-blog-filters {
        flex-wrap: wrap;
    }

    .didaf-filter {
        padding: 0 18px;
    }

    .didaf-blog-grid {
        grid-template-columns: 1fr;
    }

    .didaf-blog-card {
        height: 410px;
    }

}