/* Modal flotante - ventana independiente centrada */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: white;
  margin: auto;
  padding: 25px;
  border-radius: 16px;
  width: 90%;
  max-width: 550px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 12px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #1e5799;
}

.modal h3 {
  color: #1e5799;
  margin-bottom: 15px;
  border-bottom: 2px solid #1e5799;
  padding-bottom: 8px;
}

.modal strong {
  color: #2c3e50;
}

.modal ul {
  margin: 8px 0 0 20px;
  padding-left: 0;
}

.modal li {
  margin: 5px 0;
}

.modal details {
  margin-top: 10px;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.modal details summary {
  font-weight: bold;
  cursor: pointer;
  color: #1e5799;
}

.modal-datos {
  margin: 5px 0;
  padding: 4px 0;
}

/* Scroll personalizado */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: #e41212;
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #1e5799;
  border-radius: 4px;
}

/* ============================================ */
/* RESPONSIVE - Modal flotante */
/* ============================================ */

@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-width: 450px;
    padding: 20px;
  }

  .modal h3 {
    font-size: 1rem;
  }

  .modal ul {
    margin-left: 12px;
  }

  .modal li {
    font-size: 0.85rem;
  }

  .modal details {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .modal-content {
    padding: 16px;
    max-width: 100%;
  }

  .modal h3 {
    font-size: 0.9rem;
  }

  .modal ul {
    margin-left: 10px;
  }

  .modal li {
    font-size: 0.8rem;
  }

  .modal details {
    font-size: 0.8rem;
    padding: 6px;
  }

  .modal-close {
    font-size: 22px;
    right: 12px;
    top: 8px;
  }

  .modal-datos {
    font-size: 0.8rem;
  }
}
