:root {
  --bg-primary: #080c14;
  --bg-secondary: #0f172a;
  --bg-card: rgba(17, 26, 44, 0.7);
  --bg-card-hover: rgba(26, 39, 66, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.25);
  
  --brand-purple: #701a75;
  --brand-wine: #831843;
  --brand-cyan: #06b6d4;
  --brand-blue: #2563eb;
  --brand-emerald: #10b981;
  --brand-accent: #f59e0b;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --gradient-tech: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
  --gradient-wine: linear-gradient(135deg, #831843 0%, #4c0519 100%);
  --gradient-card: linear-gradient(180deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%);
  --shadow-glow: 0 10px 30px -10px rgba(6, 182, 212, 0.2);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 0% 0%, rgba(112, 26, 117, 0.18) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.14) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(37, 99, 235, 0.12) 0px, transparent 60%);
  background-attachment: fixed;
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 20, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  cursor: pointer;
}

.brand-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #06b6d4, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

.brand-info h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--gradient-tech);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.brand-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* NAV BUTTONS & TRIGGER */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #fff;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

.btn-menu-trigger:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(139, 92, 246, 0.3));
  border-color: var(--brand-cyan);
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

.burger-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.burger-line {
  width: 18px;
  height: 2px;
  background: #38bdf8;
  border-radius: 2px;
  transition: var(--transition);
}

/* QUICK SHORTCUTS IN NAV */
.nav-quick-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-quick-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-quick-btn:hover, .nav-quick-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* FULL-SCREEN / DRAWER MEGA MENU */
.mega-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.mega-menu-overlay.active {
  display: flex;
  opacity: 1;
}

.mega-menu-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 980px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.9);
  padding: 2rem;
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.mega-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

.mega-menu-title {
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--gradient-tech);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-close-mega {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: var(--transition);
}

.btn-close-mega:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: rotate(90deg);
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.mega-card-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mega-card-item:hover {
  background: rgba(6, 182, 212, 0.08);
  border-color: var(--brand-cyan);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -10px rgba(6, 182, 212, 0.3);
}

.mega-card-item.featured-highlight {
  border-color: rgba(236, 72, 153, 0.4);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.06), rgba(139, 92, 246, 0.06));
}

.mega-card-item.featured-highlight:hover {
  border-color: #ec4899;
}

.mega-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.mega-item-icon {
  font-size: 1.4rem;
}

