/* قالب مقاله — تم پزشکی، ۸۰٪ محتوا + ۲۰٪ فرم چسبان */

body.mycell-article-page {
  --art-n: #16254c;
  --art-c: #85d3e6;
  --art-n-deep: #0f1a36;
  --art-muted: rgba(22, 37, 76, 0.62);
  --art-soft: rgba(133, 211, 230, 0.14);
  --art-radius: 18px;
  --art-sticky-top: calc(var(--mycell-header-h, 72px) + 0.75rem);
  --art-layout-pad-top: clamp(1.25rem, 3vw, 2rem);
}

body.mycell-article-page #content.mycell-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* ── هیرو مقاله — هم‌سبک mycell-svc-hero در برگه‌های سرویس ── */
.mycell-article-hero-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 0 clamp(1rem, 2.5vw, 1.5rem);
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 3vw, 2rem);
  background: linear-gradient(135deg, #000037 0%, #000852 100%);
  color: #fff;
  box-sizing: border-box;
}

.mycell-article-hero-banner__title {
  margin: 0;
  max-width: 28ch;
  margin-inline: auto;
  color: #fff;
  font-size: clamp(1.55rem, 3.8vw, 2rem);
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
}

/* ── چیدمان دو ستونه ── */
.mycell-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(220px, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: start;
  width: min(100% - 2rem, 1400px);
  margin: 0 auto;
  padding: var(--art-layout-pad-top, clamp(1.25rem, 3vw, 2rem)) 1rem 3.5rem;
  direction: rtl;
}

.mycell-article-main {
  min-width: 0;
}

.mycell-article-sidebar {
  min-width: 0;
  align-self: start;
  position: relative;
}

@media (min-width: 992px) {
  .mycell-article-layout {
    --art-layout-pad-top: clamp(1.25rem, 3vw, 2rem);
  }

  /* شروع فرم هم‌تراز با پایین هیروی سورمه‌ای */
  .mycell-article-sidebar {
    margin-top: calc(-1 * var(--art-layout-pad-top));
  }

  .mycell-article-form-sticky.is-pinned {
    position: fixed;
    top: var(--art-sticky-top);
    left: var(--mycell-form-left, auto);
    width: var(--mycell-form-width, 100%);
    z-index: 999;
    max-height: calc(100vh - var(--art-sticky-top) - 1rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .mycell-article-form-sticky.is-pinned.is-unpinned {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: none;
  }
}

@media (max-width: 991px) {
  .mycell-article-form-sticky {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    z-index: 1;
    max-height: none;
  }

  .mycell-article-layout {
    grid-template-columns: 1fr;
  }

  .mycell-article-sidebar {
    order: -1;
  }
}

/* ── تصویر شاخص (نسبت اصلی حفظ می‌شود — بدون crop) ── */
.mycell-article-featured {
  margin: 0 0 1.75rem;
  padding: 0;
  border-radius: var(--art-radius);
  overflow: hidden;
  border: 1px solid rgba(22, 37, 76, 0.1);
  background: linear-gradient(180deg, #f8fbfd 0%, #fff 100%);
  box-shadow: 0 8px 32px rgba(22, 37, 76, 0.07);
}

.mycell-article-featured__img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

/* ── فهرست مطالب ── */
.mycell-article-toc {
  margin: 0 0 1.75rem;
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: var(--art-radius);
  border: 1px solid rgba(22, 37, 76, 0.1);
  background:
    linear-gradient(135deg, rgba(133, 211, 230, 0.12) 0%, rgba(255, 255, 255, 0.96) 55%),
    #fff;
  box-shadow: 0 8px 32px rgba(22, 37, 76, 0.06);
}

.mycell-article-toc__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.mycell-article-toc__icon {
  color: var(--art-n);
  flex-shrink: 0;
}

.mycell-article-toc__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--art-n);
}

.mycell-article-toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.mycell-article-toc__list li {
  margin: 0;
  padding: 0;
}

.mycell-article-toc__list li + li {
  margin-top: 0.35rem;
}

.mycell-article-toc__list a {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.42rem 0.55rem;
  border-radius: 10px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--art-muted);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.mycell-article-toc__list a::before {
  counter-increment: toc;
  content: counter(toc, decimal-leading-zero);
  flex-shrink: 0;
  min-width: 1.6rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--art-c);
  background: var(--art-soft);
  border-radius: 6px;
  text-align: center;
  padding: 0.12rem 0.25rem;
}

.mycell-article-toc__list a:hover,
.mycell-article-toc__list a.is-active {
  background: var(--art-soft);
  color: var(--art-n);
}

.mycell-article-toc__list .mycell-article-toc__item--h3 a {
  padding-right: 1.35rem;
  font-size: 0.82rem;
}

.mycell-article-toc__list .mycell-article-toc__item--h3 a::before {
  content: "›";
  counter-increment: none;
  min-width: auto;
  background: transparent;
  color: var(--art-c);
  font-size: 0.9rem;
}

/* ── محتوای مقاله ── */
.mycell-article-content {
  font-size: 1rem;
  line-height: 1.9;
  color: rgba(22, 37, 76, 0.9);
}

