.rob-ig-feed {
  display: grid;
  grid-template-columns: repeat(var(--rob-ig-columns, 4), minmax(0, 1fr));
  gap: 16px;
}

.rob-ig-card {
  position: relative;
  display: block;
  border: 0;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #f4f4f4;
  cursor: pointer;
  border-radius: 14px;
}

.rob-ig-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.rob-ig-card:hover img {
  transform: scale(1.04);
}

.rob-ig-card-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px;
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
}

.rob-ig-modal[hidden] {
  display: none;
}

.rob-ig-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 24px;
}

.rob-ig-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.76);
}

.rob-ig-dialog {
  position: relative;
  width: min(920px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 22px 70px rgba(0,0,0,.35);
}

.rob-ig-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  border: 0;
  width: 42px;
  height: 42px;
  font-size: 32px;
  line-height: 1;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  cursor: pointer;
}

.rob-ig-media {
  background: #111;
  min-height: 280px;
  display: grid;
  place-items: center;
}

.rob-ig-media img,
.rob-ig-media video {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.rob-ig-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px;
}

.rob-ig-prev,
.rob-ig-next {
  border: 1px solid #ddd;
  background: #fff;
  min-width: 42px;
  min-height: 38px;
  border-radius: 999px;
  font-size: 26px;
  cursor: pointer;
}

.rob-ig-caption {
  white-space: pre-wrap;
  padding: 0 22px 18px;
  line-height: 1.5;
}

.rob-ig-link {
  display: inline-block;
  margin: 0 22px 22px;
  font-weight: 700;
}


.rob-ig-card[hidden] {
  display: none;
}

.rob-ig-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.rob-ig-load-more {
  border: 0;
  border-radius: 999px;
  padding: 13px 28px;
  font-weight: 700;
  cursor: pointer;
  background: #111;
  color: #fff;
  transition: transform .2s ease, opacity .2s ease;
}

.rob-ig-load-more:hover {
  transform: translateY(-1px);
  opacity: .88;
}

.rob-ig-load-more[hidden] {
  display: none;
}

.rob-ig-error {
  padding: 12px 14px;
  border-left: 4px solid #d63638;
  background: #fff5f5;
}

@media (max-width: 720px) {
  .rob-ig-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .rob-ig-card-caption {
    display: none;
  }

  .rob-ig-modal {
    padding: 10px;
  }
}
