/* Estilos del modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  animation: zoom 0.3s;
}

@keyframes zoom {
  from {
    transform: translateY(-50%) scale(0.9);
  }
  to {
    transform: translateY(-50%) scale(1);
  }
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.close:hover {
  color: #bbb;
}

.modal-caption {
  margin: 15px auto;
  display: block;
  width: 80%;
  text-align: center;
  color: #ccc;
  font-size: 1.2rem;
  max-width: 700px;
}

/* Efectos de transición */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive */
@media only screen and (min-width: 768px) {
  .modal-content {
    max-width: 80vw;
  }
}

@media only screen and (min-width: 1024px) {
  .modal-content {
    max-width: 70vw;
  }
}
