@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;800&display=swap");

/* --- ESTILOS GENERALES --- */
.modal-content {
  font-family: "Montserrat", sans-serif !important;
  border-radius: 20px !important;
  border: none !important;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.modal-header-registro h2,
.modal-header-login h2,
.modal-title {
  width: 100%;
  text-align: center;
  margin: 0;
}

/* BOTÓN CERRAR (X) CIRCULAR */
.close {
  position: absolute !important;
  right: 15px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 30px !important;
  height: 30px !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid white !important;
  border-radius: 50% !important;
  color: white !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  opacity: 1 !important;
  cursor: pointer;
  transition: 0.3s;
  z-index: 10;
  line-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.close:hover {
  background-color: white !important;
  color: #ab0a3d !important;
}

.modal-header-registro,
.modal-header-login,
.modal-header {
  position: relative !important;
}

/* --- MODAL LOGIN --- */
.modal-caja-login {
  max-width: 400px;
  margin: auto;
}

.modal-header-login {
  background-color: #ab0a3d !important;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.modal-header-login h2 {
  color: white !important;
  font-weight: 800;
  font-size: 1.2rem;
  text-transform: uppercase;
  margin: 0;
}

/* --- MODAL REGISTRO --- */
#ModalRegistro .modal-dialog,
#modalRequisitos .modal-dialog,
#modalFormatos .modal-dialog {
  max-width: 800px !important;
}

.modal-header-registro {
  background-color: #ab0a3d !important;
  padding: 20px !important;
  position: relative;
  text-align: center !important;
}

.modal-header-registro h2 {
  color: white !important;
  font-weight: 800;
  font-size: 1.3rem;
  margin: 0;
}

.instruccion-registro {
  border-left: 5px solid #ab0a3d;
  padding-left: 15px;
  margin: 20px 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: #323232;
  text-align: justify; /* TEXTO JUSTIFICADO */
}

.grid-registro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 40px;
}

/* --- INPUTS Y FORMULARIOS --- */
.form-group-custom {
  margin-bottom: 15px;
}

.form-group-custom label {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 5px;
  display: block;
}

.input-institucional {
  background-color: #f0f5ff !important;
  border: 1px solid #d1d9e6 !important;
  border-radius: 10px !important;
  padding: 10px 15px !important;
  font-size: 0.95rem;
  width: 100%;
}

/* --- CAJA DE AVISO --- */
.caja-aviso {
  background-color: #ffffff !important;
  border: 2px solid #ab0a3d !important;
  border-radius: 15px;
  padding: 20px;
  margin-top: 20px;
  margin-bottom: 20px;
}

.texto-aviso {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #444;
  text-align: justify; /* TEXTO JUSTIFICADO */
  margin-bottom: 15px;
}

.contenedor-check {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #323232;
}

.contenedor-check input {
  margin-right: 10px;
  transform: scale(1.2);
}

/* --- BOTONES Y FOOTERS --- */
.footer-registro-fuera {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.footer-centrado-requisitos {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  width: 100%;
}

.btn-registro-continuar {
  background-color: #ab0a3d !important;
  color: white !important;
  border: none !important;
  font-weight: 800;
  padding: 12px 35px;
  border-radius: 8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.3s ease;
  text-decoration: none;
}

/* --- CUERPO DE REQUISITOS --- */
.body-requisitos {
  padding: 30px;
}

.subtitulo-requisito {
  font-family: "Montserrat", sans-serif !important;
  color: #323232 !important;
  font-weight: 700;
  font-size: 1.1rem;
  border-bottom: 2px solid #ab0a3d;
  padding-bottom: 8px;
  margin-bottom: 15px;
}

.lista-requisitos {
  list-style: none;
  padding-left: 0;
}

.lista-requisitos li {
  font-family: "Montserrat", sans-serif !important;
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
  color: #323232;
  text-align: justify; /* TEXTO JUSTIFICADO */
}

.lista-requisitos li::before {
  content: "\f058";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  color: #323232;
}

.caja-formatos-municipio {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-top: 25px;
  border-left: 5px solid #ab0a3d;
}

/* --- MODAL FORMATOS --- */
.item-anexo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
  gap: 20px;
}