.mega-item-badge {
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.mega-card-item h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.mega-card-item p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.btn-open-keys {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-open-keys:hover {
  border-color: var(--brand-cyan);
  color: #fff;
}

/* CONTAINER & SECTIONS */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

.view-section {
  display: none;
  animation: fadeIn 0.35s ease forwards;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* HERO SECTION */
.hero {
  padding: 3rem 0 2rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--brand-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero h2 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
}

.hero h2 span.gradient-text {
  background: var(--gradient-tech);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.12rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-primary {
  background: var(--gradient-tech);
  color: #fff;
  border: none;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(6, 182, 212, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(6, 182, 212, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

/* HERO PROFILE CARD */
.profile-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -40%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.profile-avatar-wrap {
  position: relative;
}

.profile-avatar {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 3px solid var(--brand-cyan);
  object-fit: cover;
  background: #1e293b;
}

.status-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  background: var(--brand-emerald);
  border-radius: 50%;
  border: 2px solid #0f172a;
}

.profile-meta h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.profile-meta p {
  font-size: 0.88rem;
  color: var(--brand-cyan);
  font-weight: 500;
}

.credentials-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.cred-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cred-item svg {
  color: var(--brand-cyan);
  flex-shrink: 0;
  margin-top: 3px;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.p-pill {
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
}

/* STATS ROW */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin: 3.5rem 0 4rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.cyan { background: rgba(6, 182, 212, 0.15); color: var(--brand-cyan); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.stat-icon.emerald { background: rgba(16, 185, 129, 0.15); color: var(--brand-emerald); }
.stat-icon.wine { background: rgba(225, 29, 72, 0.15); color: #fb7185; }

.stat-details .num {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.stat-details .label {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* SECTION TITLES */
.section-header {
  margin-bottom: 2.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-cyan);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 750px;
}

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.75rem;
}

.program-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.program-card:hover {
  transform: translateY(-5px);
  border-color: var(--brand-cyan);
  box-shadow: var(--shadow-glow);
}

.card-top {
  position: relative;
  height: 180px;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
}

.card-top::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 20, 0.2) 0%, rgba(8, 12, 20, 0.9) 100%);
}

.card-top * {
  position: relative;
  z-index: 2;
}

.card-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-lic { background: #0284c7; color: #fff; }
.badge-esp { background: #831843; color: #fff; }
.badge-mae { background: #7c3aed; color: #fff; }
.badge-doc { background: #d97706; color: #fff; }

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.card-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.ai-interactive-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--brand-cyan);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}

.card-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-card-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-card-action:hover {
  background: var(--brand-cyan);
  color: #000;
  border-color: var(--brand-cyan);
}

/* INTERACTIVE LAB / SIMULATOR MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.btn-close-modal:hover {
  color: #fff;
}

.modal-content-area {
  padding: 1.75rem;
}

/* AGENTS SECTION */
.agents-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.agent-console {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.agent-console-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.agent-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.voice-wave {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 35px;
  margin: 1.5rem 0;
  justify-content: center;
}

.wave-bar {
  width: 6px;
  height: 8px;
  background: var(--brand-cyan);
  border-radius: 3px;
  transition: height 0.15s ease;
}

.voice-wave.recording .wave-bar {
  animation: pulseWave 0.6s infinite alternate ease-in-out;
}

.voice-wave.recording .wave-bar:nth-child(2) { animation-delay: 0.1s; }
.voice-wave.recording .wave-bar:nth-child(3) { animation-delay: 0.2s; }
.voice-wave.recording .wave-bar:nth-child(4) { animation-delay: 0.3s; }
.voice-wave.recording .wave-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes pulseWave {
  from { height: 8px; }
  to { height: 35px; }
}

.chat-box {
  background: #080d1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  height: 420px;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
  scroll-behavior: smooth;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4);
}

.chat-box::-webkit-scrollbar {
  width: 6px;
}
.chat-box::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
.chat-box::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 9999px;
}

.chat-msg {
  max-width: 92%;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.6;
  animation: fadeInMsg 0.3s ease-out;
}

@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg.bot {
  align-self: flex-start;
  width: 100%;
}

.chat-msg.user {
  align-self: flex-end;
  max-width: 85%;
}

.chat-user-bubble {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  padding: 0.75rem 1.15rem;
  border-radius: 16px 16px 4px 16px;
  font-size: 0.92rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  line-height: 1.5;
  word-break: break-word;
}

/* ── Tarjeta de Respuesta Estructurada del Bot ── */
.chat-structured-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-left: 3px solid #6366f1;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.chat-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-badge-tutor {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #a5b4fc;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.live-dot-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
}

.chat-badge-model {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.chat-card-content {
  color: #e2e8f0;
  font-size: 0.9rem;
}

.chat-paragraph {
  margin: 0 0 0.65rem 0;
  line-height: 1.6;
}

.chat-paragraph:last-child {
  margin-bottom: 0;
}

.chat-heading {
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  margin: 0.75rem 0 0.4rem 0;
}

.chat-subheading {
  font-size: 0.92rem;
  font-weight: 600;
  color: #93c5fd;
  margin: 0.6rem 0 0.35rem 0;
}

/* ── Listas Ordenadas y con Viñetas Profesionales ── */
.chat-ordered-list {
  list-style: none;
  padding: 0;
  margin: 0.65rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.chat-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.chat-list-item:hover {
  background: rgba(99, 102, 241, 0.06);
}

.chat-item-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
}

.chat-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0.65rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.4rem 0.5rem;
}

.chat-bullet-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
  flex-shrink: 0;
  margin-top: 8px;
}

.chat-item-text {
  flex-grow: 1;
  line-height: 1.55;
}

.chat-accent {
  color: #67e8f9;
  font-weight: 700;
}

.chat-inline-code {
  background: rgba(99, 102, 241, 0.15);
  color: #c4b5fd;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.82rem;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.chat-link {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Acciones de la Tarjeta (Copiar / Escuchar Voz) ── */
.chat-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-action-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: #e2e8f0;
  transform: translateY(-1px);
}

/* ── Indicador de Pensando ── */
.chat-loading-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.95rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 10px;
  font-size: 0.82rem;
  color: #a5b4fc;
}

.loading-spinner-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6366f1;
  animation: dotBlink 1.2s infinite ease-in-out both;
}

.loading-spinner-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-spinner-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-spinner-dot:nth-child(3) { animation-delay: 0s; }

@keyframes dotBlink {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

.chat-input-bar {
  display: flex;
  gap: 0.65rem;
}

.chat-input {
  flex-grow: 1;
  background: #080d1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 0.85rem 1.4rem;
  color: #fff;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.25s ease;
}

.chat-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  background: #0b1224;
}

/* NOTEBOOKLM HUB */
.notebook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.75rem;
}

.notebook-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.notebook-card:hover {
  border-color: #a855f7;
  transform: translateY(-4px);
  box-shadow: 0 10px 30px -10px rgba(168, 85, 247, 0.3);
}

.audio-player-mock {
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #a855f7;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.btn-play:hover {
  transform: scale(1.08);
  background: #c084fc;
}

.audio-track-info {
  flex-grow: 1;
}

.track-progress {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-top: 0.4rem;
  overflow: hidden;
  position: relative;
}

.track-bar {
  width: 35%;
  height: 100%;
  background: #a855f7;
}

/* RESEARCH PAPERS LIST */
.paper-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.paper-item:hover {
  border-color: var(--brand-emerald);
  transform: translateX(4px);
}

.paper-year {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: var(--brand-emerald);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.paper-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.paper-meta {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.paper-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* TECH STACK & LOGOS GRID (LANDING PAGE FOOTER) */
.tech-stack-section {
  margin-top: 5rem;
  padding-top: 3.5rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.tech-badge-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.tech-badge-card:hover {
  border-color: var(--brand-cyan);
  background: rgba(6, 182, 212, 0.08);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -8px rgba(6, 182, 212, 0.3);
}

.tech-icon-img {
  font-size: 1.6rem;
}

.tech-badge-card .tech-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.tech-badge-card .tech-role {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* PAPER CATEGORY BLOCKS */
.paper-block-section {
  margin-bottom: 3rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.paper-block-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.paper-block-header h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.paper-block-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* ETHICS & GOVERNANCE VIEW */
.ethics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.ethics-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.ethics-card:hover {
  border-color: #ec4899;
  transform: translateY(-3px);
}

.ethics-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.ethics-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

/* CONCEPTOS IA SECTION */
.concept-category-block {
  margin-bottom: 3rem;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.concept-category-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.concept-category-header h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}

.concepts-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

.concept-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.concept-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-cyan);
  box-shadow: 0 12px 30px -10px rgba(6, 182, 212, 0.25);
}

.concept-card.reading-active {
  border-color: #ec4899;
  background: rgba(236, 72, 153, 0.08);
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.3);
}

.concept-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.concept-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
}

.btn-speak-concept {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--brand-cyan);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-speak-concept:hover {
  background: var(--brand-cyan);
  color: #000;
  transform: scale(1.1);
}

.concept-card.reading-active .btn-speak-concept {
  background: #ec4899;
  color: #fff;
  border-color: #ec4899;
  animation: pulseVoice 1s infinite alternate;
}

@keyframes pulseVoice {
  from { transform: scale(1); }
  to { transform: scale(1.15); box-shadow: 0 0 15px #ec4899; }
}

.concept-card h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.concept-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.concept-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.concept-voice-hint {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #f472b6;
  font-weight: 600;
}

/* GLOBAL FLOATING VOICE AGENT (ACROSS ALL PAGES) */
.global-voice-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.btn-floating-voice {
  background: linear-gradient(135deg, #06b6d4, #8b5cf6);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 30px -5px rgba(6, 182, 212, 0.5);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: var(--transition);
}

.btn-floating-voice:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 15px 35px -5px rgba(139, 92, 246, 0.6);
}

.btn-floating-voice.active-listening {
  background: linear-gradient(135deg, #ef4444, #ec4899);
  animation: pulseListen 1.2s infinite alternate;
}

@keyframes pulseListen {
  from { box-shadow: 0 0 15px rgba(239, 68, 68, 0.6); }
  to { box-shadow: 0 0 30px rgba(236, 72, 153, 0.9); }
}

.voice-floating-panel {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  width: 380px;
  max-width: 90vw;
  padding: 1.5rem;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.9);
  display: none;
  flex-direction: column;
  gap: 0.85rem;
  animation: slideUp 0.25s ease forwards;
}

.voice-floating-panel.active {
  display: flex;
}

.voice-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.voice-panel-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
}

.voice-live-dialog {
  background: #090e17;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #cbd5e1;
  max-height: 200px;
  overflow-y: auto;
}

.voice-live-dialog strong {
  color: var(--brand-cyan);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .agents-split, .ethics-grid {
    grid-template-columns: 1fr;
  }
  .mega-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* =============================================
   WIDGET GLOBAL DE VOZ FLOTANTE (CENTRADO VERTICAL)
   ============================================= */

.global-voice-widget {
  position: fixed;
  top: 32%;
  right: 1.5rem;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.85rem;
  pointer-events: none;
}

.global-voice-widget > * {
  pointer-events: auto;
}

/* ── Botón flotante OpenAI Voz (abajo) ── */
.btn-floating-voice {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.3rem;
  background: linear-gradient(135deg, #6366f1 0%, #38bdf8 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.55), 0 0 0 0 rgba(99, 102, 241, 0.4);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: voice-pulse 3s infinite;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.btn-floating-voice:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 36px rgba(99, 102, 241, 0.75);
  animation: none;
}

.btn-floating-voice.active-listening {
  background: linear-gradient(135deg, #e11d48 0%, #f97316 100%);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 30px rgba(225, 29, 72, 0.65), 0 0 0 0 rgba(225, 29, 72, 0.4);
  animation: voice-pulse-red 1.5s infinite;
}

@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(99, 102, 241, 0.55), 0 0 0 0 rgba(99, 102, 241, 0.3); }
  50%       { box-shadow: 0 8px 28px rgba(99, 102, 241, 0.55), 0 0 0 10px rgba(99, 102, 241, 0); }
}

@keyframes voice-pulse-red {
  0%, 100% { box-shadow: 0 8px 30px rgba(225, 29, 72, 0.65), 0 0 0 0 rgba(225, 29, 72, 0.4); }
  50%       { box-shadow: 0 8px 30px rgba(225, 29, 72, 0.65), 0 0 0 10px rgba(225, 29, 72, 0); }
}

/* ── Botón ElevenLabs Aria (arriba) ── */
.btn-floating-eleven {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.15rem 0.65rem 0.65rem;
  background: linear-gradient(135deg, #7c3aed 0%, #ec4899 60%, #f97316 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  color: #fff;
  font-family: var(--font-main);
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.55), 0 0 0 0 rgba(236, 72, 153, 0.4);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: aria-pulse 3.5s infinite;
  white-space: nowrap;
  position: relative;
}

.btn-floating-eleven:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 36px rgba(124, 58, 237, 0.75);
  animation: none;
}

.btn-floating-eleven.active-listening {
  box-shadow: 0 8px 32px rgba(236, 72, 153, 0.8), 0 0 0 4px rgba(236, 72, 153, 0.3);
}

@keyframes aria-pulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(124, 58, 237, 0.55), 0 0 0 0 rgba(236, 72, 153, 0.35); }
  50%       { box-shadow: 0 8px 28px rgba(124, 58, 237, 0.55), 0 0 0 10px rgba(236, 72, 153, 0); }
}

.eleven-btn-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.35);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e1b4b, #0c4a6e);
}

