
/* Galeria de Imagenes */
.gallery-title {
  text-align: center;
  padding: 20px;
  font-size: 2rem;
  color: #444;
}

/* Galería en 3 columnas */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 20px;
  justify-content: center; /* centra si hay menos de 3 imágenes en la fila */
  box-sizing: border-box;
}

/* cada ítem */
.gallery-item {
  flex: 0 0 calc((100% - 30px) / 3);
  max-width: calc((100% - 30px) / 3);
  box-sizing: border-box;

  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item img {
  display: block;
  max-width: 100%;
  height: auto;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

@media (max-width: 992px) {
  .gallery-item {
    flex: 0 0 calc((100% - 15px) / 2);
    max-width: calc((100% - 15px) / 2);
  }
}

@media (max-width: 600px) {
  .gallery-item {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Modal */
.modal {
  position: fixed!important;
  z-index: 9999!important;
  left: 0;
  top: 0px;
  padding-top:30px!important;
  width: 100%!important;
  height: 100%!important;
  background-color: rgba(0,0,0,0.9);
  text-align: center;
}

.modal-content {
  max-width: 80%;
  max-height: 80%;
  margin: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255,255,255,0.5);
  object-fit: contain;
}

/* Botón cerrar */
.close {
  position: absolute;
  top: 15px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
  z-index: 10000;
}

.close:hover {
  color: #ff4444;
}

/* Flechas */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 40px;
  transition: 0.3s;
  user-select: none;
  z-index: 10000;
}

.prev { left: 20px; }
.next { right: 20px; }

.prev:hover, .next:hover {
  color: #ff4444;
}


.gallery-img {
  cursor: pointer;
  transition: transform 0.3s ease;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.gallery-img:hover {
  transform: scale(1.05);
}

.modal-content {
  background: transparent;
  border: none;
  box-shadow: none;
}

.modal-body img {
  max-height: 85vh;   /* limita altura en pantallas pequeñas */
  width: auto;
  height: auto;
  object-fit: contain; /* no deforma */
  border-radius: 10px;
}