.item-anexo.no-border {
  border-bottom: none;
}

.nombre-anexo {
  font-size: 0.95rem;
  font-weight: 700;
  color: #444;
  margin: 0;
  line-height: 1.4;
  flex: 1;
  text-align: justify; /* TEXTO JUSTIFICADO */
}

.btn-anexo {
  background-color: #ab0a3d !important;
  color: white !important;
  text-decoration: none !important;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 10px 25px;
  border-radius: 6px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: 0.3s;
  min-width: 130px;
  text-align: center;
}

/* Responsividad */
@media (max-width: 576px) {
  .item-anexo {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-anexo {
    width: 100%;
    margin-top: 10px;
  }
}

/* --- SECCIÓN DE PREGUNTAS (FAQ) ESTÁTICA --- */

.faq-container {
  padding: 10px 0;
}

.faq-item {
  border-bottom: 1px solid #eee;
  padding: 20px 0;
}

.faq-item:last-child,
.faq-item.no-border {
  border-bottom: none;
}

/* Título de la pregunta */
.faq-pregunta {
  font-family: "Montserrat", sans-serif !important;
  color: #ab0a3d; /* Color institucional */
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 12px;
  line-height: 1.4;
  text-align: justify;
  display: block; /* Asegura que no intente comportarse como flex */
}

/* Respuesta principal */
.faq-respuesta {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.6;
  margin-bottom: 15px;
  text-align: justify;
}

/* Caja para Persona Moral / Física */
.faq-sub-list {
  background-color: #f8f9fa;
  padding: 18px;
  border-left: 5px solid #ab0a3d;
  border-radius: 8px;
  margin: 15px 0;
}

.faq-sub-list p {
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: #323232;
}

.faq-sub-list p:last-child {
  margin-bottom: 0;
}

/* Caja de Fundamento Legal */
.faq-fundamento {
  background-color: #ffffff;
  padding: 15px;
  border: 1px dashed #ab0a3d;
  border-radius: 10px;
  font-size: 0.85rem;
  color: #555;
  margin-top: 15px;
  line-height: 1.5;
}

/* Ajuste para que las preguntas dentro de un mismo bloque respiren */
.faq-item .faq-pregunta:not(:first-child) {
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid #fcecee;
}

/* --- SOLO AJUSTES DE ESPACIO Y TÍTULO --- */

/* 1. Forzar estilo de encabezado igual a los otros */
#ModalPreguntas .modal-header {
  background-color: #ab0a3d !important;
  color: white !important;
}

#ModalPreguntas .modal-title {
  color: white !important;
  font-weight: 800;
}

/* 2. Reducción drástica de espacios entre preguntas */
#ModalPreguntas .faq-item {
  padding-top: 5px !important; /* Menos espacio arriba */
  padding-bottom: 5px !important; /* Menos espacio abajo */
  margin-bottom: 0px !important; /* Elimina margen externo */
}

#ModalPreguntas .faq-pregunta {
  margin-top: 5px !important; /* Acerca la pregunta al borde */
  margin-bottom: 2px !important; /* Acerca la respuesta a la pregunta */
}

#ModalPreguntas .faq-respuesta {
  margin-bottom: 5px !important; /* Acerca la siguiente pregunta */
}

/* 3. Ajuste para bloques de texto internos */
#ModalPreguntas .faq-sub-list,
#ModalPreguntas .faq-fundamento {
  margin-top: 5px !important;
  margin-bottom: 5px !important;
  padding: 8px !important;
}
/* --- HOMOLOGACIÓN DE TÍTULO Y COMPACTACIÓN --- */

/* 1. Fondo guinda y texto blanco para el header de Preguntas */
#ModalPreguntas .modal-header {
  background-color: #ab0a3d !important;
  border-bottom: none !important;
  padding: 20px !important;
  text-align: center !important;
  display: block !important; /* Asegura el centrado del h2 */
}

