/**
 * استایل‌های پایهٔ تم (RTL، فونت، پس‌زمینه)
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  direction: rtl;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  background-color: var(--color-background);
}

body {
  position: relative;
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text-body);
  /* شفاف تا لایهٔ بوکهٔ fixed (z-index: 0) زیر محتوا دیده شود؛ رنگ پایه روی html است */
  background-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/**
 * لایه بوکه ثابت — زیر محتوای صفحه، بالای رنگ html.
 * z-index منفی پشت پس‌زمینهٔ body می‌رود و در بسیاری مرورگرها دیده نمی‌شود.
 */
.netron-boke-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  pointer-events: none;
  overflow: hidden;
}

.netron-boke-bg__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100svh;
  object-fit: cover;
  object-position: center;
}

/*
 * خواهران بعد از بوکه باید بالاتر از لایهٔ بوکه (z-index: 0) رسم شوند.
 * هدر را از این قانون خارج می‌کنیم: selector قبلی با specificity بالاتر از `.header`
 * باعث override شدن position: sticky و z-index: 100 هدر می‌شد و محتوای main روی مگامنو می‌افتاد.
 */
body > .netron-boke-bg ~ *:not(.header) {
  position: relative;
  z-index: 1;
}

/**
 * قفل اسکرول پس‌زمینه هنگام منوی موبایل در JS (touchmove/wheel) انجام می‌شود
 * تا با overflow:hidden روی body اسکرول به بالا نپرد.
 */
html.netron-mobile-nav-open {
  overscroll-behavior: none;
}

/**
 * محتوای اصلی — هم‌تراز با لبهٔ محتوای هدر (.header + .header__shell) و فوتر (.footer + .footer__container):
 * حداکثر ۱۲۰۰px، حداقل فاصلهٔ افقی var(--space-4) از لبهٔ ویوپورت، و padding داخلی هم‌عرض با شِل/کانتینر فوتر.
 */
main.site-main,
main.home,
main.about-page,
main.contact-page,
main.privacy-page,
main.brand-guide-page,
main.category-page,
main.glossary-page {
    box-sizing: border-box;
    width: min(1200px, calc(100% - 2 * var(--space-4)));
    max-width: 100%;
    margin-inline: auto;
    overflow-x: hidden;
    overflow-x: clip;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/**
 * FAQ + فرم دریافت لید (template-parts/faq-and-forms.php)
 * رنگ‌ها، فاصله و شیشه مطابق project-architecture.md؛ بدون سایهٔ تزئینی روی کارت‌ها.
 */
.home__faq-and-forms {
  padding-block: var(--space-5);
}

.home__faq-and-forms__grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}

.faq-and-forms__form-card {
  box-sizing: border-box;
  border: 1px solid var(--color-glass-stroke);
  border-radius: var(--radius-lg);
  background-color: var(--color-glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: var(--space-5);
}

/* اسکرول پس از ریدایرکت فرم لید (هش) — زیر هدر ثابت نماند */
.netron-lead-scroll-target {
  scroll-margin-top: calc(var(--header-bar-height, 64px) + var(--space-3));
}

.faq-and-forms__form-kicker {
  margin: 0 0 var(--space-4);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
  font-size: 1rem;
  color: var(--color-text-heading);
}

.faq-and-forms__form-kicker-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-success);
  border: 2px solid color-mix(in srgb, var(--color-background) 85%, #fff);
}

.faq-and-forms__form-note {
  margin: 0 0 var(--space-3);
  font-size: 0.9375rem;
  line-height: 2;
  color: var(--color-text-secondary);
}

.faq-and-forms__form-note--success {
  color: var(--color-success);
}

