* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.instagram-feed {
  max-width: 1200px;
  margin: 0 auto;
}

.feed-header {
  text-align: center;
  margin-bottom: 30px;
}

.feed-header h2 {
  color: #262626;
  font-size: 28px;
  margin-bottom: 10px;
}

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
  padding: 10px;
}

.instagram-post {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* 1:1 Aspect Ratio */
  background: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.instagram-post:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.instagram-post img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: background 0.3s ease;
}

.instagram-post:hover .play-button {
  background: rgba(255, 255, 255, 1);
}

.play-icon {
  width: 0;
  height: 0;
  border-left: 20px solid #262626;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 5px;
}

.follow-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0095f6;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  margin-top: 20px;
  transition: background 0.2s;
}

.follow-button:hover {
  background: #0081d9;
}

.instagram-icon {
  width: 20px;
  height: 20px;
}

/* Placeholder styling for posts without images */
.instagram-post.placeholder {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.placeholder-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  width: 80%;
}

.placeholder-text svg {
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
}

.placeholder-text p {
  font-size: 12px;
  opacity: 0.9;
}

/* 
 In mobile view, keep 2 cards in the same line by switching to 2 columns, 
 avoiding horizontal scroll and zoom out.
*/
@media (max-width: 768px) {
  .instagram-feed {
      overflow-x: unset;
  }

  .instagram-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
      min-width: unset;
      transform: none;
  }

  .play-button {
      width: 40px;
      height: 40px;
  }

  .play-icon {
      border-left: 15px solid #262626;
      border-top: 9px solid transparent;
      border-bottom: 9px solid transparent;
  }
}