.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  padding: 0;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  max-height: 90vh;
  width: auto;
  height: auto;
  /* Permitimos que el botón de cierre posicionado fuera del contenedor sea visible */
  overflow: visible;

  max-width: 500px;

  /* Si necesitas scroll interno en el contenido, usa 'overflow: auto' en el elemento interno (ej. .modal-body) en vez de aquí. */
}
.modal-image {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: contain;
}

.modal-close-btn {
  position: absolute;
  top: -20px; /* Posicionamiento fuera de la esquina */
  right: -20px;

  background-color: #ff8c00; /* Naranja */
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid white; /* Borde blanco */

  color: white;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  z-index: 9999;

  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
  line-height: 1;
  box-sizing: border-box;
}
:hover.modal-close-btn {
  background-color: #e67600; /* Naranja más oscuro al pasar el ratón */
}

@media (max-width: 600px) {
  .modal-content {
    max-width: 90%;
    height: auto;
  }
}
