/* =====================================================
   MTB · Страница кластера (Cluster)
   Эталон: cluster-A.html (Кластер А «Самообраз»)

   Hero — паттерн .listing-hero из ДС (assets/listing.css).
   Карточки мишеней — .target-tile, карточки басен — .ftile.
   Здесь — только уникальные для страницы кластера паттерны:
   .cluster-section, .thematic-group, .cluster-nav.
   ===================================================== */

/* ---------- Sections ---------- */
.cluster-section {
  padding: 72px 0;
  background: var(--bg-cream);
}
.cluster-section--warm { background: var(--bg-warm); }
.cluster-section__body {
  max-width: 820px;
  margin: 56px auto 0 auto;
}
.cluster-section__lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.55;
  color: var(--accent);
  margin: 0 0 24px 0;
  text-wrap: pretty;
}
.cluster-section__body-text {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-dark);
  margin: 0;
  text-wrap: pretty;
}

/* Disabled state для .target-tile и .ftile в контексте страницы кластера.
   На corpus.html / targets.html эти карточки всегда активны;
   на cluster-A до шаблонизации многие ссылки ведут в "#". */
.cluster-section .tcard[href="#"],
.cluster-section .ftile[href="#"] {
  opacity: 0.55;
  cursor: not-allowed;
}
.cluster-section .tcard[href="#"]:hover,
.cluster-section .ftile[href="#"]:hover {
  border-color: var(--border);
  transform: none;
  box-shadow: none;
}

/* ---------- Раздел 03 — Тематические связки ---------- */
.thematic-groups {
  display: grid;
  gap: 32px;
  max-width: 820px;
  margin: 56px auto 0 auto;
}
.thematic-group {
  padding: 24px 32px;
  background: var(--surface);
  border-radius: 12px;
  border-left: 3px solid var(--accent);
}
.thematic-group__title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text-dark);
  margin: 0 0 8px 0;
}
.thematic-group__desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 16px 0;
}
.thematic-group__fables {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.thematic-fable {
  padding: 10px 16px;
  background: var(--bg-warm);
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  color: var(--text-dark);
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid transparent;
  transition: border-color 0.2s;
  min-width: 200px;
}
.thematic-fable:hover { border-color: var(--accent); }
.thematic-fable__head {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.thematic-fable__num {
  font-family: var(--font-number);
  font-weight: 700;
  color: var(--accent);
  font-size: 14px;
}
.thematic-fable__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-dark);
}
.thematic-fable__angle {
  font-size: 15px;
  color: var(--text-dark);
  line-height: 1.55;
  letter-spacing: 0.2px;
  margin-top: 2px;
}
.thematic-group__note {
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  text-wrap: pretty;
}

/* ---------- Раздел 05 — Навигация по кластерам ---------- */
.cluster-nav {
  padding: 48px 0;
  background: var(--bg-cream);
  border-top: 1px solid var(--border);
}
.cluster-nav__grid {
  display: flex;
  gap: 24px;
}
.cluster-nav__grid > * { flex: 1; }
.cluster-nav__grid--prev-only > * { max-width: 50%; }
.cluster-nav__grid--next-only { justify-content: flex-end; }
.cluster-nav__grid--next-only > * { max-width: 50%; }
.cluster-nav__item {
  padding: 24px 32px;
  background: var(--surface);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.cluster-nav__item:not(.cluster-nav__item--disabled):hover {
  border-color: var(--accent);
}
.cluster-nav__item--disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
.cluster-nav__item--next { text-align: right; }
.cluster-nav__dir {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cluster-nav__letter {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
  margin: 4px 0;
  letter-spacing: -2px;
}
.cluster-nav__title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--text-dark);
}

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .cluster-nav__grid { flex-direction: column; }
  .cluster-nav__item--next { text-align: left; }
  .cluster-nav__grid--prev-only > *,
  .cluster-nav__grid--next-only > * { max-width: 100%; }
}

@media (max-width: 640px) {
  .cluster-section { padding: 64px 0; }
  .thematic-fable { min-width: 100%; }
}

/* Mobile overflow fix — grid-3 в 1 колонку на узком (12.2.C) */
@media (max-width: 480px) {
  .grid-3 { grid-template-columns: 1fr; }
}
