/* Definición de la animación de movimiento exclusivamente horizontal
@keyframes pan-background {
  0% {
    background-position: 0% 0%;
    /* Inicio a la izquierda, posición vertical fija 
  }

  100% {
    background-position: 100% 0%;
    /* Fin a la derecha, posición vertical fija 
  }
} */

body {
  /* Configuración de la imagen de fondo */
  background-image: url("../assets/img/back_metrics.png");

  /* Hago la imagen 120% más grande, optimizado para movimiento horizontal */
  background-size: cover;
  background-attachment: fixed;
  /* Mantiene la imagen fija respecto al viewport */

  /* Aplico la animación con un movimiento lineal y más evidente (30s) */
  /* animation: pan-background 30s linear infinite alternate; */
  color: #374151;
  font-family: 'Inter', sans-serif;


}

/* @media screen and (max-width:768px) {
  body {
    background-size: auto;
    animation: pan-background 180s linear infinite alternate;
  }
} */

.fondo-transparente {
  background-color: rgba(255, 255, 255, 0.15);
  padding: 1px;
}

/* Definimos la fuente para consistencia */

/* Estilos base del botón */
.corner-button-bs {
  margin-left: 1rem;
  padding: 10px 0;
  /* Desactivamos el borde inicial de Bootstrap */
  border: none !important;
  /* Posicionamiento relativo esencial para los pseudo-elementos */
  position: relative;
  z-index: 10;
  overflow: hidden;
  /* Transición para el color de fondo y texto */
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Definición común para los pseudo-elementos */
.corner-button-bs::before,
.corner-button-bs::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  /* Iniciamos invisible */
  transition: width 0.3s ease-out, height 0.3s ease-out, opacity 0.3s ease-out;
}

/* ::before: Esquina Superior Izquierda */
.corner-button-bs::before {
  top: 0;
  left: 0;
  /* Bordes que se dibujarán */
  border-top: 3px solid;
  border-left: 3px solid;
  pointer-events: none;
}

/* ::after: Esquina Inferior Derecha */
.corner-button-bs::after {
  pointer-events: none;
  bottom: 0;
  right: 0;
  /* Bordes que se dibujarán */
  border-bottom: 3px solid;
  border-right: 3px solid;
}

/* Efecto HOVER */
.corner-button-bs:hover::before,
.corner-button-bs:hover::after {
  /* Las líneas se expanden */
  width: 100%;
  height: 100%;
  opacity: 1;
  /* Se hace visible */
  transition: width 0.5s ease-in, height 0.5s ease-in, opacity 0.1s ease-in;
  pointer-events: none;
}

/* * CAMBIO SOLICITADO: Mantenemos el fondo transparente y el color de texto
        * y eliminamos el box-shadow (borde envolvente).
        */
.corner-button-bs:hover {
  /* Forzamos el fondo transparente (anulando el hover de btn-outline-primary) */
  background-color: transparent !important;
  /* Mantenemos el color del texto primario (azul) */
  /* color: var(--bs-primary) !important; */
  /* Eliminamos por completo el borde/sombra que rodeaba todo el botón */
  box-shadow: none !important;
}

.nav-link {
  padding: 0;
  text-align: center;
  margin: auto;
}

/* FOOTER */
.footer-hub {
  border: 2px;
  background-color: rgba(0, 0, 0, 0.25);
  border-style: solid;
  border-color: black;
}

.footer-hub:hover {
  background-color: rgba(0, 0, 0, 0.75);
}

.footer-humanmetrics {
  border: 2px;
  background-color: rgba(34, 171, 119, 0.25);
  border-style: solid;
  border-color: #22ab77;
}

.footer-humanmetrics:hover {
  background-color: rgba(34, 171, 119, 0.75);
}

.footer-sonorify {
  border: 2px;
  background-color: rgba(116, 94, 166, 0.25);
  border-style: solid;
  border-color: #725da5;
}

.footer-sonorify:hover {
  background-color: rgba(116, 94, 166, 0.75);
}

.footer-solutiontech {
  border: 2px;
  background-color: rgba(13, 166, 197, 0.25);
  border-style: solid;
  border-color: #0da6c5;
}

.footer-solutiontech:hover {
  background-color: rgba(13, 166, 197, 0.75);
}

.footer-productora {
  border: 2px;
  background-color: rgba(241, 135, 22, 0.25);
  border-style: solid;
  border-color: #f18716;
}

.footer-productora:hover {
  background-color: rgba(241, 135, 22, 0.75);
}

@media (max-width: 576px) {

  .titulo-pagina {
    font-size: 1.4dvh;
  }
}

/* --- ESTILOS PARA ESCALA DE EMOCIONES (EMOJI) --- */
.emoji-rating {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  /* Asegura que los emojis se distribuyan horizontalmente */
  justify-content: center;
  /* Centra los emojis si no llenan todo el ancho */
  flex-wrap: wrap;
  /* Permite que los emojis salten de línea si hay muchos */
  gap: 10px;
  /* Espacio entre emojis */
}

