.custom-instagram-feed {
  width: 100%;
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 1rem;
  text-align: center;
}
.custom-instagram-feed__title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 700;
}
.custom-instagram-feed__grid {
  display: grid;
  grid-template-columns: repeat(var(--cif-columns, 3), minmax(0, 1fr));
  gap: 16px;
}
.custom-instagram-feed__item {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.custom-instagram-feed__item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,.14);
  text-decoration: none;
}
.custom-instagram-feed__image-wrap {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f4f4f4;
}
.custom-instagram-feed__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}
.custom-instagram-feed__item:hover .custom-instagram-feed__image {
  transform: scale(1.04);
}
.custom-instagram-feed__badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}
.custom-instagram-feed__caption {
  display: block;
  padding: .8rem .9rem 1rem;
  font-size: .92rem;
  line-height: 1.35;
  text-align: left;
}
.custom-instagram-feed__footer {
  margin-top: 1.25rem;
}
.custom-instagram-feed__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.15rem;
  border-radius: 999px;
  background: #111;
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
}
@media (max-width: 991px) {
  .custom-instagram-feed__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
  .custom-instagram-feed__grid { grid-template-columns: 1fr; }
}
