/* =====================================================
   SINGLE ARTICLE PAGE
===================================================== */

.didaf-single-page {
    direction: rtl;
    font-family: "yekan-bakh-fn", "IRANYekan", Tahoma, sans-serif;
    background: #fff;
    padding: 45px 0 80px;
}

.didaf-single-container {
    width: 1200px;
    max-width: calc(100% - 40px);
    margin: 0 auto;
}


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

.didaf-single-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 40px;
    font-size: 14px;
}

.didaf-single-breadcrumb a {
    color: #777;
    text-decoration: none;
    transition: color .3s ease;
}

.didaf-single-breadcrumb a:hover {
    color: #ed1c24;
}

.didaf-single-breadcrumb span {
    color: #aaa;
    font-size: 22px;
}

.didaf-single-breadcrumb strong {
    color: #ed1c24;
    font-weight: 600;
}


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

.didaf-single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 40px;
    align-items: start;
}


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

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


/* =====================================================
   ARTICLE HEADER
===================================================== */

.didaf-single-header {
    text-align: center;
    margin-bottom: 10px;
}

.didaf-single-title {
    margin: 0 auto 22px;
    max-width: 900px;

    font-size: 38px;
    line-height: 1.6;
    font-weight: 800;

    color: #171717;
}

.didaf-single-meta {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    padding: 10px 22px;

    border: 1px solid #e5e5e5;
    border-radius: 30px;

    background: #fff;

    color: #777;

    font-size: 14px;
}

.didaf-meta-dot {
    color: #ed1c24;
    font-weight: bold;
}


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

.didaf-single-featured {
    width: 100%;
    margin: 0 auto 40px;

    overflow: hidden;

    border-radius: 18px;
    background: #f5f5f5;
}

.didaf-single-featured img {
    display: block;

    width: 100%;
    height: auto;

    max-height: 560px;

    object-fit: cover;
}


/* =====================================================
   ARTICLE CONTENT
===================================================== */

.didaf-single-content {
    color: #444;

    font-size: 17px;
    line-height: 2.2;

    text-align: justify;
}

.didaf-single-content p {
    margin: 0 0 25px;
}

.didaf-single-content h2 {
    margin: 45px 0 18px;

    color: #171717;

    font-size: 25px;
    line-height: 1.7;
    font-weight: 800;
}

.didaf-single-content h3 {
    margin: 35px 0 15px;

    color: #222;

    font-size: 21px;
    font-weight: 700;
}

.didaf-single-content strong {
    color: #222;
}

.didaf-single-content a {
    color: #ed1c24;
    text-decoration: none;
}

.didaf-single-content a:hover {
    text-decoration: underline;
}

.didaf-single-content img {
    max-width: 100%;
    height: auto;

    display: block;

    margin: 30px auto;

    border-radius: 12px;
}

.didaf-single-content ul,
.didaf-single-content ol {
    padding-right: 25px;
    margin: 20px 0;
}

.didaf-single-content li {
    margin-bottom: 8px;
}

.didaf-single-content blockquote {
    margin: 30px 0;

    padding: 20px 25px;

    border-right: 4px solid #ed1c24;

    background: #f7f7f7;

    border-radius: 8px;

    color: #555;
}


/* =====================================================
   TAGS
===================================================== */

.didaf-single-tags {
    display: flex;
    flex-wrap: wrap;

    align-items: center;

    gap: 8px;

    margin-top: 45px;
    padding-top: 25px;

    border-top: 1px solid #eee;
}

.didaf-tags-title {
    font-weight: 700;
    color: #333;
}

.didaf-single-tags a {
    display: inline-block;

    padding: 6px 13px;

    border-radius: 20px;

    background: #f1f1f1;

    color: #666;

    text-decoration: none;

    font-size: 13px;

    transition: all .3s ease;
}

.didaf-single-tags a:hover {
    background: #ed1c24;
    color: #fff;
}


/* =====================================================
   PREV / NEXT
===================================================== */

.didaf-single-navigation {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 20px;

    margin-top: 35px;
}

.didaf-prev-post,
.didaf-next-post {
    padding: 20px;

    border: 1px solid #e7e7e7;

    border-radius: 12px;

    background: #fff;

    transition: all .3s ease;
}

.didaf-prev-post:hover,
.didaf-next-post:hover {
    border-color: #555;

    box-shadow: 0 8px 25px rgba(0,0,0,.08);

    transform: translateY(-3px);
}

.didaf-prev-post span,
.didaf-next-post span {
    display: block;

    margin-bottom: 8px;

    color: #999;

    font-size: 12px;
}

.didaf-prev-post a,
.didaf-next-post a {
    color: #222;

    text-decoration: none;

    font-size: 15px;

    line-height: 1.8;

    font-weight: 600;
}


/* =====================================================
   RELATED ARTICLES
===================================================== */

.didaf-related-section {
    margin-top: 55px;
    padding-top: 35px;

    border-top: 1px solid #eee;
}

.didaf-related-title {
    position: relative;

    margin-bottom: 25px;

    font-size: 24px;
    font-weight: 800;

    color: #222;
}

.didaf-related-title span {
    position: relative;

    display: inline-block;

    padding-bottom: 8px;
}

