/* ===== Кейс «Маргоша Вет»: статистика и скриншоты ===== */

.case-study-page--margosha .case-study-work {
  border-radius: 44px;
}

.margosha-results {
  padding-top: 36px;
  border-top: 1px solid rgba(247, 247, 244, .16);
}

.margosha-results .case-study-results__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.margosha-results .case-study-metric {
  min-width: 0;
  padding: clamp(20px, 2vw, 32px);
}

.margosha-results .case-study-metric strong {
  font-size: clamp(48px, 4.4vw, 76px);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.margosha-results__note {
  max-width: 76em;
  margin: 22px 0 0;
  color: rgba(247, 247, 244, .6);
  font-size: 13px;
  line-height: 1.6;
}

.case-study-page--margosha .case-study-site-gallery__preview {
  background: #faf9ef;
}

/* ===== Единые превью сайта и админ-панели ===== */
.margosha-website-gallery .case-study-site-gallery__crop {
  height: 100%;
  aspect-ratio: auto;
}

.margosha-website-gallery img {
  position: static;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--preview-position, center top);
}

.margosha-maps-gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  margin: 0;
}

.margosha-maps-gallery__preview {
  align-items: start;
  aspect-ratio: 9 / 16;
  background: #fff;
}

/* В превью — единые портретные рамки, в просмотрщике — весь скриншот. */
.margosha-maps-gallery__preview .case-study-site-gallery__crop {
  height: 100%;
  aspect-ratio: auto;
}

.margosha-maps-gallery__preview img {
  position: static;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}

.margosha-maps-gallery figcaption,
.margosha-report__gallery figcaption {
  color: rgba(247, 247, 244, .65);
}

.margosha-report {
  display: grid;
  grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr);
  align-items: center;
  gap: 48px;
  margin-top: clamp(48px, 6vw, 96px);
  padding-top: 40px;
  border-top: 1px solid rgba(247, 247, 244, .16);
}

.margosha-report__copy .case-study-eyebrow {
  color: rgba(247, 247, 244, .5);
}

.margosha-report__copy h3 {
  margin: 16px 0;
  font-size: clamp(25px, 2.4vw, 38px);
  font-weight: 400;
  line-height: 1.2;
}

.margosha-report__copy > p:last-child {
  max-width: 29em;
  margin: 0;
  color: rgba(247, 247, 244, .65);
  font-size: 16px;
  line-height: 1.6;
}

.margosha-report__gallery {
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
}

.margosha-report__gallery .case-study-site-gallery__preview {
  aspect-ratio: 1280 / 577;
}

@media (max-width: 1100px) {
  .margosha-results .case-study-results__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .margosha-maps-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .margosha-maps-gallery > .case-study-site-gallery__figure:last-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 12px) / 2);
  }

  .case-study-page--margosha .case-study-work {
    border-radius: 30px;
  }

  .margosha-results .case-study-metric {
    padding: 20px 16px;
    border-radius: 20px;
  }

  .margosha-results .case-study-metric strong {
    font-size: clamp(36px, 9vw, 48px);
  }

  .margosha-results .case-study-metric p {
    font-size: 14px;
  }

  .margosha-report {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}
