/* article.css — стили тела статьи блога.
 *
 * Верстка портирована из шаблона (Статья заваривание/index_v2.html), но цвета
 * замаплены на бренд-токены сайта (colors_and_type.css), а шрифты — на
 * Airport/Open Sans. Всё scoped под `.article-body`, чтобы не задеть остальной
 * сайт. Header/Footer — общие компоненты, здесь их нет.
 */

.article-wrap {
  --a-red: var(--color-brick);
  --a-red-deep: var(--color-crimson);
  --a-gold: var(--color-amber);
  --a-ink: var(--color-black);
  --a-paper: #fbf9f5;      /* тёплый лист — читаемее чистого off-white */
  --a-cream: #f5f0e8;
  --a-grey-1: #4a4a4a;
  --a-grey-2: #8a8a8a;
  --a-grey-3: #e2ddd4;
  background: var(--a-paper);
}

.article-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px 40px;
  font-family: var(--font-body);
  color: var(--a-ink);
  font-size: 17px;
  line-height: 1.65;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.article-hero { padding: 56px 0 24px; }
.article-hero .kicker {
  font-family: var(--font-display);
  color: var(--a-red); font-weight: 700; font-size: 15px;
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 16px;
}
.article-hero h1 {
  font-family: var(--font-display);
  font-size: 42px; line-height: 1.12; letter-spacing: -0.5px;
  text-transform: uppercase; margin: 0 0 18px;
}
.article-hero .lead { font-size: 19px; color: var(--a-grey-1); margin: 0 0 22px; }
.article-hero .meta { display: flex; flex-wrap: wrap; gap: 18px; color: var(--a-grey-2); font-size: 14px; }
.article-hero .meta span::before { content: "·"; margin-right: 18px; color: var(--a-grey-3); }
.article-hero .meta span:first-child::before { content: ""; margin: 0; }

/* ── Breadcrumbs ──────────────────────────────────────────────────────────── */
.article-crumbs { font-size: 13px; color: var(--a-grey-2); padding-top: 20px; }
.article-crumbs a { color: var(--a-grey-1); text-decoration: none; }
.article-crumbs a:hover { color: var(--a-red); }
.article-crumbs .sep { margin: 0 8px; color: var(--a-grey-3); }

/* ── Проза ────────────────────────────────────────────────────────────────── */
.article-body h2 {
  font-family: var(--font-display);
  font-size: 30px; line-height: 1.2; letter-spacing: -0.3px; text-transform: uppercase;
  margin: 52px 0 16px; scroll-margin-top: 90px;
}
.article-body h3 { font-family: var(--font-display); font-size: 20px; margin: 24px 0 8px; text-transform: none; }
.article-body p { margin: 0 0 16px; }
.article-body a { color: var(--a-red); text-decoration: underline; text-underline-offset: 2px; }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 22px; }
.article-body li { margin-bottom: 6px; }

/* ── Оглавление ───────────────────────────────────────────────────────────── */
.article-toc {
  background: var(--color-white); border: 1px solid var(--a-grey-3);
  border-radius: 14px; padding: 20px 24px; margin: 28px 0;
}
.article-toc h4 {
  font-family: var(--font-display);
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--a-grey-2); margin: 0 0 12px;
}
.article-toc ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.article-toc li { padding: 4px 0; font-size: 14px; margin: 0; }
.article-toc a { color: var(--a-ink); text-decoration: none; }
.article-toc a:hover { color: var(--a-red); }

/* ── Callout ──────────────────────────────────────────────────────────────── */
.article-callout {
  background: #fff6e5; border-left: 4px solid var(--a-gold);
  padding: 16px 20px; border-radius: 12px; margin: 24px 0; font-size: 16px;
}
.article-callout strong { color: var(--a-red-deep); }
.article-callout.tip { background: #fbeeda; border-left-color: var(--a-gold); }

/* ── Таблица ──────────────────────────────────────────────────────────────── */
.article-table-wrap { overflow-x: auto; margin: 24px 0; border-radius: 12px; }
.article-body table {
  width: 100%; border-collapse: collapse; font-size: 14px; background: var(--color-white);
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-card);
}
.article-body th {
  background: var(--a-ink); color: #fff; padding: 12px 14px; text-align: left;
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap;
}
.article-body td { padding: 12px 14px; border-bottom: 1px solid var(--a-grey-3); vertical-align: top; }
/* Значения (температура, время, навеска) — всегда в одну строку; длинные
   названия сортов в первом столбце по-прежнему переносятся. Таблица при этом
   уходит в горизонтальный скролл (.article-table-wrap). */
