*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

/* GALERÍA */
.gallery{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:20px;
  width:100%;
  margin-top:20px;
}

.gallery img{
  width:100%;
  height:150px;
  object-fit:cover;
  border-radius:12px;
  cursor:pointer;
  transition:0.3s ease;
}

.gallery img:hover{
  transform:scale(1.03);
  opacity:0.9;
}

/* LIGHTBOX */
.lightbox{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  display:none;
  justify-content:center;
  align-items:center;
  background:rgba(0,0,0,0.80);
  z-index:999999;
}

.lightbox.active{
  display:flex !important;
}

.lightbox img{
  max-width:90%;
  max-height:90vh;
  object-fit:contain;
  margin:auto;
  display:block;
  position:relative;
  z-index:1;
  pointer-events:none;
}

.lightbox-img-wrapper{
  position:relative;
  overflow:hidden;
  width:90%;
  max-width:1200px;
  display:flex;
  justify-content:center;
  align-items:center;
}

.lightbox img{
  max-width:100%;
  max-height:90vh;
  object-fit:contain;
  animation:slideIn 0.35s ease;
}

@keyframes slideIn{

from{
  opacity:0;
  transform:translateX(80px);
}

to{
  opacity:1;
  transform:translateX(0);
}

}

/* BOTONES */
.prev,
.next{
  position:absolute;
  color:white;
  font-size:40px;
  cursor:pointer;
  user-select:none;
  padding:10px;
  transition:0.2s;
  z-index: 11;
}

.close{
  position:fixed;
  top:20px;
  right:30px;
  width:50px;
  height:50px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:42px;
  color:#fff;
  cursor:pointer;
  z-index:99999999;
  background:rgba(0,0,0,0.4);
  border-radius:10px;
  padding-bottom: 5px;
}

.close:hover,
.prev:hover,
.next:hover{
  opacity:0.7;
}

.prev{
  left:30px;
  top:50%;
  transform:translateY(-50%);
}

.next{
  right:30px;
  top:50%;
  transform:translateY(-50%);
}

@media(max-width:768px){
.lightbox img{
  max-width:95%;
}

.prev,
.next{
  font-size:32px;
}

.gallery{
  grid-template-columns:repeat(2, 1fr);
} 

}