/* Instagram feed — justified single row of linked tiles.
   Tile widths follow each image's aspect ratio (inline flex-grow
   set by the block template), so the row fills edge to edge with
   a shared height, exactly like the original grid. */

.block-instagram-feed { margin-top: var(--grid-gap); }

.block-instagram-feed__grid {
  display: flex;
  gap: var(--grid-gap);
}

.block-instagram-feed__item {
  position: relative;
  overflow: hidden;
  display: block;
  min-width: 0;
  flex: 1 1 0;
}

.block-instagram-feed__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.block-instagram-feed__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  opacity: 0;
  transition: opacity var(--transition);
}

.block-instagram-feed__item:hover .block-instagram-feed__caption { opacity: 1; }

@media (max-width: 820px) {
  .block-instagram-feed__grid { flex-wrap: wrap; }

  .block-instagram-feed__item {
    flex: 1 1 calc(50% - var(--grid-gap)) !important;
    aspect-ratio: 3 / 4 !important;
  }
}
