/* Ahan Dark Mode Fix - CSS
   هدف: خوانا کردن .ftwp-text و #tmc-panel در حالت شب.
   ما روی چند الگوی رایج حالت شب هدف‌گیری می‌کنیم: 
   html.dark, body.dark, body.dark-mode, .wp-dark-mode-active, [data-theme="dark"], .is-dark-mode
   و در صورت تشخیص خودکار JS، کلاس html.ai-dark هم فعال می‌شود. */

:root {
  --adf-d-bg: #111214;
  --adf-d-surface: #15171a;
  --adf-d-text: #e8e9ee;
  --adf-d-muted: #c8ccd2;
  --adf-d-border: #2a2e34;
  --adf-d-hover: #1d2024;
  --adf-focus: 0 0 0 3px rgba(100, 150, 250, 0.35);
}

/* --- .ftwp-text --- */
html.ai-dark .ftwp-text,
html.dark .ftwp-text,
body.dark .ftwp-text,
body.dark-mode .ftwp-text,
.wp-dark-mode-active .ftwp-text,
[data-theme="dark"] .ftwp-text,
.is-dark-mode .ftwp-text {
  color: var(--adf-d-text) !important;
  text-shadow: none !important;
}

/* --- #tmc-panel & children --- */
html.ai-dark #tmc-panel .tmc-card,
html.dark #tmc-panel .tmc-card,
body.dark #tmc-panel .tmc-card,
body.dark-mode #tmc-panel .tmc-card,
.wp-dark-mode-active #tmc-panel .tmc-card,
[data-theme="dark"] #tmc-panel .tmc-card,
.is-dark-mode #tmc-panel .tmc-card {
  background: var(--adf-d-surface) !important;
  color: var(--adf-d-text) !important;
  border: 1px solid var(--adf-d-border) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45) !important;
}

html.ai-dark #tmc-panel .tmc-title,
html.dark #tmc-panel .tmc-title,
body.dark #tmc-panel .tmc-title,
body.dark-mode #tmc-panel .tmc-title,
.wp-dark-mode-active #tmc-panel .tmc-title,
[data-theme="dark"] #tmc-panel .tmc-title,
.is-dark-mode #tmc-panel .tmc-title {
  color: var(--adf-d-text) !important;
  border-bottom: 1px solid var(--adf-d-border) !important;
}

/* لینک‌ها و آیکن‌ها رنگ را از والد می‌گیرند (currentColor) */
html.ai-dark #tmc-panel .tmc-item,
html.dark #tmc-panel .tmc-item,
body.dark #tmc-panel .tmc-item,
body.dark-mode #tmc-panel .tmc-item,
.wp-dark-mode-active #tmc-panel .tmc-item,
[data-theme="dark"] #tmc-panel .tmc-item,
.is-dark-mode #tmc-panel .tmc-item {
  color: var(--adf-d-text) !important;
  background: transparent !important;
  border-color: var(--adf-d-border) !important;
}

html.ai-dark #tmc-panel .tmc-item:hover,
html.dark #tmc-panel .tmc-item:hover,
body.dark #tmc-panel .tmc-item:hover,
body.dark-mode #tmc-panel .tmc-item:hover,
.wp-dark-mode-active #tmc-panel .tmc-item:hover,
[data-theme="dark"] #tmc-panel .tmc-item:hover,
.is-dark-mode #tmc-panel .tmc-item:hover {
  background: var(--adf-d-hover) !important;
}

/* دکمه بستن */
html.ai-dark #tmc-panel .tmc-close,
html.dark #tmc-panel .tmc-close,
body.dark #tmc-panel .tmc-close,
body.dark-mode #tmc-panel .tmc-close,
.wp-dark-mode-active #tmc-panel .tmc-close,
[data-theme="dark"] #tmc-panel .tmc-close,
.is-dark-mode #tmc-panel .tmc-close {
  color: var(--adf-d-text) !important;
  background: transparent !important;
  border: 1px solid var(--adf-d-border) !important;
}
html.ai-dark #tmc-panel .tmc-close:focus {
  outline: none !important;
  box-shadow: var(--adf-focus);
}

/* اطمینان از خوانایی متن داخل spanهای بدون رنگ */
html.ai-dark #tmc-panel span,
html.dark #tmc-panel span,
body.dark #tmc-panel span,
body.dark-mode #tmc-panel span,
.wp-dark-mode-active #tmc-panel span,
[data-theme="dark"] #tmc-panel span,
.is-dark-mode #tmc-panel span {
  color: var(--adf-d-text) !important;
}

/* اگر svgها از currentColor استفاده می‌کنند، نیازی به فیلتر نیست.
   اما برای svgهای خارجی/تصویری می‌توان در صورت نیاز invert کرد. */
html.ai-dark #tmc-panel svg,
html.dark #tmc-panel svg,
body.dark #tmc-panel svg,
body.dark-mode #tmc-panel svg,
.wp-dark-mode-active #tmc-panel svg,
[data-theme="dark"] #tmc-panel svg,
.is-dark-mode #tmc-panel svg {
  stroke: currentColor !important;
  fill: none;
}

/* حالت فوکوس برای دسترس‌پذیری بهتر */
#tmc-panel a:focus,
#tmc-panel button:focus {
  outline: none !important;
  box-shadow: var(--adf-focus);
}

/* --- Chip fix for .ftwp-text when underlying bg is light in dark mode --- */
html.ai-dark .ftwp-text.adf-chip,
html.dark .ftwp-text.adf-chip,
body.dark .ftwp-text.adf-chip,
body.dark-mode .ftwp-text.adf-chip,
.wp-dark-mode-active .ftwp-text.adf-chip,
[data-theme="dark"] .ftwp-text.adf-chip,
.is-dark-mode .ftwp-text.adf-chip {
  background: var(--adf-d-surface) !important;
  color: var(--adf-d-text) !important;
  padding: .12em .35em !important;
  border-radius: .3em !important;
  box-shadow: 0 0 0 1px var(--adf-d-border) inset;
}

/* Try to neutralize explicit white backgrounds on the span itself */
html.ai-dark .ftwp-text,
html.dark .ftwp-text,
body.dark .ftwp-text,
body.dark-mode .ftwp-text,
.wp-dark-mode-active .ftwp-text,
[data-theme="dark"] .ftwp-text,
.is-dark-mode .ftwp-text {
  background-color: transparent !important;
}

/* --- .tmcpt-title readability in dark mode --- */
html.ai-dark .tmcpt-title,
html.dark .tmcpt-title,
body.dark .tmcpt-title,
body.dark-mode .tmcpt-title,
.wp-dark-mode-active .tmcpt-title,
[data-theme="dark"] .tmcpt-title,
.is-dark-mode .tmcpt-title {
  color: var(--adf-d-text) !important;
  background: transparent !important;
  text-shadow: none !important;
}

/* Chip style is generic now for any selector we mark as adf-chip */
html.ai-dark .adf-chip,
html.dark .adf-chip,
body.dark .adf-chip,
body.dark-mode .adf-chip,
.wp-dark-mode-active .adf-chip,
[data-theme="dark"] .adf-chip,
.is-dark-mode .adf-chip {
  background: var(--adf-d-surface) !important;
  color: var(--adf-d-text) !important;
  padding: .12em .35em !important;
  border-radius: .3em !important;
  box-shadow: 0 0 0 1px var(--adf-d-border) inset;
}

/* Force-ink for inline-colored text (e.g., p style="color:#555") in dark mode */
html.ai-dark .adf-ink,
html.dark .adf-ink,
body.dark .adf-ink,
body.dark-mode .adf-ink,
.wp-dark-mode-active .adf-ink,
[data-theme="dark"] .adf-ink,
.is-dark-mode .adf-ink {
  color: var(--adf-d-text) !important;
  background: transparent !important;
}

/* As a pragmatic safety net, target common grey inline colors directly */
html.ai-dark p[style*="color:#555"],
html.ai-dark p[style*="color: #555"],
html.dark p[style*="color:#555"],
html.dark p[style*="color: #555"],
body.dark p[style*="color:#555"],
body.dark p[style*="color: #555"],
.wp-dark-mode-active p[style*="color:#555"],
.wp-dark-mode-active p[style*="color: #555"],
[data-theme="dark"] p[style*="color:#555"],
[data-theme="dark"] p[style*="color: #555"],
.is-dark-mode p[style*="color:#555"],
.is-dark-mode p[style*="color: #555"] {
  color: var(--adf-d-text) !important;
}


/* === Night Mode Overrides v1.3.5 === */
/* ftwp list anchors */
html.ai-dark, html.dark, html.dark-mode, body.dark, body.dark-mode, .dark-mode, .night-mode, .theme-dark, .wp-dark-mode-active, html[data-theme="dark"], [data-theme="dark"] #ftwp-list .ftwp-anchor,
html.ai-dark, html.dark, html.dark-mode, body.dark, body.dark-mode, .dark-mode, .night-mode, .theme-dark, .wp-dark-mode-active, html[data-theme="dark"], [data-theme="dark"] .ftwp-list-nest .ftwp-anchor {
  color: #000000 !important;
  fill: #000000 !important;
  stroke: #000000 !important;
  opacity: 0.95 !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}
html.ai-dark, html.dark, html.dark-mode, body.dark, body.dark-mode, .dark-mode, .night-mode, .theme-dark, .wp-dark-mode-active, html[data-theme="dark"], [data-theme="dark"] #ftwp-list .ftwp-anchor .ftwp-text,
html.ai-dark, html.dark, html.dark-mode, body.dark, body.dark-mode, .dark-mode, .night-mode, .theme-dark, .wp-dark-mode-active, html[data-theme="dark"], [data-theme="dark"] .ftwp-list-nest .ftwp-anchor .ftwp-text {
  color: #000000 !important;
}
html.ai-dark, html.dark, html.dark-mode, body.dark, body.dark-mode, .dark-mode, .night-mode, .theme-dark, .wp-dark-mode-active, html[data-theme="dark"], [data-theme="dark"] #ftwp-list .ftwp-anchor:hover,
html.ai-dark, html.dark, html.dark-mode, body.dark, body.dark-mode, .dark-mode, .night-mode, .theme-dark, .wp-dark-mode-active, html[data-theme="dark"], [data-theme="dark"] #ftwp-list .ftwp-anchor:focus {
  opacity: 1 !important;
  color: #111111 !important;
  fill: #111111 !important;
  stroke: #111111 !important;
}
html.ai-dark, html.dark, html.dark-mode, body.dark, body.dark-mode, .dark-mode, .night-mode, .theme-dark, .wp-dark-mode-active, html[data-theme="dark"], [data-theme="dark"] #ftwp-list .ftwp-anchor:visited {
  color: #000000 !important;
}



