* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.gallery {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #111;
}

ul.results {
  display: flex;
  gap: 1rem;
  list-style-type: none;
  padding: 1rem;
  overflow-x: auto;
  max-width: 90vw;
}

.result {
  flex: 1 1 150px;
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
}

.result img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  transition: all 0.4s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* Hover Effects */
.results:hover .result {
  flex: 1 1 100px;
  opacity: 0.5;
  transform: scale(0.95);
}

.results .result:hover {
  flex: 3 1 400px;
  opacity: 1;
  transform: scale(1.05);
  z-index: 5;
}

.results .result:hover img {
  border: 1px solid #fff;
}

.img-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

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

.caption {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 0.5rem;
  background-color: rgba(0, 0, 0, 0.6); /* Black with transparency */
  color: white;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.img-container:hover .caption {
  opacity: 1;
}

