/* Расширение /cases — не меняет cases.css */

.cases-grid--related {
  grid-template-columns: repeat(3, 1fr);
}

.cases-card--compact .cases-card__body {
  padding: 14px 16px 18px;
}

.cases-card--compact .cases-card__title {
  font-size: 16px;
}

.case-gallery__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.case-gallery__btn img {
  width: 100%;
  display: block;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.case-gallery__btn:hover img {
  transform: scale(1.03);
}

.case-review__author {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.case-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.88);
  padding: 24px;
}

.case-lightbox[hidden] {
  display: none;
}

.case-lightbox__img {
  max-width: min(96vw, 1100px);
  max-height: 88vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.case-lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.cases-filters {
  max-width: 100%;
}

@media (max-width: 1024px) {
  .cases-grid--related {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .cases-grid--related {
    grid-template-columns: 1fr;
  }
}