/* ── OVERLAY INMERSIVO PANTALLA COMPLETA ── */
.voice-immersive-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 100000;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
}

.voice-immersive-overlay.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* ── MODAL INMERSIVO / PANTALLA COMPLETA REAJUSTABLE ── */
.voice-immersive-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.95) 0%, rgba(9, 14, 28, 0.98) 100%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 28px;
  padding: 1.85rem 1.75rem 2rem 1.75rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 60px rgba(99, 102, 241, 0.2);
  transform: scale(0.93) translateY(20px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 90vh;
}

.voice-immersive-overlay.active .voice-immersive-modal {
  transform: scale(1) translateY(0);
}

/* Modo Pantalla Completa Reajustable (Desktop & Tablet) */
.voice-immersive-modal.is-fullscreen {
  max-width: 100vw !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  border-radius: 0 !important;
  border: none !important;
  padding: 2.5rem 2rem !important;
  justify-content: space-between !important;
}

/* Modal Aria ElevenLabs diferenciado con acentos magenta */
.voice-immersive-modal.eleven-panel {
  border-color: rgba(236, 72, 153, 0.4);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(236, 72, 153, 0.15), 0 0 60px rgba(124, 58, 237, 0.25);
}

/* ── Cabecera del Modal Inmersivo ── */
.immersive-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-fullscreen-toggle {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-fullscreen-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* ── Escenario Central Inmersivo (Aria) ── */
.immersive-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 0.5rem 0;
}

