/* =========================
   GALERÍA
========================= */

.galeria {
  background: #fff;
}

/* Título */
.section-title {
  text-align: center;
  font-size: 34px;
  margin-bottom: 60px;
  color: var(--dark);
  font-weight: 600;
}

/* GRID UNIFORME */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

/* Item */
.gallery-item {
  position: relative;
  width: 100%;
  height: 220px; /* 🔥 TODAS IGUALES */
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
}

/* Imagen */
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 🔥 recorte elegante */
  transition: transform 0.5s ease;
}

/* Hover */
.gallery-item:hover img {
  transform: scale(1.08);
}

/* =========================
   MODAL
========================= */
.gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.gallery-modal img {
  max-width: 90%;
  max-height: 85%;
  border-radius: 12px;
}

/* Cerrar */
.gallery-modal .close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
}

/* Flechas */
.modal-controls span {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 60px;
  color: #fff;
  cursor: pointer;
  padding: 20px;
  user-select: none;
}

.modal-controls .prev {
  left: 30px;
}

.modal-controls .next {
  right: 30px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  .gallery-item {
    height: 200px;
  }

  .section-title {
    font-size: 28px;
  }
}
