/* Reset y Variables CSS */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --dark: #1e293b;
  --darker: #0f172a;
  --light: #f8fafc;
  --gray: #64748b;
  --gray-light: #cbd5e1;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--light);
  overflow-x: hidden;
}

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

/* Header Mejorado */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 40px;
  width: auto;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--darker);
  margin: 0;
}

.site-nav ul {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.site-nav a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

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

.site-nav a.active {
  color: var(--primary);
}

.site-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.btn-nav {
  background: var(--primary);
  color: white !important;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.btn-nav:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
}

/* Hero Section Mejorada */
.hero {
  background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
  color: white;
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff" fill-opacity="0.02" points="0,1000 1000,0 1000,1000"/></svg>');
  background-size: cover;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
}

.highlight {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--gray-light);
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
  justify-content: flex-start; 
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  white-space: nowrap; /* Evita que el texto se rompa */
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.hero-stats {
  display: flex;
  gap: 40px;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--gray-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Platform Preview Mejorado con Tema Oscuro */
.platform-preview {
  position: relative;
}

.platform-preview::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background: linear-gradient(135deg, 
      rgba(37, 99, 235, 0.1) 0%, 
      rgba(6, 182, 212, 0.1) 100%);
  border-radius: var(--border-radius-lg);
  z-index: -1;
}

.browser-window {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
  transition: transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 400px;
  margin: 0 auto;
}

.browser-window:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.browser-header {
  background: #334155;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #94a3b8;
}

.browser-dots span:nth-child(1) { background: #ef4444; }
.browser-dots span:nth-child(2) { background: #f59e0b; }
.browser-dots span:nth-child(3) { background: #10b981; }

.browser-url {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-family: 'Monaco', 'Menlo', monospace;
}

.browser-content {
  background: #1e293b;
  padding: 0;
}

/* Chat Header */
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.chat-info h4 {
  color: white;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.status {
  color: var(--success);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
}

/* Chat Messages */
.ai-chat-preview {
  padding: 20px;
  max-height: 300px;
  overflow-y: auto;
}

.chat-message {
  margin-bottom: 16px;
}

.message-content {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 18px;
  padding: 12px 16px;
  max-width: 85%;
  position: relative;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  line-height: 1.4;
}

.user-message .message-content {
  background: var(--primary);
  color: white;
  border: none;
  margin-left: auto;
}

.message-time {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
  display: block;
}

.user-message .message-time {
  text-align: right;
}

.ai-message .message-time {
  text-align: left;
}

/* Chat Input */
.chat-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.chat-input input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 12px 20px;
  color: white;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

.chat-input input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.chat-input input:focus {
  outline: none;
  border-color: var(--primary);
}

.send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.send-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

/* Scrollbar personalizado para el chat */
.ai-chat-preview::-webkit-scrollbar {
  width: 4px;
}

.ai-chat-preview::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.ai-chat-preview::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 2px;
}

.ai-chat-preview::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Efecto de brillo sutil */
.browser-window {
  position: relative;
  overflow: hidden;
}

.browser-window::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
      circle at center,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.browser-window:hover::after {
  opacity: 1;
}

/* Features Section */
.features {
  padding: 100px 0;
  background: white;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--darker);
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.25rem;
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

.feature-card {
  background: white;
  padding: 40px 32px;
  border-radius: var(--border-radius-lg);
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid #f1f5f9;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: white;
  font-size: 2rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--darker);
}

.feature-card p {
  color: var(--gray);
  margin-bottom: 24px;
  line-height: 1.6;
}

.feature-list {
  list-style: none;
  text-align: left;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--dark);
}

.feature-list i {
  color: var(--success);
  font-size: 0.9rem;
}

/* Process Section */
.process {
  padding: 80px 0;
  background: #f8fafc;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  counter-reset: step;
}

.process-step {
  text-align: center;
  position: relative;
}

.process-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.step-number {
  display: none;
}

.process-step h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--darker);
}

.process-step p {
  color: var(--gray);
  line-height: 1.6;
}

/* CTA Section */
.cta {
  padding: 100px 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  text-align: center;
}

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.cta-content p {
  font-size: 1.25rem;
  margin-bottom: 40px;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer Mejorado */
.site-footer {
  background: var(--darker);
  color: white;
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: white;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-section a {
  color: var(--gray-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: white;
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--gray-light);
}

.social-links {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--gray-light);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center; /* Centramos también en tablet */
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero-title {
    font-size: 2.25rem;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-buttons {
    justify-content: center; /* Centramos en móvil */
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 280px; /* Un poco menos del máximo para mejor visual */
    justify-content: center;
    text-align: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
  
  .process-steps {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .browser-window {
    max-width: 100%;
    transform: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .hero {
    padding: 120px 0 60px;
  }
  
  .hero-title {
    font-size: 1.875rem;
  }
  
  .features, .process, .cta {
    padding: 60px 0;
  }
  
  .section-header h2 {
    font-size: 1.75rem;
  }
  
  .feature-card {
    padding: 30px 20px;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }
  
    .hero-buttons .btn {
    max-width: 100%; /* Ocupa todo el ancho disponible */
    padding: 14px 20px; /* Un poco más de padding para mejor tact */
  }
  
  .hero-buttons {
    gap: 12px; /* Menor espacio entre botones */
  }
}

/* Contact Form */
.contact-form {
  max-width: 500px;
  margin: 40px auto;
  padding: 30px;
  background-color: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  font-family: 'Inter', sans-serif;
}

.contact-form h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #222;
}

.contact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
}

.contact-form button {
  background-color: #4f46e5;
  color: #fff;
  font-weight: 600;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.contact-form button:hover {
  background-color: #3730a3;
}

#formMessage {
  text-align: center;
  font-weight: 500;
  margin-top: 15px;
  padding: 10px;
  border-radius: 8px;
  display: none;
}

#formMessage.success {
  color: #065f46;
  background-color: #d1fae5;
  display: block;
}

#formMessage.error {
  color: #b91c1c;
  background-color: #fee2e2;
  display: block;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 900px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-50px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    z-index: 1001;
    transition: color 0.3s ease;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    color: #007bff;
    background-color: #f8f9fa;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Evitar scroll cuando el modal está abierto */
body.modal-open {
    overflow: hidden;
}
