/**
 * Full-width Instagram post grid only.
 */
.eapps-instagram-feed {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.eapps-instagram-feed-posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  padding: 8px 15px 20px;
  box-sizing: border-box;
}

.eapps-instagram-feed-posts-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: #f0f0f0;
}

.eapps-instagram-feed-posts-item-image,
.eapps-instagram-feed-posts-item-image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  visibility: visible !important;
  opacity: 1 !important;
}

.eapps-instagram-feed-posts-item-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.eapps-instagram-feed-posts-item:hover .eapps-instagram-feed-posts-item-overlay {
  opacity: 1;
}

.eapps-instagram-feed-posts-item-overlay svg {
  width: 32px;
  height: 32px;
  fill: #fff;
}

.eapps-instagram-feed-posts-item-video-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  color: #fff;
  font-size: 18px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

@media (min-width: 1400px) {
  .eapps-instagram-feed-posts-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 10px 20px 24px;
  }
}

@media (max-width: 991px) {
  .eapps-instagram-feed-posts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
}

@media (max-width: 575px) {
  .eapps-instagram-feed-posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 4px 10px 16px;
  }
}
