/* ==========================================================================
   editorial.css — پایه‌ی مشترک صفحات ادیتوریال عریض
   (/phase-guide, /magazine, /about و راهنماهای فاز)
   ========================================================================== */

.editorial-hero {
  padding: 20px 16px;
  border-radius: var(--r-hero);
  background: linear-gradient(165deg, #fffdf8, #f5ebd9);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.editorial-hero h1 {
  font-size: 24px;
  line-height: 1.55;
  margin-bottom: 8px;
}

.editorial-hero p {
  font-size: 13.5px;
  line-height: 2;
  max-width: 66ch;
  color: var(--sadaf-muted);
}

/* مسیر راهنما */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--sadaf-muted);
  margin-bottom: 10px;
}

.breadcrumb a { color: var(--sadaf-gold); font-weight: 700; }
.breadcrumb i { font-style: normal; opacity: .6; }

/* فصل / بخش ادیتوریال — پریمیتیو .chapter در components.css تعریف شده است. */

/* شبکه‌ی کارت‌ها */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

/* جدول مقایسه */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.compare-table caption {
  caption-side: top;
  text-align: start;
  font-size: 12px;
  color: var(--sadaf-muted);
  padding-bottom: 8px;
}

.compare-table th,
.compare-table td {
  padding: 9px 8px;
  text-align: start;
  border-bottom: 1px solid var(--sadaf-line);
  vertical-align: top;
}

.compare-table thead th {
  background: #fbf6ec;
  font-weight: 800;
  color: var(--sadaf-text);
  white-space: nowrap;
}

.compare-table tbody th {
  font-weight: 700;
  color: var(--sadaf-text);
  white-space: nowrap;
}

.compare-table td { color: var(--sadaf-muted); line-height: 1.85; }

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* آکاردئون پرسش‌های رایج */
.faq-list {
  display: grid;
  gap: 7px;
}

.faq-item {
  border: 1px solid var(--sadaf-line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 13px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--sadaf-text);
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "⌄";
  font-size: 15px;
  color: var(--sadaf-muted);
  transition: transform var(--t-base);
  flex: none;
}

.faq-item[open] summary::after { transform: rotate(180deg); }

.faq-item .faq-body {
  padding: 0 13px 13px;
  font-size: 12.5px;
  line-height: 2.05;
  color: var(--sadaf-muted);
}

/* CTA پایانی ادیتوریال */
.editorial-cta {
  padding: 18px 16px;
  border-radius: var(--r-cta);
  background: linear-gradient(165deg, #fffdf8, #f6ecdb);
  box-shadow: var(--shadow);
  text-align: center;
  margin-bottom: 12px;
}

.editorial-cta h2 {
  font-size: 17px;
  margin-bottom: 7px;
}

.editorial-cta p {
  font-size: 12.5px;
  line-height: 2;
  margin-bottom: 13px;
}

.editorial-cta .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* فهرست سریع */
.toc {
  padding: 14px 13px;
  border-radius: var(--r-card-lg);
  background: #fbf6ec;
  border: 1px solid var(--sadaf-line);
  margin-bottom: 12px;
}

.toc h2 {
  font-size: 14px;
  margin-bottom: 9px;
}

.toc ol {
  padding-inline-start: 18px;
  display: grid;
  gap: 5px;
}

.toc a {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sadaf-text);
  line-height: 1.9;
}

.toc a:hover { color: var(--sadaf-gold); }

/* کارت پیوند مرتبط */
.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.related-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--sadaf-line);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: var(--sadaf-text);
  transition: background var(--t-fast), border-color var(--t-fast);
}

.related-links a:hover {
  background: #fdf6e8;
  border-color: rgba(184, 137, 59, .45);
}

.related-links a i { font-style: normal; color: var(--sadaf-muted); }

/* ---------- کارت کوچک (استفاده در همه‌ی صفحات ادیتوریال) ---------- */
.mini-card {
  display: flex;
  flex-direction: column;
  padding: 13px 12px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid var(--sadaf-line);
}

.mini-card h3 {
  font-size: 13.5px;
  margin-bottom: 6px;
  line-height: 1.7;
}

.mini-card p {
  font-size: 12px;
  line-height: 2;
  margin-bottom: 9px;
  flex: 1;
}

.mini-card ul {
  padding-inline-start: 16px;
  font-size: 12px;
  line-height: 2;
  color: var(--sadaf-muted);
  margin: 0;
}

.mini-card a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--sadaf-gold);
  min-height: 32px;
}

.mini-card a i { font-style: normal; }

.mini-card--good { border-color: rgba(76, 140, 74, .3); background: #f7fbf6; }
.mini-card--warn { border-color: rgba(184, 137, 59, .35); background: #fdfaf3; }

/* ---------- آماره کوچک ---------- */
.pg-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pg-stat {
  padding: 11px 10px;
  border-radius: 13px;
  background: #fbf6ec;
  border: 1px solid var(--sadaf-line);
}

.pg-stat span {
  display: block;
  font-size: 10.5px;
  color: var(--sadaf-muted);
  margin-bottom: 3px;
}

.pg-stat strong {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--sadaf-text);
  line-height: 1.7;
}

/* ---------- چک‌لیست ---------- */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: cl;
  display: grid;
  gap: 9px;
}

.checklist li {
  position: relative;
  padding: 11px 12px 11px 44px;
  padding-inline-start: 44px;
  padding-inline-end: 12px;
  border-radius: 13px;
  background: #fbf6ec;
  border: 1px solid var(--sadaf-line);
  font-size: 12.5px;
  line-height: 2;
  color: var(--sadaf-muted);
  counter-increment: cl;
}

.checklist li::before {
  content: counter(cl);
  position: absolute;
  inset-inline-start: 12px;
  top: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sadaf-gold);
  color: #fffdf8;
  font-size: 11px;
  font-weight: 800;
}

.checklist strong { color: var(--sadaf-text); }

/* ---------- گرید چندستونه در عرض‌های بزرگ ---------- */
@media (min-width: 700px) {
  .pg-stat-grid { grid-template-columns: repeat(4, 1fr); }
  .editorial-hero { padding: 28px 24px; }
  .editorial-hero h1 { font-size: 30px; }
  .chapter { padding: 20px 20px; }
  .chapter > h2 { font-size: 20px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

@media (min-width: 901px) {
  .editorial-hero h1 { font-size: 34px; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}
