@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: #0f172a; /* bg-slate-900 */
  color: #e2e8f0; /* text-slate-200 */
}

/* Focus ring for accessibility */
:focus-visible {
  outline: 2px solid #22d3ee; /* cyan-400 */
  outline-offset: 2px;
  border-radius: 4px;
}

/* Animaciones para el equipo */
@keyframes fade-in-up {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.2);
  }
  50% {
    box-shadow: 0 0 30px 10px rgba(56, 189, 248, 0.1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  opacity: 0;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Efectos de glassmorphism */
.glass-effect {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradiente animado para el texto */
.gradient-text {
  background: linear-gradient(-45deg, #ec4899, #8b5cf6, #06b6d4, #10b981);
  background-size: 400% 400%;
  animation: gradient-shift 3s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Mejorar scrolling suave */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6366f1, #06b6d4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #4f46e5, #0891b2);
}

/* Mega Menu Animations */
@keyframes mega-menu-fade-in {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mega-menu-slide-up {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes service-card-hover {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-2px);
  }
}

.mega-menu-enter {
  animation: mega-menu-fade-in 0.3s ease-out forwards;
}

.mega-menu-content {
  animation: mega-menu-slide-up 0.4s ease-out forwards;
}

.service-card-hover:hover {
  animation: service-card-hover 0.2s ease-out forwards;
}

/* Hover effects for mega menu items */
.mega-menu-item {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mega-menu-item:hover {
  transform: translateX(4px);
}

/* Gradient borders for mega menu */
.mega-menu-border {
  position: relative;
  overflow: hidden;
}

.mega-menu-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #06b6d4, transparent);
  animation: border-slide 2s infinite;
}

@keyframes border-slide {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Fade in down animation for mega menu */
@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInDown {
  animation: fadeInDown 0.3s ease-out forwards;
}

/* Efectos hover adicionales para fotos */
.photo-hover-effect {
  position: relative;
  overflow: hidden;
}

.photo-hover-effect::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.8s ease;
  z-index: 1;
}

.photo-hover-effect:hover::before {
  left: 100%;
}

/* Efecto de pulsación en hover */
@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.ring-pulse::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border: 2px solid #06b6d4;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.ring-pulse:hover::after {
  animation: pulse-ring 1.5s infinite;
}

/* Efectos de magnetismo */
.magnetic-hover {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.magnetic-hover:hover {
  transform: scale(1.05) rotate(1deg);
}

/* Efecto de cristal mejorado */
.glass-card {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

/* Animación de carga para avatares */
@keyframes avatar-load {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(-10deg);
  }
  50% {
    transform: scale(1.1) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.avatar-animate {
  animation: avatar-load 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* Efecto de rebote en hover */
@keyframes bounce-gentle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.bounce-hover:hover {
  animation: bounce-gentle 0.6s ease-in-out;
}