
/* ── Каркас ── */
.case-page { font-family: 'Onest', system-ui, sans-serif; }
.case-page,
.case-page *:not(svg):not(svg *) { font-family: 'Onest', system-ui, sans-serif; }
.case-page { --case-col: 800px; }
.case-page .t-container { max-width: calc(var(--case-col) + 40px); }
.case-page .content-page__title { max-width: none; }
.t-zoomer__wrapper { display: none !important; }
.case-content > * { max-width: none; box-sizing: border-box; }

.case-lead {
  font-size: 22px;
  line-height: 1.5;
  color: #3d3d3d;
  margin: 0 0 8px;
}

.case-integrator {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: #fff;
  border-radius: 16px;
  border-left: 4px solid #FEE121;
  padding: 16px 22px;
  margin: 16px 0 8px;
}
.case-integrator__label { font-size: 15px; color: #6b7280; }
.case-integrator__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #171717;
}
.content-page__body .case-integrator__brand img { height: 30px; width: auto; display: block; margin: 0; border-radius: 0; }

.case-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  column-gap: 32px;
  row-gap: 24px;
  align-items: start;
  margin: 8px 0 16px;
}
.case-row__main { min-width: 0; }
.content-page__body .case-row__main > :last-child { margin-bottom: 0; }
.case-row__side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.content-page__body .case-row__side img { width: 100%; height: auto; margin: 0; display: block; }
.content-page__body .case-row__side figure { margin: 0; }

.content-page__body blockquote p + p { margin-top: 16px; }

.content-page__body figure.case-photo { position: relative; }
.case-photo__badge {
  position: absolute;
  top: 7%;
  right: 3%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18%;
  min-width: 96px;
  aspect-ratio: 2 / 1;
  padding: 10px 12px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 12px;
}
.content-page__body .case-photo__badge img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.case-logocard {
  background: #fff;
  border-radius: 16px;
  padding: 40px 32px;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.content-page__body .case-logocard img.case-clientlogo {
  max-width: 100%;
  max-height: 120px;
  width: auto;
  height: auto;
  display: block;
  margin: 0;
  border-radius: 0;
}

.case-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 16px;
}
.case-facts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.case-facts--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.case-facts--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.case-facts--5 .case-fact { padding: 22px 18px; }
.case-facts--5 .case-fact__num { font-size: 28px; }
.case-fact { background: #fff; border-radius: 16px; padding: 26px 24px; min-width: 0; }
.case-fact__num {
  display: block;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.05;
  color: #171717;
  overflow-wrap: anywhere;
}
.case-fact__num::after {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin-top: 14px;
  background: #FEE121;
  border-radius: 2px;
}
.content-page__body .case-fact__txt { margin: 14px 0 0; font-size: 15px; line-height: 1.5; color: #171717; }

.case-solutions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 16px;
}
.case-solutions--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.case-solutions--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.case-solutions--1 { grid-template-columns: minmax(0, 1fr); }
.case-solution {
  background: #fff;
  border-radius: 16px;
  padding: 26px 24px;
  border-left: 4px solid #FEE121;
  min-width: 0;
}
.case-solution__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FEE121;
  color: #171717;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}
.content-page__body .case-solution h3 { margin: 0 0 10px; font-size: 18px; font-weight: 700; line-height: 1.35; color: #171717; }
.content-page__body .case-solution p,
.content-page__body .case-solution li { font-size: 15px; line-height: 1.5; color: #3d3d3d; max-width: 100%; }
.content-page__body .case-solution p { margin: 0 0 8px; }
.content-page__body .case-solution > :last-child { margin-bottom: 0; }
.content-page__body .case-solution ul { margin: 0; padding-left: 20px; }
.content-page__body .case-solution img { margin: 12px 0 0; width: 100%; height: auto; }
.content-page__body .case-solutions > figure { margin: 0; align-self: center; min-width: 0; }

.case-result {
  background: #fff;
  border-left: 4px solid #FEE121;
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 20px 0 16px;
  font-size: 17px;
  line-height: 1.5;
  color: #171717;
}
.content-page__body .case-result p { margin: 0 0 8px; }
.content-page__body .case-result > :last-child { margin-bottom: 0; }

.case-content > figure { margin: 28px 0; max-width: 100%; }
.content-page__body figure img,
.case-content > figure img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 0;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}
.case-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0;
}
.case-gallery--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.content-page__body .case-gallery figure { margin: 0; min-width: 0; }

.case-media { margin: 28px 0; }
.case-media__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.case-media__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.case-media__print { display: none; }

.case-carousel { margin: 28px 0; }
.case-carousel .news-carousel__track {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}
.content-page__body .case-carousel .news-carousel__slide {
  margin: 0;
  padding: 16px 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.content-page__body .case-carousel .news-carousel__slide img {
  aspect-ratio: auto;
  object-fit: contain;
  width: auto;
  max-width: 100%;
  max-height: 560px;
  height: auto;
  border-radius: 8px;
  box-shadow: none;
}
.content-page__body .case-carousel .news-carousel__slide figcaption { text-align: center; max-width: 780px; }
.case-carousel { padding-bottom: 64px; }
.case-carousel .news-carousel__arrow {
  top: auto;
  bottom: 0;
  transform: none;
  width: 48px;
  height: 48px;
  background: #fff;
  border: 1px solid #171717;
  box-sizing: border-box;
  padding: 0;
  box-shadow: none;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.case-carousel .news-carousel__arrow--prev { left: calc(50% - 54px); }
.case-carousel .news-carousel__arrow--next { right: calc(50% - 54px); }
.case-carousel .news-carousel__arrow:hover:not([disabled]) { background: #171717; }
.case-carousel .news-carousel__arrow:hover:not([disabled])::before { border-color: #fff; }
.case-carousel .news-carousel__dots { flex-wrap: wrap; margin-top: 14px; }

/* Сноска «подготовлено на основе материалов …» со ссылкой на первоисточник */
.content-page__body .case-source {
  margin: 40px 0 0;
  padding: 14px 20px;
  background: #fff;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #6b7280;
}
.content-page__body .case-source a {
  color: #171717;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}
.content-page__body .case-source a:hover { text-decoration-color: #FEE121; }

/* ── Адаптив ── */
@media screen and (max-width: 980px) {
  .case-page .t-container { max-width: 760px; }
  .case-content > * { max-width: none; }
  .case-row { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .case-logocard { min-height: 0; padding: 32px; }
  .case-facts--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-facts--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .case-solutions--3,
  .case-solutions--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-gallery--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 640px) {
  .case-lead { font-size: 19px; }
  .case-facts,
  .case-facts--2,
  .case-facts--4,
  .case-facts--5,
  .case-solutions,
  .case-solutions--3,
  .case-solutions--4,
  .case-gallery,
  .case-gallery--3 { grid-template-columns: minmax(0, 1fr); }
  .case-fact__num { font-size: 34px; }
  .content-page__body .case-carousel .news-carousel__slide { padding: 10px 10px 12px; }
  .content-page__body .case-carousel .news-carousel__slide img { max-height: 70vh; }
  .case-integrator { padding: 14px 18px; }
}
