/* ==== CORRECCIÓN TOTAL FONDO MODAL ==== */

/* capa de diálogo (envolvente del modal) */
.modal-dialog {
  background: transparent !important;
  backdrop-filter: none !important;
}

/* contenido del modal */
.modal-content {
  background-color: #ffffff !important; /* blanco puro */
  opacity: 1 !important; /* sin transparencia */
  color: #212529 !important;
  border-radius: 1rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  border: none !important;
  position: relative;
  isolation: isolate; /* evita heredar filtros del fondo */
  z-index: 1060;
}

/* cabecera azul */
.modal-header {
  background-color: #0d6efd !important;
  color: #fff !important;
  border-bottom: none;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* cuerpo del formulario */
.modal-body {
  background-color: #ffffff !important;
}

/* pie del formulario */
.modal-footer {
  background-color: #ffffff !important;
  border-top: none;
}

/* fondo detrás del modal (oscuro con blur) */
.modal-backdrop.show {
  background-color: rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: blur(6px) !important;
}

/* campos */
.form-control {
  background-color: #fff !important;
  border: 1px solid #ced4da;
  border-radius: 8px;
  transition: all 0.3s ease;
}
 
/* ======== HEADER GENERAL ======== */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1050;
}

.navbar-brand {
  font-size: 1.3rem;
  letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
  color: #ffffff !important;
  font-weight: 500;
  margin-right: 10px;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: #dbeafe !important;
}

.btn.btn-light {
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn.btn-light:hover {
  background-color: #e0eaff;
  transform: scale(1.05);
}

/* ===========================================================
   🔹 CORRECCIÓN MODAL MÓVIL - SIEMPRE ENCIMA DEL HEADER Y WHATSAPP
   =========================================================== */

/* Forzar la capa del modal más arriba de todo */
.modal,
.modal-backdrop {
  z-index: 9999 !important; /* por encima del header y botones flotantes */
}

/* Fondo oscuro translúcido y con desenfoque */
.modal-backdrop.show {
  background-color: rgba(0, 0, 0, 0.55) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

/* Contenedor del modal */
.modal-dialog {
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh; /* ocupa toda la altura */
}

/* Cuerpo del formulario (centrado en móvil) */
.modal-content {
  z-index: 10000 !important;
  position: relative;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  width: 90%;
  max-width: 450px;
  margin: auto;
}

/* === Ajuste para móvil === */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: auto;
  }

  /* Evita que el header o botones flotantes se vean */
  .navbar,
  .whatsapp-button,
  #whatsapp-float {
    z-index: 1 !important;
  }
}
/* ===========================================================
   🧭 MODAL RESERVA SOBRE HEADER Y WHATSAPP
   =========================================================== */

/* Forzar el modal sobre cualquier elemento */
.modal,
.modal-backdrop {
  position: fixed !important;
  z-index: 99999 !important; /* máximo nivel */
}

/* Oscurece y desenfoca el fondo */
.modal-backdrop.show {
  background-color: rgba(0, 0, 0, 0.55) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

/* Ajuste del contenedor del modal */
.modal-dialog {
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

/* Caja del formulario */
.modal-content {
  z-index: 100000 !important;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
  width: 92%;
  max-width: 450px;
  margin: auto;
  position: relative;
}

/* === Asegurar que header y whatsapp queden debajo === */
.navbar,
#whatsapp,
#whatsapp-float,
.whatsapp-button,
.float-whatsapp {
  z-index: 1 !important; /* mandarlos al fondo */
}