.mycell-article-content > *:first-child {
  margin-top: 0;
}

.mycell-article-content p {
  margin: 0 0 1.1rem;
}

.mycell-article-content h2,
.mycell-article-content h3 {
  scroll-margin-top: calc(var(--mycell-header-h, 72px) + 1.25rem);
  color: var(--art-n);
  font-weight: 800;
  line-height: 1.4;
}

.mycell-article-content h2 {
  margin: 2rem 0 0.85rem;
  padding-bottom: 0.45rem;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  border-bottom: 2px solid rgba(133, 211, 230, 0.45);
}

.mycell-article-content h3 {
  margin: 1.35rem 0 0.65rem;
  font-size: 1.05rem;
}

.mycell-article-content ul,
.mycell-article-content ol {
  margin: 0 0 1.1rem;
  padding-right: 1.25rem;
}

.mycell-article-content li {
  margin-bottom: 0.35rem;
}

.mycell-article-content a {
  color: var(--art-n);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(133, 211, 230, 0.85);
  text-underline-offset: 3px;
}

.mycell-article-content a:hover {
  text-decoration-color: var(--art-c);
}

.mycell-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 1rem 0;
}

.mycell-article-content blockquote {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border-right: 4px solid var(--art-c);
  border-radius: 0 12px 12px 0;
  background: var(--art-soft);
  color: var(--art-n);
  font-weight: 600;
}

/* ── فرم مشاوره ── */
.mycell-article-form-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(22, 37, 76, 0.1);
  border-radius: var(--art-radius);
  padding: 1.45rem 1.2rem 1.55rem;
  box-shadow: 0 14px 44px rgba(22, 37, 76, 0.1);
  overflow: hidden;
}

.mycell-article-form-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--art-c), var(--art-n));
}

.mycell-article-form-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  color: var(--art-n);
  background: var(--art-soft);
}

.mycell-article-form-card__title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--art-n);
  line-height: 1.35;
}

.mycell-article-form-card__sub {
  margin: 0 0 1.1rem;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--art-muted);
}

.mycell-article-form__field {
  display: block;
  margin-bottom: 0.85rem;
}

.mycell-article-form__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--art-n);
}

.mycell-article-form__input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(22, 37, 76, 0.16);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--art-n);
  background: #f8fbfd;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mycell-article-form__input:focus {
  outline: none;
  border-color: var(--art-c);
  box-shadow: 0 0 0 3px rgba(133, 211, 230, 0.35);
}

.mycell-article-form__submit {
  width: 100%;
  margin-top: 0.25rem;
  border: 0;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--art-n) 0%, var(--art-n-deep) 100%);
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.mycell-article-form__submit:hover {
  opacity: 0.92;
}

.mycell-article-form__submit:active {
  transform: scale(0.98);
}

.mycell-article-form__note {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--art-muted);
}

.mycell-article-form__note.is-success {
  color: #0a6b4a;
}

.mycell-article-form__note.is-error {
  color: #b42318;
}

@media (prefers-reduced-motion: reduce) {
  .mycell-article-form__submit {
    transition: none;
  }
}

/* ── Elementor داخل ستون بدنه (۸۰٪) — مثل صفحه سرویس ── */
body.mycell-article-page .mycell-article-main .elementor {
  width: 100%;
  max-width: 100%;
}

body.mycell-article-page .mycell-article-main .e-con.e-parent,
body.mycell-article-page .mycell-article-main .elementor-section {
  width: 100% !important;
  max-width: 100% !important;
}

/* جلوگیری از شکستن چیدمان با سکشن‌های کشیده */
body.mycell-article-page .mycell-article-main .elementor-section.elementor-section-stretched {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.mycell-article-page .mycell-article-content--elementor > .elementor {
  width: 100%;
}

body.mycell-article-page .mycell-article-main .elementor-widget-text-editor p {
  margin: 0 0 1.1rem;
  line-height: 1.9;
  color: rgba(22, 37, 76, 0.9);
}

body.mycell-article-page .mycell-article-main .elementor-widget-text-editor a {
  color: var(--art-n);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(133, 211, 230, 0.85);
  text-underline-offset: 3px;
}

body.mycell-article-page .mycell-article-main .elementor-widget-text-editor a:hover {
  text-decoration-color: var(--art-c);
}

body.mycell-article-page .mycell-article-main .elementor-widget-heading .elementor-heading-title {
  scroll-margin-top: calc(var(--mycell-header-h, 72px) + 1.25rem);
  color: var(--art-n);
  font-weight: 800;
  line-height: 1.4;
}

body.mycell-article-page .mycell-article-main .elementor-widget-heading h2.elementor-heading-title {
  margin: 2rem 0 0.85rem;
  padding-bottom: 0.45rem;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  border-bottom: 2px solid rgba(133, 211, 230, 0.45);
}

body.mycell-article-page .mycell-article-main .elementor-widget-heading h3.elementor-heading-title {
  margin: 1.35rem 0 0.65rem;
  font-size: 1.05rem;
}

body.mycell-article-page .mycell-article-main .elementor-widget-image img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}
