.case-gallery-grid {
  align-items: stretch;
}

.case-gallery-card {
  min-width: 0;
  height: 100%;
  text-decoration: none;
}

.case-gallery-shell {
  height: 100%;
  overflow: hidden;
}

.case-gallery-figure {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0b1424;
}

.case-gallery-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(4, 10, 20, 0.26));
  pointer-events: none;
}

.case-gallery-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 280ms ease, filter 280ms ease;
}

.case-gallery-card:hover .case-gallery-thumb,
.case-gallery-card:focus-visible .case-gallery-thumb {
  transform: scale(1.025);
  filter: saturate(1.05);
}

.case-gallery-copy {
  min-height: 86px;
  align-items: flex-start !important;
  padding: 14px 16px !important;
}

.case-gallery-icon {
  display: none !important;
}

.case-gallery-text {
  min-width: 0;
  overflow: visible !important;
}

.case-gallery-text h4,
.case-gallery-text p {
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
}

.case-gallery-text h4 {
  font-size: 15px !important;
  line-height: 1.45;
}

.case-gallery-text p {
  margin-top: 4px;
  line-height: 1.45;
}

@media (max-width: 520px) {
  .case-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .case-gallery-copy {
    min-height: 92px;
    padding: 12px !important;
  }

  .case-gallery-text h4 {
    font-size: 14px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .case-gallery-thumb {
    transition: none;
  }
}
