/* ==========================================================================
   Dentia AI - Sistema de Diseño y Estilos CSS Premium (Vibe Tecnológica y Dental)
   ========================================================================== */

/* Variables del Sistema de Diseño */
:root {
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Colores */
  --bg-main: #0b0f19;
  --bg-card: #141c2c;
  --bg-card-hover: #1b263b;
  --bg-glass: rgba(20, 28, 44, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.15);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Acentos y Temas */
  --accent-emerald: #10b981;
  --accent-emerald-hover: #059669;
  --accent-emerald-light: rgba(16, 185, 129, 0.15);
  --accent-emerald-glow: rgba(16, 185, 129, 0.3);
  
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-blue-light: rgba(59, 130, 246, 0.15);
  --accent-blue-glow: rgba(59, 130, 246, 0.3);
  
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;

  /* WhatsApp Colors en versión Oscura Integrada */
  --wa-bg: #0d141a;
  --wa-chat-bg: #0b141a;
  --wa-incoming: #202c33;
  --wa-outgoing: #005c4b;
  --wa-header: #202c33;
  
  /* Sombras y Radios */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset y Configuración General */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button, input {
  font-family: inherit;
  font-size: inherit;
}

.scroll-offset {
  scroll-margin-top: 100px;
}

/* Clases de Utilidad */
.text-center { text-align: center; }
.highlight { color: var(--accent-emerald); }
.text-blue { color: var(--accent-blue); }
.hidden { display: none !important; }

/* Degradados de Texto */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-emerald) 0%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================================================
   Componentes: Botones y Elementos Interactivos
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-emerald) 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-emerald-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: var(--border-color-hover);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-large {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-full {
  width: 100%;
}

/* Animaciones en Botones */
.btn-animated {
  position: relative;
  overflow: hidden;
}

.btn-animated::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: 0.75s;
}

.btn-animated:hover::after {
  left: 120%;
}

/* ==========================================================================
   Estructura: Navbar
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  transition: all var(--transition-fast);
}

.nav-container {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  cursor: pointer;
}

.logo-icon {
  color: var(--accent-emerald);
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 6px var(--accent-emerald-glow));
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ==========================================================================
   Sección 1: HERO
   ========================================================================== */

.hero-section {
  position: relative;
  padding: 160px 0 100px 0;
  overflow: hidden;
}

.hero-bg-gradients {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.gradient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.15;
}

.gradient-blue {
  top: -10%;
  right: 5%;
  width: 500px;
  height: 500px;
  background-color: var(--accent-blue);
}

.gradient-emerald {
  bottom: 10%;
  left: -5%;
  width: 600px;
  height: 600px;
  background-color: var(--accent-emerald);
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--accent-emerald-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 14px;
  border-radius: 50px;
  color: var(--accent-emerald);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse 2s infinite;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 24px;
}

.hero-content .subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 580px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 48px;
  border-top: 1px solid var(--border-color);
  padding-top: 32px;
  width: 100%;
}

.stat-item h3 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Hero Visual: Mockup Frame */
.hero-visual {
  width: 100%;
}