/* === ADF inline-background paragraph guard v1.4.3 === */
html.ai-dark, html.ai-dark-by-clock, html.dark, html.dark-mode, body.dark, body.dark-mode, .dark-mode, .night-mode, .theme-dark, .wp-dark-mode-active, html[data-theme="dark"], [data-theme="dark"], .is-dark-mode [style*="background"] p,
html.ai-dark, html.ai-dark-by-clock, html.dark, html.dark-mode, body.dark, body.dark-mode, .dark-mode, .night-mode, .theme-dark, .wp-dark-mode-active, html[data-theme="dark"], [data-theme="dark"], .is-dark-mode [style*="background-color"] p {
  color: #111 !important;
  text-shadow: none !important;
  mix-blend-mode: normal !important;
  filter: none !important;
}


/* --- Table for Dark Mode Compatibility --- */
html.ai-dark .pp-table-container,
html.dark .pp-table-container,
body.dark .pp-table-container,
body.dark-mode .pp-table-container,
.wp-dark-mode-active .pp-table-container,
[data-theme="dark"] .pp-table-container,
.is-dark-mode .pp-table-container {
    background-color: var(--adf-d-surface) !important;
    color: var(--adf-d-text) !important;
    border: 1px solid var(--adf-d-border);
}

html.ai-dark .pp-table-cell-text,
html.dark .pp-table-cell-text,
body.dark .pp-table-cell-text,
body.dark-mode .pp-table-cell-text,
.wp-dark-mode-active .pp-table-cell-text,
[data-theme="dark"] .pp-table-cell-text,
.is-dark-mode .pp-table-cell-text {
    color: var(--adf-d-text) !important;
}

html.ai-dark .jo-grid,
html.dark .jo-grid,
body.dark .jo-grid,
body.dark-mode .jo-grid,
.wp-dark-mode-active .jo-grid,
[data-theme="dark"] .jo-grid,
.is-dark-mode .jo-grid {
    background-color: var(--adf-d-surface);
    border-radius: 8px;
}

/* === Global dark-mode headings & tables hard-fix (Ahan Sazeh – 2025-11-03) === */

/* تمام تیترها و لینک‌های داخل محتوا در حالت شب خوانا شوند */
html.ai-dark .site-main h1,
html.ai-dark .site-main h2,
html.ai-dark .site-main h3,
html.ai-dark .site-main h4,
html.ai-dark .site-main h5,
html.ai-dark .site-main h6,
html.ai-dark .site-main h1 a,
html.ai-dark .site-main h2 a,
html.ai-dark .site-main h3 a,
html.ai-dark .site-main h4 a,
html.ai-dark .site-main h5 a,
html.ai-dark .site-main h6 a,
html.ai-dark-by-clock .site-main h1,
html.ai-dark-by-clock .site-main h2,
html.ai-dark-by-clock .site-main h3,
html.ai-dark-by-clock .site-main h4,
html.ai-dark-by-clock .site-main h5,
html.ai-dark-by-clock .site-main h6,
html.ai-dark-by-clock .site-main h1 a,
html.ai-dark-by-clock .site-main h2 a,
html.ai-dark-by-clock .site-main h3 a,
html.ai-dark-by-clock .site-main h4 a,
html.ai-dark-by-clock .site-main h5 a,
html.ai-dark-by-clock .site-main h6 a,
html.dark .site-main h1,
html.dark .site-main h2,
html.dark .site-main h3,
html.dark .site-main h4,
html.dark .site-main h5,
html.dark .site-main h6,
html.dark .site-main h1 a,
html.dark .site-main h2 a,
html.dark .site-main h3 a,
html.dark .site-main h4 a,
html.dark .site-main h5 a,
html.dark .site-main h6 a,
body.dark .site-main h1,
body.dark .site-main h2,
body.dark .site-main h3,
body.dark .site-main h4,
body.dark .site-main h5,
body.dark .site-main h6,
body.dark .site-main h1 a,
body.dark .site-main h2 a,
body.dark .site-main h3 a,
body.dark .site-main h4 a,
body.dark .site-main h5 a,
body.dark .site-main h6 a,
body.dark-mode .site-main h1,
body.dark-mode .site-main h2,
body.dark-mode .site-main h3,
body.dark-mode .site-main h4,
body.dark-mode .site-main h5,
body.dark-mode .site-main h6,
body.dark-mode .site-main h1 a,
body.dark-mode .site-main h2 a,
body.dark-mode .site-main h3 a,
body.dark-mode .site-main h4 a,
body.dark-mode .site-main h5 a,
body.dark-mode .site-main h6 a,
.wp-dark-mode-active .site-main h1,
.wp-dark-mode-active .site-main h2,
.wp-dark-mode-active .site-main h3,
.wp-dark-mode-active .site-main h4,
.wp-dark-mode-active .site-main h5,
.wp-dark-mode-active .site-main h6,
.wp-dark-mode-active .site-main h1 a,
.wp-dark-mode-active .site-main h2 a,
.wp-dark-mode-active .site-main h3 a,
.wp-dark-mode-active .site-main h4 a,
.wp-dark-mode-active .site-main h5 a,
.wp-dark-mode-active .site-main h6 a,
[data-theme="dark"] .site-main h1,
[data-theme="dark"] .site-main h2,
[data-theme="dark"] .site-main h3,
[data-theme="dark"] .site-main h4,
[data-theme="dark"] .site-main h5,
[data-theme="dark"] .site-main h6,
[data-theme="dark"] .site-main h1 a,
[data-theme="dark"] .site-main h2 a,
[data-theme="dark"] .site-main h3 a,
[data-theme="dark"] .site-main h4 a,
[data-theme="dark"] .site-main h5 a,
[data-theme="dark"] .site-main h6 a,
.is-dark-mode .site-main h1,
.is-dark-mode .site-main h2,
.is-dark-mode .site-main h3,
.is-dark-mode .site-main h4,
.is-dark-mode .site-main h5,
.is-dark-mode .site-main h6,
.is-dark-mode .site-main h1 a,
.is-dark-mode .site-main h2 a,
.is-dark-mode .site-main h3 a,
.is-dark-mode .site-main h4 a,
.is-dark-mode .site-main h5 a,
.is-dark-mode .site-main h6 a {
    color: var(--adf-d-text) !important;
    text-shadow: none !important;
}

/* عنوان محصولات مرتبط حتی اگر کلاس ووکامرس متفاوت باشد */
html.ai-dark .related.products h2,
html.ai-dark .related.products h3,
html.ai-dark .related.products h2 a,
html.ai-dark .related.products h3 a,
html.ai-dark-by-clock .related.products h2,
html.ai-dark-by-clock .related.products h3,
html.ai-dark-by-clock .related.products h2 a,
html.ai-dark-by-clock .related.products h3 a,
html.dark .related.products h2,
html.dark .related.products h3,
html.dark .related.products h2 a,
html.dark .related.products h3 a,
body.dark .related.products h2,
body.dark .related.products h3,
body.dark .related.products h2 a,
body.dark .related.products h3 a,
body.dark-mode .related.products h2,
body.dark-mode .related.products h3,
body.dark-mode .related.products h2 a,
body.dark-mode .related.products h3 a,
.wp-dark-mode-active .related.products h2,
.wp-dark-mode-active .related.products h3,
.wp-dark-mode-active .related.products h2 a,
.wp-dark-mode-active .related.products h3 a,
[data-theme="dark"] .related.products h2,
[data-theme="dark"] .related.products h3,
[data-theme="dark"] .related.products h2 a,
[data-theme="dark"] .related.products h3 a,
.is-dark-mode .related.products h2,
.is-dark-mode .related.products h3,
.is-dark-mode .related.products h2 a,
.is-dark-mode .related.products h3 a {
    color: var(--adf-d-text) !important;
}

/* در صورت باقی ماندن مشکل در جدول‌ها، همه tableها در حالت شب تیره و خوانا شوند */
html.ai-dark table,
html.ai-dark table th,
html.ai-dark table td,
html.ai-dark-by-clock table,
html.ai-dark-by-clock table th,
html.ai-dark-by-clock table td,
html.dark table,
html.dark table th,
html.dark table td,
body.dark table,
body.dark table th,
body.dark table td,
body.dark-mode table,
body.dark-mode table th,
body.dark-mode table td,
.wp-dark-mode-active table,
.wp-dark-mode-active table th,
.wp-dark-mode-active table td,
[data-theme="dark"] table,
[data-theme="dark"] table th,
[data-theme="dark"] table td,
.is-dark-mode table,
.is-dark-mode table th,
.is-dark-mode table td {
    background-color: var(--adf-d-surface) !important;
    color: var(--adf-d-text) !important;
    border-color: var(--adf-d-border) !important;
}



/* === CHP (Card Grid) Dark Mode Fixes ===
   این بخش اختصاصاً برای کلاس‌های چیدمان کارت‌های وبلاگ (chp-*) است
   تا در حالت شب با تم‌های مختلف (wp-dark-mode، body.dark، data-theme=dark و …) درست نمایش داده شوند. */

/* کانتکست‌های رایج حالت شب */
html.ai-dark .chp-grid,
html.dark .chp-grid,
body.dark .chp-grid,
body.dark-mode .chp-grid,
.wp-dark-mode-active .chp-grid,
[data-theme="dark"] .chp-grid,
.is-dark-mode .chp-grid {
  color-scheme: dark;
}

/* کارت‌ها */
html.ai-dark .chp-card,
html.dark .chp-card,
body.dark .chp-card,
body.dark-mode .chp-card,
.wp-dark-mode-active .chp-card,
[data-theme="dark"] .chp-card,
.is-dark-mode .chp-card {
  background: var(--adf-d-surface) !important;
  color: var(--adf-d-text) !important;
  border: 1px solid var(--adf-d-border) !important;
  box-shadow: none !important;
}

/* تصویر بندانگشتی کارت بدون فیلتر؛ فقط حاشیه */
html.ai-dark .chp-card .chp-thumb,
html.dark .chp-card .chp-thumb,
body.dark .chp-card .chp-thumb,
body.dark-mode .chp-card .chp-thumb,
.wp-dark-mode-active .chp-card .chp-thumb,
[data-theme="dark"] .chp-card .chp-thumb,
.is-dark-mode .chp-card .chp-thumb {
  background: transparent !important;
  border-bottom: 1px solid var(--adf-d-border) !important;
}

