/* ============================================================
   Neo Bot Agencia — Shared Stylesheet
   Preset "Midnight Luxe" adaptado a identidad de marca
   Paleta: Obsidiana · Azul Eléctrico · Rojo · Marfil
   Tipografía: Inter · Playfair Display · JetBrains Mono
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:ital,wght@1,400;1,600;1,700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Variables ── */
:root {
  --bg-primary:     #141B2A;
  --bg-secondary:   #1C2539;
  --bg-card:        #212E45;
  --bg-card-hover:  #26354F;
  --bg-footer:      #0F1520;
  --bg-input:       #192030;

  --blue:           #1565C0;
  --blue-md:        #1976D2;
  --blue-lt:        #42A5F5;
  --blue-xl:        #90CAF9;
  --red:            #CC0000;
  --red-lt:         #EF5350;

  --text:           #F0F4FF;
  --text-sec:       #8B96B0;
  --text-muted:     #4E5A72;

  --border:         rgba(45, 55, 80, 0.85);
  --border-blue:    rgba(21, 101, 192, 0.4);

  --glow:           rgba(21, 101, 192, 0.25);
  --glow-lg:        rgba(21, 101, 192, 0.45);
  --glow-red:       rgba(204, 0, 0, 0.2);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--blue-lt);
  outline-offset: 3px;
}

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(20, 27, 42, 0.92);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--border);
}
.header-nav {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
@keyframes logo-float {
  0%, 100% { transform: translateY(5px); }
  50%       { transform: translateY(-8px); }
}
.header-logo {
  height: 74px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(21,101,192,0.3));
  transition: filter 0.3s var(--ease);
  flex-shrink: 0;
  animation: logo-float 4s ease-in-out infinite;
}
.header-logo:hover { filter: drop-shadow(0 0 22px rgba(21,101,192,0.65)); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  color: var(--text-sec);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
  white-space: nowrap;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--blue), var(--red));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ── Mobile menu ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-sec);
  border-radius: 2px;
  transition: all 0.3s;
}
.nav-mobile {
  display: none;
  position: fixed;
  inset: 76px 0 0 0;
  background: rgba(13,13,18,0.98);
  backdrop-filter: blur(24px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-sec);
  letter-spacing: 0.05em;
  transition: color 0.3s;
}
.nav-mobile a:hover { color: var(--blue-lt); }

/* Back button */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  background: transparent;
  border: 1px solid var(--border-blue);
  border-radius: var(--r-sm);
  color: var(--blue-lt);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}
.btn-back:hover {
  background: rgba(21,101,192,0.12);
  border-color: var(--blue-lt);
  box-shadow: 0 0 16px var(--glow);
}
.btn-back svg {
  width: 13px; height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: transform 0.3s var(--ease);
}
.btn-back:hover svg { transform: translateX(-3px); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all 0.3s var(--ease);
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-lt));
  color: var(--text);
  box-shadow: 0 4px 22px var(--glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px var(--glow-lg);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-blue);
}
.btn-outline:hover {
  border-color: var(--blue-lt);
  background: rgba(21,101,192,0.1);
  box-shadow: 0 0 20px var(--glow);
}

/* ── Section Base ── */
.section {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
}
.section-inner { max-width: 1200px; margin: 0 auto; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 1rem;
  background: rgba(21,101,192,0.1);
  border: 1px solid rgba(21,101,192,0.28);
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--blue-lt);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}
.badge::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--blue-lt);
  border-radius: 50%;
  animation: dot-blink 2s ease-in-out infinite;
}
@keyframes dot-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.65); }
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.7rem;
}
.section-sub {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--text-sec);
  font-size: 1.05rem;
  margin-bottom: 2.8rem;
  line-height: 1.6;
}

.red-line {
  width: 44px;
  height: 2px;
  background: linear-gradient(90deg, var(--red), transparent);
  margin: 0.7rem 0 1.4rem;
  transition: width 0.4s var(--ease);
}

/* ── Features Grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition: all 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}
.feature-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--red));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.feature-card:hover {
  border-color: var(--border-blue);
  background: var(--bg-card-hover);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 24px var(--glow);
  transform: translateY(-4px);
}
.feature-card:hover::after { transform: scaleX(1); }

.feature-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  background: rgba(21,101,192,0.1);
  border: 1px solid rgba(21,101,192,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  transition: all 0.35s var(--ease);
}
.feature-icon svg {
  width: 24px; height: 24px;
  stroke: var(--blue-lt);
  fill: none;
  stroke-width: 1.5;
}
.feature-card:hover .feature-icon {
  background: rgba(21,101,192,0.2);
  box-shadow: 0 0 16px var(--glow);
}
.feature-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.feature-desc {
  color: var(--text-sec);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ── Contact Form ── */
