@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

.hero {
  min-height: 75vh;
  background-image: linear-gradient(rgba(0, 0, 0, 0.5)),
    url(images/hero-image.jpg);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 3%;
  margin-bottom: 3.5rem;
}
.hero h1 {
  color: #fff;
  font-size: clamp(1.5rem, 2.3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.hero .content {
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.hero .search-bar {
  display: flex;
  align-items: center;
  height: 50px;
  border-radius: 30px;
  background: #fff;
}
.search-bar input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 1rem;
  min-width: 0;
  background: transparent;
  margin-left: 20px;
}
.search-bar button {
  background: #97f879;
  color: #333;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  margin-right: 5px;
}
.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  max-width: 1240px;
  padding: 0 20px;
  margin: 0 auto;
}
.galeria img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  /* break-inside: avoid; */
  /* evita que corte la imagen entre columnas */
}
.img-wrapper {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  text-wrap: nowrap;
  /*No funcionaba bien porque el display de masonry ocasionaba eso.*/
}

.img-wrapper::after {
  position: absolute;
  content: "";
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
  inset: 0;
  /* pointer-events: none; */
}
.img-wrapper:hover::after,
.img-wrapper:hover a {
  opacity: 1;
}
.img-wrapper::after,
.img-wrapper a {
  opacity: 0;
  transition: 0.3s ease;
}

.img-wrapper a {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #6a5acd;
  color: #fff;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  /* user-select: none; */
}

.img-wrapper a:hover {
  background: #5b4ac9;
}

.line {
  opacity: 0;
  transform: translateY(50px);
  animation: slideUp 0.8s ease-out forwards;
}

.line span {
  color: #97f879;
}

/* Animación por línea con delay */
.line:nth-child(1) {
  animation-delay: 0.2s;
}
.line:nth-child(2) {
  animation-delay: 0.5s;
}
.line:nth-child(3) {
  animation-delay: 0.8s;
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .hero h1 {
    gap: 0.7rem;
  }
}
.ver-mas {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  background: #6a5acd;
  color: #fff;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.ver-mas:hover {
  background: #5b4ac9;
}
