.galeria {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columnas iguales */
  grid-template-rows: repeat(6, 1fr);    /* 6 filas iguales */
  gap: 15px;
  padding: 20px;
}

.galeria img {
  width: 100%;   /* se adapta a su celda */
  height: 100%;  /* ocupa toda la celda */
  object-fit: cover; /* mantiene proporción */
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

.galeria img:hover {
  transform: scale(1.05);
}

/* Modal estilo */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 50%; height: 50%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: flex-start; /* 👈 muestra el contenido desde arriba */
  overflow-y: auto;        /* permite scroll total del modal */
  overflow-x: hidden;
  z-index: 9999;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 900px;
  margin: 40px auto;       /* 👈 separa del borde superior */
  text-align: center;
}

/* Imagen dentro del modal */
.modal-img {
  width: 100%;             /* ocupa todo el ancho */
  height: auto;            /* mantiene proporciones */
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: cover;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    padding: 15px;
    margin: 20px auto;
  }

  .modal-img {
    object-fit: contain;   /* en mobile muestra todo sin recortar */
  }
}



.map-link {
  margin-top: 15px;
}

.map-link a {
  display: inline-block;
  background: #234060;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s;
}

.map-link a:hover {
  background: #3a5a8a;
}

.cerrar {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}
