/* ==========================================================================
   ДЛЯ УЧИТЕЛЕЙ – книги и методические ресурсы (page-dlya-uchitelej.php)

   Страницы нет в макете: контент пришёл HTML-файлом от заказчика
   (2026-08-20). Вёрстка собрана из приёмов существующих страниц:
   хиро – синяя полоса с кольцами как у «Полезных ресурсов» (page-
   poleznye-resursy.css), карточки – плашки --color-bg-soft / radius-xl
   как .res-card. Никаких новых цветов и кеглей – только токены
   variables.css.
   ========================================================================== */

/* Полоса вокруг серой пилюли шапки – в цвет хиро (как на других страницах
   с цветным верхом). */
.site-header:has(+ .site-main .tch-hero) {
  background: var(--color-brand);
}

/* --- Хиро ----------------------------------------------------------------- */

.tch-hero {
  position: relative;
  overflow: hidden;                 /* кольца выходят за секцию */

  /* Под шапку, как остальные цветные хиро (замер --header-h в main.js). */
  margin-top: calc(-1 * var(--header-h));
  padding: calc(var(--header-h) + var(--space-48)) var(--side-padding) var(--space-64);

  background: var(--color-brand);
  color: var(--color-text-invert);
}

.tch-hero__rings { position: absolute; inset: 0; pointer-events: none; }

.tch-hero__ring {
  position: absolute;
  right: -280px;
  bottom: -300px;
  border: 1.5px solid rgba(255, 255, 255, .35);
  border-radius: var(--radius-pill);
}

.tch-hero__ring--1 { width: 781px; height: 781px; }
.tch-hero__ring--2 { width: 650px; height: 650px; right: -215px; bottom: -235px; }
.tch-hero__ring--3 { width: 520px; height: 520px; right: -150px; bottom: -170px; }

.tch-hero__inner {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: flex-end;
  gap: var(--space-48);

  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: calc(96px - var(--side-padding));
}

.tch-hero__texts { flex: 1 1 auto; max-width: 1000px; }

.tch-eyebrow {
  margin-bottom: var(--space-16);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tch-hero__title {
  margin-bottom: var(--space-24);
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  font-weight: var(--fw-display);
  letter-spacing: var(--ls-display);
}

.tch-hero__lead {
  max-width: 760px;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  opacity: .85;
}

.tch-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-top: var(--space-24);
  list-style: none;
  padding: 0;
}

.tch-hero__tags li {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  line-height: 1.2;
  font-weight: 500;
}

/* Боковая плашка «6 книг…» – белая карточка на синем. */
.tch-hero__aside {
  flex: 0 0 360px;
  padding: var(--space-24);
  background: var(--color-bg);
  border-radius: var(--radius-xl);
  color: var(--color-text);
}

.tch-hero__count {
  margin-bottom: var(--space-12);
  font-size: 54px;
  line-height: 1;
  font-weight: var(--fw-display);
  letter-spacing: -0.05em;
  color: var(--color-brand);
}

.tch-hero__note {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  letter-spacing: var(--ls-small);
  opacity: .7;
}

/* --- Секции --------------------------------------------------------------- */

.tch-section { padding: var(--space-64) 0; }
.tch-section--band { background: var(--color-bg-cold); }

.tch-head {
  display: flex;
  gap: var(--space-48);
  margin-bottom: var(--space-48);
}

.tch-kicker {
  flex: 0 0 260px;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .5;
}

.tch-h2 {
  margin-bottom: var(--space-12);
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: var(--fw-h2);
  letter-spacing: var(--ls-h2);
}

.tch-sub {
  max-width: 780px;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  opacity: .6;
}

/* --- Карточки книг ---------------------------------------------------------
   Метрики один в один с .res-card / .res-cards «Полезных ресурсов»
   (page-poleznye-resursy.css): сетка 4 колонки по 20px, плашка bg-soft
   radius-xl с паддингом 24, белое окно 168px под обложку (contain),
   заголовок + синяя категория + кружок-стрелка, описание 20px/.6.
   В секции три книги – четвёртая колонка остаётся пустой, зато ширина
   карточки совпадает со страницей ресурсов. */

.tch-books {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.tch-book {
  display: flex;
  flex-direction: column;
  gap: var(--space-32);

  padding: var(--space-24);
  background: var(--color-bg-soft);
  border-radius: var(--radius-xl);
  color: inherit;
}

.tch-book__cover {
  height: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-16);

  background: var(--color-bg);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.tch-book__cover img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.tch-book__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

.tch-book__head {
  display: flex;
  align-items: center;
  gap: var(--space-24);
}

.tch-book__titles {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.tch-book__title {
  font-size: var(--fs-h3);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.tch-book__cat {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 500;
  letter-spacing: var(--ls-small);
  color: var(--color-link);
}

.tch-book__arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;
  background: var(--color-brand);
  border-radius: var(--radius-pill);
}

.tch-book__desc {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-body);
  letter-spacing: var(--ls-body);
  color: var(--color-text);
  opacity: .6;
}

/* Автор – отдельной строкой внутри описания. */
.tch-book__author {
  display: block;
  margin-top: var(--space-8);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

/* --- Направления и сертификат --------------------------------------------- */

.tch-directions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-20);
}

.tch-direction {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  padding: var(--space-32);
  background: var(--color-bg-soft);
  border-radius: var(--radius-xl);
}

.tch-direction__label {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-brand);
}

.tch-direction__title {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: var(--fw-h3);
  letter-spacing: var(--ls-h3);
}

.tch-direction__text {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  opacity: .7;
}

/* Сертификаты: сетка 2×2 (2026-08-21 сертификат Венеры + три скана
   Кайрата). Сканы разных пропорций (портрет и альбом) – белое окно
   фиксированной высоты с contain, как у обложек книг. Клик по скану
   открывает полноразмер в новой вкладке. */

.tch-certs-title { margin-top: var(--space-48); margin-bottom: var(--space-20); flex: none; }

.tch-certs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-20);
}

.tch-cert {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
  padding: var(--space-24);
  background: var(--color-bg-soft);
  border-radius: var(--radius-xl);
}

.tch-cert__image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 320px;
  padding: var(--space-16);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tch-cert__image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.tch-cert__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.tch-cert__title {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: var(--fw-h3);
  letter-spacing: var(--ls-h3);
}

.tch-cert__text {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  letter-spacing: var(--ls-small);
  opacity: .7;
}

.tch-cert__meta {
  margin-top: var(--space-4);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 600;
  opacity: .55;
}

/* --- Адаптив -------------------------------------------------------------- */

@media (max-width: 1279px) {
  .tch-hero__inner { flex-direction: column; align-items: stretch; padding-inline: 0; }
  .tch-hero__aside { flex-basis: auto; max-width: 360px; }
  .tch-head { flex-direction: column; gap: var(--space-12); }
  .tch-kicker { flex-basis: auto; }
}

@media (max-width: 1440px) {
  .tch-books { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
  .tch-books { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .tch-books,
  .tch-directions,
  .tch-certs { grid-template-columns: minmax(0, 1fr); }
  .tch-cert__image { height: 240px; }
  .tch-hero__count { font-size: 40px; }
  .tch-section { padding: var(--space-48) 0; }
}