.faq-and-forms__form-note--error {
  color: color-mix(in srgb, #c62828 92%, var(--color-text-heading));
}

.faq-and-forms__fields {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.faq-and-forms__field {
  display: grid;
  gap: var(--space-2);
}

.faq-and-forms__input,
.faq-and-forms__select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background-color: color-mix(in srgb, #fff 92%, var(--color-background));
  padding: 12px var(--space-3);
  color: var(--color-text-heading);
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.75;
  text-align: right;
}

.faq-and-forms__input::placeholder {
  color: var(--color-text-secondary);
}

.faq-and-forms__select {
  color: var(--color-text-heading);
  cursor: pointer;
}

.faq-and-forms__select:invalid,
.faq-and-forms__select option[value=""] {
  color: var(--color-text-secondary);
}

.faq-and-forms__select-wrap {
  position: relative;
}

.faq-and-forms__select {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: calc(var(--space-5) + var(--space-2));
}

.faq-and-forms__select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-end: var(--space-3);
  width: 6px;
  height: 6px;
  /* بوردرهای فیزیکی تا شکل «رو به پایین» وابسته به RTL نشود */
  border-right: 2px solid var(--color-text-secondary);
  border-bottom: 2px solid var(--color-text-secondary);
  transform: translateY(-55%) rotate(45deg);
  pointer-events: none;
  opacity: 0.75;
}

.faq-and-forms__submit {
  width: 100%;
  margin-top: var(--space-2);
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.5;
  border: none;
  cursor: pointer;
}

/* اولویت بالاتر از .home__btn در home.css برای ارتفاع دکمهٔ فرم */
.faq-and-forms__form .faq-and-forms__submit.home__btn--primary {
  padding-block: 12px;
  padding-inline: var(--space-4);
}

@media (min-width: 992px) {
  .home__faq-and-forms__grid {
    gap: var(--space-5);
    grid-template-columns: minmax(0, 0.36fr) minmax(0, 0.64fr);
    align-items: start;
  }
}

/**
 * FAQ: آکاردئون
 */
.faq-and-forms__faq-header {
  margin-bottom: var(--space-4);
}

.faq-and-forms__faq-title {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--color-text-heading);
  text-align: right;
}

.faq-and-forms__accordion {
  display: grid;
  gap: var(--space-3);
}

.faq-and-forms__accordion-item {
  border: 2px solid var(--color-glass-stroke);
  background-color: var(--color-glass-bg);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}

.faq-and-forms__accordion-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--color-text-heading);
}

.faq-and-forms__accordion-summary::-webkit-details-marker {
  display: none;
}

.faq-and-forms__accordion-question {
  flex: 1;
  min-width: 0;
  text-align: right;
  line-height: 1.6;
}

.faq-and-forms__accordion-arrow {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
  color: var(--color-text-secondary);
  transition: transform 0.2s ease;
}

.faq-and-forms__accordion-arrow svg {
  display: block;
}

.faq-and-forms__accordion-answer-wrap {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
}

.faq-and-forms__accordion-answer {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 2;
  color: var(--color-text-secondary);
  text-align: right;
}

.faq-and-forms__accordion-answer > *:first-child {
  margin-top: 0;
}

.faq-and-forms__accordion-answer > *:last-child {
  margin-bottom: 0;
}

.faq-and-forms__accordion-answer img {
  max-width: 100%;
  height: auto;
}

.faq-and-forms__accordion-item[open] .faq-and-forms__accordion-arrow {
  transform: rotate(180deg);
}

/**
 * فرم: زمان تماس — پیلهٔ سفید روی نوار خاکستری روشن (طبق ماکت)
 */
.faq-and-forms__field--time {
  gap: var(--space-2);
}

.faq-and-forms__time-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text-heading);
  text-align: right;
}

.faq-and-forms__time-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background-color: color-mix(in srgb, var(--color-divider) 35%, var(--color-background));
}

.faq-and-forms__time-option {
  position: relative;
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-width: 0;
  cursor: pointer;
}

.faq-and-forms__time-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  pointer-events: auto;
}

.faq-and-forms__time-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 10px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.45;
  text-align: center;
  color: var(--color-text-secondary);
  background-color: transparent;
  border: 1px solid transparent;
  pointer-events: none;
}

.faq-and-forms__time-option input:checked + span {
  background-color: #fff;
  color: var(--color-text-heading);
  border-color: var(--color-divider);
}