/* Aura acústica concéntrica */
.aria-aura-container {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 0.75rem auto 1.25rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-aura-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: all 0.5s ease;
}

.voice-aura-ring.aura-1 { width: 110px; height: 110px; border: 1.5px solid rgba(124, 58, 237, 0.45); }
.voice-aura-ring.aura-2 { width: 138px; height: 138px; border: 1.5px solid rgba(236, 72, 153, 0.35); }
.voice-aura-ring.aura-3 { width: 168px; height: 168px; border: 1.5px solid rgba(56, 189, 248, 0.25); }

.aria-call-panel.in-call .voice-aura-ring {
  opacity: 1;
  animation: auraPulse 2.4s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}
.aria-call-panel.in-call .voice-aura-ring.aura-2 { animation-delay: 0.4s; }
.aria-call-panel.in-call .voice-aura-ring.aura-3 { animation-delay: 0.8s; }

@keyframes auraPulse {
  0%   { transform: scale(0.9); opacity: 0.8; }
  50%  { transform: scale(1.18); opacity: 0.35; }
  100% { transform: scale(1.38); opacity: 0; }
}

.aria-avatar-large {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.1), 0 0 35px rgba(99, 102, 241, 0.35);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease;
  z-index: 2;
}

.aria-avatar-large.listening {
  border-color: rgba(16, 185, 129, 0.8);
  box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.2), 0 0 50px rgba(16, 185, 129, 0.5);
  animation: avatar-glow-green 1.5s ease-in-out infinite;
}