/* بدنه کارت */
html.ai-dark .chp-card .chp-card-body,
html.dark .chp-card .chp-card-body,
body.dark .chp-card .chp-card-body,
body.dark-mode .chp-card .chp-card-body,
.wp-dark-mode-active .chp-card .chp-card-body,
[data-theme="dark"] .chp-card .chp-card-body,
.is-dark-mode .chp-card .chp-card-body {
  background: transparent !important;
  color: var(--adf-d-text) !important;
}

/* عنوان و لینک عنوان */
html.ai-dark .chp-card .chp-card-title,
html.dark .chp-card .chp-card-title,
body.dark .chp-card .chp-card-title,
body.dark-mode .chp-card .chp-card-title,
.wp-dark-mode-active .chp-card .chp-card-title,
[data-theme="dark"] .chp-card .chp-card-title,
.is-dark-mode .chp-card .chp-card-title {
  color: var(--adf-d-text) !important;
}
html.ai-dark .chp-card .chp-card-title a,
html.dark .chp-card .chp-card-title a,
body.dark .chp-card .chp-card-title a,
body.dark-mode .chp-card .chp-card-title a,
.wp-dark-mode-active .chp-card .chp-card-title a,
[data-theme="dark"] .chp-card .chp-card-title a,
.is-dark-mode .chp-card .chp-card-title a {
  color: var(--adf-d-text) !important;
  text-decoration-color: rgba(232,233,238,.35) !important;
}
html.ai-dark .chp-card .chp-card-title a:hover,
html.dark .chp-card .chp-card-title a:hover,
body.dark .chp-card .chp-card-title a:hover,
body.dark-mode .chp-card .chp-card-title a:hover,
.wp-dark-mode-active .chp-card .chp-card-title a:hover,
[data-theme="dark"] .chp-card .chp-card-title a:hover,
.is-dark-mode .chp-card .chp-card-title a:hover {
  color: #ffffff !important;
  text-decoration-color: #ffffff !important;
}

/* متادیتا (زمان، دسته، جداکننده) */
html.ai-dark .chp-card .chp-card-meta,
html.dark .chp-card .chp-card-meta,
body.dark .chp-card .chp-card-meta,
body.dark-mode .chp-card .chp-card-meta,
.wp-dark-mode-active .chp-card .chp-card-meta,
[data-theme="dark"] .chp-card .chp-card-meta,
.is-dark-mode .chp-card .chp-card-meta {
  color: var(--adf-d-muted) !important;
}
html.ai-dark .chp-card .chp-card-meta a,
html.dark .chp-card .chp-card-meta a,
body.dark .chp-card .chp-card-meta a,
body.dark-mode .chp-card .chp-card-meta a,
.wp-dark-mode-active .chp-card .chp-card-meta a,
[data-theme="dark"] .chp-card .chp-card-meta a,
.is-dark-mode .chp-card .chp-card-meta a {
  color: var(--adf-d-muted) !important;
}
html.ai-dark .chp-card .chp-card-meta .sep,
html.dark .chp-card .chp-card-meta .sep,
body.dark .chp-card .chp-card-meta .sep,
body.dark-mode .chp-card .chp-card-meta .sep,
.wp-dark-mode-active .chp-card .chp-card-meta .sep,
[data-theme="dark"] .chp-card .chp-card-meta .sep,
.is-dark-mode .chp-card .chp-card-meta .sep {
  color: var(--adf-d-border) !important;
}

/* خلاصه/اکسرپت */
html.ai-dark .chp-card .chp-excerpt,
html.dark .chp-card .chp-excerpt,
body.dark .chp-card .chp-excerpt,
body.dark-mode .chp-card .chp-excerpt,
.wp-dark-mode-active .chp-card .chp-excerpt,
[data-theme="dark"] .chp-card .chp-excerpt,
.is-dark-mode .chp-card .chp-excerpt {
  color: var(--adf-d-muted) !important;
}

/* دکمه‌ها */
html.ai-dark .chp-card .chp-card-actions .button,
html.ai-dark .chp-card .chp-card-actions .chp-btn-outline,
html.dark .chp-card .chp-card-actions .button,
html.dark .chp-card .chp-card-actions .chp-btn-outline,
body.dark .chp-card .chp-card-actions .button,
body.dark .chp-card .chp-card-actions .chp-btn-outline,
body.dark-mode .chp-card .chp-card-actions .button,
body.dark-mode .chp-card .chp-card-actions .chp-btn-outline,
.wp-dark-mode-active .chp-card .chp-card-actions .button,
.wp-dark-mode-active .chp-card .chp-card-actions .chp-btn-outline,
[data-theme="dark"] .chp-card .chp-card-actions .button,
[data-theme="dark"] .chp-card .chp-card-actions .chp-btn-outline,
.is-dark-mode .chp-card .chp-card-actions .button,
.is-dark-mode .chp-card .chp-card-actions .chp-btn-outline {
  background: transparent !important;
  color: var(--adf-d-text) !important;
  border: 1px solid var(--adf-d-border) !important;
  border-radius: .5rem !important;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease !important;
}
html.ai-dark .chp-card .chp-card-actions .button:hover,
html.ai-dark .chp-card .chp-card-actions .chp-btn-outline:hover,
html.dark .chp-card .chp-card-actions .button:hover,
html.dark .chp-card .chp-card-actions .chp-btn-outline:hover,
body.dark .chp-card .chp-card-actions .button:hover,
body.dark .chp-card .chp-card-actions .chp-btn-outline:hover,
body.dark-mode .chp-card .chp-card-actions .button:hover,
body.dark-mode .chp-card .chp-card-actions .chp-btn-outline:hover,
.wp-dark-mode-active .chp-card .chp-card-actions .button:hover,
.wp-dark-mode-active .chp-card .chp-card-actions .chp-btn-outline:hover,
[data-theme="dark"] .chp-card .chp-card-actions .button:hover,
[data-theme="dark"] .chp-card .chp-card-actions .chp-btn-outline:hover,
.is-dark-mode .chp-card .chp-card-actions .button:hover,
.is-dark-mode .chp-card .chp-card-actions .chp-btn-outline:hover {
  background: var(--adf-d-hover) !important;
  border-color: #3a3f46 !important;
}

/* خطوط فوکِس قابل مشاهده */
html.ai-dark .chp-card :is(a,button,[role="button"],.button).focus-visible,
html.dark .chp-card :is(a,button,[role="button"],.button).focus-visible,
body.dark .chp-card :is(a,button,[role="button"],.button).focus-visible,
body.dark-mode .chp-card :is(a,button,[role="button"],.button).focus-visible,
.wp-dark-mode-active .chp-card :is(a,button,[role="button"],.button).focus-visible,
[data-theme="dark"] .chp-card :is(a,button,[role="button"],.button).focus-visible,
.is-dark-mode .chp-card :is(a,button,[role="button"],.button).focus-visible {
  outline: none !important;
  box-shadow: var(--adf-focus) !important;
}

/* گرید پست‌ها */
html.ai-dark .chp-grid-posts,
html.dark .chp-grid-posts,
body.dark .chp-grid-posts,
body.dark-mode .chp-grid-posts,
.wp-dark-mode-active .chp-grid-posts,
[data-theme="dark"] .chp-grid-posts,
.is-dark-mode .chp-grid-posts {
  background: transparent !important;
}

/* زمان در متا */
html.ai-dark .chp-card .chp-card-meta time,
html.dark .chp-card .chp-card-meta time,
body.dark .chp-card .chp-card-meta time,
body.dark-mode .chp-card .chp-card-meta time,
.wp-dark-mode-active .chp-card .chp-card-meta time,
[data-theme="dark"] .chp-card .chp-card-meta time,
.is-dark-mode .chp-card .chp-card-meta time {
  color: var(--adf-d-muted) !important;
}

/* لینک‌های داخل اکسرپت */
html.ai-dark .chp-card .chp-excerpt a,
html.dark .chp-card .chp-excerpt a,
body.dark .chp-card .chp-excerpt a,
body.dark-mode .chp-card .chp-excerpt a,
.wp-dark-mode-active .chp-card .chp-excerpt a,
[data-theme="dark"] .chp-card .chp-excerpt a,
.is-dark-mode .chp-card .chp-excerpt a {
  color: #9ec2ff !important;
  text-decoration-color: rgba(158,194,255,.5) !important;
}
html.ai-dark .chp-card .chp-excerpt a:hover,
html.dark .chp-card .chp-excerpt a:hover,
body.dark .chp-card .chp-excerpt a:hover,
body.dark-mode .chp-card .chp-excerpt a:hover,
.wp-dark-mode-active .chp-card .chp-excerpt a:hover,
[data-theme="dark"] .chp-card .chp-excerpt a:hover,
.is-dark-mode .chp-card .chp-excerpt a:hover {
  color: #cfe0ff !important;
  text-decoration-color: #cfe0ff !important;
}
/* === پایان اصلاحات chp === */



/* === WCRS (Related Products) Dark Mode Fixes ===
   المان‌های: .wcrs-wrapper, .wcrs-products, .wcrs-product, .wcrs-thumb, .wcrs-body, .wcrs-name, .wcrs-btn
   هدف: خوانایی کامل در تم‌های تیره بدون دست‌بردن به رنگ تصاویر. */

/* کانتکست‌های تیره */
html.ai-dark .wcrs-wrapper,
html.dark .wcrs-wrapper,
body.dark .wcrs-wrapper,
body.dark-mode .wcrs-wrapper,
.wp-dark-mode-active .wcrs-wrapper,
[data-theme="dark"] .wcrs-wrapper,
.is-dark-mode .wcrs-wrapper {
  color-scheme: dark;
  background: transparent !important;
}

/* عنوان سکشن */
html.ai-dark .wcrs-wrapper .wcrs-title,
html.dark .wcrs-wrapper .wcrs-title,
body.dark .wcrs-wrapper .wcrs-title,
body.dark-mode .wcrs-wrapper .wcrs-title,
.wp-dark-mode-active .wcrs-wrapper .wcrs-title,
[data-theme="dark"] .wcrs-wrapper .wcrs-title,
.is-dark-mode .wcrs-wrapper .wcrs-title {
  color: var(--adf-d-text) !important;
  text-shadow: none !important;
}

/* کانتینر محصولات */
html.ai-dark .wcrs-wrapper .wcrs-products,
html.dark .wcrs-wrapper .wcrs-products,
body.dark .wcrs-wrapper .wcrs-products,
body.dark-mode .wcrs-wrapper .wcrs-products,
.wp-dark-mode-active .wcrs-wrapper .wcrs-products,
[data-theme="dark"] .wcrs-wrapper .wcrs-products,
.is-dark-mode .wcrs-wrapper .wcrs-products {
  background: transparent !important;
}