.faq-and-forms__time-option input:focus-visible + span {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.faq-and-forms__honeypot {
  display: none;
}

/**
 * مسیر صفحه (تمپلیت breadcrumb.php) — هم‌عرض محتوای هدر؛ RTL: چسبیده به راست (inline-start)
 */
.netron-breadcrumb-wrap {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: 100%;
  margin-bottom: var(--space-3);
}

.netron-breadcrumb {
  width: 100%;
}

.netron-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.netron-breadcrumb__link {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.netron-breadcrumb__link:hover,
.netron-breadcrumb__link:focus-visible {
  color: var(--color-primary);
  outline: none;
}

.netron-breadcrumb__current {
  color: var(--color-text-body);
}

.netron-breadcrumb__sep {
  color: var(--color-text-secondary);
  opacity: 0.85;
  user-select: none;
}

/**
 * بردکرامب Yoast SEO — یکدست در همهٔ صفحات (#64748B = --color-text-secondary)
 */
.netron-breadcrumb-wrap--yoast,
.netron-breadcrumb-wrap--yoast .yoast-breadcrumb,
.netron-breadcrumb-wrap--yoast .netron-yoast-breadcrumb,
.netron-breadcrumb-wrap--yoast #breadcrumbs {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.netron-breadcrumb-wrap--yoast a,
.netron-breadcrumb-wrap--yoast a:visited,
.netron-breadcrumb-wrap--yoast span,
.netron-breadcrumb-wrap--yoast .breadcrumb_last,
.netron-breadcrumb-wrap--yoast b,
.netron-breadcrumb-wrap--yoast strong {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.netron-breadcrumb-wrap--yoast a:hover,
.netron-breadcrumb-wrap--yoast a:focus,
.netron-breadcrumb-wrap--yoast a:focus-visible {
  color: var(--color-text-secondary);
  text-decoration: none;
  outline: none;
}

/**
 * جداول محتوای ویرایشگر (بلوک جدول گوتنبرگ، جدول خام، کپی از Canvas / AI و …)
 * موبایل‌فرست: اسکرول افقی نرم، حفظ ساختار ستون‌ها، ظاهر یکدست با تم.
 */
:root {
  --netron-table-border: var(--color-divider);
  --netron-table-head-bg: color-mix(in srgb, var(--color-primary) 10%, var(--color-background));
  --netron-table-stripe: color-mix(in srgb, var(--color-divider) 45%, var(--color-background));
  --netron-table-surface: color-mix(in srgb, #fff 88%, var(--color-background));
  --netron-table-caption: var(--color-text-secondary);
  --netron-table-cell-pad-y: 0.55rem;
  --netron-table-cell-pad-x: 0.65rem;
}

@media (min-width: 768px) {
  :root {
    --netron-table-cell-pad-y: 0.65rem;
    --netron-table-cell-pad-x: 0.85rem;
  }
}

/* کانتینر اسکرول — figure بلوک جدول، جدول داخل گروه، جدول ریشه (بدون div.table-container؛ آن جداست) */
.entry-content figure.wp-block-table,
.entry-content > table,
.entry-content .wp-block-group > .wp-block-group__inner-container > table,
.entry-content .wp-block-group.is-layout-constrained > table,
.category-page__end-text-inner figure.wp-block-table,
.category-page__end-text-inner > table,
.faq-and-forms__accordion-answer figure.wp-block-table,
.faq-and-forms__accordion-answer > table {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin-block: var(--space-5);
  margin-inline: 0;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--netron-table-border);
  background-color: var(--netron-table-surface);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--color-text-heading) 6%, transparent);
}

/* div.table-container: فقط اسکرول افقی؛ بدون padding، قاب، گوشه‌گرد و سایه */
.entry-content .table-container,
.category-page__end-text-inner .table-container,
.faq-and-forms__accordion-answer .table-container {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin-block: var(--space-5);
  margin-inline: 0;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
  padding: 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
}

.entry-content figure.wp-block-table:first-child,
.entry-content > table:first-child,
.entry-content .table-container:first-child,
.entry-content .wp-block-group > .wp-block-group__inner-container > table:first-child,
.entry-content .wp-block-group.is-layout-constrained > table:first-child,
.category-page__end-text-inner figure.wp-block-table:first-child,
.category-page__end-text-inner > table:first-child,
.faq-and-forms__accordion-answer figure.wp-block-table:first-child,
.faq-and-forms__accordion-answer > table:first-child {
  margin-top: 0;
}

.entry-content figure.wp-block-table:last-child,
.entry-content > table:last-child,
.entry-content .table-container:last-child,
.entry-content .wp-block-group > .wp-block-group__inner-container > table:last-child,
.entry-content .wp-block-group.is-layout-constrained > table:last-child,
.category-page__end-text-inner figure.wp-block-table:last-child,
.category-page__end-text-inner > table:last-child,
.faq-and-forms__accordion-answer figure.wp-block-table:last-child,
.faq-and-forms__accordion-answer > table:last-child {
  margin-bottom: 0;
}

.entry-content figure.wp-block-table:focus-within,
.entry-content > table:focus-within,
.entry-content .table-container:focus-within,
.entry-content .wp-block-group > .wp-block-group__inner-container > table:focus-within,
.entry-content .wp-block-group.is-layout-constrained > table:focus-within,
.category-page__end-text-inner figure.wp-block-table:focus-within,
.category-page__end-text-inner > table:focus-within,
.faq-and-forms__accordion-answer figure.wp-block-table:focus-within,
.faq-and-forms__accordion-answer > table:focus-within {
  outline: 2px solid color-mix(in srgb, var(--color-primary) 45%, transparent);
  outline-offset: 2px;
}

/* جدول واقعی داخل کانتینر */
.entry-content figure.wp-block-table table,
.entry-content .table-container table,
.entry-content > table,
.entry-content .wp-block-group > .wp-block-group__inner-container > table,
.entry-content .wp-block-group.is-layout-constrained > table,
.category-page__end-text-inner figure.wp-block-table table,
.faq-and-forms__accordion-answer figure.wp-block-table table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--color-text-body);
  background-color: transparent;
}

