
/* 4-up responsive grid (1/2/3/4 cols), softer hover, rounded corners */
/* Unchanged grid columns */
.gallery-grid {
  --gap: 16px;
  --radius: 12px;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: 16px;
}
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px){ .gallery-grid { grid-template-columns: repeat(4, 1fr); } }

.gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111;
  aspect-ratio: 4 / 3;
  transform: translateZ(0);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease;  /* мягче и быстрее */
  display: block;
}
.gallery-item:hover img {
  transform: scale(1.03);          /* меньше увеличение */
}

/* Caption: ВСЕГДА виден, аккуратный градиент снизу */
.gallery-item .cap {
  position: absolute;
  left: 8px; right: 8px; bottom: 8px;
  padding: 6px 10px;
  font-size: 14px;
  line-height: 1.2;
  color: #fff;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 100%);
  opacity: 1;                      /* <-- всегда видно */
  transition: opacity .2s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}

/* Текстовые блоки */
.prose { line-height: 1.7; }
.prose p { margin: 0 0 1em; }
.muted { opacity: .75; }