.article-body td:not(:first-child) { white-space: nowrap; }
.article-body tr:last-child td { border-bottom: none; }
.article-body tbody tr:nth-child(even) td { background: var(--a-paper); }

/* ── Карточка чая ─────────────────────────────────────────────────────────── */
.tea-card {
  background: var(--color-white); border-radius: 22px; overflow: hidden;
  margin: 40px 0; box-shadow: var(--shadow-card); border: 1px solid var(--a-grey-3);
  scroll-margin-top: 90px;
}
.tea-card .tc-head { padding: 22px 26px 18px; border-bottom: 1px solid var(--a-grey-3); display: flex; align-items: center; gap: 16px; }
.tea-card .tc-num {
  width: 44px; height: 44px; background: var(--a-red); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700;
  flex-shrink: 0; font-family: var(--font-display);
}
.tea-card h2 { font-family: var(--font-display); font-size: 24px; margin: 0; text-transform: uppercase; }
.tea-card h2 .cn { color: var(--a-grey-2); font-size: 15px; font-weight: 500; margin-left: 8px; text-transform: none; font-family: var(--font-body); }
.tea-card .tc-body { display: grid; grid-template-columns: 260px 1fr; gap: 26px; padding: 24px 26px 26px; align-items: start; }
.tea-card .tc-body.no-visual { grid-template-columns: 1fr; }  /* без картинки — на всю ширину */
.tea-card .tc-visual { aspect-ratio: 1/1; background: var(--a-cream); border-radius: 14px; overflow: hidden; }
.tea-card .tc-visual img { width: 100%; height: 100%; object-fit: cover; }
.tea-card .tc-taste { font-size: 15px; color: var(--a-grey-1); margin: 0 0 18px; }
.tea-card .tc-taste strong { color: var(--a-ink); }
.tea-card .tc-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
/* Без картинки карточка широкая — раскладываем параметры в один ряд по сетке. */
.tea-card .tc-body.no-visual .tc-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* …а «Нюанс» и «Типичную ошибку» — двумя равными колонками. */
.tea-card .tc-body.no-visual .tc-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tea-card .tc-notes { display: contents; }
/* Обнуляем отступ только в двухколоночной раскладке (no-visual) — там нижние
   края «Нюанс»/«Ошибка» и так выравнены сеткой. В обычной (одна под другой)
   отступ между ними должен остаться. */
