/* Estilos personalizados para Wanted Studio */

/* Optimizaciones globales para rendimiento */
* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Configuración base del body */
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
               "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 45%, #020617 100%);
  color: #F9FAFB;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Scroll suave mejorado */
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
}

/* Scroll suave en HTML */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Espacio para el header fijo */
}

/* Fuentes especiales */
.font-display {
  font-family: 'Playfair Display', serif;
}

.font-modern {
  font-family: 'Space Grotesk', sans-serif;
}

.font-body {
  font-family: 'Inter', sans-serif;
}

/* Efecto vidrio para paneles */
.glass-ws {
  background: linear-gradient(145deg, rgba(15,23,42,0.95), rgba(15,23,42,0.8));
  border: 1px solid rgba(148,163,184,0.18);
  backdrop-filter: blur(14px);
}

/* Estilo para badges suaves */
.badge-soft {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.45);
}

/* Efectos de transición suaves */
.smooth-transition {
  transition: all 0.3s ease-in-out;
  will-change: transform, opacity;
}

/* Hover effects para botones */
.btn-primary {
  will-change: transform, box-shadow;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
  transform: translate3d(0, -1px, 0);
  box-shadow: 0 20px 50px rgba(220, 38, 38, 0.4);
}

/* Animación para elementos que aparecen */
.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
  will-change: transform, opacity;
}

.slide-up {
  animation: slideUp 0.6s ease-out forwards;
  will-change: transform, opacity;
}

.scale-in {
  animation: scaleIn 0.5s ease-out forwards;
  will-change: transform, opacity;
}

.float-animation {
  animation: float 6s ease-in-out infinite;
  will-change: transform;
}

.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
  will-change: box-shadow;
}

/* Optimización para elementos que se transforman */
article, .glass-ws, img {
  will-change: auto;
}

/* Activar aceleración por hardware en elementos interactivos */
a, button, .hover-lift, .smooth-transition {
  transform: translate3d(0, 0, 0);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate3d(0, 50px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale3d(0.9, 0.9, 1);
  }
  to {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -10px, 0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
  }
  50% {
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.6);
  }
}

/* Hover effects modernos */
.hover-lift {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
}

.hover-lift:hover {
  transform: translate3d(0, -8px, 0) scale3d(1.02, 1.02, 1);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.hover-glow {
  transition: all 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 25px rgba(220, 38, 38, 0.5);
}

/* Text effects */
.text-gradient {
  background: linear-gradient(135deg, #DC2626 0%, #EF4444 50%, #F87171 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-glow {
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

/* Efectos interactivos modernos */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Cursor personalizado */
.custom-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 2px solid #DC2626;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
}

.custom-cursor.cursor-active {
  width: 40px;
  height: 40px;
  background: rgba(220, 38, 38, 0.1);
  border-color: #EF4444;
}

/* Efectos de carga suaves */
@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 0px, #e0e0e0 40px, #f0f0f0 80px);
  background-size: 200px;
  animation: shimmer 1.5s infinite;
}

/* Mejoras para botones con gradientes */
.btn-gradient {
  background: linear-gradient(135deg, #DC2626, #B91C1C);
  position: relative;
  overflow: hidden;
}

.btn-gradient::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-gradient:hover::before {
  left: 100%;
}

/* Optimizaciones específicas para mobile */
@media (max-width: 640px) {
  /* Reducir efectos de animación en móviles para mejor rendimiento */
  .float-animation {
    animation: none;
  }
  
  /* Simplificar transiciones en móviles */
  .hover-lift:active {
    transform: translate3d(0, -2px, 0) scale3d(1.01, 1.01, 1);
    transition: all 0.1s ease;
  }
  
  /* Optimizar backdrop-filter para móviles */
  .glass-ws {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  
  /* Mejorar espaciado en cards de barberos */
  .glass-ws {
    margin-bottom: 1rem;
  }
  
  /* Optimizar imágenes para mobile */
  .mobile-img-container {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Mejorar legibilidad del texto en mobile */
  .mobile-text {
    line-height: 1.6;
    font-size: 0.875rem;
  }
  
  /* Botones más grandes en mobile */
  .mobile-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
  
  /* Espaciado optimizado para secciones */
  section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  
  /* Optimizar cursor personalizado - deshabilitado en móviles */
  .custom-cursor {
    display: none;
  }
}

/* Mejoras para tablets */
@media (min-width: 641px) and (max-width: 1024px) {
  .glass-ws {
    backdrop-filter: blur(16px);
  }
}

/* Respetar preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .float-animation,
  .pulse-glow {
    animation: none !important;
  }
}

/* Soporte para usuarios que prefieren movimiento reducido */
.reduce-motion * {
  animation: none !important;
  transition: none !important;
}