.emoji-label {
  display: flex;
  /* Para centrar el emoji vertical y horizontalmente */
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border: 2px solid #ccc;
  /* Borde gris más visible por defecto */
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  /* Animación más suave */
  font-size: 3.5em;
  /* 🚀 EMOJIS MÁS GRANDES */
  background-color: #f9f9f9;
  /* Fondo ligero */
  min-width: 80px;
  /* Asegura un tamaño mínimo para cada opción */
  height: 80px;
  user-select: none;
  /* Evita selección de texto al hacer doble clic */
}

/* Efecto al pasar el ratón */
.emoji-rating .emoji-label:hover {
  background-color: #e0e0e0;
  /* Fondo más oscuro al pasar el ratón */
  border-color: #888;
  /* Borde más oscuro */
  transform: scale(1.05);
  /* Ligeramente más grande */
}

/* Estilo de SELECCIÓN */
.emoji-rating input[type="radio"]:checked+.emoji-label {
  border-color: #007bff;
  /* Borde azul vibrante */
  background-color: #dbeaff;
  /* Fondo azul claro */
  transform: scale(1.1);
  /* 🚀 EMOJI SELECCIONADO MÁS GRANDE */
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
  /* Sombra para resaltarlo */
  color: #0056b3;
  /* Color de texto si el emoji no es una imagen */
}

/* --- ESTILOS PARA VALORACIÓN (ESTRELLAS) --- */
.rating-stars {
  display: flex;
  flex-direction: row-reverse;
  /* Hace que las estrellas se vean de derecha a izquierda */
  justify-content: center;
  /* 🚀 ELIMINAR direction: rtl; de aquí si no es absolutamente necesario para los inputs,
       ya que puede interferir con el texto */
  /* direction: rtl; */
  font-size: 3.5em;
  /* Estrellas más grandes */
  margin: 20px 0;
  line-height: 1;
  /* Asegura que no haya espacio extra vertical */
}

.rating-stars>input {
  display: none;
  /* Oculta los inputs de radio */
}

.rating-stars>label {
  cursor: pointer;
  /* 🚀 AJUSTE: El ancho ahora es fijo para una estrella */
  width: 1em;
  /* Ocupa el espacio de una estrella */
  overflow: visible;
  /* No ocultar, ya no hay texto extra */
  white-space: nowrap;
  color: #ccc;
  /* Color base (gris) */
  position: relative;
  transition: color 0.2s ease-in-out;
  /* Transición suave de color */
  text-align: center;
  /* Centra el carácter de la estrella dentro de su ancho */
}

/* 🚀 CAMBIO CLAVE: Usa el carácter Unicode de estrella */
.rating-stars>label:before {
  content: '★';
}

/* Estilo cuando el mouse pasa o el radio está chequeado */
.rating-stars>input:checked~label,
.rating-stars>label:hover,
.rating-stars>label:hover~label {
  color: #FFD700;
  /* Amarillo dorado más vibrante */
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
  /* Sombra para resaltarlas */
}

/* Estilo cuando ya ha sido seleccionada y queremos ver el estado (el hover es más fuerte) */
.rating-stars>input:checked+label:hover,
.rating-stars>input:checked~label:hover,
.rating-stars>label:hover~input:checked~label,
.rating-stars>input:checked~label:hover~label {
  color: #FFC107;
  /* Un amarillo ligeramente diferente al pasar el ratón */
}

/* Cuando el bloque está recibiendo algo (Drag & Drop activo) */
.questions-container.drag-over {
  background-color: #e7f1ff !important;
  border-color: #0d6efd !important;
  transform: scale(1.01);
}

/* Ocultar el mensaje "Arrastra aquí" cuando ya hay preguntas */
.questions-container:has(.card) .drop-placeholder {
  display: none;
}

/* Estilo para los botones del menú lateral para que se vean arrastrables */
.drag-handle {
  cursor: grab;
  transition: transform 0.2s;
}

.drag-handle:active {
  cursor: grabbing;
  transform: scale(0.95);
}

#drag-menu-preguntas .list-group-item {
    cursor: grab;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    margin-bottom: 10px;
    padding: 12px 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    background: white;
    display: flex;
    align-items: center;
}

#drag-menu-preguntas .list-group-item:hover {
    background-color: #f0f7ff;
    border-color: #0d6efd !important;
    color: #0d6efd;
    transform: translateX(5px);
}

#drag-menu-preguntas .list-group-item i {
    width: 25px;
    color: #94a3b8;
}

/* Sombra cuando se está arrastrando */
.sortable-ghost {
    opacity: 0.4;
    background-color: #0d6efd !important;
}

/* Menú lateral: Texto 1 punto más grande y negrita */
#drag-menu-preguntas .list-group-item {
    font-size: 0.75rem !important; /* Un punto más grande */
    font-weight: 550 !important;   /* Negrita sutil pero clara */
    letter-spacing: -0.3px;        /* Toque moderno */
}

