/* ============================================
   DEMO SECTION — demo.css
   ============================================ */

/* ── Wrapper ─────────────────────────────── */
#demo {
  background: #e8e0d5;
  padding: 80px 20px;
  text-align: center;
}

/* ── Encabezado ──────────────────────────── */
.demo-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #7a6e61;
  margin-bottom: 8px;
}

.demo-title {
  font-family: 'Instrument Serif', serif;
  font-size: 2rem;
  color: #0f1f3d;
  margin-bottom: 8px;
}

.demo-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #7a6e61;
  margin-bottom: 24px;
}

/* ── Barra de progreso ───────────────────── */
.demo-progress-bar {
  max-width: 560px;
  margin: 0 auto 16px auto;
  height: 2px;
  background: #d4ccc3;
  border-radius: 2px;
  overflow: hidden;
}

.demo-progress-fill {
  height: 100%;
  background: #1a2f6e;
  border-radius: 2px;
  transition: width 0.4s linear;
}

/* ── Browser shell ───────────────────────── */
.demo-browser {
  max-width: 560px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 40px rgba(0, 0, 0, 0.13);
  transition: background 0.5s;
}

.demo-browser.light { background: #fff; }
.demo-browser.dark  { background: #0f1623; }

/* ── Browser bar ─────────────────────────── */
.demo-bar {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid #e9edf2;
  transition: background 0.5s, border-color 0.5s;
}

.demo-bar.light { background: #f8f9fc; }
.demo-bar.dark  { background: #1a2535; border-bottom-color: #2d3f5e; }

.demo-dots {
  display: flex;
  gap: 4px;
}

.demo-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: block;
}

.demo-dot-r { background: #ff5f57; }
.demo-dot-y { background: #febc2e; }
.demo-dot-g { background: #28c840; }

.demo-url {
  flex: 1;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 10px;
  font-family: monospace;
  transition: background 0.5s, border-color 0.5s, color 0.5s;
}

.demo-url.light {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #6b7280;
}

.demo-url.dark {
  background: #0f1623;
  border: 1px solid #2d3f5e;
  color: #64748b;
}

.demo-hbtns {
  display: flex;
  gap: 4px;
  align-items: center;
}

/* ── Botones del header ──────────────────── */
.demo-guide-btn {
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #0f1f3d;
  font-family: 'DM Sans', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.3s;
  white-space: nowrap;
  position: relative;
  cursor: default;
}

.demo-guide-btn.dark {
  border-color: #2d3f5e;
  background: #1e293b;
  color: #e2e8f0;
}

.demo-guide-btn.guide-active {
  background: #1a2f6e;
  color: #fff;
  border-color: #1a2f6e;
}

.demo-lang-grp {
  display: flex;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #d1d5db;
  transition: border-color 0.3s;
}

.demo-lang-grp.dark { border-color: #2d3f5e; }

.demo-lang-btn {
  font-size: 9px;
  padding: 2px 7px;
  border: none;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.3s;
  cursor: default;
}

.demo-lang-btn.active   { background: #1a2f6e; color: #fff; }
.demo-lang-btn.inactive { background: transparent; color: #6b7280; }

.demo-theme-btn {
  font-size: 11px;
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  position: relative;
  cursor: default;
}

.demo-theme-btn.dark { border-color: #2d3f5e; color: #e2e8f0; }

/* ── Área de contenido ───────────────────── */
.demo-content {
  position: relative;
  overflow: hidden;
  transition: background 0.5s;
  min-height: 330px;
}

.demo-content.light { background: #fff; }
.demo-content.dark  { background: #0f1623; }

/* ── CV layer ────────────────────────────── */
.demo-cv-layer {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.demo-profile-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.demo-profile-row.show {
  opacity: 1;
  transform: translateY(0);
}

.demo-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1a2f6e;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.5s;
}

.demo-avatar.dark { background: #2563eb; }

.demo-p-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f1f3d;
  transition: color 0.5s;
}

.demo-p-name.dark { color: #e2e8f0; }

.demo-p-role {
  font-size: 11px;
  color: #6b7280;
  transition: color 0.5s;
}

.demo-p-role.dark { color: #64748b; }

.demo-chip {
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 20px;
  transition: all 0.5s;
}

.demo-chip.light { background: #edf0f7; color: #1a2f6e; }
.demo-chip.dark  { background: #1e293b; color: #60a5fa; }

.demo-ai-badge {
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.5s;
  white-space: nowrap;
}

.demo-ai-badge.light {
  background: #edf0f7;
  border: 1px solid #c7d2fe;
  color: #1a2f6e;
}

.demo-ai-badge.dark {
  background: #1e293b;
  border: 1px solid #2d3f5e;
  color: #818cf8;
}

/* ── CV sections ─────────────────────────── */
.demo-section {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  margin-bottom: 7px;
  border-radius: 6px;
  padding: 4px;
  position: relative;
}

.demo-section.show {
  opacity: 1;
  transform: translateY(0);
}

.demo-section.guide-focus {
  border: 1.5px solid #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.demo-section.guide-blur { opacity: 0.15; }

.demo-section .guide-tip {
  display: none;
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: #1a2f6e;
  color: #fff;
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
  z-index: 10;
}

.demo-section.guide-focus .guide-tip { display: block; }

.demo-sec-head {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  padding-bottom: 3px;
  transition: border-color 0.5s;
}

.demo-sec-head.light { border-bottom: 1px solid #e9edf2; }
.demo-sec-head.dark  { border-bottom: 1px solid #2d3f5e; }

.demo-sec-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: color 0.5s;
}

.demo-sec-label.light { color: #1a2f6e; }
.demo-sec-label.dark  { color: #818cf8; }

.demo-exp-card {
  border-radius: 5px;
  padding: 4px 8px;
  margin-bottom: 3px;
  font-size: 10px;
  transition: all 0.5s;
}

.demo-exp-card.light { background: #f8f9fc; color: #0f1f3d; }
.demo-exp-card.dark  { background: #1e293b; color: #e2e8f0; }

/* ── Chat panel ──────────────────────────── */
.demo-chat-panel {
  position: absolute;
  bottom: 50px;
  right: 10px;
  width: 220px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  z-index: 20;
}

.demo-chat-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.demo-chat-header {
  background: #1a2f6e;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demo-bot-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-online {
  font-size: 8px;
  background: #22c55e;
  color: #fff;
  padding: 1px 6px;
  border-radius: 20px;
}

.demo-chat-msgs {
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 150px;
  overflow: hidden;
}

.demo-msg {
  font-size: 10px;
  line-height: 1.5;
  padding: 5px 8px;
  border-radius: 7px;
  max-width: 90%;
}

.demo-msg.ai {
  background: #f1f5f9;
  color: #0f1f3d;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.demo-msg.user {
  background: #1a2f6e;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.demo-msg-bot-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1a2f6e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.demo-typing {
  display: flex;
  gap: 3px;
  padding: 5px 8px;
  background: #f1f5f9;
  border-radius: 7px;
  border-bottom-left-radius: 2px;
  width: fit-content;
  align-items: center;
}

.demo-typing span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #94a3b8;
  animation: blink 1s infinite;
}

.demo-typing span:nth-child(2) { animation-delay: 0.2s; }
.demo-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}

/* ── FAB ─────────────────────────────────── */
.demo-fab {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1a2f6e;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  cursor: default;
}

.demo-fab svg {
  width: 15px;
  height: 15px;
  fill: #fff;
}

/* ── Touch rings ─────────────────────────── */
.demo-touch-ring {
  position: absolute;
  border-radius: inherit;
  border: 2px solid #1a2f6e;
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
  z-index: 40;
  display: none;
}

.demo-touch-ring.fire {
  display: block;
  animation: touchPulse 0.55s ease forwards;
}

@keyframes touchPulse {
  0%   { opacity: 0.9; transform: scale(0.5); }
  100% { opacity: 0;   transform: scale(1.6); }
}

/* ── CTA screen ──────────────────────────── */
.demo-cta {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0f1f3d, #1a2f6e);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.6s;
  pointer-events: none;
  z-index: 5;
}

.demo-cta.show {
  opacity: 1;
  pointer-events: auto;
}

.demo-cta-title {
  font-family: 'Instrument Serif', serif;
  font-size: 20px;
  color: #fff;
  text-align: center;
  line-height: 1.4;
}

.demo-cta-title em {
  font-style: italic;
  color: #a78bfa;
}

.demo-cta-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 9px 24px;
  border-radius: 22px;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
}

/* ── Caption ─────────────────────────────── */
.demo-caption {
  text-align: center;
  font-size: 11px;
  color: #7a6e61;
  font-style: italic;
  margin-top: 10px;
  min-height: 16px;
}
