/* ===== Блог: оформлення й дрібна взаємодія. Окремий файл, щоб не чіпати спільні стилі. ===== */

/* --- Блок «Актуальна стаття»: фото цілим кадром, текст піднятою плашкою --- */
.section-hero.is-blog-page .blog-card-top{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  grid-template-rows:auto auto;
  align-items:start;        /* по центру фото й плашка розʼїжджались по висоті */
  column-gap:26px;
  row-gap:0;
  padding:0;
  min-height:0;
  background:transparent;
  border-radius:0;
  overflow:visible;
}
.section-hero.is-blog-page .blog-card-top__img-wrap{
  position:relative;
  inset:auto;
  grid-column:1;
  grid-row:1 / span 2;
  align-self:start;
  aspect-ratio:16 / 9;
  border-radius:28px;
  overflow:hidden;
  box-shadow:0 14px 34px -16px rgba(29,36,66,.28);
}
.section-hero.is-blog-page .blog-card-top__img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  /* custom.js ганяє паралакс по селектору «.section-hero img» — він писався для
     героя головної, а наша картка лежить у тій самій секції й потрапила під нього
     випадково. Інлайновий translate зсував фото в рамці 16:9: зверху щілина,
     знизу обріз. Картка не герой, рух їй не потрібен. */
  translate:none !important;
  will-change:auto !important;
}
.section-hero.is-blog-page .blog-card-top__txt-wrap{
  grid-column:2;
  grid-row:1;
  position:relative;
  z-index:2;
  max-width:none;
  margin-left:0;
  padding:34px 34px 26px;
  border-radius:20px;
  background:#fff;
  box-shadow:0 24px 54px -18px rgba(29,36,66,.26), 0 2px 6px rgba(29,36,66,.06);
}
.section-hero.is-blog-page .blog-card-top .div-block-70{
  grid-column:2;
  grid-row:2;
  position:relative;
  z-index:2;
  margin-left:0;
  /* кнопка стоїть по лівому краю плашки, а не по її тексту */
  padding:18px 0 0;
  justify-self:start;
}
.section-hero.is-blog-page .blog-card-top .div-block-70 .button{
  display:inline-block;
  width:auto;
}

@media (max-width:991px){
  .section-hero.is-blog-page .blog-card-top{grid-template-columns:1fr}
  .section-hero.is-blog-page .blog-card-top__img-wrap{grid-column:1;grid-row:1}
  .section-hero.is-blog-page .blog-card-top__txt-wrap{
    grid-column:1;grid-row:2;margin:-42px 16px 0;padding:24px 22px 20px;
  }
  .section-hero.is-blog-page .blog-card-top .div-block-70{
    grid-column:1;grid-row:3;margin-left:0;padding:16px 16px 0;
  }
}

/* --- Видимий фокус: повертаємо те, що прибрав шаблон --- */
.blog-card a:focus-visible,
.toc_link:focus-visible,
.f-nav__link:focus-visible,
.blog-link:focus-visible,
.article__text a:focus-visible,
.vd-faq__btn:focus-visible,
.vd-top:focus-visible,
a.button:focus-visible{
  outline:3px solid #43abff;
  outline-offset:3px;
  border-radius:6px;
}

/* --- Смуга прогресу читання --- */
.vd-progress{
  position:fixed;inset:0 0 auto 0;height:3px;z-index:9999;
  background:transparent;pointer-events:none;
}
.vd-progress__bar{
  height:100%;width:0;
  background:#43abff;
  border-radius:0 3px 3px 0;
  transition:width .12s linear;
}

/* --- Рядок дати й часу читання --- */
/* дата стояла 16px, як основний текст, і не вирівнювалась із плашкою */
.blog-date-wrap{
  display:flex;
  align-items:center;
  gap:4px;
  flex-wrap:wrap;
}
.article__text-date{
  align-self:center;
  font-size:14px;
  line-height:1.4;
  color:#5a6480;
}
.vd-readtime{
  display:inline-flex;
  align-items:center;
  align-self:center;
  margin-left:10px;
  padding:3px 10px;
  border-radius:999px;
  background:rgba(67,171,255,.12);
  color:#3f4660;
  font-size:13px;
  line-height:1.4;
  white-space:nowrap;
}

