/* ============================================================
   PROPULSAR — Hoja de estilos global
   Oscuro: #0f0518 · Morado: #4d297d · Amarillo: #fcd403
   ============================================================ */

:root {
  --propulsar-oscuro:   #0f0518;
  --propulsar-morado:   #4d297d;
  --propulsar-amarillo: #fcd403;
}

/* ── Animación flotante ── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}
.animate-float { animation: float 6s ease-in-out infinite; }

/* ── Recorte en 3 líneas ── */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Tabs: Cómo funciona ── */
.tab-btn { cursor: pointer; }
.tab-btn.active-tab  { background-color: var(--propulsar-morado); color: #ffffff; }
.tab-btn.inactive-tab { color: #6b7280; }
.tab-btn.inactive-tab:hover { color: #e5e7eb; }

/* ── Accordion FAQ ── */
details summary {
  cursor: pointer;
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details[open] .faq-chevron { transform: rotate(180deg); }
.faq-chevron { transition: transform 0.2s ease-out; }
details .faq-body {
  overflow: hidden;
  animation: faqOpen 0.2s ease-out;
}
@keyframes faqOpen {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Blog: filtros de categoría ── */
.filter-btn { cursor: pointer; transition: all 0.15s ease; }
.filter-btn.active {
  background-color: var(--propulsar-amarillo);
  color: var(--propulsar-oscuro);
  border-color: var(--propulsar-amarillo);
}
.blog-card { transition: opacity 0.2s ease, transform 0.2s ease; }
.blog-card.hidden-card { display: none; }

/* ── Scrollbar personalizada ── */
::-webkit-scrollbar        { width: 5px; }
::-webkit-scrollbar-track  { background: var(--propulsar-oscuro); }
::-webkit-scrollbar-thumb  { background: var(--propulsar-morado); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--propulsar-amarillo); }

/* ── Selección de texto ── */
::selection { background-color: var(--propulsar-amarillo); color: var(--propulsar-oscuro); }

/* ── Quiz para empresas ── */
.quiz-step-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  transition: background 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}
.quiz-step-dot.active  { background: var(--propulsar-amarillo); transform: scale(1.2); }
.quiz-step-dot.done    { background: var(--propulsar-morado); }
.quiz-step-line {
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}
.quiz-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0.875rem;
  background: rgba(255,255,255,0.02);
  color: #d1d5db;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.1s ease;
  text-align: left;
  width: 100%;
}
.quiz-option:hover {
  border-color: rgba(252,212,3,0.4);
  background: rgba(252,212,3,0.06);
  color: #fff;
  transform: translateY(-1px);
}
.quiz-option.selected {
  border-color: var(--propulsar-amarillo);
  background: rgba(252,212,3,0.10);
  color: #fff;
}
.quiz-option-icon {
  width: 2rem; height: 2rem;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  color: var(--propulsar-amarillo);
  flex-shrink: 0;
}
.quiz-option-icon svg { width: 16px; height: 16px; }
.quiz-option-row { align-items: flex-start; }
.quiz-option-row .quiz-option-icon { margin-top: 0.1rem; }
.quiz-option-compact {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0.75rem;
  gap: 0;
}
.quiz-step {
  transition: opacity 0.25s ease;
}
.quiz-step.hidden { display: none; }

/* ── Scroll reveal ── */
.reveal-item {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Back to top ── */
.back-to-top {
  position: fixed;
  bottom: 6rem;        /* 96px: por encima del FAB (56px + 24px base + 16px gap) */
  right: 1.5rem;
  z-index: 40;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 0.75rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: bottom 0.28s cubic-bezier(0.4,0,0.2,1),
              opacity 0.25s ease, background 0.2s ease, color 0.2s ease;
}
.back-to-top.visible      { opacity: 1; pointer-events: auto; }
.back-to-top:hover        { background: rgba(255,255,255,0.10); color: #fff; }
/* Se corre hacia arriba cuando el menú se despliega, para no quedar
   tapado. El clic ya no se lo roba nadie: eso se arregló apagando los
   botones del menú mientras está cerrado. */
.back-to-top.fab-expanded { bottom: 13.5rem; } /* por encima del segundo ítem del dial */

/* ── FAB principal ── */
.propulsar-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none; /* el contenedor es click-through; solo los hijos activos capturan eventos */
  transition: opacity 0.2s ease;
}

/* Elimina cualquier punto rojo residual de versiones anteriores */
.wa-ping { display: none !important; }

.fab-main {
  pointer-events: auto;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--propulsar-morado);
  border: 2px solid rgba(252,212,3,0.25);
  color: var(--propulsar-amarillo);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(77,41,125,0.55);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  z-index: 1;
}
.fab-main:hover {
  background: #5e3299;
  transform: scale(1.08);
  box-shadow: 0 6px 32px rgba(77,41,125,0.75);
}

/* Speed dial */
.fab-dial {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.fab-dial.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.fab-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.fab-label {
  background: rgba(15,5,24,0.92);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  padding: 0.375rem 0.75rem;
  border-radius: 0.625rem;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  pointer-events: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

/* El contenedor del dial se apaga al cerrarse, pero esta regla lo
   sobrescribía: los botones quedaban invisibles y capturando clics
   igual, así que le robaban el clic a lo que hubiera debajo. */
.fab-dial:not(.open) .fab-item-btn { pointer-events: none; }

.fab-item-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  text-decoration: none;
  flex-shrink: 0;
  border: none;
  pointer-events: auto;
}
.fab-item-btn:hover { transform: scale(1.1); }

.fab-item-wa {
  background: #25D366;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
}
.fab-item-ai {
  background: var(--propulsar-morado);
  color: var(--propulsar-amarillo);
  border: 1px solid rgba(252,212,3,0.2);
  box-shadow: 0 4px 16px rgba(77,41,125,0.5);
}

/* ── Chat widget ── */
.chat-widget {
  position: fixed;
  bottom: 6.5rem;
  right: 1.5rem;
  width: 340px;
  height: 480px;
  background: var(--propulsar-oscuro);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1.25rem;
  box-shadow: 0 8px 48px rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  z-index: 60; /* por encima del speed dial (.propulsar-fab: 50) y del scroll (.back-to-top: 40) */
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}
.chat-widget.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
@media (max-width: 400px) {
  .chat-widget { width: calc(100vw - 2rem); right: 1rem; bottom: 5.5rem; }
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.125rem;
  background: linear-gradient(135deg, #4d297d 0%, #2d1254 100%);
  flex-shrink: 0;
}
.chat-header-info { display: flex; align-items: center; gap: 0.625rem; }
.chat-avatar {
  width: 2.25rem; height: 2.25rem;
  background: rgba(252,212,3,0.12);
  border: 1px solid rgba(252,212,3,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--propulsar-amarillo);
  flex-shrink: 0;
}
.chat-title    { font-weight: 700; font-size: 0.875rem; color: #fff; line-height: 1; margin-bottom: 0.2rem; }
.chat-subtitle { font-size: 0.6875rem; color: rgba(255,255,255,0.45); line-height: 1; }
.chat-close {
  background: transparent; border: none;
  color: rgba(255,255,255,0.45); cursor: pointer;
  padding: 0.25rem; border-radius: 0.5rem;
  transition: color 0.15s, background 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.chat-close:hover { color: #fff; background: rgba(255,255,255,0.1); }

.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 1rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(77,41,125,0.4) transparent;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(77,41,125,0.4); border-radius: 4px; }

.chat-msg { max-width: 85%; }
.chat-msg p { font-size: 0.8125rem; line-height: 1.55; margin: 0; }
.chat-msg-user {
  align-self: flex-end;
  background: var(--propulsar-morado);
  color: #fff;
  padding: 0.625rem 0.875rem;
  border-radius: 1rem 1rem 0.25rem 1rem;
}
.chat-msg-bot {
  align-self: flex-start;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  padding: 0.625rem 0.875rem;
  border-radius: 0.25rem 1rem 1rem 1rem;
}

.chat-typing { display: flex; align-items: center; gap: 5px; padding: 0.75rem 0.875rem; }
.chat-typing span {
  width: 7px; height: 7px;
  background: rgba(255,255,255,0.3); border-radius: 50%;
  animation: typing-dot 1.2s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30%            { transform: translateY(-5px); opacity: 1; }
}

.chat-input-area {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
#chat-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  font-family: inherit;
  color: #fff;
  outline: none;
  transition: border-color 0.15s ease;
}
#chat-input::placeholder { color: rgba(255,255,255,0.25); }
#chat-input:focus { border-color: rgba(77,41,125,0.7); }

#chat-send {
  width: 2.25rem; height: 2.25rem;
  background: var(--propulsar-morado); border: none;
  border-radius: 0.625rem;
  color: var(--propulsar-amarillo);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background 0.15s ease, transform 0.1s ease;
}
#chat-send:hover   { background: #5e3299; }
#chat-send:active  { transform: scale(0.92); }
#chat-send:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Chat chips ── */
.chat-chips {
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0 1rem 0.625rem;
  flex-shrink: 0;
}
.chip {
  background: rgba(77,41,125,0.35);
  border: 1px solid rgba(77,41,125,0.6);
  color: rgba(255,255,255,0.85);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3125rem 0.75rem;
  border-radius: 1.5rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.chip:hover {
  background: rgba(77,41,125,0.6);
  border-color: #fcd403;
  color: #fff;
}

/* ── Accesibilidad: reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .animate-float      { animation: none; }
  .faq-body           { animation: none; }
  .reveal-item        { opacity: 1; transform: none; transition: none; }
  .chat-typing span   { animation: none; opacity: 0.6; }
  * { transition-duration: 0.01ms !important; }
}
