/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for timeline look */
.timeline-line::before {
    content: '';
    position: absolute;
    top: 0;
    right: 15px;
    height: 100%;
    width: 2px;
    background: #e2e8f0;
}




/* انیمیشن بی‌انتها از راست به چپ */
@keyframes infinite-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(50%);
    }

    /* برای RTL از مقدار مثبت استفاده می‌کنیم */
}

.animate-infinite-scroll {
    /* زمان انیمیشن بسته به تعداد لوگوها می‌تواند تغییر کند */
    animation: infinite-scroll 40s linear infinite;
}

/* توقف اسکرول در حالت هاور برای تمرکز کاربر */
.group:hover .animate-infinite-scroll {
    animation-play-state: paused;
}

/* جهت دهی مناسب برای مرورگرهای مختلف */
[dir="rtl"] .animate-infinite-scroll {
    animation-direction: normal;
}



/* انیمیشن جریان نور در کل مسیر از راست به چپ */
@keyframes flow-rtl {
    0% {
        right: -30%;
    }

    100% {
        right: 100%;
    }
}

.animate-flow-rtl {
    animation: flow-rtl 4s linear infinite;
}

/* انیمیشن ظهور ترتیبی کارت‌ها */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* مخفی سازی اسکرول‌بار */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}




/* Custom Content Styling for WordPress */
.wp-content {
    line-height: 1.9;
    color: #334155;
    /* slate-700 */
    font-size: 1.125rem;
}

/* عناوین داخل متن */
.wp-content h2 {
    font-size: 1.875rem;
    font-weight: 900;
    color: #0f172a;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    border-right: 4px solid #0ea5e9;
    padding-right: 1rem;
}

.content-wrapper h2::before {
    content: "";
    width: 6px;
    height: 32px;
    background: var(--hx-brand-600) !important;
    border-radius: 50px;
    display: inline-block;
}

.wp-content h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* پاراگراف‌ها و فواصل */
.wp-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* استایل تصاویر ارسالی از وردپرس */
.wp-content img {
    border-radius: 1.5rem;
    margin: 2rem auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* استایل نقل‌قول (Blockquote) */
.wp-content blockquote {
    background-color: #f0f9ff;
    border-right: 4px solid #0284c7;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0.5rem 1rem 1rem 0.5rem;
    font-style: italic;
    color: #0369a1;
}

/* لیست‌ها */
.wp-content ul {
    list-style-type: disc;
    margin-right: 1.5rem;
    margin-bottom: 1.5rem;
}

.wp-content li {
    margin-bottom: 0.5rem;
}

/* استایل کدها (مناسب برای مقالات فنی پچیم) */
.wp-content code {
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 0.4rem;
    font-family: monospace;
    color: #e11d48;
}

.wp-content pre {
    background: #1e293b;
    color: #f8fafc;
    padding: 1.5rem;
    border-radius: 1rem;
    overflow-x: auto;
    direction: ltr;
    margin-bottom: 1.5rem;
}

        .prose h2 {
            font-size: 1.75rem;
            font-weight: 800;
            margin-top: 3rem;
            margin-bottom: 1.5rem;
            color: #0f172a;
        }

        .prose p {
            margin-bottom: 1.5rem;
            color: #475569;
            text-align: justify;
            font-size: 1.1rem;
        }



        .black-ar{
            color: #0f172a !important;
        }




/* انیمیشن جابه‌جایی فرم پاسخ */
#respond {
    transition: all 0.4s ease-in-out;
}

/* استایل دکمه پاسخ در هر کامنت */
.comment-reply-link {
    display: inline-flex;
    align-items: center;
    background-color: #f1f5f9;
    padding: 6px 12px;
    border-radius: 8px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    transition: all 0.2s;
}

.comment-reply-link:hover {
    background-color: #2563eb;
    color: #ffffff;
}