.form-wrap {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2.8rem;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
}
.form-heading {
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.form-intro {
  color: var(--text-sec);
  font-size: 0.88rem;
  margin-bottom: 2rem;
  line-height: 1.65;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin-bottom: 1.1rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-sec);
}
.form-group label .req { color: var(--red-lt); margin-left: 2px; }
.form-group input,
.form-group textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.8rem 1rem;
  color: var(--text);
  font-size: 0.93rem;
  transition: all 0.3s var(--ease);
  outline: none;
  width: 100%;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue-md);
  background: rgba(21,101,192,0.06);
  box-shadow: 0 0 0 3px rgba(21,101,192,0.13);
}
.form-group input.err,
.form-group textarea.err {
  border-color: var(--red-lt);
  box-shadow: 0 0 0 3px rgba(204,0,0,0.12);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.8rem 1rem;
  color: var(--text);
  font-size: 0.93rem;
  transition: all 0.3s var(--ease);
  outline: none;
  width: 100%;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2355556A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.form-group select:focus {
  border-color: var(--blue-md);
  background-color: rgba(21,101,192,0.06);
  box-shadow: 0 0 0 3px rgba(21,101,192,0.13);
}
.form-group select option { background: var(--bg-secondary); color: var(--text); }
.ferr {
  font-size: 0.74rem;
  color: var(--red-lt);
  display: none;
}
.ferr.show { display: block; }
.captcha-block { margin: 1.4rem 0; }

.math-captcha {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(21,101,192,0.06);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.captcha-label {
  flex: 1;
  color: var(--text-sec);
  font-size: 0.82rem;
  text-align: left;
}
.captcha-label span {
  color: var(--blue-lt);
  font-weight: 700;
}
.math-captcha input {
  width: 120px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.75rem 0.9rem;
  color: var(--text);
  font-size: 0.93rem;
  outline: none;
}
.math-captcha input:focus {
  border-color: var(--blue-md);
  box-shadow: 0 0 0 3px rgba(21,101,192,0.13);
}
.math-captcha input.err {
  border-color: var(--red-lt);
  box-shadow: 0 0 0 3px rgba(204,0,0,0.12);
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 1.2rem 0 1.4rem;
  text-align: left;
  color: var(--text-sec);
  font-size: 0.8rem;
  line-height: 1.55;
}
.form-consent input {
  width: 18px;
  height: 18px;
  margin-top: 0.12rem;
  accent-color: var(--blue-md);
  flex-shrink: 0;
}
.form-consent a {
  color: var(--blue-lt);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.submit-btn {
  width: 100%;
  padding: 0.95rem;
  background: linear-gradient(135deg, var(--blue), var(--blue-lt));
  color: var(--text);
  border: none;
  border-radius: var(--r-sm);
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  box-shadow: 0 4px 20px var(--glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}
.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--glow-lg);
}
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.submit-btn .spinner {
  width: 17px; height: 17px;
  border: 2px solid rgba(255,255,255,0.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  padding: 1rem 1.5rem;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  font-weight: 500;
  max-width: 380px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  transform: translateY(120px);
  opacity: 0;
  transition: all 0.4s var(--ease);
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.ok  { background: rgba(21,101,192,0.15); border: 1px solid rgba(21,101,192,0.4); color: var(--blue-xl); }
.toast.ko  { background: rgba(204,0,0,0.12);    border: 1px solid rgba(204,0,0,0.3);    color: #FF8A80; }

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--bg-footer);
  border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}
@keyframes footer-logo-sway {
  0%, 100% { transform: rotate(-4deg); }
  50%       { transform: rotate(4deg); }
}
.footer-logo-img {
  height: 110px;
  margin-top: -1.2rem;
  margin-bottom: 1rem;
  margin-left: 40px;
  filter: drop-shadow(0 0 8px rgba(21,101,192,0.22));
  animation: footer-logo-sway 9s ease-in-out infinite;
}
.footer-desc {
  color: var(--text-sec);
  font-size: 0.86rem;
  line-height: 1.75;
  max-width: 300px;
}
.footer-col h4 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col ul a { color: var(--text-sec); font-size: 0.87rem; transition: color 0.3s; }
.footer-col ul a:hover { color: var(--blue-lt); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.73rem;
  color: var(--text-muted);
}
.footer-links { display: flex; gap: 2rem; }
.footer-links a {
  font-size: 0.76rem;
  color: var(--text-muted);
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--blue-lt); }

/* Legal pages */
.legal-main {
  position: relative;
  z-index: 1;
  padding: 9rem 2rem 5rem;
}
.legal-inner {
  max-width: 920px;
  margin: 0 auto;
}
.legal-kicker {
  font-family: 'JetBrains Mono', monospace;
  color: var(--blue-lt);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.legal-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}
.legal-updated {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 3rem;
}
.legal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2.6rem;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
}
.legal-card h2 {
  font-size: 1.1rem;
  margin: 2rem 0 0.65rem;
}
.legal-card h2:first-child { margin-top: 0; }
.legal-card p,
.legal-card li {
  color: var(--text-sec);
  font-size: 0.94rem;
  line-height: 1.8;
}
.legal-card ul { margin: 0.6rem 0 0 1.2rem; }
.legal-card a {
  color: var(--blue-lt);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .features-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .section { padding: 4rem 1.2rem; }
  .form-wrap { padding: 1.8rem 1.2rem; }
  .legal-main { padding: 8rem 1.2rem 4rem; }
  .legal-card { padding: 1.6rem 1.2rem; }
  .nav-links .hide-mobile { display: none; }
  .nav-hamburger { display: flex; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .header-nav { padding: 0 1rem; }
}

/* ══════════════════════════════════════
   CHATBOT NEO BOT — Dark Glassmorphism
══════════════════════════════════════ */

/* Botón flotante */
.nb-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9000;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(21, 101, 192, 0.35);
  border: 1px solid rgba(66, 165, 245, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(21,101,192,0.5), 0 0 60px rgba(21,101,192,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: all 0.3s var(--ease);
  animation: nb-pulse 3s infinite;
}
.nb-toggle:hover {
  transform: scale(1.1) translateY(-2px);
  background: rgba(21, 101, 192, 0.55);
  box-shadow: 0 0 30px rgba(21,101,192,0.7), 0 0 80px rgba(21,101,192,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
  animation: none;
}
@keyframes nb-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(21,101,192,0.5), 0 0 60px rgba(21,101,192,0.2), inset 0 1px 0 rgba(255,255,255,0.1); }
  50%       { box-shadow: 0 0 30px rgba(21,101,192,0.7), 0 0 90px rgba(21,101,192,0.35), inset 0 1px 0 rgba(255,255,255,0.15); }
}
.nb-toggle svg { width: 26px; height: 26px; fill: #fff; transition: opacity 0.2s; }
.nb-toggle .nb-icon-close { display: none; }
.nb-toggle.is-open .nb-icon-chat  { display: none; }
.nb-toggle.is-open .nb-icon-close { display: block; }
.nb-toggle.is-open { animation: none; }

/* Ventana de chat */
.nb-chat {
  position: fixed;
  bottom: 5.5rem;
  right: 2rem;
  z-index: 8999;
  width: 365px;
  background: rgba(15, 22, 38, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(66, 165, 245, 0.2);
  border-radius: 20px;
  box-shadow:
    0 25px 70px rgba(0,0,0,0.6),
    0 0 40px rgba(21,101,192,0.15),
    inset 0 1px 0 rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.nb-chat.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Cabecera */
.nb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  background: linear-gradient(135deg, rgba(21,101,192,0.6) 0%, rgba(13,71,161,0.8) 100%);
  border-bottom: 1px solid rgba(66,165,245,0.2);
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}
.nb-header-info { display: flex; align-items: center; gap: 0.75rem; }
.nb-avatar {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scaleX(-1);
}
.nb-name { font-weight: 700; font-size: 0.95rem; color: #fff; letter-spacing: 0.01em; }
.nb-status {
  font-size: 0.7rem; color: rgba(255,255,255,0.7);
  display: flex; align-items: center; gap: 0.4rem;
}
.nb-status::before {
  content: '';
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #4cef8a;
  box-shadow: 0 0 6px #4cef8a;
}
.nb-close {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%; width: 28px; height: 28px;
  color: rgba(255,255,255,0.7); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; line-height: 1;
  transition: all 0.2s;
}
.nb-close:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* Área de mensajes */
.nb-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 340px;
  max-height: 340px;
  scrollbar-width: thin;
  scrollbar-color: rgba(66,165,245,0.2) transparent;
}
.nb-messages::-webkit-scrollbar { width: 3px; }
.nb-messages::-webkit-scrollbar-track { background: transparent; }
.nb-messages::-webkit-scrollbar-thumb { background: rgba(66,165,245,0.25); border-radius: 2px; }

.nb-msg { display: flex; max-width: 88%; }
.nb-msg-bot  { align-self: flex-start; }
.nb-msg-user { align-self: flex-end; flex-direction: row-reverse; }

.nb-msg-bubble {
  padding: 0.65rem 1rem;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.55;
  word-break: break-word;
}
.nb-msg-bot .nb-msg-bubble {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--text);
  border-bottom-left-radius: 4px;
  backdrop-filter: blur(8px);
}
.nb-msg-user .nb-msg-bubble {
  background: rgba(21,101,192,0.5);
  border: 1px solid rgba(66,165,245,0.3);
  color: #fff;
  border-bottom-right-radius: 4px;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 16px rgba(21,101,192,0.25);
}

/* Indicador de escritura */
.nb-typing {
  display: flex; gap: 5px;
  padding: 0.65rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
  backdrop-filter: blur(8px);
}
.nb-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue-lt);
  animation: nb-bounce 1.2s infinite;
}
.nb-typing span:nth-child(2) { animation-delay: 0.2s; }
.nb-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes nb-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30%           { transform: translateY(-6px); opacity: 1; }
}