@media (min-width: 768px) {
  .entry-content figure.wp-block-table table,
  .entry-content .table-container table,
  .entry-content > table,
  .entry-content .wp-block-group > .wp-block-group__inner-container > table,
  .entry-content .wp-block-group.is-layout-constrained > table,
  .category-page__end-text-inner figure.wp-block-table table,
  .faq-and-forms__accordion-answer figure.wp-block-table table {
    font-size: 0.9375rem;
    line-height: 1.6;
  }
}

.entry-content > table,
.entry-content .table-container table,
.entry-content .wp-block-group > .wp-block-group__inner-container > table,
.entry-content .wp-block-group.is-layout-constrained > table,
.category-page__end-text-inner > table,
.faq-and-forms__accordion-answer > table {
  display: table;
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--color-text-body);
  background-color: transparent;
}

@media (min-width: 768px) {
  .entry-content > table,
  .entry-content .table-container table,
  .entry-content .wp-block-group > .wp-block-group__inner-container > table,
  .entry-content .wp-block-group.is-layout-constrained > table,
  .category-page__end-text-inner > table,
  .faq-and-forms__accordion-answer > table {
    font-size: 0.9375rem;
    line-height: 1.6;
  }
}

.entry-content figure.wp-block-table figcaption,
.category-page__end-text-inner figure.wp-block-table figcaption,
.faq-and-forms__accordion-answer figure.wp-block-table figcaption {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: var(--space-3) var(--netron-table-cell-pad-x);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--netron-table-caption);
  text-align: center;
  caption-side: top;
  border-bottom: 1px solid var(--netron-table-border);
  background-color: color-mix(in srgb, var(--netron-table-surface) 92%, var(--color-text-heading));
}

.entry-content figure.wp-block-table table caption,
.category-page__end-text-inner figure.wp-block-table table caption,
.faq-and-forms__accordion-answer figure.wp-block-table table caption {
  caption-side: top;
  padding: var(--space-3) var(--netron-table-cell-pad-x);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-heading);
  text-align: center;
}

.entry-content table thead th,
.entry-content table thead td,
.category-page__end-text-inner table thead th,
.category-page__end-text-inner table thead td,
.faq-and-forms__accordion-answer table thead th,
.faq-and-forms__accordion-answer table thead td {
  background-color: var(--netron-table-head-bg);
  color: var(--color-text-heading);
  font-weight: 700;
  text-align: right;
  vertical-align: middle;
}

.entry-content table tbody th,
.category-page__end-text-inner table tbody th,
.faq-and-forms__accordion-answer table tbody th {
  background-color: color-mix(in srgb, var(--netron-table-head-bg) 55%, var(--netron-table-surface));
  font-weight: 600;
  text-align: right;
  vertical-align: middle;
}

