/* 
---------------------------------------------
Galería con Modal
--------------------------------------------- 
*/

.galeria {
  padding-top: 130px;
  padding-bottom: 80px;
}

.gallery-grid {
  margin-top: 50px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  cursor: pointer;
  transition: transform 0.3s ease;
  width: 250px;
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 15px;
  transition: all 0.3s ease;
}

.gallery-item:hover .gallery-img {
  filter: brightness(0.8);
}

/* Modal (Lightbox) */
.modal-gallery {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.95);
}

.modal-content-gallery {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
}

.close-modal {
  position: absolute;
  top: 30px;
  right: 50px;
  color: #fff;
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.close-modal:hover,
.close-modal:focus {
  color: #06424c;
}

/* Flechas de navegación */
.prev-gallery,
.next-gallery {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px;
  color: white;
  font-weight: bold;
  font-size: 40px;
  transition: 0.3s ease;
  border-radius: 0 5px 5px 0;
  user-select: none;
}

.next-gallery {
  right: 20px;
  border-radius: 5px 0 0 5px;
}

.prev-gallery {
  left: 20px;
}

.prev-gallery:hover,
.next-gallery:hover {
  background-color: rgba(6, 66, 76, 0.8);
}

/* Responsive */
@media (max-width: 768px) {
  .gallery-img {
    height: 250px;
  }

  .close-modal {
    top: 15px;
    right: 20px;
    font-size: 35px;
  }

  .prev-gallery,
  .next-gallery {
    font-size: 30px;
    padding: 10px;
  }
}