/* محدود کردن عرض لیست نظرات تو در تو */
.comment-list .children {
    margin-right: 1.5rem; /* فاصله از راست برای ریپلای */
    padding-right: 1rem;
    border-right: 2px solid #e2e8f0; /* خط راهنما برای پاسخ‌ها */
    list-style: none;
}

@media (min-width: 768px) {
    .comment-list .children {
        margin-right: 3rem;
    }
}

/* انیمیشن فرم هنگام جابه‌جایی برای ریپلای */
#respond {
    transition: margin 0.3s ease;
}



/* افکت هایلایت برای کامنت والد */
.comment-highlight {
    animation: highlight-pulse 2s ease-in-out infinite;
    border-color: #3b82f6 !important; /* تغییر رنگ لبه به آبی */
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15) !important;
    position: relative;
    z-index: 10;
}

@keyframes highlight-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

/* استایل برای زمانی که کاربر لغو پاسخ می‌زند */
.comment-list div {
    transition: all 0.4s ease;
}



/* --- HamiNext Article Engine (Standard 2026) --- */

.content-wrapper {
    line-height: 2.1;
    font-size: 1.1rem;
    color: #334155; /* slate-700 */
    text-align: justify;
    text-justify: inter-word;
}

/* Typography Hierarchy */
.content-wrapper h2, 
.content-wrapper h3, 
.content-wrapper h4 {
    color: #0f172a;
    font-weight: 900;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.content-wrapper h2 { 
    font-size: 1.85rem; 
    display: flex;
    align-items: center;
    gap: 12px;
}

/* اضافه کردن یک خط تزئینی کنار H2 برای هویت برند */
.content-wrapper h2::before {
    content: "";
    width: 6px;
    height: 32px;
    background: #2563eb;
    border-radius: 50px;
    display: inline-block;
}

.content-wrapper h3 { font-size: 1.5rem; }

/* Tables: Next-Gen Style */
.content-wrapper table {
    width: 100%;
    margin: 2.5rem 0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 1.5rem;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.04);
}

.content-wrapper table th {
    background: #f8fafc;
    padding: 1.25rem 1rem;
    font-weight: 800;
    font-size: 0.95rem;
    color: #1e293b;
    border-bottom: 2px solid #f1f5f9;
}

.content-wrapper table td {
    padding: 1.1rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
}

.content-wrapper table tr:last-child td { border-bottom: none; }
.content-wrapper table tr:hover td { background: #fbfcfd; }

/* Blocks: Info & Alerts */
.content-wrapper .info-box, 
.content-wrapper blockquote {
    margin: 2.5rem 0;
    padding: 2rem;
    border-radius: 1.5rem;
    background: #f8fafc;
    border-right: 6px solid #2563eb;
    position: relative;
}

.content-wrapper blockquote::before {
    content: "“";
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: #e2e8f0;
    font-family: serif;
}

/* Technical Code Blocks */
.content-wrapper pre {
    direction: ltr;
    background: #0f172a;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 1.25rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    margin: 2rem 0;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.3);
}

.content-wrapper p code {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.2rem 0.4rem;
    border-radius: 0.4rem;
    font-size: 0.85em;
    font-weight: bold;
}

/* Images */
.content-wrapper img {
    border-radius: 2rem;
    margin: 2.5rem 0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
}

/* Article page typography system */
.rs-article-header,
.rs-article-content {
    max-width: 100%;
}

.rs-article-title {
    max-width: 100%;
    text-wrap: balance;
    word-break: normal;
    overflow-wrap: anywhere;
}

.rs-article-meta {
    font-size: 0.95rem;
}

.rs-article-content .content-wrapper {
    font-size: 1.06rem;
    line-height: 2;
    color: #334155;
    text-align: right;
    text-justify: auto;
}

.rs-article-content .content-wrapper > * {
    max-width: 100%;
}

.rs-article-content,
.rs-article-content .content-wrapper,
.rs-article-content .content-wrapper > * {
    overflow-wrap: anywhere;
}

.rs-article-content .content-wrapper p,
.rs-article-content .content-wrapper li {
    font-size: 1em;
    line-height: 2;
}

.rs-article-content .content-wrapper p {
    margin-bottom: 1.35rem;
}

.rs-article-content .content-wrapper h2,
.rs-article-content .content-wrapper h3,
.rs-article-content .content-wrapper h4 {
    color: #0f172a;
    font-weight: 900;
    letter-spacing: -0.01em;
    scroll-margin-top: 7rem;
}

.rs-article-content .content-wrapper h2 {
    font-size: 1.68rem;
    line-height: 1.55;
    margin-top: 2.65rem;
    margin-bottom: 1.15rem;
    gap: 0.75rem;
}

.rs-article-content .content-wrapper h2::before {
    width: 6px;
    height: 30px;
    flex-shrink: 0;
}

.rs-article-content .content-wrapper h3 {
    font-size: 1.34rem;
    line-height: 1.6;
    margin-top: 2.15rem;
    margin-bottom: 1rem;
}

.rs-article-content .content-wrapper h4 {
    font-size: 1.12rem;
    line-height: 1.7;
    margin-top: 1.75rem;
    margin-bottom: 0.8rem;
}

.rs-article-content .content-wrapper ul,
.rs-article-content .content-wrapper ol {
    margin-bottom: 1.5rem;
    padding-right: 1.15rem;
}

.rs-article-content .content-wrapper li + li {
    margin-top: 0.45rem;
}

.rs-article-content .content-wrapper table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}