.entry-content table th,
.entry-content table td,
.category-page__end-text-inner table th,
.category-page__end-text-inner table td,
.faq-and-forms__accordion-answer table th,
.faq-and-forms__accordion-answer table td {
  padding: var(--netron-table-cell-pad-y) var(--netron-table-cell-pad-x);
  border: 1px solid var(--netron-table-border);
  text-align: right;
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.entry-content table th[data-align="center"],
.entry-content table td[data-align="center"],
.entry-content table .has-text-align-center,
.category-page__end-text-inner table .has-text-align-center,
.faq-and-forms__accordion-answer table .has-text-align-center {
  text-align: center;
}

.entry-content table th[data-align="left"],
.entry-content table td[data-align="left"],
.entry-content table .has-text-align-left,
.category-page__end-text-inner table .has-text-align-left,
.faq-and-forms__accordion-answer table .has-text-align-left {
  text-align: left;
}

.entry-content table tbody tr:nth-child(even) td,
.entry-content table tbody tr:nth-child(even) th,
.category-page__end-text-inner table tbody tr:nth-child(even) td,
.category-page__end-text-inner table tbody tr:nth-child(even) th,
.faq-and-forms__accordion-answer table tbody tr:nth-child(even) td,
.faq-and-forms__accordion-answer table tbody tr:nth-child(even) th {
  background-color: color-mix(in srgb, var(--netron-table-stripe) 35%, transparent);
}

.entry-content figure.wp-block-table.is-style-stripes tbody tr:nth-child(odd) td,
.entry-content figure.wp-block-table.is-style-stripes tbody tr:nth-child(odd) th,
.category-page__end-text-inner figure.wp-block-table.is-style-stripes tbody tr:nth-child(odd) td,
.category-page__end-text-inner figure.wp-block-table.is-style-stripes tbody tr:nth-child(odd) th,
.faq-and-forms__accordion-answer figure.wp-block-table.is-style-stripes tbody tr:nth-child(odd) td,
.faq-and-forms__accordion-answer figure.wp-block-table.is-style-stripes tbody tr:nth-child(odd) th {
  background-color: color-mix(in srgb, var(--netron-table-stripe) 55%, var(--netron-table-surface));
}

.entry-content figure.wp-block-table.is-style-stripes tbody tr:nth-child(even) td,
.entry-content figure.wp-block-table.is-style-stripes tbody tr:nth-child(even) th,
.category-page__end-text-inner figure.wp-block-table.is-style-stripes tbody tr:nth-child(even) td,
.category-page__end-text-inner figure.wp-block-table.is-style-stripes tbody tr:nth-child(even) th,
.faq-and-forms__accordion-answer figure.wp-block-table.is-style-stripes tbody tr:nth-child(even) td,
.faq-and-forms__accordion-answer figure.wp-block-table.is-style-stripes tbody tr:nth-child(even) th {
  background-color: transparent;
}

.entry-content figure.wp-block-table table.has-fixed-layout,
.entry-content table.has-fixed-layout,
.category-page__end-text-inner figure.wp-block-table table.has-fixed-layout,
.category-page__end-text-inner table.has-fixed-layout,
.faq-and-forms__accordion-answer figure.wp-block-table table.has-fixed-layout,
.faq-and-forms__accordion-answer table.has-fixed-layout {
  table-layout: fixed;
}

.entry-content figure.wp-block-table a,
.entry-content table a,
.category-page__end-text-inner figure.wp-block-table a,
.category-page__end-text-inner table a,
.faq-and-forms__accordion-answer figure.wp-block-table a,
.faq-and-forms__accordion-answer table a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.entry-content figure.wp-block-table a:hover,
.entry-content table a:hover,
.category-page__end-text-inner figure.wp-block-table a:hover,
.category-page__end-text-inner table a:hover,
.faq-and-forms__accordion-answer figure.wp-block-table a:hover,
.faq-and-forms__accordion-answer table a:hover {
  opacity: 0.9;
}

.entry-content figure.wp-block-table img,
.entry-content table img,
.category-page__end-text-inner figure.wp-block-table img,
.category-page__end-text-inner table img,
.faq-and-forms__accordion-answer figure.wp-block-table img,
.faq-and-forms__accordion-answer table img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.entry-content figure.wp-block-table table table,
.entry-content table table,
.category-page__end-text-inner figure.wp-block-table table table,
.category-page__end-text-inner table table,
.faq-and-forms__accordion-answer figure.wp-block-table table table,
.faq-and-forms__accordion-answer table table {
  font-size: 0.92em;
}

.entry-content figure.wp-block-table col,
.entry-content table col,
.category-page__end-text-inner figure.wp-block-table col,
.category-page__end-text-inner table col,
.faq-and-forms__accordion-answer figure.wp-block-table col,
.faq-and-forms__accordion-answer table col {
  min-width: 2.5rem;
}

/**
 * بلوک «ستون‌ها» وقتی ۳+ ستون دارد (خروجی رایج AI به‌جای جدول واقعی) — شبکهٔ افقی با اسکرول.
 */
@supports selector(:has(a)) {
  .entry-content .wp-block-columns:has(> .wp-block-column:nth-child(3)) {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-block: var(--space-5);
    margin-inline: 0;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    align-content: stretch;
    gap: 1px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-gutter: stable;
    padding: var(--space-3) var(--space-2);
    border-radius: var(--radius-md);
    border: 1px solid var(--netron-table-border);
    background-color: var(--netron-table-border);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--color-text-heading) 6%, transparent);
  }

  .entry-content .wp-block-columns:has(> .wp-block-column:nth-child(3)):focus-within {
    outline: 2px solid color-mix(in srgb, var(--color-primary) 45%, transparent);
    outline-offset: 2px;
  }

  .entry-content .wp-block-columns:has(> .wp-block-column:nth-child(3)) > .wp-block-column {
    flex: 1 0 min(22%, 13.5rem);
    min-width: 11.5rem;
    max-width: 100%;
    box-sizing: border-box;
    background-color: var(--netron-table-surface);
    padding: var(--netron-table-cell-pad-y) var(--netron-table-cell-pad-x);
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--color-text-body);
    text-align: right;
  }

  @media (min-width: 768px) {
    .entry-content .wp-block-columns:has(> .wp-block-column:nth-child(3)) > .wp-block-column {
      font-size: 0.9375rem;
      line-height: 1.6;
    }
  }

  .entry-content .wp-block-columns:has(> .wp-block-column:nth-child(3)) > .wp-block-column > *:first-child {
    margin-top: 0;
  }

  .entry-content .wp-block-columns:has(> .wp-block-column:nth-child(3)) > .wp-block-column > *:last-child {
    margin-bottom: 0;
  }

  .entry-content .wp-block-columns:has(> .wp-block-column:nth-child(3)) > .wp-block-column p {
    margin-block: 0.4em;
  }

  .entry-content .wp-block-columns:has(> .wp-block-column:nth-child(3)) > .wp-block-column strong {
    color: var(--color-text-heading);
  }

  .entry-content .wp-block-columns:has(> .wp-block-column:nth-child(3)) > .wp-block-column a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 0.15em;
  }
}

