.gallery {
  padding: 2rem;
  background-color: #f9f9f9;
  text-align: center;
}

.gallery h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #333;
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  justify-items: center;
}

.gallery-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 300px;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.gallery-item p {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  color: #555;
  text-align: center;
}

@media (max-width: 768px) {
  .gallery h3 {
    font-size: 1.5rem;
  }

  .gallery-container {
    gap: 0.75rem;
  }

  .gallery-item p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .gallery h3 {
    font-size: 1.25rem;
  }

  .gallery-container {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
  }

  .gallery-item p {
    font-size: 0.8rem;
  }
}