.rs-article-content .content-wrapper table th,
.rs-article-content .content-wrapper table td {
    white-space: normal;
    min-width: 9rem;
}

.rs-article-content .content-wrapper img,
.rs-article-content .content-wrapper video,
.rs-article-content .content-wrapper iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

.rs-article-content .content-wrapper pre {
    max-width: 100%;
}

@media (max-width: 767px) {
    main[data-post-id] {
        overflow-x: clip;
    }

    .rs-article-content {
        overflow-x: clip;
    }

    .rs-article-title {
        max-width: 100%;
        text-wrap: pretty;
    }

    .rs-article-meta {
        font-size: 0.88rem;
    }

    .rs-article-content .content-wrapper {
        font-size: 0.99rem;
        line-height: 1.92;
    }

    .rs-article-content .content-wrapper p,
    .rs-article-content .content-wrapper li {
        line-height: 1.92;
    }

    .rs-article-content .content-wrapper h2,
    .rs-article-content .content-wrapper h3,
    .rs-article-content .content-wrapper h4 {
        margin-top: 2rem;
        margin-bottom: 0.8rem;
    }

    .rs-article-content .content-wrapper h2 {
        font-size: 1.38rem;
        line-height: 1.6;
        gap: 0.6rem;
    }

    .rs-article-content .content-wrapper h2::before {
        width: 5px;
        height: 22px;
    }

    .rs-article-content .content-wrapper h3 {
        font-size: 1.18rem;
        line-height: 1.7;
    }

    .rs-article-content .content-wrapper h4 {
        font-size: 1.03rem;
        line-height: 1.75;
    }

    .rs-article-content .content-wrapper table {
        margin: 1.75rem 0;
        border-radius: 1rem;
    }

    .rs-article-content .content-wrapper table th,
    .rs-article-content .content-wrapper table td {
        min-width: 8rem;
        padding: 0.85rem 0.8rem;
        font-size: 0.88rem;
    }

    .rs-article-content .content-wrapper blockquote,
    .rs-article-content .content-wrapper .info-box {
        padding: 1.2rem 1rem;
        margin: 1.75rem 0;
        border-radius: 1rem;
        border-right-width: 4px;
    }

    .rs-article-content .content-wrapper pre {
        padding: 1rem;
        font-size: 0.82rem;
        border-radius: 1rem;
    }

    .rs-article-content .content-wrapper img {
        border-radius: 1.25rem;
        margin: 1.75rem 0;
    }

    .rs-article-content .content-wrapper iframe,
    .rs-article-content .content-wrapper video,
    .rs-article-content .content-wrapper img,
    .rs-article-content .content-wrapper pre,
    .rs-article-content .content-wrapper table {
        max-width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .rs-article-title {
        max-width: 30ch;
    }

    .rs-article-content .content-wrapper {
        font-size: 1.03rem;
    }

    .rs-article-content .content-wrapper h2 {
        font-size: 1.52rem;
    }

    .rs-article-content .content-wrapper h3 {
        font-size: 1.26rem;
    }
}

@media (min-width: 1024px) {
    .rs-article-title {
        max-width: 34ch;
    }
}

@media (max-width: 767px) {
    .rs-article-related__head {
        align-items: center;
        text-align: center;
    }

    .rs-article-related__copy {
        text-align: center;
    }

    .rs-article-related__link {
        justify-content: center;
        align-self: center;
    }
}



.hami-text {
	font-family:"IRANYekanXVF" !important;
}

.hami-btn{
		font-family:"IRANYekanXVF" !important;

}

.hx-toc {
    position: sticky;
    top: 120px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    padding: 1.25rem 1.25rem 0.75rem;
}

.hx-toc.is-collapsed .hx-toc__content {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.hx-toc__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-weight: 900;
    color: #0f172a;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.hx-toc__toggle:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--hx-brand-600) 40%, transparent);
    outline-offset: 4px;
}

.hx-toc__toggle-text {
    font-size: 0.9rem;
}

.hx-toc.is-collapsed .hx-toc__toggle {
    justify-content: space-between;
}

.hx-toc.is-collapsed {
    padding: 0.75rem 1rem;
    width: 100%;
}

.hx-toc.is-collapsed .hx-toc__icon {
    margin: 0;
}

.hx-toc__icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.hx-toc__icon svg {
    width: 16px;
    height: 16px;
}

.hx-toc.is-open .hx-toc__icon {
    transform: rotate(180deg);
    background: color-mix(in srgb, var(--hx-brand-600) 12%, #ffffff);
    color: var(--hx-brand-600);
}

.hx-toc__content {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
}

.hx-toc.is-open .hx-toc__content {
    max-height: 700px;
    opacity: 1;
    margin-top: 0.75rem;
}

.hx-toc.is-collapsed .hx-toc__list {
    max-height: 0;
}

.hx-toc__title {
    font-size: 0.9rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.hx-toc__list {
    max-height: calc(100vh - 240px);
    overflow: auto;
    padding-left: 0;
    padding-right: 0;
    margin: 0;
}

.hx-toc__item {
    margin-bottom: 0.35rem;
}

.hx-toc__link {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    border-radius: 0.75rem;
    padding: 0.35rem 0.6rem;
    transition: color 0.2s ease, background 0.2s ease;
}

.hx-toc__link:hover,
.hx-toc__link:focus-visible {
    color: var(--hx-brand-600);
    background: color-mix(in srgb, var(--hx-brand-600) 12%, #ffffff);
    outline: none;
}

.hx-toc__link.is-active {
    color: var(--hx-brand-600);
    background: color-mix(in srgb, var(--hx-brand-600) 12%, #ffffff);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hx-brand-600) 30%, #ffffff);
}

.hx-toc__item--l2 .hx-toc__link {
    padding-right: 0.6rem;
}

.hx-toc__item--l3 .hx-toc__link {
    padding-right: 1.4rem;
    font-size: 0.82rem;
}

.hx-toc__item--l4 .hx-toc__link {
    padding-right: 2.1rem;
    font-size: 0.8rem;
}

.hx-toc--mobile {
    position: static;
    padding: 0.85rem 1rem;
}
