/* Custom styles */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: #1a202c;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: 3.5rem;
  font-weight: 900;
}
h2 {
  font-size: 2.5rem;
  font-weight: 800;
}
h3 {
  font-size: 1.875rem;
  font-weight: 700;
}
h4 {
  font-size: 1.5rem;
  font-weight: 600;
}
h5 {
  font-size: 1.25rem;
  font-weight: 600;
}
h6 {
  font-size: 1rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
}

/* Mejoras de legibilidad */
.text-balance {
  text-wrap: balance;
}

.leading-relaxed {
  line-height: 1.75;
}

.tracking-tight {
  letter-spacing: -0.025em;
}

.tracking-wide {
  letter-spacing: 0.025em;
}

/* Header/Navigation styles - asegurar fondo sólido siempre */
nav {
  background-color: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

nav.fixed {
  background-color: #ffffff !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
}

/* Asegurar que el video no interfiera con el header */
.hero-video {
  z-index: 1;
}

nav {
  z-index: 50 !important;
  position: relative !important;
}

/* Transitions */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

/* Hover effects */
.hover\:shadow-lg:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Custom animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.5s ease-out;
}

/* Animación de fade in desde abajo */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}

/* Animación de escala */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-scaleIn {
  animation: scaleIn 0.5s ease-out;
}

/* Efecto hover para tarjetas */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Botones con efectos modernos */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

/* Gradientes animados */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-animated {
  background: linear-gradient(270deg, #3b82f6, #2563eb, #1d4ed8);
  background-size: 600% 600%;
  animation: gradientShift 8s ease infinite;
}

/* Efecto parallax suave */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Contador animado */
.counter {
  font-variant-numeric: tabular-nums;
  transition: all 0.3s ease;
}

/* Línea decorativa animada */
.line-accent {
  position: relative;
  padding-bottom: 0.5rem;
}

.line-accent::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: 2px;
}

/* Efecto de revelación de imagen */
.image-reveal {
  position: relative;
  overflow: hidden;
}

.image-reveal::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.6s;
  z-index: 1;
}

.image-reveal:hover::before {
  left: 100%;
}

/* Texto con gradiente */
.text-gradient {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Pulso suave para iconos */
@keyframes pulse-soft {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.icon-pulse {
  animation: pulse-soft 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Sombras mejoradas */
.shadow-soft {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.shadow-medium {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08),
    0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.shadow-strong {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.06);
}

/* Responsive utilities */
@media (max-width: 768px) {
  .card-hover:hover {
    transform: translateY(-4px);
  }
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2rem;
  }
  h3 {
    font-size: 1.5rem;
  }
}

/* ========================================
   ANIMACIONES AVANZADAS PROFESIONALES
======================================== */

/* Fade & Slide Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInDown {
  animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fadeInScale {
  animation: fadeInScale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Smooth entrance */
@keyframes smoothEntrance {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animate-smooth {
  animation: smoothEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Text reveal */
@keyframes textReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.animate-textReveal {
  animation: textReveal 0.7s ease-out;
}

/* ========================================
   EFECTOS HOVER PROFESIONALES
======================================== */

/* Card lift effect */
.card-lift {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-lift:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Button magnetic effect */
.btn-magnetic {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-magnetic:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.5);
}

.btn-magnetic:active {
  transform: translateY(0);
}

/* Icon bounce on hover */
.icon-bounce-hover:hover {
  animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-5px);
  }
  50% {
    transform: translateY(0);
  }
  75% {
    transform: translateY(-3px);
  }
}

/* ========================================
   EFECTOS DE BRILLO Y RESPLANDOR
======================================== */

/* Shine effect on cards */
.card-shine {
  position: relative;
  overflow: hidden;
}

.card-shine::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  transform: rotate(45deg);
  transition: all 0.6s;
  opacity: 0;
}

.card-shine:hover::after {
  left: 100%;
  opacity: 1;
}

/* Glow pulse */
@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.6);
  }
}

.glow-pulse {
  animation: glowPulse 2s ease-in-out infinite;
}

/* ========================================
   GRADIENTES ANIMADOS PROFESIONALES
======================================== */

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-flow {
  background: linear-gradient(
    -45deg,
    #667eea 0%,
    #764ba2 25%,
    #f093fb 50%,
    #4facfe 100%
  );
  background-size: 300% 300%;
  animation: gradientFlow 15s ease infinite;
}

/* ========================================
   EFECTOS DE TEXTO
======================================== */

/* Text shadow smooth */
.text-shadow-smooth {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.text-shadow-strong {
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Underline animation */
.underline-animate {
  position: relative;
  display: inline-block;
}

.underline-animate::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.underline-animate:hover::after {
  width: 100%;
}

/* ========================================
   LOADERS Y SPINNERS
======================================== */

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin-slow {
  animation: spin-slow 3s linear infinite;
}

/* ========================================
   EFECTOS DE PARALLAX
======================================== */

.parallax-slow {
  transform: translateZ(0);
  will-change: transform;
}

/* ========================================
   UTILIDADES PROFESIONALES
======================================== */

/* Glass morphism */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Neumorphism */
.neumorphic {
  background: #f0f0f3;
  box-shadow: 8px 8px 16px #d1d1d4, -8px -8px 16px #ffffff;
}

.neumorphic-inset {
  background: #f0f0f3;
  box-shadow: inset 8px 8px 16px #d1d1d4, inset -8px -8px 16px #ffffff;
}

/* Smooth transitions for all elements */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states */
button:focus,
a:focus,
input:focus,
textarea:focus {
  outline: 2px solid rgba(59, 130, 246, 0.5);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background-color: rgba(59, 130, 246, 0.3);
  color: #1a202c;
}

::-moz-selection {
  background-color: rgba(59, 130, 246, 0.3);
  color: #1a202c;
}

/* Animaciones adicionales avanzadas */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-slideInLeft {
  animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-slideInRight {
  animation: slideInRight 0.6s ease-out;
}

@keyframes bounce-subtle {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-bounce-subtle {
  animation: bounce-subtle 2s ease-in-out infinite;
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.5),
      0 0 10px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.8),
      0 0 30px rgba(59, 130, 246, 0.5);
  }
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.animate-shimmer {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

@keyframes rotate-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-rotate-slow {
  animation: rotate-slow 20s linear infinite;
}

/* Efecto de escritura */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.typing-effect {
  overflow: hidden;
  border-right: 3px solid;
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

/* Stat card hover effect mejorado */
.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: rotate(45deg);
  transition: all 0.6s;
}

.stat-card:hover::before {
  left: 100%;
}

/* Efecto de partículas */
@keyframes particle-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-100px) rotate(180deg);
    opacity: 1;
  }
}

.particle {
  animation: particle-float 4s ease-in-out infinite;
}

/* Efecto de onda */
@keyframes wave {
  0% {
    transform: translateX(0) translateZ(0) scaleY(1);
  }
  50% {
    transform: translateX(-25%) translateZ(0) scaleY(0.55);
  }
  100% {
    transform: translateX(-50%) translateZ(0) scaleY(1);
  }
}

.wave-animation {
  animation: wave 8s cubic-bezier(0.36, 0.45, 0.63, 0.53) infinite;
}

/* Mejora de transiciones globales */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover effect para botones mejorado */
.btn-hover-effect {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-hover-effect::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: -1;
}

.btn-hover-effect:hover::after {
  width: 300px;
  height: 300px;
}
