/* ===== CKEditor Rich Text (scoped) ===== */
.rt-content {
  --rt-fg: rgba(255,255,255,.88);
  --rt-fg-soft: rgba(255,255,255,.70);
  --rt-muted: rgba(255,255,255,.55);
  --rt-border: rgba(255,255,255,.12);
  --rt-accent: #b1e346;

  color: var(--rt-fg);
  line-height: 1.9;
  font-size: 1.05rem;
  word-wrap: break-word;
}
.rt-content * { max-width: 100%; }

/* Headings */
.rt-content h1,.rt-content h2,.rt-content h3,
.rt-content h4,.rt-content h5,.rt-content h6{
  color: #fff;
  font-weight: 800;
  line-height: 1.35;
  margin: 1.2em 0 .6em;
}
.rt-content h1{ font-size: 2rem; }
.rt-content h2{ font-size: 1.7rem; }
.rt-content h3{ font-size: 1.4rem; }
.rt-content h4{ font-size: 1.2rem; }
.rt-content h5{ font-size: 1.1rem; }
.rt-content h6{ font-size: 1rem; color: var(--rt-fg-soft); }

/* Paragraph & links */
.rt-content p{ margin: .85em 0; color: var(--rt-fg); }
.rt-content a{ color: var(--rt-accent); text-decoration: none; }
.rt-content a:hover{ text-decoration: underline; }

/* Lists */
.rt-content ul, .rt-content ol { margin: .8em 1.2em .8em 1.2em; }
.rt-content ul{ list-style: disc; }
.rt-content ol{ list-style: decimal; }
.rt-content ul ul{ list-style: circle; }
.rt-content ol ol{ list-style: lower-alpha; }
.rt-content li{ margin: .35em 0; }
.rt-content li::marker{ color: var(--rt-accent); }

/* Blockquote */
.rt-content blockquote{
  margin: 1.2em 0; padding: 1rem 1.2rem;
  border-right: 3px solid var(--rt-accent); /* RTL */
  background: rgba(255,255,255,.04);
  border-radius: 14px;
  color: var(--rt-fg);
}

/* Code & Pre */
.rt-content code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background: rgba(255,255,255,.08);
  padding: .12rem .35rem;
  border-radius: .45rem;
  border: 1px solid var(--rt-border);
  color: #E9F7C9;
}
.rt-content pre{
  overflow-x: auto; margin: 1em 0; padding: 1rem 1.2rem;
  background: rgba(0,0,0,.35);
  border: 1px solid var(--rt-border);
  border-radius: 14px;
}
.rt-content pre code{
  background: transparent; border: 0; padding: 0; color: #E9F7C9;
}

/* Horizontal rule */
.rt-content hr{
  border: 0; height: 1px; background: var(--rt-border);
  margin: 1.5rem 0;
}

/* Images & Figures (CKEditor image plugin) */
.rt-content figure{ margin: 1.2em auto; }
.rt-content figure.image img{
  display: block; height: auto; border-radius: 16px;
  border: 1px solid var(--rt-border);
  background: rgba(255,255,255,.03);
}
.rt-content figure.image figcaption{
  text-align: center; font-size: .9rem; color: var(--rt-muted);
  margin-top: .5rem;
}
/* alignment classes from CKEditor */
.rt-content .image-style-align-left{ float: left; margin: .3rem .9rem .5rem 0; }
.rt-content .image-style-align-right{ float: right; margin: .3rem 0 .5rem .9rem; }
.rt-content .image-style-align-center{ margin-left: auto; margin-right: auto; text-align: center; }
.rt-content .image_resized{ max-width: 100% !important; height: auto; }

/* Iframes / media embeds */
.rt-content .media, .rt-content iframe{
  display: block; max-width: 100%; width: 100%;
  aspect-ratio: 16 / 9; border: 1px solid var(--rt-border);
  border-radius: 16px; background: rgba(255,255,255,.03);
}

/* Tables (CKEditor table plugin) */
.rt-content .table{ overflow-x: auto; }
.rt-content table{
  width: 100%; border-collapse: collapse; border-spacing: 0;
  margin: 1rem 0; background: rgba(255,255,255,.03);
  border: 1px solid var(--rt-border);
  border-radius: 14px; overflow: hidden;
}
.rt-content thead th{
  background: rgba(177,227,70,.10);
  color: #fff; font-weight: 700; text-align: right;
  border-bottom: 1px solid var(--rt-border);
}
.rt-content th, .rt-content td{
  padding: .75rem .9rem; vertical-align: middle;
  border-bottom: 1px solid var(--rt-border);
}
.rt-content tbody tr:last-child td{ border-bottom: 0; }
.rt-content tbody tr:hover{ background: rgba(255,255,255,.04); }
.rt-content caption{ caption-side: bottom; color: var(--rt-muted); padding: .5rem; }

/* Text alignment (CKEditor classes) */
.rt-content .text-left{ text-align: left; }
.rt-content .text-right{ text-align: right; }
.rt-content .text-center{ text-align: center; }

/* Callouts / info boxes (اختیاری اگر در ادیتور تمپلیت سازی کرده‌ای) */
.rt-content .callout{
  border: 1px solid var(--rt-border); border-right: 3px solid var(--rt-accent);
  background: rgba(255,255,255,.04); border-radius: 14px; padding: .9rem 1rem;
}
.rt-content .callout .title{ font-weight: 700; color: #fff; margin-bottom: .35rem; }

/* Lists inside callouts/tables spacing */
.rt-content td ul, .rt-content td ol{ margin: .5em 1.2em; }

/* Clear floats after images */
.rt-content::after{ content: \"\"; display: block; clear: both; }

/* Small screens tweaks */
@media (max-width: 480px){
  .rt-content{ font-size: 1rem; }
  .rt-content table{ font-size: .95rem; }
}