.didaf-related-title span::after {
    content: "";

    position: absolute;

    right: 0;
    bottom: 0;

    width: 45px;
    height: 3px;

    background: #ed1c24;

    border-radius: 5px;
}

.didaf-related-grid {
    display: grid;

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

    gap: 20px;
}

.didaf-related-card {
    overflow: hidden;

    border: 1px solid #e4e4e4;

    border-radius: 14px;

    background: #fff;

    transition: all .3s ease;
}

.didaf-related-card:hover {
    border-color: #555;

    box-shadow: 0 8px 25px rgba(0,0,0,.08);

    transform: translateY(-4px);
}

.didaf-related-image {
    display: block;

    width: 100%;
    height: 170px;

    overflow: hidden;

    background: #f4f4f4;
}

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

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .4s ease;
}

.didaf-related-card:hover .didaf-related-image img {
    transform: scale(1.05);
}

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

    display: flex;

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

    color: #aaa;
}

.didaf-related-content {
    padding: 15px;
}

.didaf-related-content h3 {
    margin: 0 0 10px;

    font-size: 16px;

    line-height: 1.8;
}

.didaf-related-content h3 a {
    color: #222;
    text-decoration: none;
}

.didaf-related-content span {
    color: #999;
    font-size: 12px;
}


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

.didaf-single-sidebar {
    width: 100%;
}


/* SEARCH */

.didaf-sidebar-search {
    padding: 13px;

    margin-bottom: 25px;

    border: 1px solid #ddd;

    border-radius: 16px;

    background: #f4f4f4;
}

.didaf-sidebar-search form {
    display: flex;

    align-items: center;

    gap: 8px;
}

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

    height: 48px;

    border: 0;

    outline: none;

    border-radius: 12px;

    padding: 0 15px;

    background: #fff;

    font-family: inherit;

    box-sizing: border-box;
}

.didaf-sidebar-search button {
    flex: 0 0 48px;

    width: 48px;
    height: 48px;

    border: 0;

    border-radius: 50%;

    background: #ed1c24;

    color: #fff;

    cursor: pointer;

    display: flex;

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

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

    fill: none;

    stroke: currentColor;

    stroke-width: 2;
}


/* SIDEBAR BOX */

.didaf-sidebar-box {
    margin-bottom: 25px;

    padding: 22px 18px;

    border: 1px solid #ddd;

    border-radius: 16px;

    background: #f5f5f5;
}

.didaf-sidebar-box h3 {
    margin: 0 0 20px;

    text-align: center;

    color: #333;

    font-size: 19px;

    line-height: 1.5;
}


/* CATEGORIES */

.didaf-category-list {
    display: flex;

    flex-direction: column;

    gap: 14px;
}

.didaf-category-item {
    display: flex;

    align-items: center;

    gap: 10px;

    color: #555;

    text-decoration: none;

    font-size: 14px;

    transition: color .3s ease;
}

.didaf-category-item:hover {
    color: #ed1c24;
}

.didaf-category-checkbox {
    width: 18px;
    height: 18px;

    border: 2px solid #aaa;

    border-radius: 5px;

    box-sizing: border-box;

    flex-shrink: 0;
}


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

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

.didaf-latest-item {
    display: flex;

    align-items: center;

    gap: 10px;

    padding: 12px 0;

    border-bottom: 1px solid #ddd;

    text-decoration: none;
}

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

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

    flex: 0 0 58px;

    overflow: hidden;

    border-radius: 8px;

    background: #ddd;
}

.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: #444;

    font-size: 13px;

    line-height: 1.7;

    font-weight: 600;
}

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

    font-size: 10px;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1000px) {

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

    .didaf-single-sidebar {
        width: 100%;
    }

    .didaf-single-title {
        font-size: 32px;
    }

}


@media (max-width: 700px) {

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

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

    .didaf-single-title {
        font-size: 26px;
    }

    .didaf-single-content {
        font-size: 15px;
        line-height: 2;
    }

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

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

    .didaf-related-image {
        height: 200px;
    }

    .didaf-single-breadcrumb {
        font-size: 12px;
        gap: 7px;
    }

}
/* =====================================================
   ARTICLE WITHOUT FEATURED IMAGE
===================================================== */

/* وقتی تصویر شاخص وجود ندارد،
   فاصله بعد از هدر کاملاً کم می‌شود */

.didaf-single-header.no-featured-image {
    margin-bottom: 0 !important;
}


/* محتوای مقاله هم بدون فاصله اضافی شروع شود */

.didaf-single-header.no-featured-image + .didaf-single-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}


/* اولین پاراگراف مقاله */

.didaf-single-header.no-featured-image
~ .didaf-single-content > p:first-child {
    margin-top: 0 !important;
}
/* =====================================================
   ARTICLE WITHOUT FEATURED IMAGE
   حذف کامل فاصله ابتدای مقاله
===================================================== */

.didaf-single-content.no-featured-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}


/* اولین المان واقعی مقاله */

.didaf-single-content.no-featured-content > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}


/* اگر اولین المان پاراگراف باشد */

.didaf-single-content.no-featured-content > p:first-child {
    margin-top: 0 !important;
}


/* فاصله هدر در حالت بدون تصویر */

.didaf-single-header.no-featured-image {
    margin-bottom: 0 !important;
}