/**
 * موبایل (≤۷۶۸px): اسکرول افقی + ستون اول چسبان (Sticky Column)
 * کانتینر: .table-container (فیلتر PHP) یا figure.wp-block-table (بلوک جدول)
 */
@media (max-width: 768px) {
  .entry-content .table-container,
  .entry-content figure.wp-block-table,
  .category-page__end-text-inner .table-container,
  .category-page__end-text-inner figure.wp-block-table,
  .faq-and-forms__accordion-answer .table-container,
  .faq-and-forms__accordion-answer figure.wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .entry-content .table-container th,
  .entry-content .table-container td,
  .entry-content figure.wp-block-table th,
  .entry-content figure.wp-block-table td,
  .category-page__end-text-inner .table-container th,
  .category-page__end-text-inner .table-container td,
  .category-page__end-text-inner figure.wp-block-table th,
  .category-page__end-text-inner figure.wp-block-table td,
  .faq-and-forms__accordion-answer .table-container th,
  .faq-and-forms__accordion-answer .table-container td,
  .faq-and-forms__accordion-answer figure.wp-block-table th,
  .faq-and-forms__accordion-answer figure.wp-block-table td {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: manual;
  }

  .entry-content .table-container thead th:first-child,
  .entry-content .table-container tbody td:first-child,
  .entry-content .table-container tbody th:first-child,
  .entry-content figure.wp-block-table thead th:first-child,
  .entry-content figure.wp-block-table tbody td:first-child,
  .entry-content figure.wp-block-table tbody th:first-child,
  .category-page__end-text-inner .table-container thead th:first-child,
  .category-page__end-text-inner .table-container tbody td:first-child,
  .category-page__end-text-inner .table-container tbody th:first-child,
  .category-page__end-text-inner figure.wp-block-table thead th:first-child,
  .category-page__end-text-inner figure.wp-block-table tbody td:first-child,
  .category-page__end-text-inner figure.wp-block-table tbody th:first-child,
  .faq-and-forms__accordion-answer .table-container thead th:first-child,
  .faq-and-forms__accordion-answer .table-container tbody td:first-child,
  .faq-and-forms__accordion-answer .table-container tbody th:first-child,
  .faq-and-forms__accordion-answer figure.wp-block-table thead th:first-child,
  .faq-and-forms__accordion-answer figure.wp-block-table tbody td:first-child,
  .faq-and-forms__accordion-answer figure.wp-block-table tbody th:first-child {
    position: sticky;
    inset-inline-start: 0;
    z-index: 2;
    box-shadow: -5px 0 10px -5px rgba(0, 0, 0, 0.1);
  }

  .entry-content .table-container thead th:first-child,
  .entry-content figure.wp-block-table thead th:first-child,
  .category-page__end-text-inner .table-container thead th:first-child,
  .category-page__end-text-inner figure.wp-block-table thead th:first-child,
  .faq-and-forms__accordion-answer .table-container thead th:first-child,
  .faq-and-forms__accordion-answer figure.wp-block-table thead th:first-child {
    background-color: var(--netron-table-head-bg);
    z-index: 3;
  }

  .entry-content .table-container tbody td:first-child,
  .entry-content .table-container tbody th:first-child,
  .entry-content figure.wp-block-table tbody td:first-child,
  .entry-content figure.wp-block-table tbody th:first-child,
  .category-page__end-text-inner .table-container tbody td:first-child,
  .category-page__end-text-inner .table-container tbody th:first-child,
  .category-page__end-text-inner figure.wp-block-table tbody td:first-child,
  .category-page__end-text-inner figure.wp-block-table tbody th:first-child,
  .faq-and-forms__accordion-answer .table-container tbody td:first-child,
  .faq-and-forms__accordion-answer .table-container tbody th:first-child,
  .faq-and-forms__accordion-answer figure.wp-block-table tbody td:first-child,
  .faq-and-forms__accordion-answer figure.wp-block-table tbody th:first-child {
    background-color: var(--netron-table-surface);
  }

  .entry-content .table-container tbody tr:nth-child(even) td:first-child,
  .entry-content .table-container tbody tr:nth-child(even) th:first-child,
  .entry-content figure.wp-block-table tbody tr:nth-child(even) td:first-child,
  .entry-content figure.wp-block-table tbody tr:nth-child(even) th:first-child,
  .category-page__end-text-inner .table-container tbody tr:nth-child(even) td:first-child,
  .category-page__end-text-inner .table-container tbody tr:nth-child(even) th:first-child,
  .category-page__end-text-inner figure.wp-block-table tbody tr:nth-child(even) td:first-child,
  .category-page__end-text-inner figure.wp-block-table tbody tr:nth-child(even) th:first-child,
  .faq-and-forms__accordion-answer .table-container tbody tr:nth-child(even) td:first-child,
  .faq-and-forms__accordion-answer .table-container tbody tr:nth-child(even) th:first-child,
  .faq-and-forms__accordion-answer figure.wp-block-table tbody tr:nth-child(even) td:first-child,
  .faq-and-forms__accordion-answer figure.wp-block-table tbody tr:nth-child(even) th:first-child {
    background-color: color-mix(in srgb, var(--netron-table-stripe) 35%, var(--netron-table-surface));
  }

  html[dir="ltr"] .entry-content .table-container thead th:first-child,
  html[dir="ltr"] .entry-content .table-container tbody td:first-child,
  html[dir="ltr"] .entry-content .table-container tbody th:first-child,
  html[dir="ltr"] .entry-content figure.wp-block-table thead th:first-child,
  html[dir="ltr"] .entry-content figure.wp-block-table tbody td:first-child,
  html[dir="ltr"] .entry-content figure.wp-block-table tbody th:first-child,
  html[dir="ltr"] .category-page__end-text-inner .table-container thead th:first-child,
  html[dir="ltr"] .category-page__end-text-inner .table-container tbody td:first-child,
  html[dir="ltr"] .category-page__end-text-inner .table-container tbody th:first-child,
  html[dir="ltr"] .category-page__end-text-inner figure.wp-block-table thead th:first-child,
  html[dir="ltr"] .category-page__end-text-inner figure.wp-block-table tbody td:first-child,
  html[dir="ltr"] .category-page__end-text-inner figure.wp-block-table tbody th:first-child,
  html[dir="ltr"] .faq-and-forms__accordion-answer .table-container thead th:first-child,
  html[dir="ltr"] .faq-and-forms__accordion-answer .table-container tbody td:first-child,
  html[dir="ltr"] .faq-and-forms__accordion-answer .table-container tbody th:first-child,
  html[dir="ltr"] .faq-and-forms__accordion-answer figure.wp-block-table thead th:first-child,
  html[dir="ltr"] .faq-and-forms__accordion-answer figure.wp-block-table tbody td:first-child,
  html[dir="ltr"] .faq-and-forms__accordion-answer figure.wp-block-table tbody th:first-child {
    box-shadow: 5px 0 10px -5px rgba(0, 0, 0, 0.1);
  }
}

