/* أقسام دليل الحوار «الحوار ضوابطه الشرعية…» — تُعرض في صفحة «تدرّب» بعد «جرّب شكل التدريب».
   نصّ طويل يُقرأ، فالتخطيط تحريري: عنوان القسم ورقمه في عمود، والمحتوى في عمود
   أعرض بسطر لا يتجاوز ~70 حرفًا. الألوان والخطوط من متغيّرات style.css وحدها.
   لا ارتفاعات ثابتة: الإسبانية والبرتغالية أطول من العربية. */

.dlg-intro {
  padding-block: clamp(64px, 9vw, 112px) clamp(40px, 6vw, 72px);
  background: var(--surface);
}

.dlg-intro-inner {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.dlg-intro h2 {
  margin: 0 0 24px;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.35;
  text-wrap: balance;
}

.dlg-intro p {
  max-width: 68ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.95;
}

.dlg-intro .dlg-intro-lead {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: clamp(19px, 2.2vw, 22px);
  font-weight: 600;
  line-height: 1.8;
}

/* القسم: رقم وعنوان ومقدمة في عمود البداية، والمحتوى بجانبه. */
.dlg-section {
  padding-block: clamp(56px, 8vw, 96px);
  background: var(--surface);
  border-top: 1px solid var(--soft-line);
}

.dlg-section--canvas {
  background: var(--canvas);
  border-top-color: transparent;
}

.dlg-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.dlg-head {
  position: sticky;
  top: 104px;
}

.dlg-num {
  display: block;
  margin-bottom: 12px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.dlg-head h2 {
  margin: 0;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 700;
  line-height: 1.45;
  text-wrap: balance;
}

.dlg-head p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.9;
}

.dlg-body {
  min-width: 0;
  max-width: 780px;
}

.dlg-subhead {
  margin: 0 0 18px;
  color: var(--brand);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.6;
}

.dlg-body > .dlg-subhead:not(:first-child) {
  margin-top: 48px;
}

.dlg-lead {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.9;
}

/* كتلة نصّ مؤطّرة: لون الخلفية يعاكس لون القسم حتى تنفصل عنه. */
.dlg-block {
  padding: clamp(20px, 2.5vw, 28px);
  background: var(--canvas);
  border-radius: var(--radius-md);
}

.dlg-section--canvas .dlg-block {
  background: var(--surface);
}

.dlg-block h3,
.dlg-block h4 {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.6;
}

.dlg-block p {
  margin: 0;
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.9;
}

.dlg-block .dlg-note {
  margin-top: 14px;
  padding-top: 14px;
  color: var(--muted-brand);
  border-top: 1px solid var(--line);
}

/* تعريفان: لغة واصطلاح. */
.dlg-defs {
  display: grid;
  gap: 16px;
  margin: 0;
}

.dlg-defs > div {
  display: grid;
  margin: 0;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}

.dlg-defs > div:first-child {
  border-top: 1px solid var(--line);
}

.dlg-defs dt {
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.9;
}

.dlg-defs dd {
  margin: 0;
  font-weight: 400;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.95;
}

.dlg-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* جدول الفروق. */
.dlg-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 1.75;
}

.dlg-table th,
.dlg-table td {
  padding: 16px 18px;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.dlg-table tbody tr:last-child > * {
  border-bottom: 0;
}

.dlg-table thead th {
  color: var(--surface);
  background: var(--brand);
  font-size: 14px;
  font-weight: 600;
}

.dlg-table tbody th {
  color: var(--brand);
  font-weight: 700;
  white-space: nowrap;
}

.dlg-table td {
  color: var(--ink);
}

/* أنماط المحاورين: أربع كتل في شبكة. */
.dlg-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: none;
}

.dlg-types dl {
  margin: 0;
}

.dlg-types dt {
  margin-top: 14px;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 700;
}

.dlg-types dt:first-child {
  margin-top: 4px;
}

.dlg-types dd {
  margin: 4px 0 0;
  font-weight: 400;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.85;
}

/* المجموعات والقوائم. */
.dlg-groups {
  display: grid;
  gap: 40px;
}

.dlg-group h3 {
  margin: 0 0 16px;
  color: var(--brand);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
}

.dlg-group--common {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.dlg-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: dlg;
}

.dlg-list li {
  position: relative;
  padding-inline-start: 22px;
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.9;
}

.dlg-list li::before {
  position: absolute;
  top: 0.8em;
  inset-inline-start: 0;
  width: 7px;
  height: 7px;
  content: "";
  background: var(--gold);
  border-radius: 50%;
}

.dlg-list b {
  display: block;
  color: var(--brand);
  font-weight: 700;
}

.dlg-list--numbered li {
  padding-inline-start: 44px;
  counter-increment: dlg;
}

.dlg-list--numbered li::before {
  top: 0.15em;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  content: counter(dlg);
  color: var(--brand);
  background: var(--canvas);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.dlg-section--canvas .dlg-list--numbered li::before {
  background: var(--surface);
}

.dlg-list--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 32px;
}

/* الوصايا الختامية على لوحة بلون الهوية. */
.dlg-closing {
  padding-block: 24px clamp(56px, 8vw, 96px);
  background: var(--surface);
}

.dlg-closing-panel {
  padding: clamp(32px, 6vw, 72px);
  color: var(--surface);
  background: var(--brand);
  border-radius: 32px;
}

.dlg-closing-panel .dlg-num {
  color: var(--gold-bright);
}

.dlg-closing-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.4;
}

.dlg-closing-text {
  max-width: 68ch;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  line-height: 1.95;
}

.dlg-closing-panel h3 {
  margin: 36px 0 20px;
  color: var(--gold-bright);
  font-size: 16px;
  font-weight: 700;
}

.dlg-closing-panel .dlg-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dlg-closing-panel .dlg-list li {
  color: rgba(255, 255, 255, 0.82);
}

.dlg-closing-panel .dlg-list b {
  color: var(--surface);
}

.dlg-closing-panel .dlg-list--numbered li::before {
  color: var(--brand);
  background: var(--gold-bright);
  border-color: transparent;
}

@media (max-width: 991.98px) {
  .dlg-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .dlg-head {
    position: static;
  }

  .dlg-body {
    max-width: none;
  }

  .dlg-closing-panel .dlg-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767.98px) {
  .dlg-pair,
  .dlg-types,
  .dlg-list--grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dlg-defs > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  /* الجدول بطاقات: كل صفّ كتلة، وتسمية العمود فوق كل خلية. */
  .dlg-table,
  .dlg-table tbody,
  .dlg-table tr,
  .dlg-table th,
  .dlg-table td {
    display: block;
  }

  .dlg-table {
    overflow: visible;
    background: transparent;
    border: 0;
  }

  .dlg-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .dlg-table tbody {
    display: grid;
    gap: 14px;
  }

  .dlg-table tr {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
  }

  .dlg-table tbody th {
    color: var(--surface);
    background: var(--brand);
    white-space: normal;
  }

  .dlg-table td::before {
    display: block;
    content: attr(data-label);
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
  }

  .dlg-table tbody tr:last-child > * {
    border-bottom: 1px solid var(--line);
  }

  .dlg-table tr > :last-child {
    border-bottom: 0 !important;
  }
}