/* کارت محصول */
html.ai-dark .wcrs-wrapper .wcrs-product,
html.dark .wcrs-wrapper .wcrs-product,
body.dark .wcrs-wrapper .wcrs-product,
body.dark-mode .wcrs-wrapper .wcrs-product,
.wp-dark-mode-active .wcrs-wrapper .wcrs-product,
[data-theme="dark"] .wcrs-wrapper .wcrs-product,
.is-dark-mode .wcrs-wrapper .wcrs-product {
  background: var(--adf-d-surface) !important;
  color: var(--adf-d-text) !important;
  border: 1px solid var(--adf-d-border) !important;
  box-shadow: none !important;
  border-radius: .65rem !important;
}

/* بندانگشتی */
html.ai-dark .wcrs-wrapper .wcrs-thumb,
html.dark .wcrs-wrapper .wcrs-thumb,
body.dark .wcrs-wrapper .wcrs-thumb,
body.dark-mode .wcrs-wrapper .wcrs-thumb,
.wp-dark-mode-active .wcrs-wrapper .wcrs-thumb,
[data-theme="dark"] .wcrs-wrapper .wcrs-thumb,
.is-dark-mode .wcrs-wrapper .wcrs-thumb {
  background: transparent !important;
  border-bottom: 1px solid var(--adf-d-border) !important;
}
/* تصویر و واریانت‌های فرمت؛ بدون فیلتر برای حفظ رنگ واقعی */
html.ai-dark .wcrs-wrapper .wcrs-thumb img,
html.dark .wcrs-wrapper .wcrs-thumb img,
body.dark .wcrs-wrapper .wcrs-thumb img,
body.dark-mode .wcrs-wrapper .wcrs-thumb img,
.wp-dark-mode-active .wcrs-wrapper .wcrs-thumb img,
[data-theme="dark"] .wcrs-wrapper .wcrs-thumb img,
.is-dark-mode .wcrs-wrapper .wcrs-thumb img {
  filter: none !important;
  mix-blend-mode: normal !important;
  background: transparent !important;
}

/* بدنه کارت */
html.ai-dark .wcrs-wrapper .wcrs-body,
html.dark .wcrs-wrapper .wcrs-body,
body.dark .wcrs-wrapper .wcrs-body,
body.dark-mode .wcrs-wrapper .wcrs-body,
.wp-dark-mode-active .wcrs-wrapper .wcrs-body,
[data-theme="dark"] .wcrs-wrapper .wcrs-body,
.is-dark-mode .wcrs-wrapper .wcrs-body {
  background: transparent !important;
  color: var(--adf-d-text) !important;
}

/* نام محصول + لینک */
html.ai-dark .wcrs-wrapper .wcrs-name,
html.dark .wcrs-wrapper .wcrs-name,
body.dark .wcrs-wrapper .wcrs-name,
body.dark-mode .wcrs-wrapper .wcrs-name,
.wp-dark-mode-active .wcrs-wrapper .wcrs-name,
[data-theme="dark"] .wcrs-wrapper .wcrs-name,
.is-dark-mode .wcrs-wrapper .wcrs-name {
  color: var(--adf-d-text) !important;
}
html.ai-dark .wcrs-wrapper .wcrs-name a,
html.dark .wcrs-wrapper .wcrs-name a,
body.dark .wcrs-wrapper .wcrs-name a,
body.dark-mode .wcrs-wrapper .wcrs-name a,
.wp-dark-mode-active .wcrs-wrapper .wcrs-name a,
[data-theme="dark"] .wcrs-wrapper .wcrs-name a,
.is-dark-mode .wcrs-wrapper .wcrs-name a {
  color: var(--adf-d-text) !important;
  text-decoration-color: rgba(232,233,238,.35) !important;
}
html.ai-dark .wcrs-wrapper .wcrs-name a:hover,
html.dark .wcrs-wrapper .wcrs-name a:hover,
body.dark .wcrs-wrapper .wcrs-name a:hover,
body.dark-mode .wcrs-wrapper .wcrs-name a:hover,
.wp-dark-mode-active .wcrs-wrapper .wcrs-name a:hover,
[data-theme="dark"] .wcrs-wrapper .wcrs-name a:hover,
.is-dark-mode .wcrs-wrapper .wcrs-name a:hover {
  color: #ffffff !important;
  text-decoration-color: #ffffff !important;
}

/* دکمه‌ها */
html.ai-dark .wcrs-wrapper .wcrs-btn,
html.ai-dark .wcrs-wrapper .wcrs-btn-outline,
html.dark .wcrs-wrapper .wcrs-btn,
html.dark .wcrs-wrapper .wcrs-btn-outline,
body.dark .wcrs-wrapper .wcrs-btn,
body.dark .wcrs-wrapper .wcrs-btn-outline,
body.dark-mode .wcrs-wrapper .wcrs-btn,
body.dark-mode .wcrs-wrapper .wcrs-btn-outline,
.wp-dark-mode-active .wcrs-wrapper .wcrs-btn,
.wp-dark-mode-active .wcrs-wrapper .wcrs-btn-outline,
[data-theme="dark"] .wcrs-wrapper .wcrs-btn,
[data-theme="dark"] .wcrs-wrapper .wcrs-btn-outline,
.is-dark-mode .wcrs-wrapper .wcrs-btn,
.is-dark-mode .wcrs-wrapper .wcrs-btn-outline {
  background: transparent !important;
  color: var(--adf-d-text) !important;
  border: 1px solid var(--adf-d-border) !important;
  border-radius: .5rem !important;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease !important;
}
html.ai-dark .wcrs-wrapper .wcrs-btn:hover,
html.ai-dark .wcrs-wrapper .wcrs-btn-outline:hover,
html.dark .wcrs-wrapper .wcrs-btn:hover,
html.dark .wcrs-wrapper .wcrs-btn-outline:hover,
body.dark .wcrs-wrapper .wcrs-btn:hover,
body.dark .wcrs-wrapper .wcrs-btn-outline:hover,
body.dark-mode .wcrs-wrapper .wcrs-btn:hover,
body.dark-mode .wcrs-wrapper .wcrs-btn-outline:hover,
.wp-dark-mode-active .wcrs-wrapper .wcrs-btn:hover,
.wp-dark-mode-active .wcrs-wrapper .wcrs-btn-outline:hover,
[data-theme="dark"] .wcrs-wrapper .wcrs-btn:hover,
[data-theme="dark"] .wcrs-wrapper .wcrs-btn-outline:hover,
.is-dark-mode .wcrs-wrapper .wcrs-btn:hover,
.is-dark-mode .wcrs-wrapper .wcrs-btn-outline:hover {
  background: var(--adf-d-hover) !important;
  border-color: #3a3f46 !important;
}

/* فوکِس قابل مشاهده */
html.ai-dark .wcrs-wrapper :is(a,button,[role="button"],.wcrs-btn,.wcrs-btn-outline).focus-visible,
html.dark .wcrs-wrapper :is(a,button,[role="button"],.wcrs-btn,.wcrs-btn-outline).focus-visible,
body.dark .wcrs-wrapper :is(a,button,[role="button"],.wcrs-btn,.wcrs-btn-outline).focus-visible,
body.dark-mode .wcrs-wrapper :is(a,button,[role="button"],.wcrs-btn,.wcrs-btn-outline).focus-visible,
.wp-dark-mode-active .wcrs-wrapper :is(a,button,[role="button"],.wcrs-btn,.wcrs-btn-outline).focus-visible,
[data-theme="dark"] .wcrs-wrapper :is(a,button,[role="button"],.wcrs-btn,.wcrs-btn-outline).focus-visible,
.is-dark-mode .wcrs-wrapper :is(a,button,[role="button"],.wcrs-btn,.wcrs-btn-outline).focus-visible {
  outline: none !important;
  box-shadow: var(--adf-focus) !important;
}
/* === پایان اصلاحات WCRS === */



/* === Inline Pastel FAQ Boxes (style attribute) Dark Mode Fixes ===
   هدف: div هایی که فقط با inline-style پس‌زمینه‌ی روشن دارند
   (مثل #f9fbe7 و #e6f3ff) در تم تیره خوانا شوند، بدون دست‌کاری HTML.
   از selector های attribute با حساسیتِ حروف غیر فعال [i] استفاده می‌کنیم. */

/* جعبه‌های زرد کم‌رنگ (#f9fbe7) */
html.ai-dark [style*="#f9fbe7" i],
html.dark [style*="#f9fbe7" i],
body.dark [style*="#f9fbe7" i],
body.dark-mode [style*="#f9fbe7" i],
.wp-dark-mode-active [style*="#f9fbe7" i],
[data-theme="dark"] [style*="#f9fbe7" i],
.is-dark-mode [style*="#f9fbe7" i] {
  background: linear-gradient(0deg, rgba(250, 225, 120, .08), rgba(250, 225, 120, .08)) !important;
  color: var(--adf-d-text) !important;
  border: 1px solid var(--adf-d-border) !important;
  box-shadow: none !important;
  /* حفظ radius و paddingِ inline؛ اگر وجود ندارد، حداقل استاندارد: */
  border-radius: .9em;
}
html.ai-dark [style*="#f9fbe7" i] b,
html.dark [style*="#f9fbe7" i] b,
body.dark [style*="#f9fbe7" i] b,
body.dark-mode [style*="#f9fbe7" i] b,
.wp-dark-mode-active [style*="#f9fbe7" i] b,
[data-theme="dark"] [style*="#f9fbe7" i] b,
.is-dark-mode [style*="#f9fbe7" i] b {
  color: #fff !important;
}
html.ai-dark [style*="#f9fbe7" i] a,
html.dark [style*="#f9fbe7" i] a,
body.dark [style*="#f9fbe7" i] a,
body.dark-mode [style*="#f9fbe7" i] a,
.wp-dark-mode-active [style*="#f9fbe7" i] a,
[data-theme="dark"] [style*="#f9fbe7" i] a,
.is-dark-mode [style*="#f9fbe7" i] a {
  color: #ffd369 !important;
  text-decoration-color: rgba(255, 211, 105, .55) !important;
}

