:root {
  --primary-color: #4361ee;
  --primary-dark: #3a0ca3;
  --primary-light: #4cc9f0;
  --secondary-color: #7209b7;
  --accent-color: #f72585;
  --success-color: #4ade80;
  --warning-color: #f59e0b;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f8fafc;
  --bg-dark: #0f172a;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.2);
  --gradient-primary: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
  --gradient-secondary: linear-gradient(135deg, #7209b7 0%, #3a0ca3 100%);
  --gradient-accent: linear-gradient(135deg, #f72585 0%, #b5179e 100%);
}

/* Reset y base mejorado */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  color: var(--text-dark);
  overflow-x: hidden;
  background: #ffffff;
}

/* Loading Screen mejorado */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-content {
  text-align: center;
  color: white;
  transform: translateY(0);
  animation: fadeInUp 1s ease;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 25px;
  position: relative;
}

.loading-spinner::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 3px solid transparent;
  border-top: 3px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: spin 1.5s linear infinite reverse;
}

.loading-text {
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar mejorada */
.navbar-custom {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.2rem 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar-custom.scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 0.8rem 0;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.6rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-logo i {
  font-size: 1.8rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  font-weight: 600;
  color: var(--text-dark) !important;
  margin: 0 0.75rem;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0 !important;
  font-size: 0.95rem;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav-link:hover {
  color: var(--primary-color) !important;
  transform: translateY(-1px);
}

.nav-link:hover::before {
  width: 100%;
}

.nav-link.active {
  color: var(--primary-color) !important;
  font-weight: 700;
}

.nav-link.active::before {
  width: 100%;
}

.login-btn {
  background: var(--gradient-primary);
  border: none;
  border-radius: 12px;
  font-weight: 700;
  color: white !important;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
  position: relative;
  overflow: hidden;
}

.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.login-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
  color: white !important;
}

.login-btn:hover::before {
  left: 100%;
}

/* Hero Section completamente renovada */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  overflow: hidden;
  padding: 80px 0 60px;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: float 20s infinite linear;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.particle:nth-child(odd) {
  background: rgba(76, 201, 240, 0.4);
}

@keyframes float {
  0% {
    transform: translateY(100vh) rotate(0deg) scale(0.5);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(360deg) scale(1.2);
    opacity: 0;
  }
}

.hero-gradient {
  position: absolute;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(76, 201, 240, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(67, 97, 238, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(114, 9, 183, 0.2) 0%, transparent 50%);
  animation: gradientShift 10s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeInUp 0.8s ease;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  color: white;
  margin-bottom: 1.5rem;
  letter-spacing: -1.5px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.text-gradient {
  background: linear-gradient(135deg, #4cc9f0 0%, #4361ee 50%, #7209b7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

.text-gradient::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(135deg, #4cc9f0, #4361ee, #7209b7);
  border-radius: 2px;
  transform: scaleX(0);
  animation: scaleIn 1s ease 1s forwards;
}

@keyframes scaleIn {
  to {
    transform: scaleX(1);
  }
}

.hero-subtitle {
  font-size: 1.35rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  line-height: 1.6;
  max-width: 600px;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.btn-primary {
  background: var(--gradient-primary);
  border: none;
  color: white;
  padding: 1.2rem 2.5rem;
  font-weight: 700;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(67, 97, 238, 0.4);
  color: white;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-outline-light {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: white;
  padding: 1.2rem 2.5rem;
  font-weight: 700;
  border-radius: 12px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
  color: white;
}

.hero-stats {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 3rem;
  margin-top: 2rem;
  animation: fadeInUp 0.8s ease 0.8s both;
}

.stat-item {
  color: white;
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: white !important;
  background: linear-gradient(135deg, #fff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-item p {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-visual {
  position: relative;
  animation: float 6s ease-in-out infinite;
}

.main-visual {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
  transition: transform 0.3s ease;
}

.main-visual:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.hero-dashboard {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.main-visual:hover .hero-dashboard {
  transform: scale(1.05);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 30px;
  height: 30px;
  border-right: 3px solid white;
  border-bottom: 3px solid white;
  transform: rotate(45deg);
  opacity: 0.7;
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

/* Secciones generales mejoradas */
.section-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  
  background-clip: text;
  letter-spacing: -1px;
  line-height: 1.1;
}

.section-description {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.bg-light-custom {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
}

/* Clients Section mejorada */
.clients-section {
  background: white;
  padding: 5rem 0;
  position: relative;
}

.clients-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.client-logo {
  padding: 2.5rem 1rem;
  transition: all 0.3s ease;
  text-align: center;
  border-radius: 16px;
  background: white;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.client-logo:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.client-logo i {
  color: var(--primary-color);
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.client-logo span {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.9rem;
}

/* About Section mejorada */
.about-section {
  padding: 6rem 0;
  background: white;
}

.about-visual {
  position: relative;
}

.about-image-main {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: perspective(1000px) rotateY(5deg);
  transition: transform 0.3s ease;
}

.about-image-main:hover {
  transform: perspective(1000px) rotateY(0deg);
}

.about-badge {
  position: absolute;
  top: 30px;
  right: 30px;
  background: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  box-shadow: var(--shadow);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.feature-check {
  color: var(--success-color);
  font-size: 1.5rem;
  animation: bounceIn 1s ease;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Services Section mejorada */
.services-section {
  padding: 6rem 0;
}

.service-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
  overflow: hidden;
  border: none;
  box-shadow: var(--shadow);
  height: 100%;
  background: white;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-15px);
  box-shadow: var(--shadow-hover);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 100px;
  height: 100px;
  background: var(--gradient-primary);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(67, 97, 238, 0.3);
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 30px rgba(67, 97, 238, 0.4);
}

.service-icon i {
  font-size: 2.5rem;
  color: white;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.service-features li {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
}

/* Testimonials Section mejorada */
.testimonials-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
}

.testimonial-card {
  background: white;
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: none;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
}

.testimonial-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.rating {
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: var(--gradient-primary);
  color: white;
  font-size: 1.2rem;
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

/* CTA Section mejorada */
.cta-section {
  background: var(--gradient-primary);
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
  animation: float 20s ease-in-out infinite;
}

.cta-section .section-title,
.cta-section .section-description,
.cta-section .text-black-50 {
  color: white !important;
  position: relative;
  z-index: 2;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-light {
  background: white;
  border: none;
  color: var(--primary-color) !important;
  padding: 1.2rem 2.5rem;
  font-weight: 700;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.btn-light:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(255, 255, 255, 0.4);
  color: var(--primary-color) !important;
}

/* Footer mejorado */
.footer {
  background: var(--bg-dark);
  color: white;
  padding: 4rem 0 2rem;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.footer-brand {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  color: white;
  font-size: 1.8rem;
}

.footer-brand i {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-link {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: white;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.social-link:hover {
  background: var(--primary-color);
  transform: translateY(-3px) rotate(5deg);
  box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
  color: white;
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.footer-link:hover {
  color: white;
  transform: translateX(5px);
}

/* Responsive mejorado */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.8rem;
    letter-spacing: -1px;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
  
  .hero-buttons,
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-btn,
  .cta-btn {
    width: 100%;
    max-width: 300px;
    text-align: center;
    margin-bottom: 1rem;
  }
  
  .hero-stats .col-4 {
    margin-bottom: 2rem;
  }
  
  .main-visual {
    transform: none;
    margin-top: 3rem;
  }
  
  .about-image-main {
    transform: none;
    margin-bottom: 2rem;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2.2rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .stat-number {
    font-size: 2.2rem;
  }
  
  .service-icon {
    width: 80px;
    height: 80px;
  }
  
  .service-icon i {
    font-size: 2rem;
  }
}

/* Utilidades adicionales mejoradas */
.text-primary-custom {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.border-radius-custom {
  border-radius: 24px;
}

/* Efectos de scroll reveal personalizados */
[data-aos="custom-fade"] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

[data-aos="custom-fade"].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus states para accesibilidad */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}