/* ═══════════════════════════════════════════════════════════
   BONO MODO — стили страницы статьи (Soft Luxe)
   Только компоненты детальной статьи. Карточки/фильтры/крошки/
   попап/CTA-блок/related — в main.css (общие), здесь не дублируем.
   ═══════════════════════════════════════════════════════════ */

.article { padding: 28px 0 64px; }

.article__header { max-width: 740px; width: 100%; margin-bottom: 36px; }
.article__header--with-image {
  max-width: none; display: grid; grid-template-columns: minmax(0,1fr) 300px;
  gap: clamp(28px, 4vw, 56px); align-items: start;
}
.article__header--with-image .article__header-text { max-width: 740px; min-width: 0; }

.article__category {
  display: inline-block; padding: 5px 13px; border-radius: 100px;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; margin-bottom: 18px;
}
.article__category:hover { background: var(--accent); color: #fff; }

.article__title {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(30px, 4vw, 50px); line-height: 1.06; letter-spacing: -.01em;
  color: var(--ink); margin-bottom: 18px;
}
.article__meta { display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--muted); font-size: 14px; align-items: baseline; }
.article__author { font-weight: 600; color: var(--accent-deep); }
.article__excerpt { font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-2); line-height: 1.6; margin-top: 18px; }

.article__hero {
  margin: 0; width: 300px; height: 300px; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow); background: linear-gradient(150deg, var(--accent-soft), var(--rose));
  align-self: start; justify-self: stretch;
}
.article__hero img { display: block; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 900px) {
  .article__header--with-image { grid-template-columns: 1fr; gap: 24px; }
  .article__hero { width: 100%; max-width: 380px; height: auto; aspect-ratio: 1/1; order: -1; }
}

/* ─── Layout ───────────────────────────────────────────────── */
.article__layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: clamp(32px, 5vw, 64px); align-items: start; }
.article__content { min-width: 0; }
@media (max-width: 900px) {
  .article__layout { grid-template-columns: 1fr; }
  .article__sidebar { display: none; }
}

/* ─── Body ─────────────────────────────────────────────────── */
.article__body { max-width: 740px; width: 100%; font-size: 17.5px; line-height: 1.75; color: var(--ink-2); overflow-wrap: break-word; }
.article__body h2 { font-family: var(--font-serif); font-weight: 600; font-size: clamp(26px, 3vw, 34px); line-height: 1.1; color: var(--ink); margin: 44px 0 16px; }
.article__body h3 { font-family: var(--font-serif); font-weight: 600; font-size: 23px; color: var(--ink); margin: 32px 0 12px; }
.article__body p { margin-bottom: 18px; }
.article__body strong { color: var(--ink); font-weight: 700; }
.article__body ul, .article__body ol { margin: 0 0 18px; padding-left: 4px; list-style: none; }
.article__body ol { counter-reset: li; }
.article__body li { position: relative; padding-left: 34px; margin-bottom: 10px; }
.article__body ul li::before { content: "✦"; position: absolute; left: 4px; top: 2px; color: var(--accent); font-size: 13px; }
.article__body ol li { counter-increment: li; }
.article__body ol li::before { content: counter(li); position: absolute; left: 0; top: 0; min-width: 24px; font-family: var(--font-serif); font-weight: 600; font-size: 22px; line-height: 1.35; color: var(--accent-deep); }
.article__body blockquote {
  border-left: 3px solid var(--accent); padding: 18px 26px; margin: 26px 0;
  background: var(--surface); border-radius: 0 var(--r) var(--r) 0;
  font-family: var(--font-serif); font-style: italic; font-size: 22px; color: var(--ink);
}
.article__body table { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: 15px; }
.article__body th, .article__body td { padding: 13px 16px; border: 1px solid var(--line); text-align: left; }
.article__body th { background: var(--surface-2); font-weight: 600; color: var(--ink); }
.article__body tr.highlight { background: var(--accent-soft); }
.article__body a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.article__body a:hover { color: var(--accent); }

