* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.div {
  height: 160px;
  width: 100%;
}

.titulo {
  font-size: 42px;
  color: #2a2a90;
  text-align: center;
  margin-bottom: 30px;
}

.img-tam {
  height: 200px;
}

.contenedor-cajas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 30px 20px 120px;
  gap: 20px;
  color: white;
}

.caja-imagen {
  position: relative;
  width: 450px;
  height: 250px;
  margin: 20px;
  border-radius: 10px 10px 0px 0px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.caja-imagen:hover {
  transform: translateY(-5px);
}

.caja-imagen img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 10px 10px 0px 0px;
}

.caja-imagen .etiqueta-caja {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #e91e63;
  color: white;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 3px;
  z-index: 2;
}

.caja-imagen .subtit-imagen {
  background-color: #0571cf;
  color: white;
  padding: 10px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  border-radius: 0px 0px 10px 10px;
}

/* Modal */
.modal-galeria {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.modal-galeria.open {
  display: flex;
}

.modal-galeria-content {
  position: relative;
  max-width: 80vw;
  max-height: 80vh;
  animation: fadeIn 0.3s ease;
}

.modal-galeria-img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  border-radius: 8px;
  display: block;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

/* Animación */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-galeria-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 42px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 6px;
  z-index: 10001;
}

.prev {
  left: 30px;
}
.next {
  right: 30px;
}

.modal-galeria-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.cerrar {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 40px;
  background: transparent;
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 10002;
}

@media (max-width: 768px) {
  .modal-galeria-btn {
    font-size: 28px;
    background: rgba(0, 0, 0, 0);
  }
  .modal-galeria-btn:hover {
    background: rgba(0, 0, 0, 0);
  }
}
