/* Hero */
.galeria-hero {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.galeria-hero h1 {
  font-family: 'Dancing Script', cursive;
  font-size: 3.8rem;
  color: #333;
  text-shadow: 0em .1em .1em rgb(0 0 0 / 76%);
}

/* 🔹 Filtros */
.galeria-filtros {
  text-align: center;
  margin: 20px 0 40px;
}
.galeria-filtros button,
.galeria-filtros input {
  border: 2px solid #e1b2c8;
  background: #fff;
  color: #333;
  padding: 10px 20px;
  margin: 5px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Lato";
}
.galeria-filtros button.activo,
.galeria-filtros button:hover {
  background: linear-gradient(90deg, #f78ca0, #f9748f);
  color: #fff;
  border-color: #f78ca0;
}
.galeria-filtros input {
  border-radius: 20px;
  padding: 10px 15px;
  outline: none;
}

/* 🔹 Grid */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 0 20px 60px;
}
.galeria-grid .item {
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
}
.galeria-grid img {
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}
.galeria-grid .item:hover img {
  transform: scale(1.1);
}

/* 🔹 Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
}
.lightbox .cerrar {
  position: absolute;
  top: 20px; right: 30px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}
.lightbox-controles {
  margin-top: 15px;
  color: #fff;
  font-size: 2rem;
}
.lightbox-controles .prev,
.lightbox-controles .next {
  cursor: pointer;
  margin: 0 20px;
  user-select: none;
}

/* ===========================
   RESPONSIVE DESIGN
=========================== */

/* Tablets */
@media (max-width: 992px) {
  .galeria-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .galeria-hero h1 {
    font-size: 2.4rem;
  }

  .galeria-grid .item img {
    height: 220px;
  }

  .galeria-filtros {
    flex-direction: row;
    gap: 8px;
  }
}

/* Móviles medianos */
@media (max-width: 768px) {
  .galeria-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .galeria-grid .item img {
    height: 200px;
  }

  .galeria-hero h1 {
    font-size: 2rem;
  }

  .galeria-filtros {
    flex-direction: column;
    align-items: stretch;
  }

  .galeria-filtros #buscador {
    width: 75%;
  }
}

/* Móviles pequeños */
@media (max-width: 480px) {
  .galeria-grid {
    grid-template-columns: 1fr;
  }

  .galeria-grid .item img {
    height: 180px;
  }

  .galeria-hero {
    padding: -7px 15px;
  }

  .galeria-hero h1 {
    font-size: 2.4rem;
  }
}