/* --- CORRECCIÓN DE MAYÚSCULAS EN EL TÍTULO --- */
#ModalPreguntas .modal-title {
  text-transform: none !important; /* Esto quita las mayúsculas forzadas */
  font-variant: normal !important;
}

/* 3. Reducción de espacios entre preguntas */
#ModalPreguntas .faq-item {
  padding: 8px 0 !important; /* Espacio vertical muy reducido */
  border-bottom: 1px solid #eee;
}

#ModalPreguntas .faq-pregunta {
  margin-bottom: 4px !important; /* Pega la respuesta a la pregunta */
  font-size: 1rem !important;
  color: #ab0a3d !important;
}

#ModalPreguntas .faq-respuesta {
  margin-bottom: 0px !important; /* Elimina espacio sobrante al final */
  padding-bottom: 5px !important;
}

/* 4. Compactar cuadros de requisitos internos */
#ModalPreguntas .faq-sub-list,
#ModalPreguntas .faq-fundamento {
  margin: 8px 0 !important;
  padding: 10px !important;
}

/* --- HOMOLOGACIÓN TOTAL MODAL PREGUNTAS --- */

/* 1. Aplicar el mismo contenedor guinda que Registro/Login */
#ModalPreguntas .modal-header {
  background-color: #ab0a3d !important;
  padding: 20px !important;
  border-bottom: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

/* 2. Homologar el Título (H2 con clase modal-title) */
#ModalPreguntas .modal-title {
  color: white !important;
  font-weight: 800 !important;
  font-size: 1.3rem !important; /* Misma que .modal-header-registro h2 */
  text-transform: none !important; /* Respeta minúsculas del HTML */
  margin: 0 !important;
  text-align: center !important;
  width: 100%;
}

/* 3. Reducción de espacios extrema entre preguntas */
#ModalPreguntas .faq-container {
  padding: 0 !important;
}

#ModalPreguntas .faq-item {
  padding: 5px 0 !important; /* Espacio mínimo vertical */
  margin: 0 !important;
  border-bottom: 1px solid #f0f0f0;
}

#ModalPreguntas .faq-pregunta {
  margin: 0 0 2px 0 !important; /* Casi pegado a la respuesta */
  font-size: 0.95rem !important;
  line-height: 1.2 !important;
}

#ModalPreguntas .faq-respuesta {
  margin: 0 0 5px 0 !important; /* Espacio mínimo antes de la siguiente pregunta */
  font-size: 0.9rem !important;
  line-height: 1.3 !important;
}

/* 4. Compactar cuadros grises y fundamentos */
#ModalPreguntas .faq-sub-list,
#ModalPreguntas .faq-fundamento {
  margin: 5px 0 !important;
  padding: 8px !important;
  font-size: 0.85rem !important;
}

/* Ajuste para que el modal sea responsivo en celulares y tablets */
@media (max-width: 576px) {
  #ModalBienvenida .modal-dialog {
    margin: 1.5rem auto;
    width: 90%;
  }
  #ModalBienvenida .modal-content {
    padding: 20px;
  }
  #ModalBienvenida h1 {
    font-size: 1.5rem !important;
  }
}

/* Asegurar que el botón siempre sea guinda incluso en hover */
#btnAccesarInicio:hover {
  background-color: #8a0831 !important; /* Un guinda ligeramente más oscuro al pasar el mouse */
  transform: translateY(-2px);
  transition: 0.3s;
}

#btnAccesarInicio {
  transition: all 0.3s ease;
  cursor: pointer;
  outline: none;
}

#btnAccesarInicio:hover {
  background-color: #8e0a32 !important; /* Guinda un poco más oscuro */
  box-shadow: 0 4px 12px rgba(171, 10, 61, 0.4);
  transform: translateY(-1px);
}

/* Asegura que el texto sea legible en móviles */
@media (max-width: 480px) {
  #btnAccesarInicio {
    font-size: 1rem !important;
    padding: 12px 0 !important;
  }
}