/* Títulos de los Bloques */
.block-title {
    font-size: 1.1rem !important; /* Más grande */
    font-weight: 600 !important;   /* Negrita fuerte */
    color: #2d3748;
}

#drag-menu-preguntas i {
    font-size: 1.25rem; /* Un poco más grande que el texto */
    width: 30px;      /* Espacio fijo para que el texto se alinee */
    font-weight: 900; /* Máxima negrita para el icono */
}

/* El encabezado del bloque ahora es la manija para moverlo */
.block-main-container .card-header, 
.block-main-container h4 {
    cursor: move; /* Icono de flechas de movimiento */
}

/* Efecto cuando un bloque se está moviendo */
.block-main-container.sortable-chosen {
    border: 2px solid #0d6efd !important;
    opacity: 0.8;
}

/* El encabezado de la pregunta es la manija */
.question-drag-handle {
    cursor: move !important; /* Fuerza la cruz de flechas */
}

/* Efecto visual al agarrar la pregunta */
.question-card.sortable-chosen {
    border: 1px solid #0d6efd !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* El espacio vacío que queda mientras arrastras */
.bg-primary-subtle.sortable-ghost {
    opacity: 0.5;
    background-color: #e0e7ff !important;
    border: 2px dashed #6366f1 !important;
}

/* Estilo para el icono de arrastre */
.question-drag-handle .fa-grip-vertical {
    transition: opacity 0.2s;
}

.question-drag-handle:hover .fa-grip-vertical {
    opacity: 1 !important;
    color: #0d6efd !important; /* Cambia a azul al pasar el mouse */
}

/* Centrado perfecto para el botón X */
.remove-question-btn:hover {
    background-color: #fee2e2 !important; /* Fondo rojo suave al pasar el mouse */
}

/* Feedback visual para las manijas de arrastre */
.block-drag-handle:hover .fa-grip-vertical,
.question-drag-handle:hover .fa-grip-vertical {
    opacity: 1 !important;
    color: #0d6efd !important;
    transition: all 0.2s ease;
}

/* Sombra suave al arrastrar para dar efecto de "elevación" */
.sortable-chosen {
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important;
    z-index: 1050;
}

/* Contenedor principal del botón */
.ai-magic-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
}

/* La Esfera Morada */
.ai-icon-wrapper {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, #a855f7, #6b21a8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    position: relative;
    z-index: 2;
    /* Glow externo */
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.6), 
                inset 0 0 15px rgba(255, 255, 255, 0.2);
    animation: floating-glow 3s infinite ease-in-out;
}

/* El cuadro de texto flotante */
.ai-text-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    padding: 10px 20px;
    border-radius: 12px;
    margin-left: -15px; /* Se mete un poco debajo de la esfera */
    padding-left: 25px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 1;
}

.ai-title {
    color: #1a1a1a;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
}

.ai-desc {
    color: #666;
    font-size: 0.75rem;
    font-weight: 400;
}

/* --- ANIMACIONES --- */

/* Efecto de pulso y flotación de la esfera */
@keyframes floating-glow {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
    }
    50% {
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 0 35px rgba(168, 85, 247, 0.8), 
                    0 0 10px rgba(255, 255, 255, 0.4);
    }
    100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
    }
}

/* Hover: El texto se aclara y la esfera brilla más */
.ai-magic-btn:hover .ai-icon-wrapper {
    background: radial-gradient(circle at 30% 30%, #c084fc, #7e22ce);
    transition: 0.3s all;
}

.ai-magic-btn:hover .ai-text-container {
    background: #ffffff;
    transform: translateX(5px);
    transition: 0.3s all;
}

.bi-stars {
    animation: rotate-stars 4s linear infinite;
}
@keyframes rotate-stars {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 1. Estilo base del icono dentro del wrapper */
.ai-icon-wrapper i {
    color: white;
    font-size: 1.5rem;
    position: relative;
    z-index: 3;
    /* Resplandor suave inicial */
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
    animation: wand-magic-effect 3s infinite ease-in-out;
}

/* 2. Animación de "Destello Mágico" */
@keyframes wand-magic-effect {
    0% {
        transform: rotate(-5deg) scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.4));
    }
    50% {
        transform: rotate(5deg) scale(1.15);
        /* El brillo se intensifica en el medio */
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.9)) 
                drop-shadow(0 0 25px rgba(168, 85, 247, 0.4));
    }
    100% {
        transform: rotate(-5deg) scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.4));
    }
}

/* 3. Asegurar que el botón reciba los clics (Corrección) */
.ai-icon-wrapper, 
.ai-text-container {
    pointer-events: none; /* Crucial para que el clic no se pierda */
}

/* 4. Efecto al pasar el mouse por el botón padre */
.ai-magic-btn:hover .ai-icon-wrapper i {
    animation: wand-active 0.5s infinite alternate;
}

@keyframes wand-active {
    from { transform: scale(1.1); }
    to { transform: scale(1.25) rotate(10deg); }
}