/* ===========================
   sections.css — Secciones interiores, chatbot layout, BI, stats
   =========================== */

/* --- STATS BAR --- */
.stats {
  padding: 3.5rem 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.stats__item {
  padding: 1rem;
  border-right: 1px solid var(--border);
}

.stats__item:last-child { border-right: none; }

.stats__value {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #00d4ff, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.4rem;
}

.stats__label {
  font-size: 0.875rem;
  color: var(--text-2);
  font-weight: 500;
}

/* --- VISUAL CON IMAGEN --- */
.visual-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.visual-img {
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,212,255,0.15);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 80px rgba(0,212,255,0.05);
  object-fit: cover;
}

.visual-img-placeholder {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,212,255,0.15);
  background: linear-gradient(135deg, rgba(0,212,255,0.05), rgba(124,58,237,0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-3);
  text-align: center;
  padding: 2rem;
}

/* --- CHATBOT LAYOUT --- */
.chatbot-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* Chat Mockup */
.chat-mockup {
  background: rgba(12,18,32,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 400px;
  box-shadow:
    0 0 0 1px rgba(124,58,237,0.1),
    0 20px 60px rgba(0,0,0,0.5),
    0 0 80px rgba(124,58,237,0.05);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #00d4ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.chat-header-info { flex: 1; }

.chat-bot-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.chat-bot-status {
  font-size: 0.7rem;
  color: var(--accent-3);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.chat-bot-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent-3);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

.chat-channels-mini {
  display: flex;
  gap: 0.3rem;
  font-size: 0.85rem;
}

.chat-messages {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 220px;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}

.chat-msg--bot { align-self: flex-start; }
.chat-msg--user { align-self: flex-end; align-items: flex-end; }

.chat-bubble {
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.chat-msg--bot .chat-bubble {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 4px 12px 12px 12px;
}

.chat-msg--user .chat-bubble {
  background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(124,58,237,0.15));
  border: 1px solid rgba(0,212,255,0.2);
  color: var(--text);
  border-radius: 12px 4px 12px 12px;
}

.chat-msg__time {
  font-size: 0.62rem;
  color: var(--text-3);
  margin-top: 0.2rem;
  padding: 0 0.25rem;
}

/* Typing animation */
.chat-typing {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 4px 12px 12px 12px;
  max-width: 80px;
  align-self: flex-start;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  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% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
  color: var(--text-3);
  font-family: inherit;
  cursor: default;
}

.chat-send {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #00d4ff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-send svg { width: 14px; height: 14px; color: #fff; }

/* --- BI DASHBOARD MOCKUP --- */
.bi-mockup {
  background: rgba(12,18,32,0.9);
  border: 1px solid rgba(16,185,129,0.15);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  width: 100%;
  max-width: 480px;
}

.bi-mockup__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.bi-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.bi-dot:nth-child(1) { background: #ff5f57; }
.bi-dot:nth-child(2) { background: #febc2e; }
.bi-dot:nth-child(3) { background: #28c840; }

.bi-mockup__title {
  font-size: 0.78rem; color: var(--text-3); margin-left: 0.4rem; font-weight: 500;
}

.bi-mockup__body { padding: 1.25rem; }

.bi-kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.bi-kpi {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.bi-kpi__val {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-3);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.bi-kpi__lbl {
  font-size: 0.68rem;
  color: var(--text-3);
}

.bi-chart-area { margin-bottom: 1rem; }
.bi-chart-title { font-size: 0.72rem; color: var(--text-3); margin-bottom: 0.6rem; }

.bi-line-chart {
  height: 80px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-end;
  padding: 0.5rem;
  gap: 0.3rem;
  overflow: hidden;
  position: relative;
}

.bi-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, rgba(16,185,129,0.4), rgba(16,185,129,0.1));
  transition: background var(--transition);
}

.bi-bar:hover {
  background: linear-gradient(to top, rgba(16,185,129,0.7), rgba(16,185,129,0.2));
}

.bi-donut-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.bi-donut {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bi-donut__title { font-size: 0.65rem; color: var(--text-3); font-weight: 600; text-transform: uppercase; }

.bi-progress {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.bi-progress-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #10b981, #00d4ff);
}

.bi-progress-val { font-size: 0.7rem; color: var(--accent-3); font-weight: 700; }

/* --- PROBLEM CARDS (diagnóstico) --- */
.problem-card {
  background: rgba(244,63,94,0.04);
  border: 1px solid rgba(244,63,94,0.15);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color var(--transition);
}

.problem-card:hover { border-color: rgba(244,63,94,0.3); }

.problem-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(244,63,94,0.1);
  color: #f43f5e;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.problem-card__icon svg { width: 22px; height: 22px; }

.problem-card h4 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.problem-card p  { font-size: 0.875rem; color: var(--text-3); margin: 0; }

/* --- BROWSER MOCKUP (landing-web) --- */
.browser-mockup {
  background: rgba(12,18,32,0.9);
  border: 1px solid rgba(124,58,237,0.15);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  width: 100%;
  max-width: 480px;
}

.browser-chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.chrome-dot {
  width: 10px; height: 10px; border-radius: 50%;
}

.chrome-dot:nth-child(1) { background: #ff5f57; }
.chrome-dot:nth-child(2) { background: #febc2e; }
.chrome-dot:nth-child(3) { background: #28c840; }

.chrome-bar {
  flex: 1;
  height: 22px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-left: 0.5rem;
}

.browser-screen {
  padding: 0;
  overflow: hidden;
}

.sim-nav {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  background: rgba(255,255,255,0.02);
}

.sim-logo {
  width: 80px; height: 14px;
  background: linear-gradient(90deg, rgba(0,212,255,0.4), rgba(124,58,237,0.3));
  border-radius: 3px;
}

.sim-nav-links {
  display: flex;
  gap: 0.6rem;
  margin-left: auto;
}

.sim-nav-links span {
  width: 36px; height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.sim-hero-area {
  padding: 1.5rem 1rem;
  background: linear-gradient(135deg, rgba(0,212,255,0.04), rgba(124,58,237,0.04));
  border-bottom: 1px solid var(--border);
}

.sim-hero-text { display: flex; flex-direction: column; gap: 0.6rem; }

.sim-h1 {
  width: 70%; height: 16px;
  background: linear-gradient(90deg, rgba(0,212,255,0.4), rgba(124,58,237,0.3));
  border-radius: 3px;
}

.sim-h2 {
  width: 50%; height: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.sim-btn {
  width: 100px; height: 28px;
  background: linear-gradient(135deg, rgba(0,212,255,0.5), rgba(124,58,237,0.4));
  border-radius: 6px;
  margin-top: 0.5rem;
}

.sim-cards-row {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
}

.sim-card {
  flex: 1;
  height: 60px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* --- SKILLS BARS --- */
.skills-visual {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.skills-visual h4 {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  color: var(--text-2);
}

.skill-bars { display: flex; flex-direction: column; gap: 1rem; }

.skill-bar__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
}

.skill-bar__label span { color: var(--accent); }

.skill-bar__track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.skill-bar__fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  position: relative;
}

/* --- OUTCOME CARD (diagnóstico) --- */
.outcome-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.outcome-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(0,212,255,0.08);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.outcome-card__icon svg { width: 22px; height: 22px; }
.outcome-card h4 { font-size: 1rem; font-weight: 600; margin: 0; }
.outcome-card p  { font-size: 0.875rem; color: var(--text-3); margin: 0; }

/* --- MODULO CARD (diagnóstico auditorías) --- */
.modulo-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}

.modulo-card--purple { border-color: rgba(124,58,237,0.2); }

.modulo-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.modulo-card h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.modulo-card p  { font-size: 0.9rem; color: var(--text-2); margin-bottom: 1.5rem; }

.modulo-card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.modulo-card__list li {
  font-size: 0.875rem;
  color: var(--text-2);
  padding-left: 1.4rem;
  position: relative;
}

.modulo-card__list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.modulo-card__metric {
  background: rgba(0,212,255,0.06);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  min-width: 160px;
}

.modulo-card__metric-val {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.modulo-card__metric-lbl {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-bottom: 0.5rem;
}

.modulo-card__metric-note {
  font-size: 0.65rem;
  color: var(--text-3);
  font-style: italic;
}

/* --- PROCESS 4 COLS (diagnóstico) --- */
.process-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
}

.process-4::before {
  content: '';
  position: absolute;
  top: 24px;
  left: calc(12.5% + 24px);
  right: calc(12.5% + 24px);
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 0;
  opacity: 0.3;
}

@media (max-width: 900px) {
  .chatbot-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .chat-mockup { max-width: 100%; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stats__item { border-right: none; border-bottom: 1px solid var(--border); }
  .stats__item:last-child { border-bottom: none; }
  .bi-mockup { max-width: 100%; }
  .modulo-card { grid-template-columns: 1fr; }
  .process-4 { grid-template-columns: repeat(2, 1fr); }
  .process-4::before { display: none; }
}

@media (max-width: 600px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .process-4 { grid-template-columns: 1fr; }
}