/* --- Кнопка «нагору» --- */
.vd-top{
  position:fixed;right:24px;bottom:24px;z-index:9998;
  width:48px;height:48px;border:0;border-radius:14px;
  background:#1d2442;color:#fff;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  opacity:0;visibility:hidden;transform:translateY(10px);
  transition:opacity .2s ease,transform .2s ease,visibility .2s;
  box-shadow:0 10px 26px -10px rgba(29,36,66,.55);
}
.vd-top.is-on{opacity:1;visibility:visible;transform:none}
.vd-top:hover{background:#2b355e}
.vd-top svg{width:20px;height:20px}

/* --- Акордеон: робимо заголовок справжньою кнопкою --- */
.vd-faq__btn{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  width:100%;min-height:44px;
  background:transparent;border:0;padding:0;margin:0;
  font:inherit;color:inherit;text-align:left;cursor:pointer;
}

@media (prefers-reduced-motion:reduce){
  .vd-progress__bar,.vd-top{transition:none}
}

/* --- Типографіка статті. Виміряно до правки: інтервал 1,4 і рядок у 88 знаків. --- */
.article__text p,
.article__text li{
  line-height:1.65;
  max-width:68ch;              /* міра рядка 65–75 знаків — межа комфортного читання */
}
.article__text li{margin-bottom:.5em}
.article__text ul{margin-bottom:1.35em}
.article__text p{margin-bottom:1.15em}

.article__text h2{
  letter-spacing:-.015em;      /* великий Inter без цього виглядає розрідженим */
  line-height:1.18;
  margin-top:2.1em;
  margin-bottom:.55em;
  max-width:24ch;
}
.article__text h3{
  letter-spacing:-.01em;
  line-height:1.25;
  margin-top:1.5em;
  margin-bottom:.4em;
  max-width:30ch;
}
.article__text h2:first-child,
.article__text h3:first-child{margin-top:0}

.article__text strong{font-weight:600}

/* великий заголовок статті */
.hero-title-about{letter-spacing:-.02em}

/* питання у відповідях — та сама щільність, що й у тілі */
.faq-item__text p{line-height:1.65;max-width:68ch}
.faq__title{line-height:1.35}

@media (max-width:767px){
  .article__text p,.article__text li{max-width:none;line-height:1.6}
  .article__text h2{max-width:none;margin-top:1.7em}
  .article__text h3{max-width:none}
}

/* ===== Другий прохід аудиту ===== */

/* Дата на картці: було 10px і контраст 2,82:1 при нормі 4,5:1 */
.blog-card__date{
  font-size:13px;
  color:#5a6480;
}

/* Місце під зображення зарезервоване — картка не стрибає, поки фото вантажиться */
.blog-card__img-wrap{
  width:100%;            /* без цього aspect-ratio рахує ширину від висоти
                            й картинка стає вужчою за картку */
  height:auto;
  aspect-ratio:16 / 9;
  overflow:hidden;
  background:#e8eef4;
  border-radius:16px;
}
.blog-card__img-wrap img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Картка відгукується цілком. Тіні тут бути не може: картка прозора,
   фону в неї немає — тінь малювалась би навколо порожнього місця.
   Тому відгук дає саме зображення, яке обрізане рамкою. */
.blog-card{
  position:relative;
  border-radius:18px;
}
.blog-card__img-wrap img{
  transition:transform .4s cubic-bezier(.2,.6,.2,1);
}
.blog-card:hover .blog-card__img-wrap img{
  transform:scale(1.045);
}
.blog-card__title{
  transition:color .18s ease;
}
.blog-card:hover .blog-card__title{
  color:#2a6fb0;
}
.blog-card:focus-within .blog-card__img-wrap{
  outline:3px solid #43abff;
  outline-offset:2px;
}
.blog-card a.blog-link:focus-visible{outline:none}

@media (prefers-reduced-motion:reduce){
  .blog-card__img-wrap img,
  .blog-card__title{transition:none}
  .blog-card:hover .blog-card__img-wrap img{transform:none}
}

/* --- Фото в тексті з обтіканням: скруглення, тінь, підпис --- */
.vd-figure{
  float:right;
  width:min(46%,430px);
  margin:4px 0 22px 30px;
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 20px 46px -20px rgba(29,36,66,.34), 0 2px 6px rgba(29,36,66,.06);
}
.vd-figure.is-left{float:left;margin:4px 30px 22px 0}
.vd-figure img{display:block;width:100%;height:auto}
.vd-figure figcaption{
  padding:10px 14px 12px;
  background:#fff;
  font-size:13px;
  line-height:1.45;
  color:#5a6480;            /* 4,8:1 — світліший сірий не проходить за контрастом */
}
/* заголовок завжди починає новий рядок під фото */
.article__text h2{clear:both}

@media (max-width:767px){
  .vd-figure,.vd-figure.is-left{
    float:none;width:100%;margin:18px 0 22px;
  }
}

/* ===== Блок «Питання та відповіді» ===== */
/* Було: питання 22px насиченістю 700, нульові внутрішні відступи,
   плашки склеєні між собою, сіра заливка. Читалось як список брусків. */

.cms-faq__list .faq-item{
  background:#fff;
  border:1px solid rgba(29,36,66,.10);
  border-radius:16px;
  margin-bottom:10px;
  overflow:hidden;
  transition:border-color .18s ease, box-shadow .18s ease;
}
.cms-faq__list .faq-item:hover{
  border-color:rgba(29,36,66,.20);
  box-shadow:0 10px 26px -18px rgba(29,36,66,.35);
}
.cms-faq__list .faq-item.active,
.cms-faq__list .faq-item:has([aria-expanded="true"]){
  border-color:rgba(67,171,255,.45);
  box-shadow:0 14px 32px -18px rgba(29,36,66,.30);
}

.cms-faq__list .faq-item__header{
  min-height:64px;
  padding:18px 20px 18px 24px;
  gap:18px;
}

.cms-faq__list .faq__title,
.cms-faq__list .faq__title strong{
  font-size:17px;
  font-weight:600;
  line-height:1.45;
  letter-spacing:-.005em;
  color:#1d2442;
}

.cms-faq__list .faq-item__close{
  flex:0 0 auto;
  width:32px;height:32px;
  display:flex;align-items:center;justify-content:center;
  border-radius:50%;
  background:rgba(29,36,66,.05);
}
.cms-faq__list .faq-item__icon{
  color:#1d2442;
  display:flex;
}
.cms-faq__list .faq-item__icon svg{width:18px;height:18px}

.cms-faq__list .faq-item__body{padding:0 24px 20px}
.cms-faq__list .faq-item__text p{
  font-size:16px;
  line-height:1.65;
  color:#3f4660;
  max-width:70ch;
  margin:0;
}

@media (max-width:767px){
  .cms-faq__list .faq-item__header{min-height:58px;padding:16px 14px 16px 18px;gap:12px}
  .cms-faq__list .faq__title,
  .cms-faq__list .faq__title strong{font-size:16px}
  .cms-faq__list .faq-item__body{padding:0 18px 18px}
}

@media (prefers-reduced-motion:reduce){
  .cms-faq__list .faq-item{transition:none}
}
