:root {
  --primary-color: #2ECC71;
  --primary-dark: #27AE60;
  --primary-light: #58D68D;
  --secondary-color: #34495E;
  --text-dark: #2C3E50;
  --text-light: #7F8C8D;
  --bg-light: #F8F9FA;
  --bg-white: #FFFFFF;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-img {
  height: 45px;
  width: auto;
  object-fit: contain;
  display: block;
}

.footer-logo {
  filter: brightness(0) invert(1);
  height: 40px;
}

.logo-icon {
  width: 40px;
  height: 40px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}

.logo-fallback {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-wrapper img[style*="display: none"] + .logo-fallback {
  display: flex;
}

.navbar-nav .nav-link {
  color: var(--text-dark);
  font-weight: 500;
  margin: 0 0.5rem;
  transition: var(--transition);
  position: relative;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color);
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.navbar-nav .nav-link:hover::after {
  width: 100%;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  z-index: -1;
}

.hero-background::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(46, 204, 113, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
}

.hero-background::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(46, 204, 113, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(46, 204, 113, 0.1);
  color: var(--primary-dark);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-primary {
  background: var(--primary-color);
  border: none;
  padding: 14px 28px;
  font-weight: 600;
  border-radius: 12px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 14px 28px;
  font-weight: 600;
  border-radius: 12px;
  transition: var(--transition);
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.btn-success {
  background: #25D366;
  border: none;
  padding: 14px 28px;
  font-weight: 600;
  border-radius: 12px;
  transition: var(--transition);
}

.btn-success:hover {
  background: #20BA5A;
  transform: translateY(-2px);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 500px;
}

.floating-card {
  position: absolute;
  background: white;
  padding: 24px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text-dark);
  animation: floatCard 6s ease-in-out infinite;
  transition: var(--transition);
}

.floating-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.floating-card i {
  font-size: 2rem;
  color: var(--primary-color);
}

.card-1 {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.card-2 {
  top: 50%;
  right: 10%;
  animation-delay: 2s;
}

.card-3 {
  bottom: 10%;
  left: 30%;
  animation-delay: 4s;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* Demos Section */
.demos-section {
  background: var(--bg-white);
  padding: 100px 0;
}

.section-badge {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(46, 204, 113, 0.1);
  color: var(--primary-dark);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.demo-card {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.demo-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.demo-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(46, 204, 113, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.demo-icon i {
  font-size: 2.5rem;
  color: var(--primary-color);
}

.whatsapp-icon {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.1), rgba(37, 211, 102, 0.2));
}

.whatsapp-icon i {
  color: #25D366;
}

.avatar-icon {
  background: linear-gradient(135deg, rgba(52, 73, 94, 0.1), rgba(52, 73, 94, 0.2));
}

.avatar-icon i {
  color: var(--secondary-color);
}

.demo-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.demo-description {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.7;
  flex-grow: 1;
}

.demo-features {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.demo-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-light);
}

.demo-features i {
  color: var(--primary-color);
  font-size: 1.125rem;
}

/* About Section */
.about-section {
  background: var(--bg-light);
  padding: 100px 0;
}

.values-list {
  margin-top: 2rem;
}

.value-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}

.value-item i {
  font-size: 2.5rem;
  color: var(--primary-color);
  flex-shrink: 0;
}

.value-item h4 {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.value-item p {
  color: var(--text-light);
  margin: 0;
}

.about-visual {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-card {
  background: white;
  padding: 3rem;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 300px;
}

.visual-card i {
  font-size: 4rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.visual-card h5 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.visual-card p {
  color: var(--text-light);
  margin: 0;
}

/* Footer */
.footer-section {
  background: var(--text-dark);
  color: white;
  padding: 60px 0 30px;
}

.footer-brand .logo-img {
  filter: brightness(0) invert(1);
}

.footer-brand .logo-text {
  color: white;
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1rem;
  font-size: 0.95rem;
}

.footer-title {
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: white;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-links i {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: var(--transition);
  font-size: 1.25rem;
}

.social-link:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
  color: white;
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* Modals */
.modal-content {
  border-radius: 24px;
  border: none;
  overflow: hidden;
}

.modal-header {
  background: var(--bg-light);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.5rem 2rem;
}

.modal-title {
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
}

.modal-description {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.modal-body {
  padding: 2rem;
}

.iframe-container {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: white;
}

.iframe-container {
  position: relative;
}

.iframe-container iframe {
  width: 100%;
  height: 600px;
  border: none;
  display: block;
}

.chat-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  z-index: 10;
}

.chat-loading p {
  margin-top: 1rem;
  color: var(--text-light);
}


.placeholder-container,
.avatar-container {
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  border-radius: 16px;
  position: relative;
}

/* Ajustes para el modal de Avatar */
#modalAvatar .modal-content {
  max-width: 900px;
}

#modalAvatar .modal-body {
  padding: 1.5rem;
}

#modalAvatar #avatarContainer {
  width: 100%;
}

#modalAvatar #avatarPlayer {
  width: 100%;
  position: relative;
  padding-bottom: 56.25%; /* Aspect ratio 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #f8f9fa;
}

#modalAvatar #liveAvatarIframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 16px;
}

.avatar-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  width: 100%;
}

.avatar-loading p {
  color: var(--text-light);
  margin-top: 1rem;
}

.placeholder-content,
.avatar-placeholder {
  text-align: center;
  padding: 3rem;
  max-width: 800px;
}

.avatar-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.avatar-option-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: var(--transition);
}

.avatar-option-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.avatar-option-card h5 {
  color: var(--text-dark);
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  font-size: 1.1rem;
}

.avatar-option-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.avatar-option-card .btn {
  width: 100%;
  margin-top: 0.5rem;
}

#avatarPlayer {
  width: 100%;
  height: 500px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-light);
}

#avatarVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
}

#avatarEmbed {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
}

#avatarEmbed iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 16px;
}

.static-avatar-container {
  width: 100%;
  padding: 2rem;
}

.static-avatar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.static-avatar-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--primary-color);
  background: white;
  padding: 10px;
}

.static-avatar-info {
  text-align: center;
  max-width: 500px;
}

.static-avatar-info h5 {
  color: var(--text-dark);
  font-weight: 700;
  margin-bottom: 1rem;
}

.static-avatar-info p {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.avatar-info {
  margin-top: 2rem;
  text-align: left;
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.avatar-info ol {
  margin-top: 1rem;
  padding-left: 1.5rem;
}

.avatar-info li {
  margin-bottom: 0.75rem;
  color: var(--text-light);
  line-height: 1.6;
}

#azureAvatarPlayer {
  width: 100%;
  height: 500px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-light);
}

#azureAvatarPlayer video,
#azureAvatarPlayer iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 16px;
}

.placeholder-icon {
  font-size: 5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.placeholder-content h4 {
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.placeholder-content p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.placeholder-badge {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(46, 204, 113, 0.1);
  color: var(--primary-dark);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 992px) {
  .hero-visual {
    height: 300px;
    margin-top: 3rem;
  }

  .floating-card {
    padding: 16px;
    font-size: 0.9rem;
  }

  .floating-card i {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding-top: 100px;
    min-height: auto;
    padding-bottom: 60px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .demos-section,
  .about-section {
    padding: 60px 0;
  }

  .floating-card {
    position: relative;
    margin-bottom: 1rem;
    animation: none;
  }

  .hero-visual {
    height: auto;
  }
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Navbar scroll effect */
.navbar {
  transition: var(--transition);
}
