/* === MODALES === */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
}

.modal.show {
  opacity: 1;
  visibility: visible;
  display: flex !important;
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  border-radius: 8px;
  width: 80%;
  max-width: 600px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  animation: modalFadeIn 0.3s ease;
  z-index: 199;
  position: relative;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  transition: color 0.3s ease;
}

.close:hover,
.close:focus {
  color: #f44336;
  text-decoration: none;
  cursor: pointer;
}

.modal-header {
  padding-bottom: 10px;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.modal-header h2 {
  margin-top: 0;
}

.modal-body {
  margin-bottom: 20px;
}

.modal-footer {
  padding-top: 15px;
  border-top: 1px solid #eee;
  text-align: right;
}

/* Media queries para modales en móviles */
@media screen and (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 5% auto;
    padding: 15px;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .modal {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}