/* جعبه‌های آبی کم‌رنگ (#e6f3ff) */
html.ai-dark [style*="#e6f3ff" i],
html.dark [style*="#e6f3ff" i],
body.dark [style*="#e6f3ff" i],
body.dark-mode [style*="#e6f3ff" i],
.wp-dark-mode-active [style*="#e6f3ff" i],
[data-theme="dark"] [style*="#e6f3ff" i],
.is-dark-mode [style*="#e6f3ff" i] {
  background: linear-gradient(0deg, rgba(120, 180, 255, .08), rgba(120, 180, 255, .08)) !important;
  color: var(--adf-d-text) !important;
  border: 1px solid var(--adf-d-border) !important;
  box-shadow: none !important;
  border-radius: .9em;
}
html.ai-dark [style*="#e6f3ff" i] b,
html.dark [style*="#e6f3ff" i] b,
body.dark [style*="#e6f3ff" i] b,
body.dark-mode [style*="#e6f3ff" i] b,
.wp-dark-mode-active [style*="#e6f3ff" i] b,
[data-theme="dark"] [style*="#e6f3ff" i] b,
.is-dark-mode [style*="#e6f3ff" i] b {
  color: #e8f1ff !important;
}
html.ai-dark [style*="#e6f3ff" i] a,
html.dark [style*="#e6f3ff" i] a,
body.dark [style*="#e6f3ff" i] a,
body.dark-mode [style*="#e6f3ff" i] a,
.wp-dark-mode-active [style*="#e6f3ff" i] a,
[data-theme="dark"] [style*="#e6f3ff" i] a,
.is-dark-mode [style*="#e6f3ff" i] a {
  color: #9ec2ff !important;
  text-decoration-color: rgba(158, 194, 255, .55) !important;
}

/* کاهش فاصله عمودی بیش از حد اگر دو باکس پشت سر هم باشند */
html.ai-dark [style*="#f9fbe7" i] + [style*="#e6f3ff" i],
html.ai-dark [style*="#e6f3ff" i] + [style*="#f9fbe7" i],
html.dark [style*="#f9fbe7" i] + [style*="#e6f3ff" i],
html.dark [style*="#e6f3ff" i] + [style*="#f9fbe7" i],
body.dark [style*="#f9fbe7" i] + [style*="#e6f3ff" i],
body.dark [style*="#e6f3ff" i] + [style*="#f9fbe7" i],
body.dark-mode [style*="#f9fbe7" i] + [style*="#e6f3ff" i],
body.dark-mode [style*="#e6f3ff" i] + [style*="#f9fbe7" i],
.wp-dark-mode-active [style*="#f9fbe7" i] + [style*="#e6f3ff" i],
.wp-dark-mode-active [style*="#e6f3ff" i] + [style*="#f9fbe7" i],
[data-theme="dark"] [style*="#f9fbe7" i] + [style*="#e6f3ff" i],
[data-theme="dark"] [style*="#e6f3ff" i] + [style*="#f9fbe7" i],
.is-dark-mode [style*="#f9fbe7" i] + [style*="#e6f3ff" i],
.is-dark-mode [style*="#e6f3ff" i] + [style*="#f9fbe7" i] {
  margin-top: 10px !important;
}



/* === RTBL (Responsive Table) Dark Mode Fixes ===
   هدف: خوانایی جدول‌های ریسپانسیو با کلاس‌های table.rtbl و بلوک‌های .rtbl-* در تم تیره */

/* کانتکست‌های تیره مشترک */
@media (prefers-color-scheme: dark) {
  /* این مدیا کوئری به مرورگرها سیگنال می‌دهد اما ما همچنان روی کلاس‌های تیره هم هدف می‌گیریم */
}

/* خود جدول */
html.ai-dark table.rtbl,
html.dark table.rtbl,
body.dark table.rtbl,
body.dark-mode table.rtbl,
.wp-dark-mode-active table.rtbl,
[data-theme="dark"] table.rtbl,
.is-dark-mode table.rtbl,
html.ai-dark .rtbl,
html.dark .rtbl,
body.dark .rtbl,
body.dark-mode .rtbl,
.wp-dark-mode-active .rtbl,
[data-theme="dark"] .rtbl,
.is-dark-mode .rtbl {
  color-scheme: dark;
  background: var(--adf-d-surface) !important;
  color: var(--adf-d-text) !important;
  border: 1px solid var(--adf-d-border) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100%;
  box-shadow: none !important;
}

/* هدر جدول */
html.ai-dark table.rtbl thead,
html.dark table.rtbl thead,
body.dark table.rtbl thead,
body.dark-mode table.rtbl thead,
.wp-dark-mode-active table.rtbl thead,
[data-theme="dark"] table.rtbl thead,
.is-dark-mode table.rtbl thead,
html.ai-dark .rtbl .rt-head,
html.dark .rtbl .rt-head,
body.dark .rtbl .rt-head,
body.dark-mode .rtbl .rt-head,
.wp-dark-mode-active .rtbl .rt-head,
[data-theme="dark"] .rtbl .rt-head,
.is-dark-mode .rtbl .rt-head {
  background: #1a1d21 !important;
  color: var(--adf-d-text) !important;
  border-bottom: 1px solid var(--adf-d-border) !important;
}

/* سلول‌های هدر */
html.ai-dark table.rtbl thead th,
html.dark table.rtbl thead th,
body.dark table.rtbl thead th,
body.dark-mode table.rtbl thead th,
.wp-dark-mode-active table.rtbl thead th,
[data-theme="dark"] table.rtbl thead th,
.is-dark-mode table.rtbl thead th,
html.ai-dark .rtbl .rt-th,
html.dark .rtbl .rt-th,
body.dark .rtbl .rt-th,
body.dark-mode .rtbl .rt-th,
.wp-dark-mode-active .rtbl .rt-th,
[data-theme="dark"] .rtbl .rt-th,
.is-dark-mode .rtbl .rt-th {
  background: transparent !important;
  color: var(--adf-d-text) !important;
  border-right: 1px solid var(--adf-d-border) !important;
  padding: .75rem 1rem !important;
  font-weight: 600 !important;
}
/* حذف خط راست روی آخرین هدر */
html.ai-dark table.rtbl thead th:last-child,
html.dark table.rtbl thead th:last-child,
body.dark table.rtbl thead th:last-child,
body.dark-mode table.rtbl thead th:last-child,
.wp-dark-mode-active table.rtbl thead th:last-child,
[data-theme="dark"] table.rtbl thead th:last-child,
.is-dark-mode table.rtbl thead th:last-child {
  border-right: none !important;
}

/* بدنه جدول و ردیف‌ها */
html.ai-dark table.rtbl tbody,
html.dark table.rtbl tbody,
body.dark table.rtbl tbody,
body.dark-mode table.rtbl tbody,
.wp-dark-mode-active table.rtbl tbody,
[data-theme="dark"] table.rtbl tbody,
.is-dark-mode table.rtbl tbody {
  background: transparent !important;
}
html.ai-dark table.rtbl tbody tr,
html.dark table.rtbl tbody tr,
body.dark table.rtbl tbody tr,
body.dark-mode table.rtbl tbody tr,
.wp-dark-mode-active table.rtbl tbody tr,
[data-theme="dark"] table.rtbl tbody tr,
.is-dark-mode table.rtbl tbody tr,
html.ai-dark .rtbl .rt-row,
html.dark .rtbl .rt-row,
body.dark .rtbl .rt-row,
body.dark-mode .rtbl .rt-row,
.wp-dark-mode-active .rtbl .rt-row,
[data-theme="dark"] .rtbl .rt-row,
.is-dark-mode .rtbl .rt-row {
  background: transparent !important;
  border-bottom: 1px solid var(--adf-d-border) !important;
}
/* زیبرا استریپ ملایم */
html.ai-dark table.rtbl tbody tr:nth-child(even),
html.dark table.rtbl tbody tr:nth-child(even),
body.dark table.rtbl tbody tr:nth-child(even),
body.dark-mode table.rtbl tbody tr:nth-child(even),
.wp-dark-mode-active table.rtbl tbody tr:nth-child(even),
[data-theme="dark"] table.rtbl tbody tr:nth-child(even),
.is-dark-mode table.rtbl tbody tr:nth-child(even) {
  background: rgba(255,255,255,.02) !important;
}

/* سلول‌ها */
html.ai-dark table.rtbl td,
html.dark table.rtbl td,
body.dark table.rtbl td,
body.dark-mode table.rtbl td,
.wp-dark-mode-active table.rtbl td,
[data-theme="dark"] table.rtbl td,
.is-dark-mode table.rtbl td,
html.ai-dark .rtbl .rt-cell,
html.dark .rtbl .rt-cell,
body.dark .rtbl .rt-cell,
body.dark-mode .rtbl .rt-cell,
.wp-dark-mode-active .rtbl .rt-cell,
[data-theme="dark"] .rtbl .rt-cell,
.is-dark-mode .rtbl .rt-cell {
  color: var(--adf-d-text) !important;
  border-right: 1px solid var(--adf-d-border) !important;
  padding: .75rem 1rem !important;
  vertical-align: top !important;
}
/* آخرین سلول هر ردیف بدون خط راست */
html.ai-dark table.rtbl td:last-child,
html.dark table.rtbl td:last-child,
body.dark table.rtbl td:last-child,
body.dark-mode table.rtbl td:last-child,
.wp-dark-mode-active table.rtbl td:last-child,
[data-theme="dark"] table.rtbl td:last-child,
.is-dark-mode table.rtbl td:last-child {
  border-right: none !important;
}

/* برچسب ستون از data-label روی سلول‌ها (نسخه مبتنی بر table) */
@media (max-width: 768px) {
  html.ai-dark table.rtbl td[data-label]::before,
  html.dark table.rtbl td[data-label]::before,
  body.dark table.rtbl td[data-label]::before,
  body.dark-mode table.rtbl td[data-label]::before,
  .wp-dark-mode-active table.rtbl td[data-label]::before,
  [data-theme="dark"] table.rtbl td[data-label]::before,
  .is-dark-mode table.rtbl td[data-label]::before {
    content: attr(data-label) " : ";
    display: inline-block;
    min-width: 7.5em;
    margin-inline-end: .5rem;
    font-weight: 600;
    color: var(--adf-d-muted) !important;
    text-transform: none;
  }
}

/* برچسب ستون از data-label روی سلول‌های بلوکی (نسخه مبتنی بر div) */
@media (max-width: 768px) {
  html.ai-dark .rtbl .rt-cell::before,
  html.dark .rtbl .rt-cell::before,
  body.dark .rtbl .rt-cell::before,
  body.dark-mode .rtbl .rt-cell::before,
  .wp-dark-mode-active .rtbl .rt-cell::before,
  [data-theme="dark"] .rtbl .rt-cell::before,
  .is-dark-mode .rtbl .rt-cell::before {
    content: attr(data-label) " : ";
    display: inline-block;
    min-width: 7.5em;
    margin-inline-end: .5rem;
    font-weight: 600;
    color: var(--adf-d-muted) !important;
  }
}

