/*
Theme Name: CRM24 Child
Theme URI: https://crm24.io
Description: Child theme برای CRM24
Author: Your Name
Author URI: https://crm24.io
Template: crm24
Version: 1.0.0
Text Domain: crm24-child
*/

/* ======== HEADER ======== */
.single-header {
    border-radius: 0;
    color: #fff;
    padding: 3.6rem 5rem;
    text-align: right;
    position: relative;
}

.single-header .breadcrumb {
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.single-header .entry-title {
    font-size: 46px;
    font-weight: 900;
    margin-bottom: 1.2rem;
    margin-top: 1.3rem;
}

.single-header .meta-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: right;
    gap: 15px;
    font-size: 14px;
    margin-top: 10px;
    opacity: 0.9;
}

/* ======== FEATURED IMAGE ======== */
.single-featured-image {
    margin: 20px 0;
    text-align: center;
}

.single-featured-image .featured-img {
    max-width: 90%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.single-featured-image .featured-img:hover {
    transform: scale(1.03);
}

/* ======== CONTENT ======== */
.content-blog {
    margin-top: 4rem !important;
}

.post-excerpt {
    font-size: 14px;
    font-weight: 500;
    line-height: 36px;
    color: #656565;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 3px;
}

.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.table-of-content-mobile {
    display: none;
}


/* ======== SIDEBAR اصلی ======== */
.single-sidebar {
    position: sticky !important;
    top: -67px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;

    max-height: calc(100vh - 76px); /* ارتفاع کل سایدبار */
    display: flex;
    flex-direction: column;
}


.single-sidebar .sidebar-title {
    font-size: 16px !important;
    font-weight: 900 !important;
    margin-top: 1rem !important;
    margin-bottom: 15px;
    border-bottom: 1px solid #d8d9d9;
    padding-bottom: 5px;
    color: #3d3d3d;
}

.single-sidebar .share-box {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.single-sidebar .share-box a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #016FD1;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

.single-sidebar .share-box a:hover {
    background-color: #015bb0;
}

.author-avatar-img {
    width: 54px !important;
}

.sidebar-author-box {
    margin-bottom: 2rem;
}

.sidebar-author-header {
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.sidebar-author-name {
    font-size: 16px !important;
    font-weight: 700 !important;
}

.sidebar-author-bio {
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 22px !important;
}

.sidebar-author-avatar img {
    border-radius: 50%;
}

/* ======== TOC — فقط بخش فهرست اسکرول شود ======== */
.toc-list-wrapper {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding-right: 8px;
}

.single-sidebar ul.toc-list {
    list-style: none;
    margin: 0;
    max-height: calc(100vh - 76px - 240px); /* 240px ≈ ارتفاع CTA + فاصله‌ها */
    overflow-y: auto;
    padding: 0 8px 0 0;
}

.single-sidebar ul.toc-list li {
    margin-bottom: 10px;
}

.single-sidebar ul.toc-list li a {
    font-size: 14px;
    display: block;
    padding: 0px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: #656565;
    transition: all 0.3s ease;
    line-height: 34px;
}

.single-sidebar ul.toc-list li a:hover {
    color: #016FD1;
}

.single-sidebar ul.toc-list li a.active {
    color: #1281ec;
}

/* اسکرول‌بار */
.toc-list-wrapper::-webkit-scrollbar {
    width: 6px;
}

.toc-list-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.breadcrumb a {
    text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus {
    text-decoration: underline;
}



/* ======== دسته‌بندی‌ها ======== */
.cat-customer {
    background-color: #01a0d1;
}

.cat-lead {
    background-color: #28a745;
}
/* --------- */
.cat-all-blog, .cat-not-categorized {
    background-color: #1E5E8C;
}

.cat-tutorials {
    background-color: #1E5E8C;
}

.cat-sale {
    background-color: #0071cd;
}

.cat-customer-management {
    background-color: #1f0f83;
}

.cat-campaign-management,
.cat-marketing-branding,
.cat-marketing-automation {
    background-color: #b21b3c;
}

.cat-motivation-personal-development,
.cat-crm-tools-techniques,
.cat-project-management-tools	{
    background-color: #008275;
}

.cat-business-growth {
    background-color: #421983;
}
/* ======== دسته‌بندی‌ها ======== */

.category-label {
    padding: 0.5rem 2rem;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    border-radius: 5px;
}


.crm24-cta {
    padding: 20px;
    margin-top: 30px;
    border-radius: 8px;
    color: #494949;
}

.crm24-cta-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 1rem;
}

.crm24-cta-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.crm24-cta img {
    border-radius: 7px;
}

.crm24-cta-list li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #fff;
}

.crm24-cta-list li svg {
    margin-left: 8px;
    flex-shrink: 0;
}

.crm24-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #24223E;
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s;
}

.crm24-cta-button:hover {
    background-color: #121123;
}

.crm24-cta-button svg {
    margin-left: 5px;
}

.sidebar-icon {
    /*margin-right: 0.3rem;*/
}

.cta-btn {
    margin-top: 1rem;
    gap: 2rem;
}

.cta-btn .btn-icon {
    font-size: 19px;
    line-height: 1;
    margin-left: 18px;
}


/*comments */
.crm24-comments-wrapper {
    margin-top: 4rem; /* فاصله از محتوا */
}

.crm24-comments-title {
    font-size: 18px;
    font-weight: 700;
    margin-top: 3rem !important;
    margin-bottom: 2rem;
    color: #333;
}

/* کارت‌های کامنت */
.crm24-comment-card {
    display: flex;
    gap: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    background-color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.crm24-comment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.crm24-comment-avatar img {
    border-radius: 50%;
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.crm24-comment-body {
    flex: 1;
}

.crm24-comment-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.875rem;
    color: #777;
}

.crm24-comment-meta .crm24-comment-author {
    font-weight: 700;
    color: #333;
}

.crm24-comment-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}

#comments .comment-respond {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}

.comment-form-comment textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid #ddd;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.comment-form-comment textarea:focus,
.comment-form input:focus {
    border-color: #016FD1;
    box-shadow: 0 4px 15px rgba(1, 111, 209, 0.15);
    outline: none;
}

.crm24-comment-submit {
    background-color: #016FD1;
    color: #fff;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.crm24-comment-submit:hover {
    background-color: #005bb0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* پاسخ کامنت‌ها */
.crm24-comment-list li.children {
    margin-left: 40px; /* فاصله از کامنت اصلی */
}

.crm24-comment-list li.depth-2 .crm24-comment-card {
    background-color: #f5f7fa; /* رنگ متفاوت برای پاسخ */
    border-left: 4px solid #016FD1; /* خط کوچک سمت چپ */
    width: 90%;
}

.crm24-comment-list li.depth-3 .crm24-comment-card {
    background-color: #eef2f7; /* رنگ ملایم‌تر برای پاسخ‌های عمیق‌تر */
    border-left: 4px solid #005bb0;
}

.crm24-comment-card {
    transition: all 0.3s ease;
}

/* برای hover پاسخی‌ها */
.crm24-comment-list li.depth-2 .crm24-comment-card:hover,
.crm24-comment-list li.depth-3 .crm24-comment-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.comment-form label {
    font-size: 18px;
    font-weight: 700;
}

/* ======== CTA ENDING ======== */
/* سکشن CTA پایانی */
.single-end-cta {
    margin-top: 3rem !important;
    padding-top: 1.5rem;
    color: #111111 !important;
    background-color: #F4F5F5 !important;
}

.single-end-cta-inner {
    gap: 2rem;
}

.single-header.cat-tutorials,
.single-end-cta.cat-tutorials {
    background-color: #1f6feb;
}

.cta-title {
    color: #000;
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    display: block;
    line-height: 1.8;
}

.cta-words-wrapper {
    display: block;
    margin-top: 0.3rem;
    position: relative;
    height: 1.4em;
    vertical-align: bottom;
}

.cta-desc {
    margin-top: 1rem;
    margin-bottom: 1.25rem;
    opacity: 0.9;
}

.cta-actions .btn {
    margin-inline-end: 0.75rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.cta-main-btn {
    padding-inline: 1.5rem;
}

.cta-second-btn {
    border-width: 2px;
}

/* ============================= */
/*   انیمیشن کلمات (نسخه نهایی)  */
/* ============================= */

.cta-word {
    position: absolute;
    left: 0;
    right: 0;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.4s ease, transform 0.4s ease;
    color: #016fd1;
    /*text-shadow:*/
    /*        0 0 2px #389bfa,*/
    /*        0 0 8px #016fd1,*/
    /*        0 0 20px #016fd1,*/
    /*        0 0 40px rgba(46, 145, 234, 0.63);*/
    letter-spacing: 1px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* دیده شده */
.cta-word.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* می‌رود بالا */
.cta-word.is-hidden-up {
    opacity: 0;
    transform: translateY(-100%);
}

/* قبل از ورود پایین */
.cta-word.is-hidden-down {
    opacity: 0;
    transform: translateY(100%);
}

/* ======== Icon Config ======== */
.fas, .far, .fab, .fa {
    font-family: "Font Awesome 5 Free", serif !important;
    font-weight: 900;
}

.far {
    font-weight: 400;
}

[class^="icon-"], [class*=" icon-"] {
    font-family: "icomoon", serif !important;
}

/* حل مشکل احتمالی المنتور که absolute می‌گذارد */
.elementor-icon i:before,
.elementor-icon svg:before {
    display: inline-block; /* گاهی absolute باعث حذف ارتفاع می‌شود */
}




/* ======== RESPONSIVE ======== */
@media (max-width: 1399px) {
    .single-sidebar {
        top: -88px;
    }

    .cta-btn a {
        font-size: 14px;
    }
}

@media (max-width: 1199px) {
    .single-sidebar {
        top: -112px;
    }

    .cta-btn a i {
        display: none;
    }
}


@media (max-width: 991px) {
    .single-sidebar {
        display: none;
    }

    .table-of-content-mobile {
        display: flex;          /* یا block، یکی را انتخاب کن */
        position: sticky;
        top: 145px;              /* به اندازه ارتفاع هدر خودت تنظیم کن */
        z-index: 80;
        margin-top: 2rem !important;       /* نه 0 و نه 3rem !important */
    }

    .toc-mobile-header {
        width: 100%;
        border: 1px solid #D1D4DB;
        background-color: #F6F7F8;
        border-radius: 5px;
        padding: 0.6rem 0.9rem;
        font-size: 16px;
        font-weight: 500;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .5rem;
        cursor: pointer;
    }

    .toc-mobile-header i { margin-left: .25rem; }

    .toc-mobile-arrow {
        width: 10px;
        height: 10px;
        border-right: 2px solid #555;
        border-bottom: 2px solid #555;
        transform: rotate(45deg);
        transition: transform .2s;
    }

    .table-of-content-mobile.open .toc-mobile-arrow {
        transform: rotate(-135deg);
    }

    .toc-mobile-panel {
        position: absolute;
        left: 0;
        right: 0;
        margin-top: 3rem;
        width: 100%;
        max-height: calc(100vh - 6rem);
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
        overflow: hidden;
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition: opacity .22s ease, transform .22s ease;
    }

    .table-of-content-mobile.open .toc-mobile-panel {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .toc-mobile-panel-body {
        padding: .5rem 0.75rem 0.75rem;
        max-height: calc(100vh - 6rem);
        overflow-y: auto;
    }

    .toc-mobile-panel .toc-list {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .toc-mobile-panel .toc-list li {
        line-height: 26px !important;
    }

    .toc-mobile-panel .toc-list li a {
        display: block;
        padding: .45rem 0;
        font-size: 14px;
        color: #111827;
    }

    .toc-mobile-panel .toc-list li a.active {
        color: #2563EB;
        font-weight: 500;
    }

    .toc-mobile-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .35);
        opacity: 0;
        pointer-events: none;
        z-index: 70;
        transition: opacity .2s ease;
    }

    .toc-mobile-backdrop.visible {
        opacity: 1;
        pointer-events: auto;
    }

    .content-blog {
        margin-top: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    .single-end-cta-inner {
        flex-direction: column-reverse;
        text-align: center;
    }
    .single-end-cta {
        padding: 2rem 0;
    }
    .cta-actions {
        justify-content: center;
    }
    .cta-text-wrap {
        flex: 1 1 168px;
    }
}

@media (max-width: 575px) {

    .single-header {
        color: #fff;
        padding: 4rem 1rem;
        text-align: right;
    }

    .single-header .breadcrumb {
        font-size: 16px;
        margin-bottom: 1rem;
    }

    .single-header .entry-title {
        font-size: 30px !important;
    }

    .crm24-comments-title {
        font-size: 16px !important;
        font-weight: 700 !important;
    }

    .crm24-comment-avatar img {
        border-radius: 50%;
        width: 45px !important;
        height: 45px !important;
        object-fit: cover;
    }

    .comment-reply-title {
        font-size: 18px;
        font-weight: 700;
    }

    .comment-form label {
        font-size: 16px;
        font-weight: 600;
    }
    .table-of-content-mobile {
        top: 120px;              /* به اندازه ارتفاع هدر خودت تنظیم کن */
    }
}