/* Input */
.nb-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid rgba(66,165,245,0.12);
  background: rgba(0,0,0,0.15);
  flex-shrink: 0;
}
.nb-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.875rem;
  padding: 0.6rem 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  backdrop-filter: blur(8px);
}
.nb-input:focus {
  border-color: rgba(66,165,245,0.5);
  box-shadow: 0 0 0 3px rgba(21,101,192,0.15);
}
.nb-input::placeholder { color: rgba(139,150,176,0.6); }

.nb-send {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 10px;
  background: rgba(21,101,192,0.5);
  border: 1px solid rgba(66,165,245,0.35);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}
.nb-send:hover:not(:disabled) {
  background: rgba(21,101,192,0.75);
  box-shadow: 0 0 14px rgba(21,101,192,0.5);
}
.nb-send:disabled { opacity: 0.35; cursor: not-allowed; }
.nb-send svg { width: 18px; height: 18px; fill: #fff; }

.nb-cursor {
  display: inline;
  color: rgba(255,255,255,0.9);
  font-weight: 300;
  font-size: 1.05em;
  margin-left: 1px;
  animation: nb-blink 0.6s step-end infinite;
}
@keyframes nb-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Botones de respuesta rápida */
.nb-quick-replies {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 6px 0 10px;
  align-self: flex-start;
  width: 100%;
  max-width: 88%;
}
.nb-quick-btn {
  background: linear-gradient(135deg, var(--blue, #1565C0), var(--blue-lt, #42A5F5));
  border: none;
  border-radius: var(--r-sm, 8px);
  color: var(--text, #F0F4FF);
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 700;
  padding: 0.6rem 1rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 14px var(--glow, rgba(21,101,192,0.45));
  transition: transform 0.2s, box-shadow 0.2s;
  line-height: 1.4;
}
.nb-quick-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--glow-lg, rgba(21,101,192,0.6));
}
.nb-quick-btn:active {
  transform: translateY(0);
}

@media (max-width: 600px) {
  .nb-chat {
    right: 0; bottom: 5rem;
    width: 100vw;
    border-radius: 20px 20px 0 0;
    max-height: 70vh;
  }
  .nb-toggle { bottom: 1.25rem; right: 1.25rem; }
  /* En móvil el área de mensajes se adapta al 70vh del chat
     restando el alto del header (~62px) y del input (~68px) */
  .nb-messages {
    min-height: 0;
    max-height: calc(70vh - 130px);
  }
  .nb-quick-btn {
    font-size: 0.85rem;
    padding: 0.55rem 0.9rem;
  }
}

/* ══════════════════════════════════════
   REDUCCIÓN DE MOVIMIENTO
══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