/* لینک‌ها و فوکِس داخل جدول */
html.ai-dark table.rtbl a,
html.dark table.rtbl a,
body.dark table.rtbl a,
body.dark-mode table.rtbl a,
.wp-dark-mode-active table.rtbl a,
[data-theme="dark"] table.rtbl a,
.is-dark-mode table.rtbl a,
html.ai-dark .rtbl a,
html.dark .rtbl a,
body.dark .rtbl a,
body.dark-mode .rtbl a,
.wp-dark-mode-active .rtbl a,
[data-theme="dark"] .rtbl a,
.is-dark-mode .rtbl a {
  color: #9ec2ff !important;
  text-decoration-color: rgba(158,194,255,.5) !important;
}
html.ai-dark table.rtbl :is(a,button).focus-visible,
html.dark table.rtbl :is(a,button).focus-visible,
body.dark table.rtbl :is(a,button).focus-visible,
body.dark-mode table.rtbl :is(a,button).focus-visible,
.wp-dark-mode-active table.rtbl :is(a,button).focus-visible,
[data-theme="dark"] table.rtbl :is(a,button).focus-visible,
.is-dark-mode table.rtbl :is(a,button).focus-visible,
html.ai-dark .rtbl :is(a,button).focus-visible,
html.dark .rtbl :is(a,button).focus-visible,
body.dark .rtbl :is(a,button).focus-visible,
body.dark-mode .rtbl :is(a,button).focus-visible,
.wp-dark-mode-active .rtbl :is(a,button).focus-visible,
[data-theme="dark"] .rtbl :is(a,button).focus-visible,
.is-dark-mode .rtbl :is(a,button).focus-visible {
  outline: none !important;
  box-shadow: var(--adf-focus) !important;
}

/* اسکرول افقی برای جداول عریض روی موبایل */
@media (max-width: 768px) {
  html.ai-dark .rtbl,
  html.dark .rtbl,
  body.dark .rtbl,
  body.dark-mode .rtbl,
  .wp-dark-mode-active .rtbl,
  [data-theme="dark"] .rtbl,
  .is-dark-mode .rtbl {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}
/* === پایان اصلاحات RTBL === */



/* === RTBL Responsive Variant & Caption Dark Mode Fixes ===
   پوشش موارد: .rtbl.rtbl--responsive, caption, .rtbl-title-link, .rtbl-cell--title, .rtbl-cell--desc */

/* Caption */
html.ai-dark table.rtbl caption,
html.dark table.rtbl caption,
body.dark table.rtbl caption,
body.dark-mode table.rtbl caption,
.wp-dark-mode-active table.rtbl caption,
[data-theme="dark"] table.rtbl caption,
.is-dark-mode table.rtbl caption,
html.ai-dark .rtbl caption,
html.dark .rtbl caption,
body.dark .rtbl caption,
body.dark-mode .rtbl caption,
.wp-dark-mode-active .rtbl caption,
[data-theme="dark"] .rtbl caption,
.is-dark-mode .rtbl caption {
  color: var(--adf-d-muted) !important;
  background: transparent !important;
  padding: .5rem 0;
}

/* کارت‌شدن موبایلی در نسخه‌ی responsive – خنثی‌سازی رنگ‌های روشن پیش‌فرض */
@media (max-width: 768px) {
  html.ai-dark .rtbl.rtbl--responsive .rtbl-row,
  html.dark .rtbl.rtbl--responsive .rtbl-row,
  body.dark .rtbl.rtbl--responsive .rtbl-row,
  body.dark-mode .rtbl.rtbl--responsive .rtbl-row,
  .wp-dark-mode-active .rtbl.rtbl--responsive .rtbl-row,
  [data-theme="dark"] .rtbl.rtbl--responsive .rtbl-row,
  .is-dark-mode .rtbl.rtbl--responsive .rtbl-row {
    background: var(--adf-d-surface) !important;
    border-color: var(--adf-d-border) !important;
    box-shadow: none !important;
  }

  html.ai-dark .rtbl.rtbl--responsive .rtbl-cell,
  html.dark .rtbl.rtbl--responsive .rtbl-cell,
  body.dark .rtbl.rtbl--responsive .rtbl-cell,
  body.dark-mode .rtbl.rtbl--responsive .rtbl-cell,
  .wp-dark-mode-active .rtbl.rtbl--responsive .rtbl-cell,
  [data-theme="dark"] .rtbl.rtbl--responsive .rtbl-cell,
  .is-dark-mode .rtbl.rtbl--responsive .rtbl-cell {
    color: var(--adf-d-text) !important;
    border-top-color: var(--adf-d-border) !important;
    background: transparent !important;
  }

  /* برچسب ستون‌های موبایل */
  html.ai-dark .rtbl.rtbl--responsive .rtbl-cell::before,
  html.dark .rtbl.rtbl--responsive .rtbl-cell::before,
  body.dark .rtbl.rtbl--responsive .rtbl-cell::before,
  body.dark-mode .rtbl.rtbl--responsive .rtbl-cell::before,
  .wp-dark-mode-active .rtbl.rtbl--responsive .rtbl-cell::before,
  [data-theme="dark"] .rtbl.rtbl--responsive .rtbl-cell::before,
  .is-dark-mode .rtbl.rtbl--responsive .rtbl-cell::before {
    color: var(--adf-d-muted) !important;
  }

  /* لینک عنوان */
  html.ai-dark .rtbl.rtbl--responsive .rtbl-title-link,
  html.dark .rtbl.rtbl--responsive .rtbl-title-link,
  body.dark .rtbl.rtbl--responsive .rtbl-title-link,
  body.dark-mode .rtbl.rtbl--responsive .rtbl-title-link,
  .wp-dark-mode-active .rtbl.rtbl--responsive .rtbl-title-link,
  [data-theme="dark"] .rtbl.rtbl--responsive .rtbl-title-link,
  .is-dark-mode .rtbl.rtbl--responsive .rtbl-title-link {
    color: #9ec2ff !important;
    text-decoration-color: rgba(158,194,255,.45) !important;
  }
  html.ai-dark .rtbl.rtbl--responsive .rtbl-title-link:hover,
  html.dark .rtbl.rtbl--responsive .rtbl-title-link:hover,
  body.dark .rtbl.rtbl--responsive .rtbl-title-link:hover,
  body.dark-mode .rtbl.rtbl--responsive .rtbl-title-link:hover,
  .wp-dark-mode-active .rtbl.rtbl--responsive .rtbl-title-link:hover,
  [data-theme="dark"] .rtbl.rtbl--responsive .rtbl-title-link:hover,
  .is-dark-mode .rtbl.rtbl--responsive .rtbl-title-link:hover {
    color: #cfe0ff !important;
    text-decoration-color: #cfe0ff !important;
  }

  /* رنگ متنِ توضیح */
  html.ai-dark .rtbl.rtbl--responsive .rtbl-cell--desc,
  html.dark .rtbl.rtbl--responsive .rtbl-cell--desc,
  body.dark .rtbl.rtbl--responsive .rtbl-cell--desc,
  body.dark-mode .rtbl.rtbl--responsive .rtbl-cell--desc,
  .wp-dark-mode-active .rtbl.rtbl--responsive .rtbl-cell--desc,
  [data-theme="dark"] .rtbl.rtbl--responsive .rtbl-cell--desc,
  .is-dark-mode .rtbl.rtbl--responsive .rtbl-cell--desc {
    color: var(--adf-d-text) !important;
  }
}

/* نسخه‌ی دسکتاپ: لینک عنوان و رنگ‌ها */
html.ai-dark .rtbl .rtbl-title-link,
html.dark .rtbl .rtbl-title-link,
body.dark .rtbl .rtbl-title-link,
body.dark-mode .rtbl .rtbl-title-link,
.wp-dark-mode-active .rtbl .rtbl-title-link,
[data-theme="dark"] .rtbl .rtbl-title-link,
.is-dark-mode .rtbl .rtbl-title-link {
  color: #9ec2ff !important;
  text-decoration-color: rgba(158,194,255,.4) !important;
}
html.ai-dark .rtbl .rtbl-title-link:hover,
html.dark .rtbl .rtbl-title-link:hover,
body.dark .rtbl .rtbl-title-link:hover,
body.dark-mode .rtbl .rtbl-title-link:hover,
.wp-dark-mode-active .rtbl .rtbl-title-link:hover,
[data-theme="dark"] .rtbl .rtbl-title-link:hover,
.is-dark-mode .rtbl .rtbl-title-link:hover {
  color: #cfe0ff !important;
  text-decoration-color: #cfe0ff !important;
}

/* یکدست‌سازی RTL */
@media (max-width: 768px) {
  html.ai-dark .rtbl.rtbl--responsive,
  html.dark .rtbl.rtbl--responsive,
  body.dark .rtbl.rtbl--responsive,
  body.dark-mode .rtbl.rtbl--responsive,
  .wp-dark-mode-active .rtbl.rtbl--responsive,
  [data-theme="dark"] .rtbl.rtbl--responsive,
  .is-dark-mode .rtbl.rtbl--responsive {
    direction: rtl !important;
    text-align: right !important;
  }
}
/* === پایان اصلاحات RTBL Responsive === */



/* === Inline Gray FAQ Boxes (#f7f7f7) Dark Mode Fixes ===
   هدف: divهایی که با inline-style پس‌زمینه‌ی #f7f7f7 دارند در تم تیره خوانا شوند */

/* باکس خاکستری روشن عمومی */
html.ai-dark [style*="#f7f7f7" i],
html.dark [style*="#f7f7f7" i],
body.dark [style*="#f7f7f7" i],
body.dark-mode [style*="#f7f7f7" i],
.wp-dark-mode-active [style*="#f7f7f7" i],
[data-theme="dark"] [style*="#f7f7f7" i],
.is-dark-mode [style*="#f7f7f7" i] {
  background: linear-gradient(0deg, rgba(200,200,210,.09), rgba(200,200,210,.09)) !important;
  color: var(--adf-d-text) !important;
  border: 1px solid var(--adf-d-border) !important;
  box-shadow: none !important;
  border-radius: .6rem;
}

/* تیتر پررنگ داخل باکس */
html.ai-dark [style*="#f7f7f7" i] :is(b,strong),
html.dark [style*="#f7f7f7" i] :is(b,strong),
body.dark [style*="#f7f7f7" i] :is(b,strong),
body.dark-mode [style*="#f7f7f7" i] :is(b,strong),
.wp-dark-mode-active [style*="#f7f7f7" i] :is(b,strong),
[data-theme="dark"] [style*="#f7f7f7" i] :is(b,strong),
.is-dark-mode [style*="#f7f7f7" i] :is(b,strong) {
  color: #ffffff !important;
}

/* لینک‌ها داخل باکس */
html.ai-dark [style*="#f7f7f7" i] a,
html.dark [style*="#f7f7f7" i] a,
body.dark [style*="#f7f7f7" i] a,
body.dark-mode [style*="#f7f7f7" i] a,
.wp-dark-mode-active [style*="#f7f7f7" i] a,
[data-theme="dark"] [style*="#f7f7f7" i] a,
.is-dark-mode [style*="#f7f7f7" i] a {
  color: #9ec2ff !important;
  text-decoration-color: rgba(158,194,255,.55) !important;
}

/* کنترل فاصله‌ی بین باکس‌های پشت سر هم */
html.ai-dark [style*="#f7f7f7" i] + [style*="#f7f7f7" i],
html.dark [style*="#f7f7f7" i] + [style*="#f7f7f7" i],
body.dark [style*="#f7f7f7" i] + [style*="#f7f7f7" i],
body.dark-mode [style*="#f7f7f7" i] + [style*="#f7f7f7" i],
.wp-dark-mode-active [style*="#f7f7f7" i] + [style*="#f7f7f7" i],
[data-theme="dark"] [style*="#f7f7f7" i] + [style*="#f7f7f7" i],
.is-dark-mode [style*="#f7f7f7" i] + [style*="#f7f7f7" i] {
  margin-top: 12px !important;
}


/* === Generic inline light box (quick fallback for #f9f9f9) === */
html.ai-dark [style*="#f9f9f9" i],
html.dark [style*="#f9f9f9" i],
body.dark [style*="#f9f9f9" i],
body.dark-mode [style*="#f9f9f9" i],
.wp-dark-mode-active [style*="#f9f9f9" i],
[data-theme="dark"] [style*="#f9f9f9" i],
.is-dark-mode [style*="#f9f9f9" i] {
  background: linear-gradient(0deg, rgba(210,210,220,.09), rgba(210,210,220,.09)) !important;
  color: var(--adf-d-text) !important;
  border: 1px solid var(--adf-d-border) !important;
  box-shadow: none !important;
}



/* === Global Dark-Mode Link Color: Soft Yellow ===
   در حالت شب، همه لینک‌ها زرد کم‌رنگ شوند (به‌جز دکمه‌ها) */

:root {
  --adf-link: #ffd369;
  --adf-link-hover: #ffec9f;
  --adf-link-td: rgba(255, 211, 105, .55);
}

/* لینک‌های عمومی */
html.ai-dark a,
html.dark a,
body.dark a,
body.dark-mode a,
.wp-dark-mode-active a,
[data-theme="dark"] a,
.is-dark-mode a {
  color: var(--adf-link) !important;
  text-decoration-color: var(--adf-link-td) !important;
}

/* هاور */
html.ai-dark a:hover,
html.dark a:hover,
body.dark a:hover,
body.dark-mode a:hover,
.wp-dark-mode-active a:hover,
[data-theme="dark"] a:hover,
.is-dark-mode a:hover {
  color: var(--adf-link-hover) !important;
  text-decoration-color: var(--adf-link-hover) !important;
}

/* فوکِس */
html.ai-dark a:focus-visible,
html.dark a:focus-visible,
body.dark a:focus-visible,
body.dark-mode a:focus-visible,
.wp-dark-mode-active a:focus-visible,
[data-theme="dark"] a:focus-visible,
.is-dark-mode a:focus-visible {
  outline: none !important;
  box-shadow: var(--adf-focus);
}

/* از رنگ‌دهی لینک برای عناصر دکمه‌نما جلوگیری شود */
html.ai-dark :is(.button,.btn,.wcrs-btn,.wcrs-btn-outline,.chp-btn-outline,[role="button"]) a,
html.dark :is(.button,.btn,.wcrs-btn,.wcrs-btn-outline,.chp-btn-outline,[role="button"]) a,
body.dark :is(.button,.btn,.wcrs-btn,.wcrs-btn-outline,.chp-btn-outline,[role="button"]) a,
body.dark-mode :is(.button,.btn,.wcrs-btn,.wcrs-btn-outline,.chp-btn-outline,[role="button"]) a,
.wp-dark-mode-active :is(.button,.btn,.wcrs-btn,.wcrs-btn-outline,.chp-btn-outline,[role="button"]) a,
[data-theme="dark"] :is(.button,.btn,.wcrs-btn,.wcrs-btn-outline,.chp-btn-outline,[role="button"]) a,
.is-dark-mode :is(.button,.btn,.wcrs-btn,.wcrs-btn-outline,.chp-btn-outline,[role="button"]) a {
  color: inherit !important;
  text-decoration-color: currentColor !important;
}

/* اطمینان از هم‌رنگ شدن لینک‌های عنوان در کارت‌ها و بخش‌های دیگر */
html.ai-dark .chp-card .chp-card-title a,
html.dark .chp-card .chp-card-title a,
body.dark .chp-card .chp-card-title a,
body.dark-mode .chp-card .chp-card-title a,
.wp-dark-mode-active .chp-card .chp-card-title a,
[data-theme="dark"] .chp-card .chp-card-title a,
.is-dark-mode .chp-card .chp-card-title a,
html.ai-dark .wcrs-wrapper .wcrs-name a,
html.dark .wcrs-wrapper .wcrs-name a,
body.dark .wcrs-wrapper .wcrs-name a,
body.dark-mode .wcrs-wrapper .wcrs-name a,
.wp-dark-mode-active .wcrs-wrapper .wcrs-name a,
[data-theme="dark"] .wcrs-wrapper .wcrs-name a,
.is-dark-mode .wcrs-wrapper .wcrs-name a,
html.ai-dark .rtbl .rtbl-title-link,
html.dark .rtbl .rtbl-title-link,
body.dark .rtbl .rtbl-title-link,
body.dark-mode .rtbl .rtbl-title-link,
.wp-dark-mode-active .rtbl .rtbl-title-link,
[data-theme="dark"] .rtbl .rtbl-title-link,
.is-dark-mode .rtbl .rtbl-title-link {
  color: var(--adf-link) !important;
  text-decoration-color: var(--adf-link-td) !important;
}
html.ai-dark .chp-card .chp-card-title a:hover,
html.dark .chp-card .chp-card-title a:hover,
body.dark .chp-card .chp-card-title a:hover,
body.dark-mode .chp-card .chp-card-title a:hover,
.wp-dark-mode-active .chp-card .chp-card-title a:hover,
[data-theme="dark"] .chp-card .chp-card-title a:hover,
.is-dark-mode .chp-card .chp-card-title a:hover,
html.ai-dark .wcrs-wrapper .wcrs-name a:hover,
html.dark .wcrs-wrapper .wcrs-name a:hover,
body.dark .wcrs-wrapper .wcrs-name a:hover,
body.dark-mode .wcrs-wrapper .wcrs-name a:hover,
.wp-dark-mode-active .wcrs-wrapper .wcrs-name a:hover,
[data-theme="dark"] .wcrs-wrapper .wcrs-name a:hover,
.is-dark-mode .wcrs-wrapper .wcrs-name a:hover,
html.ai-dark .rtbl .rtbl-title-link:hover,
html.dark .rtbl .rtbl-title-link:hover,
body.dark .rtbl .rtbl-title-link:hover,
body.dark-mode .rtbl .rtbl-title-link:hover,
.wp-dark-mode-active .rtbl .rtbl-title-link:hover,
[data-theme="dark"] .rtbl .rtbl-title-link:hover,
.is-dark-mode .rtbl .rtbl-title-link:hover {
  color: var(--adf-link-hover) !important;
  text-decoration-color: var(--adf-link-hover) !important;
}



/* === Content-Only Dark Link Color (Soft Yellow) ===
   فقط لینک‌های داخل محتوای نوشته‌ها زرد باشند؛ بیرون از محتوا دست نمی‌زنیم. */

:root {
  --adf-link: #ffd369;
  --adf-link-hover: #ffec9f;
  --adf-link-td: rgba(255, 211, 105, .55);
}

/* محدوده‌های رایج محتوای نوشته */
html.ai-dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) a,
html.dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) a,
body.dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) a,
body.dark-mode :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) a,
.wp-dark-mode-active :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) a,
[data-theme="dark"] :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) a,
.is-dark-mode :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) a {
  color: var(--adf-link) !important;
  text-decoration-color: var(--adf-link-td) !important;
}

