
:root {
    --toc-sticky-top: 140px;
    --color-black: #121212;
    --color-accent: #e63137;
}

/* Плавная прокрутка по якорям */
html { scroll-behavior: smooth; }

/* Если у сайта фиксированная шапка — дайте запас у h2 */
.post-content > h2 { 
    scroll-margin-top: var(--toc-sticky-top); /* подстройте под вашу шапку */
 } 

/* Базовые стили ToC */
.article-toc {
  margin-bottom: 1.5rem; 
}

.article-toc__title { 
    font-family: "Arial Black", "Arial Bold", "Arial", sans-serif;
    color: var(--color-black);
    font-size: 16px;
    line-height: 20px;
}

.article-toc__list  {
    margin: 1rem 0 2rem 0;
    margin-bottom: 1.5rem;
    background: #f6f7f9;
    border-radius: 4px;
    padding: 1rem .7rem 1rem 2.2rem;
 }

.article-toc__item  { margin: .25rem 0; }

.article-toc__link  { 
    text-decoration: none;
    color: #545454;
    font-size: 14px;
    line-height: 18px;
    display: block;
    font-family: "Arial", sans-serif; 
}

.article-toc__item::marker {
    font-size: 14px;
}

.article-toc__link:hover { text-decoration: underline; }

/* Подсветка активного пункта (если включите scroll spy ниже) */
.article-toc__link.is-active { font-weight: 600;color: #0A53A1; }

/* Липкий ToC в сайдбаре (только десктоп) */
@media (min-width: 1024px) {
  .article-toc.is-sticky {
    position: sticky;
    top: var(--toc-sticky-top, 130px); /* при желании переопределите в теме */
  }
}

/* на всякий: контейнер сайдбара не должен обрубать sticky */
.sidebar.show-desktop {
  overflow: visible;
}

.rm-important {
    background: #fff0f0;
    border-left: .25rem solid var(--color-accent);
    border-radius: 0 .75rem .75rem 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1rem;
    margin: 1.5rem 0;
    font-family: "Arial", sans-serif; 
}

.rm-important__title {
    color: var(--color-black);
    font-weight: bold;
    font-size: clamp(16px, 2vw, 18px);
}

.rm-important__body {
      font-size: clamp(14px, 2vw, 16px);
}

blockquote.ra-expert-blockquote {
    border-radius: .75rem;
    background: #fff0f0;
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    width: 100%;
    font-style: normal;
    font-family: "Arial", sans-serif; 
}

.ra-blockquote__img {
    width: 2rem;
}

.ra-blockquote__img img {
  border: none;
}

.ra-blockquote__desc {
    flex: 1;
    font-size: 16px;
}

.ra-blockquote__text {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.ra-blockquote__text p {
  font-size: 16px !important;
  color: #404040 !important;
}

.ra-article-member {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
}

.ra-article-member__img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.ra-article-member__img img {
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
    object-fit: cover;
    border: none;
}

.ra-article-member__case {
    line-height: 20px;
    color: #979797;
    font-size: 13px;
    font-family: "Arial", "Arial", sans-serif;
}

@media (max-width: 768px) {
  blockquote.ra-expert-blockquote {
      padding: .5rem;
  }
  .ra-blockquote__img {
    display: none;
  }
  .ra-article-member {
    gap: .5rem;
  }
}

@media (min-width: 1366px) {
    .page-template-blog-page progress, .single-post progress {
        top: 115px !important;
    }
}

.ra-title {
  color: var(--color-black);
    font-weight: bold;
    font-family: "Arial Black", "Arial Bold", "Arial", sans-serif;
}

.post-resources, 
.post-faq {
    margin: 2rem 0;
}

.spollers__title {
    display:block; 
    width:100%;
    text-align:left;
    background: #f0f0f0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    color: var(--color-black);
}
.spollers__item + .spollers__item { margin-top:10px; }
.spollers__body { padding:10px 14px; border-left:2px solid #e5e7eb; }

/* Lightbox overlay */
.rm-lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.9);
  display: none;
  z-index: 9999;
  color: #fff;
}
.rm-lightbox__inner {
  position: absolute; inset: 0;
  display: grid; grid-template-rows: 1fr auto; gap: 12px;
}
.rm-lightbox__imgwrap {
  display: flex; align-items: center; justify-content: center;
  min-height: 0; /* для правильного масштабирования */
}
.rm-lightbox__img {
  max-width: 96vw; max-height: 85vh; object-fit: contain;
  user-select: none;
}
.rm-lightbox__caption {
  text-align: center; font-size: 14px; line-height: 1.4; opacity: .9;
  padding: 0 16px 20px;
  word-break: break-word;
}

/* Controls */
.rm-lightbox__btn {
  position: absolute; top: 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff; width: 40px; height: 40px;
  border-radius: 8px; display: grid; place-items: center;
  cursor: pointer; user-select: none;
  justify-content: center;
}
.rm-lightbox__btn:hover { background: rgba(255,255,255,.2); }
.rm-lightbox__btn--close { right: 12px; }
.rm-lightbox__btn--prev  { left: 12px; top: 50%; transform: translateY(-50%); }
.rm-lightbox__btn--next  { right: 12px; top: 50%; transform: translateY(-50%); }

.rm-lightbox__btn svg { width: 22px; height: 22px; }

/* маленькие экраны */
@media (max-width: 640px){
  .rm-lightbox__btn { width: 36px; height: 36px; }
  .rm-lightbox__img { max-width: 98vw; max-height: 78vh; }
}

/* курсор-лупа для всех изображений, которые открываются в лайтбоксе */
@media (hover: hover) {
 
 [data-rm-lightbox="post-gallery"] img {
    cursor: zoom-in !important;
  }
}

/* если есть ссылки, которые НЕ должны открываться (мы советовали класс no-lightbox) */
.post__content a.no-lightbox,
.post__content a.no-lightbox img {
  cursor: auto;
}

