/* ============================================
   ALPHA FITNESS - ESTILOS CUSTOM
   Complemento a Tailwind CSS
   ============================================ */

/* ----- Variables CSS para consistencia ----- */
:root {
  --color-primary: #eab308;      /* yellow-500 */
  --color-primary-hover: #ca8a04; /* yellow-600 */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- Smooth Scroll ----- */
html {
  scroll-behavior: smooth;
}

/* ----- Selección de texto personalizada ----- */
::selection {
  background-color: rgba(234, 179, 8, 0.3);
  color: inherit;
}

/* ----- Scrollbar personalizada ----- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb {
  background: #475569;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* ----- Animaciones Keyframes ----- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from { 
    transform: translateX(100%);
  }
  to { 
    transform: translateX(0);
  }
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.3); opacity: 0; }
}

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

/* ----- Clases de utilidad para animaciones ----- */
.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.4s ease-out;
}

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

/* ----- Efecto de glassmorphism ----- */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dark .glass {
  background: rgba(17, 24, 39, 0.7);
}

/* ----- Input autofill (arreglo para dark mode) ----- */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #f3f4f6 inset;
  -webkit-text-fill-color: #111827;
  transition: background-color 5000s ease-in-out 0s;
}

.dark input:-webkit-autofill,
.dark input:-webkit-autofill:hover,
.dark input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #374151 inset;
  -webkit-text-fill-color: white;
}

/* ----- Estilos para el modal de pago ----- */
.payment-input:focus {
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
}

/* ----- Loader personalizado ----- */
.loader {
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-left-color: currentColor;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ----- Toast notifications ----- */
.toast {
  transform: translateX(100%);
  transition: transform 0.3s ease-out;
}

.toast.show {
  transform: translateX(0);
}

/* ----- Efectos hover mejorados ----- */
.hover-lift {
  transition: var(--transition-smooth);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.2);
}

/* ----- Gradientes de fondo ----- */
.bg-gradient-radial {
  background: radial-gradient(circle at center, var(--tw-gradient-stops));
}

/* ----- Utilidades para el chat ----- */
.chat-message {
  max-width: 80%;
  word-wrap: break-word;
}

.typing-indicator span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: currentColor;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out both;
  margin: 0 2px;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* ----- Responsive utilities ----- */
@media (max-width: 640px) {
  .mobile-full {
    width: 100vw;
    max-width: 100vw;
  }
}

/* ----- Focus visible para accesibilidad ----- */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ----- Transiciones de página ----- */
.page-transition {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.page-transition.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Efecto de shimmer para loading states ----- */
.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.dark .shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
}

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

/* ----- Utilidades de texto ----- */
.text-balance {
  text-wrap: balance;
}

/* ----- Prevenir layout shift ----- */
.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-square {
  aspect-ratio: 1 / 1;
}
/* ============================================
   NUEVOS COMPONENTES: DIAGNÓSTICO + CALCULADORA
   ============================================ */

.wizard-step { animation: fadeInUp 0.5s ease-out; }
.wizard-option { position: relative; overflow: hidden; }
.wizard-option::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.1) 0%, transparent 50%);
    opacity: 0; transition: opacity 0.3s;
}
.wizard-option:hover::before { opacity: 1; }

.plan-card { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.plan-card.selected { border-color: var(--color-primary); box-shadow: 0 20px 40px -10px rgba(234, 179, 8, 0.3); }

[data-counter] { font-variant-numeric: tabular-nums; }

#particles-container { background: radial-gradient(circle at 50% 50%, rgba(234, 179, 8, 0.03) 0%, transparent 70%); }

@media (max-width: 768px) {
    .plan-card.transform.scale-105 { transform: scale(1); }
    #calculadora-planes .lg\:col-span-4,
    #calculadora-planes .lg\:col-span-8 { grid-column: span 12; }
}

html { scroll-behavior: smooth; }