html.ai-dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) a:hover,
html.dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) a:hover,
body.dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) a:hover,
body.dark-mode :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) a:hover,
.wp-dark-mode-active :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) a:hover,
[data-theme="dark"] :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) a:hover,
.is-dark-mode :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) a:hover {
  color: var(--adf-link-hover) !important;
  text-decoration-color: var(--adf-link-hover) !important;
}

/* اطمینان از عدم دخالت در لینک‌های دکمه‌ای داخل محتوا */
html.ai-dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) :is(.button,.btn,[role='button']) a,
html.dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) :is(.button,.btn,[role='button']) a,
body.dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) :is(.button,.btn,[role='button']) a {
  color: inherit !important;
  text-decoration-color: currentColor !important;
}

/* بازگردانی رنگ لینک برخی کامپوننت‌ها به حالت قبل (بیرون از محتوا) */
html.ai-dark .chp-card .chp-card-title a,
html.dark .chp-card .chp-card-title a,
body.dark .chp-card .chp-card-title a,
body.dark-mode .chp-card .chp-card-title a,
.wp-dark-mode-active .chp-card .chp-card-title a,
[data-theme="dark"] .chp-card .chp-card-title a,
.is-dark-mode .chp-card .chp-card-title a,
html.ai-dark .wcrs-wrapper .wcrs-name a,
html.dark .wcrs-wrapper .wcrs-name a,
body.dark .wcrs-wrapper .wcrs-name a,
body.dark-mode .wcrs-wrapper .wcrs-name a,
.wp-dark-mode-active .wcrs-wrapper .wcrs-name a,
[data-theme="dark"] .wcrs-wrapper .wcrs-name a,
.is-dark-mode .wcrs-wrapper .wcrs-name a {
  color: var(--adf-d-text) !important;
  text-decoration-color: rgba(232,233,238,.35) !important;
}

