/* Сброс стилей */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  min-height: 100vh;
}

/* Убеждаемся, что картинки видны */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Хедер */
.header {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-link {
  display: block;
  transition: transform 0.3s ease;
}

.nav-link:hover {
  transform: scale(1.1);
}

.nav-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.nav-link:hover .nav-image {
  /* Убираем обводку, оставляем только скейл */
}

/* Основной контент */
.main-content {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

.image-link {
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}

.image-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.content-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}

.image-link:hover .content-image {
  transform: scale(1.05);
}

/* Адаптивность */
@media (max-width: 768px) {
  .nav {
    gap: 1rem;
  }

  .nav-image {
    width: 80px;
    height: 80px;
  }

  .image-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
  }

  .content-image {
    height: 150px;
  }
}

@media (max-width: 480px) {
  .nav {
    gap: 0.5rem;
  }

  .nav-image {
    width: 60px;
    height: 60px;
  }

  .image-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .content-image {
    height: 120px;
  }
}
