/* در فایل modern-category-tabs/assets/style.css */

.mct-content-area {
    position: relative;
    min-height: 200px; /* جلوگیری از پرش صفحه هنگام لود */
}

/* استایل لودینگ */
.mct-content-area.mct-loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    margin-left: -20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #3498db; /* رنگ لودینگ - می‌توانید با رنگ برندتان عوض کنید */
    border-radius: 50%;
    animation: mct-spin 0.8s linear infinite;
    z-index: 10;
}

/* حالت مات شدن محتوای قدیمی هنگام لود شدن جدید */
.mct-content-area.mct-loading .mct-grid {
    opacity: 0.4;
    pointer-events: none;
}

@keyframes mct-spin {
    to { transform: rotate(360deg); }
}


#mct_wrapper {
    --mct-primary: #2864D7;
    --mct-text: #1e293b;
    --mct-muted: #64748b;
    --mct-border: #e2e8f0;
    --mct-bg: #ffffff;
    --mct-hover-bg: #f8fafc;
    direction: rtl;
    text-align: right;
    margin: 6px 8px 0 8px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: var(--mct-text);
}

#mct_wrapper *, 
#mct_wrapper *::before, 
#mct_wrapper *::after {
    box-sizing: border-box;
}

/* منوی تب‌ها */
#mct_wrapper .mct-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

#mct_wrapper .mct-tab {
    background: #efefef;
    border: 1px solid var(--mct-border);
    color: var(--mct-muted);
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

#mct_wrapper .mct-tab:hover {
    color: var(--mct-primary);
    border-color: var(--mct-primary);
    background: var(--mct-hover-bg);
}

#mct_wrapper .mct-tab.active {
    background: var(--mct-primary);
    border-color: var(--mct-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(40, 100, 215, 0.2);
}

/* ناحیه محتوا */
#mct_wrapper .mct-content-area {
    width: 100%;
}

/* گرید دو ستونه در دسکتاپ */
#mct_wrapper .mct-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* کارت پست */
#mct_wrapper .mct-post-card {
    display: flex;
    flex-direction: row; /* تصویر در سمت چپ (RTL) */
    align-items: stretch;
    background: var(--mct-bg);
    border: 1px solid var(--mct-border);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    transition: all 0.25s ease;
}

/* هاور ملایم سفید مایل به خاکستری با بوردر و سایه ملایم */
#mct_wrapper .mct-post-card:hover {
    border-color: #ddd;
    background: #f1f1f1;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}
#mct_wrapper .mct-post-card .mct-post-thumb img {
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

#mct_wrapper .mct-post-card:hover .mct-post-thumb img {
    transform: scale(1.08) !important;
}

/* Post Card - تبدیل به حالت معکوس برای قرارگیری عکس در چپ (RTL) */
#mct_wrapper .mct-post-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: row-reverse !important; /* عکس در سمت چپ، متن در سمت راست */
    align-items: stretch;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#mct_wrapper .mct-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
}

/* Thumbnail (Portrait, Left side) -> گوشه گرد در سمت راست (سمت اتصال به متن) */
#mct_wrapper .mct-post-thumb {
    flex: 0 0 110px;
    width: 110px;
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: 12px 0 0 12px; /* گردی گوشه در سمت راست تصویر */
    background: #f8fafc;
}

#mct_wrapper .mct-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* محتوای کارت */
#mct_wrapper .mct-post-info {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

/* فونت عنوان کوچک و موبایل‌فرندلی */
#mct_wrapper .mct-post-title {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
}

#mct_wrapper .mct-post-title a {
    color: var(--mct-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

#mct_wrapper .mct-post-title a:hover {
    color: var(--mct-primary);
}

/* متن چکیده کوچکتر */
#mct_wrapper .mct-excerpt {
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: var(--mct-muted) !important;
    margin: 0 0 10px 0 !important;
}

/* اطلاعات متا */
#mct_wrapper .mct-meta {
    font-size: 11px !important;
    color: var(--mct-muted);
    display: flex;
    gap: 10px;
}

#mct_wrapper .mct-meta span {
    background: #edeff1;
    padding: 2px 7px;
    border-radius: 4px;
    color: var(--mct-primary);
    font-weight: 500;
}

/* صفحه‌بندی */
#mct_wrapper .mct-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
}

#mct_wrapper .mct-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--mct-border);
    border-radius: 8px;
    background: #fff;
    color: var(--mct-text);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.25s ease;
}

#mct_wrapper .mct-pagination a:hover {
    border-color: var(--mct-primary);
    color: var(--mct-primary);
    background: var(--mct-hover-bg);
}

#mct_wrapper .mct-pagination .current {
    background: var(--mct-primary);
    border-color: var(--mct-primary);
    color: #fff;
    font-weight: 600;
}

/* حالت لودینگ */
#mct_wrapper.mct-loading .mct-grid {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* موبایل: تک ستونه */
@media (max-width: 768px) {
    #mct_wrapper .mct-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    #mct_wrapper .mct-post-thumb {
        flex: 0 0 110px;
    }

    #mct_wrapper .mct-post-title {
        font-size: 13px !important;
    }

    #mct_wrapper .mct-excerpt {
        font-size: 13px !important;
    }
}
