/* ===== MODAL TÉRMINOS Y CONDICIONES ===== */

/* Overlay de fondo */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Contenedor del modal */
.modal-box {
  background: #ffffff;
  border-radius: 12px;
  max-width: 760px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.25s ease;
  overflow: hidden;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Cabecera del modal */
.modal-header {
  background: linear-gradient(135deg, #1F3864 0%, #2E5090 100%);
  color: #ffffff;
  padding: 22px 28px 18px;
  flex-shrink: 0;
}

.modal-header h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.modal-header p {
  margin: 0;
  font-size: 0.82rem;
  opacity: 0.78;
}

/* Botón cerrar */
.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(255,255,255,0.3);
}

.modal-header {
  position: relative;
}

/* Cuerpo con scroll */
.modal-body {
  overflow-y: auto;
  padding: 28px 32px;
  flex: 1;
  line-height: 1.7;
  color: #333;
  font-size: 0.92rem;
}

/* Tipografía interna */
.modal-body h3 {
  color: #1F3864;
  font-size: 1rem;
  font-weight: 700;
  margin: 28px 0 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid #e8edf5;
}

.modal-body h4 {
  color: #2E5090;
  font-size: 0.93rem;
  font-weight: 600;
  margin: 18px 0 6px;
}

.modal-body p {
  margin: 0 0 10px;
  text-align: justify;
}

.modal-body ul {
  margin: 6px 0 12px 18px;
  padding: 0;
}

.modal-body ul li {
  margin-bottom: 5px;
}

.modal-body .badge-update {
  display: inline-block;
  background: #f0f4fb;
  color: #2E5090;
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 18px;
}

/* Pie del modal */
.modal-footer {
  padding: 14px 28px;
  border-top: 1px solid #e8edf5;
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
  background: #f9fafb;
}

.modal-footer .btn-cerrar {
  background: #1F3864;
  color: #fff;
  border: none;
  padding: 10px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s;
}

.modal-footer .btn-cerrar:hover {
  background: #2E5090;
}

/* Scrollbar personalizado */
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: #b0bdd4; border-radius: 4px; }
.modal-body::-webkit-scrollbar-thumb:hover { background: #2E5090; }

/* Responsive */
@media (max-width: 600px) {
  .modal-body { padding: 20px 18px; }
  .modal-header { padding: 18px 20px 14px; }
  .modal-footer { padding: 12px 18px; }
}