/**
 * دسکتاپ (≥۷۶۹px): همان ستون اول چسبان؛ بدون nowrap تا متن در سلول‌ها بشکند.
 */
@media (min-width: 769px) {
  .entry-content .table-container thead th:first-child,
  .entry-content .table-container tbody td:first-child,
  .entry-content .table-container tbody th:first-child,
  .entry-content figure.wp-block-table thead th:first-child,
  .entry-content figure.wp-block-table tbody td:first-child,
  .entry-content figure.wp-block-table tbody th:first-child,
  .category-page__end-text-inner .table-container thead th:first-child,
  .category-page__end-text-inner .table-container tbody td:first-child,
  .category-page__end-text-inner .table-container tbody th:first-child,
  .category-page__end-text-inner figure.wp-block-table thead th:first-child,
  .category-page__end-text-inner figure.wp-block-table tbody td:first-child,
  .category-page__end-text-inner figure.wp-block-table tbody th:first-child,
  .faq-and-forms__accordion-answer .table-container thead th:first-child,
  .faq-and-forms__accordion-answer .table-container tbody td:first-child,
  .faq-and-forms__accordion-answer .table-container tbody th:first-child,
  .faq-and-forms__accordion-answer figure.wp-block-table thead th:first-child,
  .faq-and-forms__accordion-answer figure.wp-block-table tbody td:first-child,
  .faq-and-forms__accordion-answer figure.wp-block-table tbody th:first-child {
    position: sticky;
    inset-inline-start: 0;
    z-index: 2;
    box-shadow: -5px 0 10px -5px rgba(0, 0, 0, 0.1);
  }

  .entry-content .table-container thead th:first-child,
  .entry-content figure.wp-block-table thead th:first-child,
  .category-page__end-text-inner .table-container thead th:first-child,
  .category-page__end-text-inner figure.wp-block-table thead th:first-child,
  .faq-and-forms__accordion-answer .table-container thead th:first-child,
  .faq-and-forms__accordion-answer figure.wp-block-table thead th:first-child {
    background-color: var(--netron-table-head-bg);
    z-index: 3;
  }

  .entry-content .table-container tbody td:first-child,
  .entry-content .table-container tbody th:first-child,
  .entry-content figure.wp-block-table tbody td:first-child,
  .entry-content figure.wp-block-table tbody th:first-child,
  .category-page__end-text-inner .table-container tbody td:first-child,
  .category-page__end-text-inner .table-container tbody th:first-child,
  .category-page__end-text-inner figure.wp-block-table tbody td:first-child,
  .category-page__end-text-inner figure.wp-block-table tbody th:first-child,
  .faq-and-forms__accordion-answer .table-container tbody td:first-child,
  .faq-and-forms__accordion-answer .table-container tbody th:first-child,
  .faq-and-forms__accordion-answer figure.wp-block-table tbody td:first-child,
  .faq-and-forms__accordion-answer figure.wp-block-table tbody th:first-child {
    background-color: var(--netron-table-surface);
  }

  .entry-content .table-container tbody tr:nth-child(even) td:first-child,
  .entry-content .table-container tbody tr:nth-child(even) th:first-child,
  .entry-content figure.wp-block-table tbody tr:nth-child(even) td:first-child,
  .entry-content figure.wp-block-table tbody tr:nth-child(even) th:first-child,
  .category-page__end-text-inner .table-container tbody tr:nth-child(even) td:first-child,
  .category-page__end-text-inner .table-container tbody tr:nth-child(even) th:first-child,
  .category-page__end-text-inner figure.wp-block-table tbody tr:nth-child(even) td:first-child,
  .category-page__end-text-inner figure.wp-block-table tbody tr:nth-child(even) th:first-child,
  .faq-and-forms__accordion-answer .table-container tbody tr:nth-child(even) td:first-child,
  .faq-and-forms__accordion-answer .table-container tbody tr:nth-child(even) th:first-child,
  .faq-and-forms__accordion-answer figure.wp-block-table tbody tr:nth-child(even) td:first-child,
  .faq-and-forms__accordion-answer figure.wp-block-table tbody tr:nth-child(even) th:first-child {
    background-color: color-mix(in srgb, var(--netron-table-stripe) 35%, var(--netron-table-surface));
  }

  html[dir="ltr"] .entry-content .table-container thead th:first-child,
  html[dir="ltr"] .entry-content .table-container tbody td:first-child,
  html[dir="ltr"] .entry-content .table-container tbody th:first-child,
  html[dir="ltr"] .entry-content figure.wp-block-table thead th:first-child,
  html[dir="ltr"] .entry-content figure.wp-block-table tbody td:first-child,
  html[dir="ltr"] .entry-content figure.wp-block-table tbody th:first-child,
  html[dir="ltr"] .category-page__end-text-inner .table-container thead th:first-child,
  html[dir="ltr"] .category-page__end-text-inner .table-container tbody td:first-child,
  html[dir="ltr"] .category-page__end-text-inner .table-container tbody th:first-child,
  html[dir="ltr"] .category-page__end-text-inner figure.wp-block-table thead th:first-child,
  html[dir="ltr"] .category-page__end-text-inner figure.wp-block-table tbody td:first-child,
  html[dir="ltr"] .category-page__end-text-inner figure.wp-block-table tbody th:first-child,
  html[dir="ltr"] .faq-and-forms__accordion-answer .table-container thead th:first-child,
  html[dir="ltr"] .faq-and-forms__accordion-answer .table-container tbody td:first-child,
  html[dir="ltr"] .faq-and-forms__accordion-answer .table-container tbody th:first-child,
  html[dir="ltr"] .faq-and-forms__accordion-answer figure.wp-block-table thead th:first-child,
  html[dir="ltr"] .faq-and-forms__accordion-answer figure.wp-block-table tbody td:first-child,
  html[dir="ltr"] .faq-and-forms__accordion-answer figure.wp-block-table tbody th:first-child {
    box-shadow: 5px 0 10px -5px rgba(0, 0, 0, 0.1);
  }
}