/* لینک عنوان جدول‌های ریسپانسیو برگردد به آبی ملایم */
html.ai-dark .rtbl .rtbl-title-link,
html.dark .rtbl .rtbl-title-link,
body.dark .rtbl .rtbl-title-link,
body.dark-mode .rtbl .rtbl-title-link,
.wp-dark-mode-active .rtbl .rtbl-title-link,
[data-theme="dark"] .rtbl .rtbl-title-link,
.is-dark-mode .rtbl .rtbl-title-link {
  color: #9ec2ff !important;
  text-decoration-color: rgba(158,194,255,.4) !important;
}
html.ai-dark .rtbl .rtbl-title-link:hover,
html.dark .rtbl .rtbl-title-link:hover,
body.dark .rtbl .rtbl-title-link:hover,
body.dark-mode .rtbl .rtbl-title-link:hover,
.wp-dark-mode-active .rtbl .rtbl-title-link:hover,
[data-theme="dark"] .rtbl .rtbl-title-link:hover,
.is-dark-mode .rtbl .rtbl-title-link:hover {
  color: #cfe0ff !important;
  text-decoration-color: #cfe0ff !important;
}



/* === Header / Menu / Breadcrumb: do NOT use yellow links (dark mode) ===
   لینک‌های فهرست هدر و ناوبری و بردکرامب به رنگ والد/قالب بمانند. */
html.ai-dark :is(header,.site-header,.header,.main-header,.topbar,.navbar,nav,.navigation,.main-navigation,
.menu,.menu-primary,.menu-secondary,.menu-top,.menu-main,.site-branding,.site-title,
.breadcrumb,.breadcrumbs,.breadcrumb-trail,.rank-math-breadcrumb,.yoast-breadcrumb) a,
html.dark :is(header,.site-header,.header,.main-header,.topbar,.navbar,nav,.navigation,.main-navigation,
.menu,.menu-primary,.menu-secondary,.menu-top,.menu-main,.site-branding,.site-title,
.breadcrumb,.breadcrumbs,.breadcrumb-trail,.rank-math-breadcrumb,.yoast-breadcrumb) a,
body.dark :is(header,.site-header,.header,.main-header,.topbar,.navbar,nav,.navigation,.main-navigation,
.menu,.menu-primary,.menu-secondary,.menu-top,.menu-main,.site-branding,.site-title,
.breadcrumb,.breadcrumbs,.breadcrumb-trail,.rank-math-breadcrumb,.yoast-breadcrumb) a,
body.dark-mode :is(header,.site-header,.header,.main-header,.topbar,.navbar,nav,.navigation,.main-navigation,
.menu,.menu-primary,.menu-secondary,.menu-top,.menu-main,.site-branding,.site-title,
.breadcrumb,.breadcrumbs,.breadcrumb-trail,.rank-math-breadcrumb,.yoast-breadcrumb) a,
.wp-dark-mode-active :is(header,.site-header,.header,.main-header,.topbar,.navbar,nav,.navigation,.main-navigation,
.menu,.menu-primary,.menu-secondary,.menu-top,.menu-main,.site-branding,.site-title,
.breadcrumb,.breadcrumbs,.breadcrumb-trail,.rank-math-breadcrumb,.yoast-breadcrumb) a,
[data-theme="dark"] :is(header,.site-header,.header,.main-header,.topbar,.navbar,nav,.navigation,.main-navigation,
.menu,.menu-primary,.menu-secondary,.menu-top,.menu-main,.site-branding,.site-title,
.breadcrumb,.breadcrumbs,.breadcrumb-trail,.rank-math-breadcrumb,.yoast-breadcrumb) a,
.is-dark-mode :is(header,.site-header,.header,.main-header,.topbar,.navbar,nav,.navigation,.main-navigation,
.menu,.menu-primary,.menu-secondary,.menu-top,.menu-main,.site-branding,.site-title,
.breadcrumb,.breadcrumbs,.breadcrumb-trail,.rank-math-breadcrumb,.yoast-breadcrumb) a {
  color: inherit !important;
  text-decoration-color: currentColor !important;
}



/* === OVERRIDE: RTBL title links INSIDE post content should be yellow in dark mode === */
html.ai-dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl .rtbl-title-link,
html.dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl .rtbl-title-link,
body.dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl .rtbl-title-link,
body.dark-mode :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl .rtbl-title-link,
.wp-dark-mode-active :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl .rtbl-title-link,
[data-theme="dark"] :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl .rtbl-title-link,
.is-dark-mode :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl .rtbl-title-link {
  color: var(--adf-link) !important;
  text-decoration-color: var(--adf-link-td) !important;
}
html.ai-dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl .rtbl-title-link:hover,
html.dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl .rtbl-title-link:hover,
body.dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl .rtbl-title-link:hover,
body.dark-mode :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl .rtbl-title-link:hover,
.wp-dark-mode-active :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl .rtbl-title-link:hover,
[data-theme="dark"] :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl .rtbl-title-link:hover,
.is-dark-mode :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl .rtbl-title-link:hover {
  color: var(--adf-link-hover) !important;
  text-decoration-color: var(--adf-link-hover) !important;
}

/* نسخه‌ی کارت‌شده (موبایل) نیز همین رفتار را داشته باشد */
@media (max-width: 768px) {
  html.ai-dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl.rtbl--responsive .rtbl-title-link,
  html.dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl.rtbl--responsive .rtbl-title-link,
  body.dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl.rtbl--responsive .rtbl-title-link,
  body.dark-mode :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl.rtbl--responsive .rtbl-title-link,
  .wp-dark-mode-active :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl.rtbl--responsive .rtbl-title-link,
  [data-theme="dark"] :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl.rtbl--responsive .rtbl-title-link,
  .is-dark-mode :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl.rtbl--responsive .rtbl-title-link {
    color: var(--adf-link) !important;
    text-decoration-color: var(--adf-link-td) !important;
  }
  html.ai-dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl.rtbl--responsive .rtbl-title-link:hover,
  html.dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl.rtbl--responsive .rtbl-title-link:hover,
  body.dark :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl.rtbl--responsive .rtbl-title-link:hover,
  body.dark-mode :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl.rtbl--responsive .rtbl-title-link:hover,
  .wp-dark-mode-active :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl.rtbl--responsive .rtbl-title-link:hover,
  [data-theme="dark"] :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl.rtbl--responsive .rtbl-title-link:hover,
  .is-dark-mode :is(.entry-content,.wp-block-post-content,[itemprop="articleBody"],.elementor-widget-theme-post-content) .rtbl.rtbl--responsive .rtbl-title-link:hover {
    color: var(--adf-link-hover) !important;
    text-decoration-color: var(--adf-link-hover) !important;
  }
}



/* === Inline Gray FAQ Boxes (#f5f5f5 & #eaeaea) Dark Mode Fixes ===
   هدف: پوشش جعبه‌های روشن بیشتر بدون نیاز به ویرایش HTML */

/* #f5f5f5 */
html.ai-dark [style*="#f5f5f5" i],
html.dark [style*="#f5f5f5" i],
body.dark [style*="#f5f5f5" i],
body.dark-mode [style*="#f5f5f5" i],
.wp-dark-mode-active [style*="#f5f5f5" i],
[data-theme="dark"] [style*="#f5f5f5" i],
.is-dark-mode [style*="#f5f5f5" i] {
  background: linear-gradient(0deg, rgba(210,210,220,.09), rgba(210,210,220,.09)) !important;
  color: var(--adf-d-text) !important;
  border: 1px solid var(--adf-d-border) !important;
  box-shadow: none !important;
  border-radius: .6rem;
}
html.ai-dark [style*="#f5f5f5" i] :is(b,strong),
html.dark [style*="#f5f5f5" i] :is(b,strong),
body.dark [style*="#f5f5f5" i] :is(b,strong),
body.dark-mode [style*="#f5f5f5" i] :is(b,strong),
.wp-dark-mode-active [style*="#f5f5f5" i] :is(b,strong),
[data-theme="dark"] [style*="#f5f5f5" i] :is(b,strong),
.is-dark-mode [style*="#f5f5f5" i] :is(b,strong) {
  color: #ffffff !important;
}
html.ai-dark [style*="#f5f5f5" i] a,
html.dark [style*="#f5f5f5" i] a,
body.dark [style*="#f5f5f5" i] a,
body.dark-mode [style*="#f5f5f5" i] a,
.wp-dark-mode-active [style*="#f5f5f5" i] a,
[data-theme="dark"] [style*="#f5f5f5" i] a,
.is-dark-mode [style*="#f5f5f5" i] a {
  color: #9ec2ff !important;
  text-decoration-color: rgba(158,194,255,.55) !important;
}

/* #eaeaea */
html.ai-dark [style*="#eaeaea" i],
html.dark [style*="#eaeaea" i],
body.dark [style*="#eaeaea" i],
body.dark-mode [style*="#eaeaea" i],
.wp-dark-mode-active [style*="#eaeaea" i],
[data-theme="dark"] [style*="#eaeaea" i],
.is-dark-mode [style*="#eaeaea" i] {
  background: linear-gradient(0deg, rgba(200,200,210,.10), rgba(200,200,210,.10)) !important;
  color: var(--adf-d-text) !important;
  border: 1px solid var(--adf-d-border) !important;
  box-shadow: none !important;
  border-radius: .6rem;
}
html.ai-dark [style*="#eaeaea" i] :is(b,strong),
html.dark [style*="#eaeaea" i] :is(b,strong),
body.dark [style*="#eaeaea" i] :is(b,strong),
body.dark-mode [style*="#eaeaea" i] :is(b,strong),
.wp-dark-mode-active [style*="#eaeaea" i] :is(b,strong),
[data-theme="dark"] [style*="#eaeaea" i] :is(b,strong),
.is-dark-mode [style*="#eaeaea" i] :is(b,strong) {
  color: #ffffff !important;
}
html.ai-dark [style*="#eaeaea" i] a,
html.dark [style*="#eaeaea" i] a,
body.dark [style*="#eaeaea" i] a,
body.dark-mode [style*="#eaeaea" i] a,
.wp-dark-mode-active [style*="#eaeaea" i] a,
[data-theme="dark"] [style*="#eaeaea" i] a,
.is-dark-mode [style*="#eaeaea" i] a {
  color: #9ec2ff !important;
  text-decoration-color: rgba(158,194,255,.55) !important;
}

/* فاصله بین باکس‌های پشت سر هم */
html.ai-dark [style*="#f5f5f5" i] + [style*="#f5f5f5" i],
html.dark [style*="#f5f5f5" i] + [style*="#f5f5f5" i],
body.dark [style*="#f5f5f5" i] + [style*="#f5f5f5" i],
body.dark-mode [style*="#f5f5f5" i] + [style*="#f5f5f5" i] { margin-top: 12px !important; }
html.ai-dark [style*="#eaeaea" i] + [style*="#eaeaea" i],
html.dark [style*="#eaeaea" i] + [style*="#eaeaea" i],
body.dark [style*="#eaeaea" i] + [style*="#eaeaea" i],
body.dark-mode [style*="#eaeaea" i] + [style*="#eaeaea" i] { margin-top: 12px !important; }