.tea-card .tc-body.no-visual .tc-notes .tc-nuance { margin-bottom: 0; }
.tea-card .tc-stat { background: var(--a-paper); padding: 12px 14px; border-radius: 12px; }
.tea-card .tc-stat .lbl { font-family: var(--font-display); font-size: 12.5px; color: var(--a-grey-2); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.tea-card .tc-stat .val { font-size: 15px; font-weight: 700; }
.tea-card .tc-nuance { background: #fbeeda; border-left: 3px solid var(--a-gold); padding: 12px 16px; border-radius: 8px; font-size: 14px; color: var(--a-grey-1); margin-bottom: 12px; }
.tea-card .tc-nuance strong { color: #8b5a2b; display: block; margin-bottom: 0; font-family: var(--font-display); font-size: 18px; text-transform: uppercase; letter-spacing: 0.1em; }
.tea-card .tc-mistake { background: #fff1f0; border-left: 3px solid var(--a-red); padding: 12px 16px; border-radius: 8px; font-size: 14px; color: var(--a-grey-1); }
.tea-card .tc-mistake strong { color: var(--a-red); display: block; margin-bottom: 0; font-family: var(--font-display); font-size: 18px; text-transform: uppercase; letter-spacing: 0.1em; }

/* ── Маскот-разделитель ───────────────────────────────────────────────────── */
.article-mascot { text-align: center; margin: 52px 0; }
.article-mascot img { width: 130px; height: 130px; border-radius: 50%; background: var(--a-cream); object-fit: cover; object-position: top; margin-bottom: 14px; }
.article-mascot .quote { font-style: italic; color: var(--a-grey-1); font-size: 16px; max-width: 480px; margin: 0 auto; }

/* ── Картинка ─────────────────────────────────────────────────────────────── */
.article-figure { margin: 28px 0; }
.article-figure img { width: 100%; border-radius: 14px; display: block; }
.article-figure figcaption { font-size: 13px; color: var(--a-grey-2); text-align: center; margin-top: 8px; }

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.article-faq details { background: var(--color-white); border: 1px solid var(--a-grey-3); border-radius: 12px; padding: 16px 20px; margin-bottom: 12px; }
.article-faq summary { font-weight: 700; font-size: 16px; list-style: none; position: relative; padding-right: 32px; cursor: pointer; }
.article-faq summary::-webkit-details-marker { display: none; }
.article-faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 24px; color: var(--a-red); font-weight: 300; }
.article-faq details[open] summary::after { content: "–"; }
.article-faq details p { margin: 12px 0 0; color: var(--a-grey-1); font-size: 15px; }

/* ── CTA ──────────────────────────────────────────────────────────────────── */
.article-cta {
  background: linear-gradient(135deg, var(--a-ink), #2d2d2d); color: var(--a-paper);
  border-radius: 22px; padding: 38px 34px; margin: 52px 0 24px; text-align: center;
  position: relative; overflow: hidden;
}
.article-cta::before { content: ""; position: absolute; top: -40px; right: -40px; width: 200px; height: 200px; background: radial-gradient(var(--a-red), transparent); opacity: 0.4; }
.article-cta h2 { font-family: var(--font-display); color: #fff; margin: 0 0 12px; text-transform: uppercase; position: relative; }
.article-cta p { color: var(--a-grey-3); margin: 0 0 22px; position: relative; }
.article-cta .cta-btn {
  display: inline-block; background: var(--a-red); color: #fff; padding: 14px 28px;
  border-radius: 999px; text-decoration: none; font-weight: 700; position: relative;
  transition: transform 0.2s, background 0.2s;
}
.article-cta .cta-btn:hover { background: var(--a-gold); transform: translateY(-1px); }

@media (max-width: 720px) {
  .article-body { font-size: 16px; padding: 0 16px 32px; }
  .article-hero { padding: 32px 0 18px; }
  .article-hero h1 { font-size: 27px; }
  .article-hero .lead { font-size: 17px; }
  .article-hero .meta { gap: 12px; font-size: 13px; }
  .article-hero .meta span::before { margin-right: 12px; }
  .article-body h2 { font-size: 22px; margin: 40px 0 14px; }
  .article-body h3 { font-size: 18px; }

  .article-toc { padding: 16px 18px; }
  .article-toc ul { grid-template-columns: 1fr; }

  /* Карточки чая: одна колонка, компактнее отступы, параметры 2×2. */
  .tea-card { margin: 28px 0; border-radius: 18px; }
  /* Номер по центру компактного блока «название + иероглифы»: высота блока
     ≈ высоте номера, поэтому они визуально выровнены. */
  .tea-card .tc-head { padding: 18px 18px 14px; gap: 12px; align-items: center; }
  .tea-card .tc-num { width: 38px; height: 38px; font-size: 16px; }
  .tea-card h2 { font-size: 19px; line-height: 1.15; }
  .tea-card h2 .cn { display: block; margin: 3px 0 0; font-size: 13px; line-height: 1.25; }
  .tea-card .tc-body,
  .tea-card .tc-body.no-visual { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .tea-card .tc-visual { aspect-ratio: 16/10; }
  .tea-card .tc-stats,
  .tea-card .tc-body.no-visual .tc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tea-card .tc-body.no-visual .tc-notes { grid-template-columns: 1fr; }

  .article-callout { padding: 14px 16px; font-size: 15px; }
  .article-cta { padding: 28px 22px; border-radius: 18px; }
  .article-cta h2 { font-size: 22px; }
  .article-mascot img { width: 104px; height: 104px; }
  .article-crumbs { font-size: 12px; }
}