.aria-avatar-large.speaking {
  border-color: rgba(249, 115, 22, 0.8);
  box-shadow: 0 0 0 8px rgba(249, 115, 22, 0.2), 0 0 50px rgba(249, 115, 22, 0.5);
  animation: avatar-glow-orange 0.8s ease-in-out infinite;
}

@keyframes avatar-glow-green {
  0%, 100% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.2), 0 0 40px rgba(16, 185, 129, 0.4); }
  50%       { box-shadow: 0 0 0 14px rgba(16, 185, 129, 0.08), 0 0 65px rgba(16, 185, 129, 0.65); }
}

@keyframes avatar-glow-orange {
  0%, 100% { box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.2), 0 0 40px rgba(249, 115, 22, 0.4); }
  50%       { box-shadow: 0 0 0 16px rgba(249, 115, 22, 0.06), 0 0 75px rgba(249, 115, 22, 0.7); }
}

.aria-call-status-box {
  font-size: 0.88rem;
  color: #94a3b8;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: inline-block;
  margin-bottom: 0.85rem;
}

/* ── Ondas de voz ── */
.voice-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 36px;
  margin-bottom: 0.75rem;
}

.wave-bar {
  width: 4px;
  background: rgba(99, 102, 241, 0.35);
  border-radius: 9999px;
  height: 10px;
  transition: background 0.3s;
}