.mockup-frame {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

.mockup-header {
  height: 48px;
  background-color: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.mockup-dots {
  display: flex;
  gap: 8px;
}

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

.mockup-dots .red { background-color: #ef4444; }
.mockup-dots .yellow { background-color: #f59e0b; }
.mockup-dots .green { background-color: #10b981; }

.mockup-title {
  margin-left: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Split-hero interior */
.split-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 320px;
  background-color: #0b111e;
}

.hero-visual-left {
  border-right: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel-header {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dummy-slider-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dummy-slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.dummy-slider-track {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.dummy-slider-bar {
  height: 100%;
  border-radius: 3px;
  position: relative;
}

.bar-emerald {
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}
.bar-blue {
  background-color: var(--accent-blue);
  box-shadow: 0 0 8px var(--accent-blue);
}
.bar-purple {
  background-color: var(--accent-purple);
  box-shadow: 0 0 8px var(--accent-purple);
}

.hero-visual-right {
  display: flex;
  flex-direction: column;
  background-color: var(--wa-bg);
}

.wa-chat-header {
  height: 52px;
  background-color: var(--wa-header);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.wa-avatar {
  width: 32px;
  height: 32px;
  background-color: #4b6b94;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.wa-info {
  display: flex;
  flex-direction: column;
}

.wa-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.wa-status {
  font-size: 0.7rem;
  color: var(--accent-emerald);
}

.wa-messages {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
  overflow: hidden;
  background-color: var(--wa-chat-bg);
}

.wa-message {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 0.8rem;
  position: relative;
  line-height: 1.4;
  animation: messageIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.msg-received {
  background-color: var(--wa-incoming);
  align-self: flex-start;
  border-top-left-radius: 0;
}

.msg-sent {
  background-color: var(--wa-outgoing);
  align-self: flex-end;
  border-top-right-radius: 0;
}

.msg-time {
  display: block;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.45);
  text-align: right;
  margin-top: 4px;
}

/* ==========================================================================
   Secciones Generales y Encabezados
   ========================================================================== */

section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  max-width: 700px;
  margin: 0 auto 64px auto;
}

.section-tag {
  display: inline-block;
  color: var(--accent-blue);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.section-footer-copy {
  margin-top: 48px;
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}

.section-footer-copy strong {
  color: var(--text-primary);
}

/* ==========================================================================
   Sección 2: PERSONALIDAD E INTERACTIVOS (Sandbox)
   ========================================================================== */

.personality-section {
  border-top: 1px solid var(--border-color);
}

.sandbox-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.sandbox-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: stretch;
}

.sandbox-panel {
  background-color: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.panel-left {
  gap: 28px;
}

.panel-right {
  background-color: var(--bg-card);
  padding: 0;
  overflow: hidden;
  justify-content: space-between;
  border-color: var(--border-color-hover);
}

.panel-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.panel-section-title i {
  color: var(--accent-emerald);
  width: 18px;
  height: 18px;
}

.sliders-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Estilización Avanzada de Sliders */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-info {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.9rem;
}

.slider-value {
  color: var(--accent-emerald);
  background-color: var(--accent-emerald-light);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.input-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  transition: background var(--transition-fast);
}

.input-slider:hover {
  background: rgba(255, 255, 255, 0.15);
}

.input-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald-glow);
  cursor: pointer;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.input-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #34d399;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Efecto Espejo Box */
.mirror-effect-box {
  background-color: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.15);
  padding: 16px;
  border-radius: var(--radius-md);
}

.mirror-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 8px;
}

.mirror-header i {
  width: 16px;
  height: 16px;
}

.mirror-phrase {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.45;
  font-style: italic;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.mirror-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Toggle vacaciones */
.toggle-control-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-md);
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toggle-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.toggle-title i {
  width: 16px;
  height: 16px;
}

.toggle-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 24px;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider-round {
  background-color: var(--accent-blue);
  box-shadow: 0 0 8px var(--accent-blue-glow);
}

input:checked + .slider-round:before {
  transform: translateX(24px);
}

/* Procedimientos Selector */
.procedimientos-selector {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.proc-buttons {
  display: flex;
  gap: 10px;
}

.proc-btn {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.proc-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--border-color-hover);
}

.proc-btn.active {
  background-color: var(--accent-emerald-light);
  border-color: var(--accent-emerald);
  color: var(--text-primary);
}

.proc-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
}

.proc-btn.active .proc-status-dot {
  background-color: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
  animation: pulse 1.5s infinite;
}

.proc-details-box {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  line-height: 1.45;
}

.proc-details-box strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.proc-details-box p {
  color: var(--text-secondary);
}

/* Chat de WhatsApp UI en el Sandbox */
.wa-window {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-grow: 1;
  background-color: var(--wa-chat-bg);
}

.wa-header {
  height: 60px;
  background-color: var(--wa-header);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wa-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wa-avatar-online {
  position: relative;
}

.status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  border: 2px solid var(--wa-header);
}

.wa-contact-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.wa-contact-status {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.wa-header-right {
  display: flex;
  gap: 20px;
  color: var(--text-secondary);
}

.wa-header-right i {
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.wa-header-right i:hover {
  color: var(--text-primary);
}

.wa-chat-area {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 0);
  background-size: 20px 20px;
}

.wa-system-message {
  align-self: center;
  background-color: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 20px;
  text-align: center;
  max-width: 90%;
  animation: fadeIn 0.4s var(--transition-normal);
}

.wa-input-bar {
  height: 60px;
  background-color: var(--wa-header);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.wa-icon-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
}

.wa-icon-btn:hover {
  color: var(--text-primary);
}

.wa-input-bar input {
  flex-grow: 1;
  height: 38px;
  background-color: rgba(255, 255, 255, 0.07);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 16px;
  color: var(--text-primary);
  outline: none;
}

.wa-input-bar input::placeholder {
  color: var(--text-muted);
}

.wa-send-btn {
  background-color: var(--accent-emerald);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.wa-send-btn:hover {
  transform: scale(1.1);
  background-color: var(--accent-emerald-hover);
}

.wa-send-btn i {
  width: 16px;
  height: 16px;
}

.sandbox-footer {
  padding: 16px 24px;
  background-color: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
}

.sandbox-badge-ai {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.sandbox-badge-ai i {
  width: 12px;
  height: 12px;
}

.sandbox-footer p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.sandbox-footer em {
  color: var(--text-primary);
  font-style: normal;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ==========================================================================
   Sección: EL SUEÑO DE TODO DENTISTA
   ========================================================================== */

.knowledge-section {
  background-color: rgba(11, 15, 25, 0.5);
  border-top: 1px solid var(--border-color);
}

.interactive-split-preview {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.split-preview-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}

.doc-panel-preview {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.preview-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.preview-title i {
  color: var(--accent-emerald);
}

.doc-cards-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.doc-card {
  position: relative;
  display: flex;
  gap: 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.doc-card:hover {
  border-color: var(--border-color-hover);
  background-color: var(--bg-card-hover);
  transform: translateX(6px);
}

.doc-card.active {
  border-color: var(--accent-emerald);
  background-color: var(--accent-emerald-light);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}

.doc-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-card-icon.emerald { background-color: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.doc-card-icon.blue { background-color: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.doc-card-icon.red { background-color: rgba(239, 68, 68, 0.15); color: var(--accent-red); }

.doc-card-body h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.doc-card-body p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.doc-card.active .doc-card-body p {
  color: var(--text-primary);
}

.pulse-indicator {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.doc-card.active .pulse-indicator {
  opacity: 1;
  animation: pulse 1.8s infinite;
}

/* Phone Simulator */
.phone-preview {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 290px;
  height: 580px;
  border: 10px solid #2d3748;
  border-radius: 36px;
  background-color: var(--wa-chat-bg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 140px;
  height: 18px;
  background-color: #2d3748;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  z-index: 5;
}

.phone-screen {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.phone-wa-header {
  height: 64px;
  background-color: var(--wa-header);
  padding: 16px 12px 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.phone-wa-header i {
  color: var(--text-secondary);
  width: 16px;
}

.phone-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--accent-blue);
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.phone-wa-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.phone-wa-name {
  font-size: 0.8rem;
  font-weight: 600;
}

.phone-wa-status {
  font-size: 0.65rem;
  color: var(--accent-emerald);
}

.phone-wa-actions {
  display: flex;
  gap: 12px;
  color: var(--text-secondary);
}

.phone-wa-actions i {
  width: 14px;
}

.phone-wa-chat {
  flex-grow: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  background-image: radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 0);
  background-size: 15px 15px;
}

.phone-wa-chat .wa-message {
  font-size: 0.75rem;
}

.phone-wa-chat .wa-system-message {
  font-size: 0.65rem;
  padding: 4px 10px;
}

.phone-wa-input {
  height: 48px;
  background-color: var(--wa-header);
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.phone-input-placeholder {
  flex-grow: 1;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.phone-send-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.phone-send-circle i {
  width: 14px;
}

/* ==========================================================================
   Sección 3: CÓMO FUNCIONA: DE LA DUDA A LA FACTURA
   ========================================================================== */

.how-it-works-section {
  border-top: 1px solid var(--border-color);
}

.flow-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.flow-progress-bar {
  position: absolute;
  top: 76px;
  left: 10%;
  right: 10%;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.06);
  z-index: 1;
}

.flow-progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--accent-emerald), var(--accent-blue));
  border-radius: 2px;
  transition: width 0.6s ease;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  position: relative;
  z-index: 2;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0.65;
  transition: all var(--transition-normal);
}

.flow-step.active {
  opacity: 1;
}

.flow-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-main);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 20px;
  transition: all var(--transition-normal);
}

.flow-step.active .flow-num {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald-glow);
}

.flow-icon-container {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  margin-bottom: 20px;
  transition: all var(--transition-normal);
}

.flow-step.active .flow-icon-container {
  background-color: var(--accent-emerald-light);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.flow-step.active:nth-child(even) .flow-icon-container {
  background-color: var(--accent-blue-light);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.flow-step.active:nth-child(even) .flow-num {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: 0 0 10px var(--accent-blue-glow);
}

.flow-step h4 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.flow-step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Sección 4: CARACTERÍSTICAS TOP-TIER
   ========================================================================== */

.features-section {
  background-color: rgba(11, 15, 25, 0.3);
  border-top: 1px solid var(--border-color);
}

.features-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.feature-card {
  background-color: var(--bg-glass);
  border: 1px solid var(--border-color);
  padding: 32px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon.bg-emerald { background-color: rgba(16, 185, 129, 0.12); color: var(--accent-emerald); }
.feature-icon.bg-blue { background-color: rgba(59, 130, 246, 0.12); color: var(--accent-blue); }
.feature-icon.bg-purple { background-color: rgba(139, 92, 246, 0.12); color: var(--accent-purple); }
.feature-icon.bg-cyan { background-color: rgba(6, 182, 212, 0.12); color: var(--accent-cyan); }

.feature-card h3 {
  font-size: 1.3rem;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Sección 5: CTA FINAL Y FORMULARIO
   ========================================================================== */

.cta-section {
  border-top: 1px solid var(--border-color);
  background: linear-gradient(180deg, var(--bg-main) 0%, #0c1220 100%);
  padding: 120px 0;
}

.cta-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.cta-text-content h2 {
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.cta-main-headline {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.cta-list-bullets {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bullet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 500;
}

.bullet-item i {
  color: var(--accent-emerald);
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Form Card */
.cta-form-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color-hover);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.cta-form-card h3 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.cta-form-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input {
  height: 42px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
}

.form-group input:focus {
  border-color: var(--accent-emerald);
  background-color: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

/* Éxito de Formulario */
.form-success-message {
  text-align: center;
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.success-icon {
  width: 60px;
  height: 60px;
  color: var(--accent-emerald);
  background-color: var(--accent-emerald-light);
  border-radius: 50%;
  padding: 12px;
  margin-bottom: 12px;
}

.form-success-message h4 {
  font-size: 1.5rem;
}

.form-success-message p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 320px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  background-color: #080b12;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-left p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-right p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-right a {
  text-decoration: underline;
  margin-left: 10px;
}

.footer-right a:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   Modales (Configuración de API Key)
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color-hover);
  border-radius: var(--radius-lg);
  width: 480px;
  max-width: 90%;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.modal-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
}

.modal-header h3 i {
  color: var(--accent-emerald);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.modal-body code {
  background-color: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-primary);
}

.api-key-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 8px;
}

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

.status-dot.grey { background-color: var(--text-muted); }
.status-dot.green { background-color: var(--accent-emerald); box-shadow: 0 0 6px var(--accent-emerald); }
.status-dot.red { background-color: var(--accent-red); box-shadow: 0 0 6px var(--accent-red); }

.api-key-help {
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

.modal-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 18px;
}

/* ==========================================================================
   Keyframes y Animaciones
   ========================================================================== */

@keyframes pulse {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animación del Mockup Hero */
.msg-animated {
  opacity: 0;
  animation-delay: 1.5s;
}

/* ==========================================================================
   Responsividad (Adaptación Móvil)
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-container, .sandbox-grid, .split-preview-grid, .cta-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-content {
    align-items: center;
    text-align: center;
  }
  
  .hero-content .subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-ctas {
    justify-content: center;
    width: 100%;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .flow-progress-bar {
    display: none;
  }
  
  .flow-steps {
    grid-template-columns: 1fr 1fr;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    display: none; /* Simplificado para landing */
  }
}

@media (max-width: 640px) {
  .hero-content h1 {
    font-size: 2.2rem;
  }
  
  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }
  
  .flow-steps {
    grid-template-columns: 1fr;
  }
  
  .cta-text-content h2 {
    font-size: 2rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .sandbox-panel {
    padding: 20px;
  }
  
  .proc-buttons {
    flex-direction: column;
  }
}
