.horse-gallery-component .wrapper {
  margin: 50px auto;
  max-width: 70%;
}

.horse-gallery-component .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.horse-gallery-component .image-wrapper {
  position: relative;
  width: 100%;
}

.horse-gallery-component .image-wrapper:hover {
  cursor: pointer;
}

.horse-gallery-component .img-box {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 150%;
  overflow: hidden;
  border: 2px solid #73344986;
  border-radius: 4px;
}

.horse-gallery-component .img-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 300px;
  transition: transform 0.3s ease;
}

.horse-gallery-component .img-box:hover img {
  transform: scale(1.1);
}

.horse-gallery-component .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  opacity: 0;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  text-align: center;
  transition: opacity 0.3s;
}

.horse-gallery-component .img-box:hover .overlay {
  opacity: 1;
}

.horse-gallery-component .overlay p {
  font-size: clamp(16px, 2vw, 20px);
  max-height: 100%;
  overflow-y: auto;
  padding: 10px;
}

.horse-gallery-component .name-bar {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: #73344980;
  color: white;
  text-align: center;
  padding: 8px;
  font-weight: bold;
  height: 30px;
  transition: opacity 0.3s;
}

.horse-gallery-component .img-box:hover .name-bar {
  opacity: 0;
}
.horse-gallery-component .horse-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
@media (max-width: 900px) {
  .horse-gallery-component .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .horse-gallery-component .grid {
    grid-template-columns: 1fr;
  }
}