.voice-wave.recording .wave-bar {
  background: linear-gradient(to top, #6366f1, #38bdf8);
  animation: wave-dance 0.8s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0.0s; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; }
.wave-bar:nth-child(5) { animation-delay: 0.2s; }
.wave-bar:nth-child(6) { animation-delay: 0.1s; }
.wave-bar:nth-child(7) { animation-delay: 0.0s; }

@keyframes wave-dance {
  0%, 100% { height: 8px;  }
  25%       { height: 28px; }
  50%       { height: 16px; }
  75%       { height: 32px; }
}

.aria-call-waves {
  opacity: 0;
  height: 0;
  margin-bottom: 0;
  overflow: hidden;
  transition: all 0.4s ease;
}

.aria-call-waves.active {
  opacity: 1;
  height: 36px;
  margin-bottom: 0.5rem;
}

/* ── ORBE DE MICRÓFONO ARIA ── */
.aria-mic-orb {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e3a5f 100%);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 0 2px rgba(99,102,241,0.25);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  margin: 0.5rem auto;
}

.aria-mic-orb:hover {
  transform: scale(1.06);
  color: #e2e8f0;
  box-shadow: 0 12px 36px rgba(0,0,0,0.6), 0 0 0 2px rgba(99,102,241,0.5);
}

