/* ==========================================================================
   REVOCARS — страница статьи блога (компонент «Блог», ID 210)
   Версия 1.0 · по брендбуку REVOCARS 1.0
   Подключение: <link rel="stylesheet" href="/netcat_files/rv-blog-article.css?v=1">
   Все правила лежат внутри .rva — остальные страницы сайта не затрагиваются.
   Многие !important нужны, потому что в тексте статей встречаются инлайн-стили.
   ========================================================================== */

.rva{
  --rva-top:24px; --ink:#282F2F; --muted:#697575; --line:#DCE1E2; --surface:#F8F7F7;
  --red:#EF2222; --red-d:#CA1515; --red-h:#B51111;
  --f-head:'Montserrat',system-ui,sans-serif;
  --f-text:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
  font-family:var(--f-text); color:var(--ink); background:#fff;
}
.rva *,.rva *::before,.rva *::after{box-sizing:border-box}
.rva-wrap{width:100%;max-width:none;margin:0 auto;padding:0 10px}
.rva-more .rva-wrap{padding:0}
.rva a:focus-visible,.rva button:focus-visible{outline:3px solid var(--red-h);outline-offset:2px}

/* ---------- Шапка статьи ---------- */
.rva .breadcrumbs{padding:24px 0 28px}
.rva-hero{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:56px;align-items:center}
.rva-hero--noimg{grid-template-columns:minmax(0,1fr)}
.rva-h1{margin:0 0 28px;font-family:var(--f-head);font-weight:700;font-size:42px;line-height:1.2;color:var(--ink);text-wrap:balance}
.rva-byline{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.rva-byline__img{width:48px;height:48px;border-radius:50%;object-fit:cover;flex:none}
.rva-byline__name{display:block;font-weight:600;font-size:16px;line-height:1.3}
.rva-byline__role{display:block;font-size:14px;line-height:1.4;color:var(--muted)}
.rva-meta{display:flex;flex-wrap:wrap;align-items:center;gap:10px 24px;font-size:14px;color:var(--muted)}
.rva-meta__item{display:inline-flex;align-items:center;gap:8px}
.rva-meta svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.rva-meta a{display:inline-flex;align-items:center;gap:8px;min-height:44px;color:var(--ink);font-weight:600;text-decoration:none}
.rva-meta a:hover{color:var(--red-d)}
.rva-hero__img{margin:0}
.rva-hero__img img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;border-radius:20px;background:#EEF0F0}

/* ---------- Раскладка ---------- */
.rva-layout{display:grid;grid-template-columns:minmax(0,1fr) clamp(380px,28vw,460px);justify-content:space-between;gap:48px;align-items:start;padding:56px 0 24px}
.rva-aside{position:sticky;top:var(--rva-top);max-height:calc(100vh - var(--rva-top) - 16px);display:flex;flex-direction:column;gap:16px}

/* ---------- Текст статьи ---------- */
.rva-prose{counter-reset:rva-h2;min-width:0;max-width:960px}
.rva-prose>*:first-child{margin-top:0}
.rva-prose p{margin:0 0 20px;font-size:17px;line-height:1.7;color:var(--ink);text-wrap:pretty}
.rva-prose>p:first-child{font-size:19px;line-height:1.65;margin-bottom:8px}
.rva-prose strong,.rva-prose b{font-weight:600}
.rva-prose a{color:var(--ink);text-decoration:underline;text-decoration-color:var(--red);text-decoration-thickness:2px;text-underline-offset:3px}
.rva-prose a:hover{color:var(--red-d)}
.rva-prose h2{counter-increment:rva-h2;margin:64px 0 20px;font-family:var(--f-head);font-weight:700;font-size:30px;line-height:1.2;color:var(--ink);text-wrap:balance;scroll-margin-top:var(--rva-top)}
.rva-prose h2::before{content:counter(rva-h2,decimal-leading-zero);display:block;margin-bottom:10px;font-size:14px;font-weight:700;letter-spacing:.08em;color:var(--red-d)}
.rva-prose>h2:first-child,.rva-prose>p:first-child+h2{margin-top:48px}
.rva-prose h3{margin:36px 0 14px;font-family:var(--f-head);font-weight:700;font-size:20px;line-height:1.25;color:var(--ink)}
.rva-prose ul,.rva-prose ol{margin:0 0 24px;padding-left:22px;font-size:17px;line-height:1.7}
.rva-prose li{margin-bottom:8px}

/* изображения (в статьях они в <p style="text-align:center"> с инлайн-размерами) */
.rva-prose img{max-width:100% !important;height:auto !important;border-radius:20px !important}
.rva-prose p>img:only-child{display:block;width:100% !important}
.rva-prose p[style*="text-align:center"],.rva-prose p[style*="text-align: center"]{text-align:left !important}
/* подписи к фото: p с font-size:14px сразу после картинки */
.rva-prose p[style*="font-size:14px"],.rva-prose p[style*="font-size: 14px"]{margin:0 0 28px !important;font-size:14px !important;line-height:1.5 !important;color:var(--muted) !important}

/* таблицы */
.rva-prose .tbl-wrap{overflow-x:auto;margin:8px 0 28px;border:1px solid var(--line);border-radius:20px;background:#fff}
.rva-prose table{width:100%;min-width:520px;border-collapse:collapse}
.rva-prose th,.rva-prose td{padding:16px 22px;text-align:left;font-size:16px;line-height:1.4;border-top:1px solid #E8ECED;color:var(--ink)}
.rva-prose thead th{border-top:0;font-size:13px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);background:var(--surface)}
.rva-prose tbody th{font-family:var(--f-head);font-weight:700}

/* кнопки-ссылки внутри текста (в статьях стоят с инлайн-стилями) */
.rva-prose a.btn{display:inline-flex !important;align-items:center;justify-content:center;gap:8px;min-height:50px;padding:0 28px !important;border-radius:30px !important;background:var(--red-d) !important;color:#fff !important;font-family:var(--f-text);font-weight:600 !important;font-size:15px !important;text-decoration:none !important;white-space:nowrap}
.rva-prose a.btn:hover{background:var(--red-h) !important}
.rva-prose p:has(>a.btn){margin:40px 0;padding:28px 32px;border-radius:20px;background:var(--surface);text-align:left !important;display:flex;flex-direction:column;align-items:flex-start;gap:12px}
.rva-prose p:has(>a.btn) span{font-size:15px !important;line-height:1.5;color:var(--muted) !important}

/* список «ключ — пояснение» (ul > li > strong) → карточки */
.rva-prose ul:has(>li>strong:first-child){list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));gap:16px}
.rva-prose ul:has(>li>strong:first-child)>li{margin:0;padding:22px 24px;border:1px solid var(--line);border-radius:20px;background:#fff;font-size:15px;line-height:1.6;color:#4A5252}
.rva-prose ul:has(>li>strong:first-child)>li>strong:first-child{display:block;margin-bottom:8px;font-family:var(--f-head);font-weight:700;font-size:18px;line-height:1.25;color:var(--ink)}

/* ---------- FAQ: <dl><dt>вопрос</dt><dd>ответ</dd></dl> (без JS всё раскрыто) ---------- */
.rva-prose dl{margin:0 0 24px}
.rva-prose dt{margin:0;padding:22px 0;border-top:1px solid var(--line);font-family:var(--f-head);font-weight:700;font-size:18px;line-height:1.35;color:var(--ink)}
.rva-prose dt strong{font-weight:700}
.rva-prose dd{margin:0;padding:0 0 22px;font-size:16px;line-height:1.7}
.rva-prose dd:last-of-type{border-bottom:1px solid var(--line)}
.rva-js .rva-prose dt{position:relative;cursor:pointer;padding-right:56px;min-height:44px}
.rva-js .rva-prose dt::before,.rva-js .rva-prose dt::after{content:"";position:absolute;top:50%;right:11px;background:var(--ink);border-radius:1px}
.rva-js .rva-prose dt::before{width:12px;height:2px;margin:-1px 0 0}
.rva-js .rva-prose dt::after{width:2px;height:12px;margin:-6px 5px 0 0}
.rva-js .rva-prose dt{background:linear-gradient(var(--line),var(--line)) no-repeat right 0 top 50%/0 0}
.rva-js .rva-prose dd{display:none;padding-right:56px;border-bottom:0 !important}
.rva-js .rva-prose dt.is-open+dd{display:block}
.rva-js .rva-prose dt.is-open::after{display:none}
.rva-js .rva-prose dd:last-of-type.is-last{border-bottom:1px solid var(--line) !important}
.rva-js .rva-prose dt:focus-visible{outline:3px solid var(--red-h);outline-offset:-3px}

/* ---------- Финал статьи: автор + поделиться ---------- */
.rva-end{margin-top:48px;padding:28px;border:1px solid var(--line);border-radius:20px;display:flex;flex-direction:column;gap:20px;scroll-margin-top:var(--rva-top)}
.rva-end__author{display:flex;align-items:center;gap:14px}
.rva-end__author img{width:56px;height:56px;border-radius:50%;object-fit:cover}
.rva-end__name{display:block;font-family:var(--f-head);font-weight:700;font-size:18px;line-height:1.3}
.rva-end__role{display:block;font-size:14px;color:var(--muted)}
.rva-end__share{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px}
.rva-end__label{font-size:14px;color:var(--muted)}

/* ---------- Сайдбар ---------- */
.rva-toc{padding:24px 28px;border:1px solid var(--line);border-radius:20px;background:#fff;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.rva-cta{flex:none}
.rva-toc[hidden]{display:none}
.rva-toc__title{margin:0 0 8px;font-family:var(--f-head);font-weight:700;font-size:18px;line-height:1.25}
.rva-toc ol{list-style:none;margin:0;padding:0;counter-reset:rva-toc}
.rva-toc li{counter-increment:rva-toc}
.rva-toc a{display:flex;gap:14px;padding:11px 0;border-top:1px solid #E8ECED;color:var(--ink);text-decoration:none;font-size:15px;line-height:1.35}
.rva-toc li:first-child a{border-top:0}
.rva-toc a::before{content:counter(rva-toc,decimal-leading-zero);flex:none;width:22px;font-family:var(--f-head);font-weight:700;font-size:13px;color:var(--red-d)}
.rva-toc a:hover,.rva-toc a.is-active{color:var(--red-d)}
.rva-cta{padding:24px 28px;border-radius:20px;background:var(--surface);display:flex;flex-direction:column;gap:12px}
.rva-cta__title{margin:0;font-family:var(--f-head);font-weight:700;font-size:22px;line-height:1.2}
.rva-cta__text{margin:0;font-size:15px;line-height:1.5;color:#4A5252}
.rva-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:50px;padding:0 28px;border-radius:30px;background:var(--red-d);color:#fff;font-family:var(--f-text);font-weight:600;font-size:15px;text-decoration:none;border:0;cursor:pointer}
.rva-btn:hover{background:var(--red-h);color:#fff}
.rva-pill{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border:1px solid var(--line);border-radius:30px;background:#fff;color:var(--ink);font-size:14px;font-weight:600;text-decoration:none}
.rva-pill:hover{border-color:var(--ink)}
/* кнопки Яндекс-шаринга внутри .rva-end */
.rva-end .share{display:contents}
.rva-end .share__label{display:none}

/* ---------- «Другие статьи» (nc_ctpl=379, .m-blog) ---------- */
.rva-more{margin-top:64px;padding:64px 0;background:var(--surface)}
.rva-more .m-blog__header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px 24px;margin-bottom:32px}
.rva-more .section-title{margin:0;font-family:var(--f-head);font-weight:700;font-size:30px;line-height:1.2;color:var(--ink)}
.rva-more .m-blog__nav{display:flex;flex-wrap:wrap;gap:8px}
.rva-more .m-blog__nav a{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border:1px solid var(--line);border-radius:30px;background:#fff;color:var(--ink);font-size:14px;font-weight:600;text-decoration:none}
.rva-more .m-blog__nav a:hover{border-color:var(--ink)}
.rva-more .m-blog__nav a.active{background:var(--ink);border-color:var(--ink);color:#fff}
.rva-more .m-blog__row{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:24px}
.rva-more .preview{display:flex;flex-direction:column;gap:14px;background:transparent;box-shadow:none;border:0;text-decoration:none;color:var(--ink)}
.rva-more .preview__img{border-radius:20px;overflow:hidden;aspect-ratio:4/3;background:#EEF0F0}
.rva-more .preview__img img{display:block;width:100%;height:100%;object-fit:cover}
.rva-more .preview__content{display:flex;flex-direction:column;gap:10px;padding:0}
.rva-more .preview__label{align-self:flex-start;padding:4px 12px;border-radius:30px;background:#E8ECED;color:var(--ink);font-size:13px;font-weight:500}
.rva-more .preview__title{margin:0;font-family:var(--f-head);font-weight:700;font-size:17px;line-height:1.3;color:var(--ink)}
.rva-more .preview:hover .preview__title{color:var(--red-d)}
.rva-more .preview__date{font-size:14px;color:var(--muted)}

/* ---------- Адаптация: 1200 / 1024 / 600 ---------- */
@media (max-width:1199px){
  .rva-hero{grid-template-columns:minmax(0,1fr);gap:32px}
  .rva-h1{font-size:36px}
}
@media (max-width:1024px){
  .rva-layout{grid-template-columns:minmax(0,1fr);padding-top:36px}
  .rva-aside{display:none}
}
@media (max-width:600px){
  .rva-wrap{padding:0 16px}
  .rva-h1{font-size:30px;line-height:1.2}
  .rva-prose p,.rva-prose ul,.rva-prose ol{font-size:16px}
  .rva-prose>p:first-child{font-size:18px}
  .rva-prose h2{font-size:24px;margin-top:48px}
  .rva-prose p:has(>a.btn){padding:22px}
  .rva-prose p:has(>a.btn) a.btn{width:100%;white-space:normal;text-align:center;padding:12px 20px !important}
  .rva-prose dt{font-size:16px}
  .rva-prose dd{padding-right:0}
  .rva-js .rva-prose dd{padding-right:0}
  .rva-end{padding:22px}
  .rva-more{padding:48px 0}
  .rva-more .section-title{font-size:24px}
}

/* узкие десктопы: сайдбар чуть уже, чтобы не сжимать текст */
@media (min-width:1025px) and (max-width:1200px){
  .rva-layout{grid-template-columns:minmax(0,1fr) 340px;gap:32px}
}

/* мобильный: у «Других статей» нет собственных полей контейнера */
@media (max-width:600px){
  .rva-more .rva-wrap{padding:0 16px}
}

/* «Другие статьи»: текст под фото (перекрывает стиль .preview--bg сайта, где подпись лежит поверх картинки) */
.rva-more .preview.preview--bg{position:relative;height:auto;overflow:visible;display:flex;flex-direction:column;gap:14px;border-radius:0}
.rva-more .preview.preview--bg .preview__img{position:relative;inset:auto;z-index:auto;width:100%;height:auto;aspect-ratio:4/3;border-radius:20px;overflow:hidden}
.rva-more .preview.preview--bg .preview__content{position:static;z-index:auto;height:auto;display:flex;flex-direction:column;gap:0;padding:0}
.rva-more .preview.preview--bg .preview__label{position:absolute;top:12px;left:12px;z-index:2;background:#fff}
.rva-more .preview.preview--bg .preview__desc{height:auto;width:auto;margin:0;padding:0;background:transparent;border-radius:0;display:flex;flex-direction:column;gap:8px}