/* ─── Sidebar ──────────────────────────────────────────────── */
.article__sidebar { order: 2; display: flex; flex-direction: column; gap: 20px; }
.sidebar-cta { background: linear-gradient(160deg, var(--ink), #43382D); color: var(--surface); border-radius: var(--r-lg); padding: 24px; }
.sidebar-cta__title { display: block; font-family: var(--font-serif); font-weight: 600; font-size: 20px; line-height: 1.12; }
.sidebar-cta__subtitle { display: block; font-size: 14px; color: rgba(252,248,241,.72); margin-top: 8px; }
.sidebar-cta__btn { display: block; width: 100%; text-align: center; padding: 13px 16px; margin-top: 16px; background: var(--accent); color: #fff; border-radius: 100px; text-decoration: none; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .25s, transform .25s; font-family: inherit; }
.sidebar-cta__btn:hover { background: var(--accent-deep); transform: translateY(-2px); }

.article-toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.article-toc__title { font-family: var(--font-serif); font-size: 19px; font-weight: 600; margin-bottom: 14px; color: var(--ink); }
.article-toc__list { list-style: none; padding: 0; margin: 0; }
.article-toc__item { margin-bottom: 2px; }
.article-toc__item--level-3 { padding-left: 16px; }
.article-toc__link { display: block; padding: 6px 0; color: var(--muted); text-decoration: none; font-size: 14px; line-height: 1.35; border-left: 2px solid transparent; padding-left: 12px; transition: color .2s, border-color .2s; }
.article-toc__link:hover { color: var(--accent-deep); border-color: var(--accent); }

/* ─── Inline CTA ───────────────────────────────────────────── */
.article-cta-inline { background: linear-gradient(155deg, var(--accent-soft), var(--surface-2)); border-radius: var(--r-lg); padding: 28px 30px; margin: 34px 0; text-align: center; }
.article-cta-inline p { margin-bottom: 8px; }
.article-cta-inline p strong { font-family: var(--font-serif); font-weight: 600; font-size: 21px; color: var(--ink); }
.article-cta-inline .btn { display: inline-block; margin-top: 14px; background: var(--accent); color: #fff; text-decoration: none; }
.article-cta-inline .btn:hover { background: var(--accent-deep); }

/* ─── FAQ ──────────────────────────────────────────────────── */
.article-faq { margin: 32px 0; }
.faq-item { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; overflow: hidden; background: var(--surface); }
.faq-item__question { width: 100%; padding: 18px 22px; background: transparent; border: none; cursor: pointer; font-size: 16px; font-weight: 600; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink); transition: color .2s; font-family: inherit; }
.faq-item__question:hover { color: var(--accent-deep); }
.faq-item__question .icon { font-size: 22px; color: var(--accent); transition: transform .25s; flex-shrink: 0; }
.faq-item.open .faq-item__question .icon { transform: rotate(45deg); }
.faq-item__answer { display: none; padding: 0 22px 18px; line-height: 1.65; color: var(--ink-2); }
.faq-item.open .faq-item__answer { display: block; }

/* ─── Checklist (если используется) ────────────────────────── */
.article-checklist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; margin: 32px 0; }
.checklist-progress { background: var(--surface-2); border-radius: 100px; height: 8px; margin-bottom: 16px; overflow: hidden; }
.checklist-progress__bar { background: var(--accent); height: 100%; border-radius: 100px; transition: width .3s ease; }
.checklist-progress__text { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.checklist-item, .article-checklist > label { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; cursor: pointer; border-bottom: 1px solid var(--line); }
.checklist-item:last-child, .article-checklist > label:last-child { border-bottom: none; }
.checklist-item__input, .article-checklist > label > input[type="checkbox"] { margin-top: 4px; flex-shrink: 0; accent-color: var(--accent); }
.checklist-item__input:checked + .checklist-item__text { text-decoration: line-through; color: var(--muted-2); }

/* ─── Mobile ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .article { padding: 14px 0 40px; }
  .article__body { font-size: 16.5px; }
  .article__body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: 13.5px; }
  .article__body th, .article__body td { padding: 9px 11px; min-width: 90px; }
  .article-cta-inline { padding: 22px 18px; }
  .faq-item__question { padding: 15px 16px; font-size: 15px; }
  .faq-item__answer { padding: 0 16px 15px; }
}

/* ─── Наглядные визуалы (визуальное повествование) ─── */
.article__body .viz { margin: 30px 0; }
.article__body .viz img { width: 100%; height: auto; display: block; border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.article__body .viz figcaption { margin-top: 12px; font-size: 14.5px; color: var(--muted); line-height: 1.55; text-align: center; }
.article__body .viz-set { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 30px 0; }
.article__body .viz-set figure { margin: 0; }
.article__body .viz-set img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.article__body .viz-set figcaption { margin-top: 9px; font-size: 13px; color: var(--muted); line-height: 1.4; text-align: center; }
@media (max-width: 620px) { .article__body .viz-set { grid-template-columns: 1fr; gap: 18px; } }

/* Лид-магнит в теле статьи (форма → /api/magnet.php) */
.article__body .article-magnet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px 32px 32px; margin: 40px 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 36px; align-items: start; }
.article__body .article-magnet__kicker { font-size: 13px; font-weight: 600; color: var(--accent-deep); }
.article__body .article-magnet h3 { font-family: var(--font-serif); font-size: 26px; line-height: 1.12; margin: 8px 0 12px; }
.article__body .article-magnet p { font-size: 16px; color: var(--ink-2); margin: 0 0 10px; }
.article__body .article-magnet ul { margin: 10px 0 0; padding-left: 20px; }
.article__body .article-magnet li { font-size: 15px; color: var(--ink-2); margin: 4px 0; }
.article__body .article-magnet .lead-form { padding: 0; background: transparent; box-shadow: none; border-radius: 0; }
.article__body .article-magnet .form-group { margin-top: 12px; }
.article__body .article-magnet .form-consent-text { font-size: 12.5px; }
.article__body .article-magnet .form-btn { margin-top: 14px; }
.article__body .article-magnet .form-status { font-size: 14px; }
@media (max-width: 760px) { .article__body .article-magnet { grid-template-columns: 1fr; padding: 22px 20px 24px; } }

/* ─── Врезка инструмента (/instrumenty/) в тело статьи ─────── */
.tool-callout { display: grid; grid-template-columns: 56px 1fr auto; gap: 18px; align-items: center; margin: 36px 0; padding: 22px 24px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.tool-callout__icon { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft) center / 32px no-repeat; }
.tool-callout__icon--eskiz { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%239E5238' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M14 5 L8 8 L4 16 L9 18 L11 14 V35 H29 V14 L31 18 L36 16 L32 8 L26 5 Q20 10 14 5Z'/%3E%3Cpath d='M20 9 V35' stroke-dasharray='2 2'/%3E%3C/svg%3E"); }
.tool-callout__icon--label { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%239E5238' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 12 L7 28 H23 L27 12'/%3E%3Cpath d='M3 12 q3 -3 6 0 t6 0 t6 0 t6 0'/%3E%3Ccircle cx='31' cy='29' r='6'/%3E%3C/svg%3E"); }
.tool-callout__icon--size { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%239E5238' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='3' y='14' width='34' height='12' rx='2'/%3E%3Cpath d='M9 14v5M15 14v4M21 14v5M27 14v4M33 14v5'/%3E%3C/svg%3E"); }
.tool-callout__icon--photo { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%239E5238' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='32' height='24' rx='4'/%3E%3Cpath d='M14 10l2-4h8l2 4'/%3E%3Ccircle cx='20' cy='22' r='7'/%3E%3C/svg%3E"); }
.tool-callout__icon--spec { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%239E5238' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='6' y='4' width='28' height='32' rx='3'/%3E%3Cpath d='M6 13h28M6 21h28M6 29h28M16 13v23'/%3E%3C/svg%3E"); }
.tool-callout__kicker { display: block; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.article__content .tool-callout__title, .tool-callout__title { display: block; font-family: var(--font-serif); font-size: 23px; font-weight: 600; line-height: 1.15; color: var(--ink); text-decoration: none; margin-top: 2px; }
.tool-callout__text { margin: 4px 0 0 !important; font-size: 15px !important; color: var(--muted); line-height: 1.5; }
.article__content .tool-callout__btn, .tool-callout__btn { white-space: nowrap; padding: 12px 20px; border-radius: 100px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14.5px; text-decoration: none; }
.tool-callout__btn:hover { background: var(--accent-deep); }
@media (max-width: 640px) { .tool-callout { grid-template-columns: 48px 1fr; } .tool-callout__icon { width: 48px; height: 48px; } .tool-callout__btn { grid-column: 1 / -1; text-align: center; } }