.aria-mic-orb.connecting {
  background: linear-gradient(135deg, #713f12, #92400e);
  color: #fcd34d;
  animation: orb-pulse-yellow 1s ease-in-out infinite;
}

.aria-mic-orb.listening {
  background: linear-gradient(135deg, #064e3b, #065f46);
  color: #6ee7b7;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 0 3px rgba(16,185,129,0.7);
  animation: orb-pulse-green 1.2s ease-in-out infinite;
}

.aria-mic-orb.speaking {
  background: linear-gradient(135deg, #7c2d12, #9a3412);
  color: #fb923c;
  animation: orb-pulse-orange 0.7s ease-in-out infinite;
}

@keyframes orb-pulse-yellow {
  0%, 100% { box-shadow: 0 6px 24px rgba(0,0,0,0.4), 0 0 0 3px rgba(245,158,11,0.4); }
  50%       { box-shadow: 0 6px 24px rgba(0,0,0,0.4), 0 0 0 3px rgba(245,158,11,0.7), 0 0 0 14px rgba(245,158,11,0); }
}

@keyframes orb-pulse-green {
  0%, 100% { box-shadow: 0 6px 24px rgba(0,0,0,0.4), 0 0 0 3px rgba(16,185,129,0.6); }
  50%       { box-shadow: 0 6px 24px rgba(0,0,0,0.4), 0 0 0 3px rgba(16,185,129,0.8), 0 0 0 18px rgba(16,185,129,0); }
}

@keyframes orb-pulse-orange {
  0%, 100% { box-shadow: 0 6px 24px rgba(0,0,0,0.4), 0 0 0 3px rgba(249,115,22,0.6); }
  50%       { box-shadow: 0 6px 24px rgba(0,0,0,0.4), 0 0 0 3px rgba(249,115,22,0.8), 0 0 0 16px rgba(249,115,22,0); }
}

.immersive-controls-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  width: 100%;
}

.call-touch-hint {
  font-size: 0.78rem;
  color: #94a3b8;
  letter-spacing: 0.01em;
}

/* ── Panel OpenAI Voz ── */
.voice-wave-container {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0;
}

.voice-live-dialog.immersive-dialog {
  min-height: 85px;
  padding: 1rem 1.15rem;
  font-size: 0.92rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 1.1rem;
}

.quick-queries-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.quick-pill {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-pill:hover {
  background: rgba(99, 102, 241, 0.28);
  color: #fff;
  transform: translateY(-1px);
}

.btn-primary-listen {
  width: 100%;
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  border: none;
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
  transition: all 0.25s ease;
}

.btn-primary-listen:hover {
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.55);
  transform: translateY(-1px);
}

/* =============================================
   RESPONSIVE DESIGN COMPLETO (Móvil, Tablet, PC, TV)
   ============================================= */

/* ── 1. TELÉFONOS MÓVILES (<= 768px) ── */
@media (max-width: 768px) {
  .global-voice-widget {
    top: auto !important;
    bottom: 1.25rem !important;
    right: 1rem !important;
    transform: none !important;
    gap: 0.55rem;
    z-index: 9999;
  }
  
  .btn-floating-eleven {
    padding: 0.5rem 0.9rem 0.5rem 0.5rem;
    font-size: 0.8rem;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.65);
  }
  
  .eleven-btn-avatar {
    width: 28px;
    height: 28px;
  }

  .btn-floating-voice {
    padding: 0.58rem 1rem;
    font-size: 0.82rem;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.65);
  }

  /* MODAL EN MÓVIL: PANTALLA COMPLETA TOTAL INMERSIVA (Estilo llamada Siri / Gemini) */
  .voice-immersive-overlay {
    padding: 0 !important;
  }

  .voice-immersive-modal {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    padding: 1.5rem 1.25rem 2rem 1.25rem !important;
    justify-content: space-between !important;
  }

  /* El botón de pantalla completa en móvil se puede ocultar ya que siempre está en full-screen */
  .btn-fullscreen-toggle {
    display: none;
  }

  .navbar {
    padding: 0.75rem 1rem;
  }

  .nav-quick-links {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 2.5rem 1rem;
    text-align: center;
  }

  .hero h2 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .hero-buttons {
    justify-content: center;
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .chat-box {
    height: 340px;
    padding: 0.85rem;
  }

  .chat-msg {
    max-width: 96%;
  }

  .chat-input-bar {
    flex-direction: column;
  }

  .chat-input {
    width: 100%;
  }

  #btn-send-chat {
    width: 100%;
    justify-content: center;
  }

  .mega-grid,
  .stats-grid,
  .ethics-grid,
  .agents-split {
    grid-template-columns: 1fr !important;
  }
}

/* ── 2. TABLETS (641px - 1024px) ── */
@media (min-width: 641px) and (max-width: 1024px) {
  .global-voice-widget {
    top: 50%;
    right: 1.25rem;
    transform: translateY(-50%);
  }

  .voice-floating-panel {
    max-width: 380px;
    max-height: 80vh;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .mega-grid,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .agents-split,
  .ethics-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 3. PANTALLAS GRANDES Y TELEVISORES (min-width: 1921px) ── */
@media (min-width: 1921px) {
  body {
    font-size: 18px;
  }

  .navbar,
  .view-section,
  .container {
    max-width: 1680px;
    margin-left: auto;
    margin-right: auto;
  }

  .global-voice-widget {
    right: calc((100vw - 1680px) / 2 + 1rem);
  }

  .hero h2 {
    font-size: 3.8rem;
  }

  .chat-box {
    height: 520px;
  }
}



