/* ==========================================================================
   INSTAGRAM.CSS - Instagram галерея
   Размер: ~2 KB | Загрузка: MainView
   ========================================================================== */

.instagram-section {
  padding: var(--space-3xl) 0;
  background: #fff;
  min-height: 400px; /* Резервируем высоту для предотвращения CLS */
}

.instagram-section.is-loaded {
  min-height: 0; /* Убираем, когда контент загружен */
}

.instagram-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}
.instagram-title {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: var(--space-sm);
  color: #000;
}
.instagram-subtitle {
  font-size: var(--text-sm);
  color: var(--c-text-light);
}

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.instagram-item {
  position: relative;
  overflow: hidden;
  padding-bottom: 100%;
  cursor: pointer;
  background: #f5f5f5;
}
.instagram-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.instagram-item:hover img {
  transform: scale(1.1);
}

.instagram-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.instagram-item:hover .instagram-overlay {
  opacity: 1;
}

.instagram-username {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.instagram-link-all {
  display: block;
  text-align: center;
  margin-top: var(--space-2xl);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #000;
  border-bottom: 1px solid #000;
  padding-bottom: 2px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  transition: opacity 0.3s ease;
}
.instagram-link-all:hover {
  opacity: 0.6;
  color: #000;
}

@media (max-width: 991px) {
  .instagram-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 767px) {
  .instagram-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }
}
