/* ============================================================
   i18n.css — استایل‌های RTL (فارسی) + لینک‌های زبان فوتر
   دو زبانگی با ?lang=EN و ?lang=FA و js/i18n.js کار می‌کند.
   ============================================================ */

/* ------------------------------------------------------------
   1) لینک‌های زبان فوتر (تنها جای تغییر زبان)
   ------------------------------------------------------------ */
.footer-col-lang a[data-set-lang] {
    transition: color 0.2s ease;
}

.footer-col-lang a[data-set-lang].active {
    color: var(--accent, #48ff91);
}

.footer-col-lang a[data-set-lang].active::after {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-inline-start: 8px;
    background: currentColor;
    border-radius: 50%;
    vertical-align: middle;
}

/* ------------------------------------------------------------
   2) RTL / فارسی
   ------------------------------------------------------------ */

/* فونت فارسی (Vazirmatn در هر صفحه لود می‌شود) */
html[dir="rtl"] body,
html[dir="rtl"] button,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
    font-family: 'Vazirmatn', 'Inter', system-ui, sans-serif;
}

/* ردیابی حروف در فارسی معنا ندارد و کلمات را از هم می‌پاشد */
html[dir="rtl"] body,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] p,
html[dir="rtl"] a,
html[dir="rtl"] li,
html[dir="rtl"] button,
html[dir="rtl"] span,
html[dir="rtl"] input,
html[dir="rtl"] label,
html[dir="rtl"] .nav-links a,
html[dir="rtl"] .nav-cta,
html[dir="rtl"] .eb-text,
html[dir="rtl"] .btn-hero {
    letter-spacing: normal;
    text-transform: none;
}

/* اعداد و کدها در متن راست‌به‌چپ به‌هم نریزند */
html[dir="rtl"] .pc-num,
html[dir="rtl"] .wseg-num,
html[dir="rtl"] .wilo-cat-num,
html[dir="rtl"] .sr-num,
html[dir="rtl"] .mq-num,
html[dir="rtl"] .update-log-id,
html[dir="rtl"] .update-time,
html[dir="rtl"] .mc-chart-stats,
html[dir="rtl"] .mc-uptime,
html[dir="rtl"] .footer-bottom,
html[dir="rtl"] .tc-tag,
html[dir="rtl"] .c-code,
html[dir="rtl"] .c-topline-code,
html[dir="rtl"] .cm-code {
    direction: ltr;
    unicode-bidi: isolate;
}

/* آیکون‌های جهت‌دار باید آینه شوند */
html[dir="rtl"] .fa-arrow-right,
html[dir="rtl"] .fa-arrow-left,
html[dir="rtl"] .fa-chevron-right,
html[dir="rtl"] .fa-chevron-left,
html[dir="rtl"] .news-read-more i,
html[dir="rtl"] .btn-hero i.fa-arrow-right {
    transform: scaleX(-1);
}

/* پدینگ‌های نامتقارن هدر آینه می‌شوند */
html[dir="rtl"] .nav-col-menu { padding: 0 18px 0 36px; }

@media (max-width: 1100px) {
    html[dir="rtl"] .nav-col-menu { padding: 0 18px; }
}

@media (max-width: 900px) {
    html[dir="rtl"] .nav-col-menu { padding: 0; }
}

/* تیترهای بزرگ در فارسی */
html[dir="rtl"] .hero-title,
html[dir="rtl"] .section-title,
html[dir="rtl"] .security-title {
    line-height: 1.45;
    word-spacing: 0;
}

/* متن‌های چندخطی و پاراگراف‌ها */
html[dir="rtl"] .hero-sub,
html[dir="rtl"] .news-desc,
html[dir="rtl"] .ws-text,
html[dir="rtl"] .ma-text,
html[dir="rtl"] .footer-note {
    line-height: 1.95;
}

/* ستون‌های فوتر در RTL از راست چیده می‌شوند */
html[dir="rtl"] .footer-cols,
html[dir="rtl"] .footer-col ul { text-align: right; }

/* فرم خبرنامه */
html[dir="rtl"] .footer-newsletter input { text-align: right; }

/* لیست‌های نشانه‌دار */
html[dir="rtl"] .product-feats,
html[dir="rtl"] .ws-feats,
html[dir="rtl"] .ma-points { padding-right: 0; }

/* ------------------------------------------------------------
   3) صفحه‌ی تیم
   ------------------------------------------------------------ */
html[dir="rtl"] .team-block .section-header p,
html[dir="rtl"] .team-hero .hero-sub {
    line-height: 1.95;
}

/* سربرگ کارت: کد نقش و نام/سمت جای‌شان عوض می‌شود */
html[dir="rtl"] .tc-head { direction: rtl; }

html[dir="rtl"] .tc-id {
    text-align: left;
    direction: rtl;
}

html[dir="rtl"] .tc-name,
html[dir="rtl"] .tc-role { text-align: left; }

/* ------------------------------------------------------------
   4) صفحه‌ی تماس
   ------------------------------------------------------------ */
html[dir="rtl"] .c-sub,
html[dir="rtl"] .c-channels,
html[dir="rtl"] .cf-consent span,
html[dir="rtl"] .cf-hint,
html[dir="rtl"] .cm-box p { line-height: 1.95; }

html[dir="rtl"] .cf-input,
html[dir="rtl"] .cf-textarea,
html[dir="rtl"] .cf-select select { text-align: right; }

html[dir="rtl"] .cf-label { text-align: right; }

html[dir="rtl"] .cf-consent { text-align: right; }

html[dir="rtl"] .cm-box { text-align: center; }

/* ------------------------------------------------------------
   5) تزئینات و پیشگیری از اسکرول افقی
   ------------------------------------------------------------ */
html[dir="rtl"] .cell-line-v.left { left: auto; right: 0; }
html[dir="rtl"] .cell-line-v.right { right: auto; left: 0; }

html.lang-rtl body { overflow-x: clip; }
