/* 1. FUENTES Y VARIABLES */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;600;800&display=swap');

:root {
  --gold: #d4af37;
  --gold-hover: #b8963b;
  --bg-soft: #fcf9f5;
  --dark: #121212;
}

/* 2. CONFIGURACIÓN BASE */
html { 
  scroll-behavior: smooth; 
  font-family: 'Plus Jakarta Sans', sans-serif; 
}

body { 
  background-color: var(--bg-soft); 
  color: var(--dark); 
  overflow-x: hidden; 
  margin: 0;
}

/* Tipografías con espaciado moderno */
h1, h2, h3 { 
  letter-spacing: -0.02em; 
}

/* 3. EFECTO PARALLAX (Fondo que se mueve) */
#home .bg-fixed {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Optimización para navegadores modernos */
  will-change: transform;
}

/* 4. CARDS PREMIUM (Efecto Elevación) */
.card-premium {
  background: white;
  border: 1px solid rgba(212, 175, 55, 0.1);
  border-radius: 2.5rem; /* Bordes más curvos estilo moderno */
  transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
  box-shadow: 0 10px 30px -12px rgba(0,0,0,0.05);
  overflow: hidden;
}

.card-premium:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 50px -15px rgba(212, 175, 55, 0.25);
  border-color: var(--gold);
}

/* 5. BOTONES ESTILIZADOS */
.btn-gold {
  background: var(--gold);
  color: white !important;
  border-radius: 9999px;
  padding: 0.8rem 2.2rem;
  font-weight: 700;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}

.btn-gold:hover {
  background: var(--gold-hover);
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

.btn-gold:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* 6. INPUTS DE FORMULARIO */
.input-premium {
  background: #fdfdfd;
  border: 1px solid #e5e5e5;
  border-radius: 1.2rem;
  padding: 1.1rem;
  width: 100%;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.input-premium:focus {
  outline: none;
  border-color: var(--gold);
  background: white;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

/* 7. ELEMENTOS OSCUROS Y FOOTER */
.bg-dark-grad {
  background: linear-gradient(145deg, #1a1a1a 0%, #000000 100%);
}

/* 8. ANIMACIONES SUTILES */
@keyframes fadeInDown {
  0% { opacity: 0; transform: translateY(-25px); }
  100% { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
  animation: fadeInDown 0.8s ease-out forwards;
}

/* Animaciones para el header mejorado */
@keyframes fadeInUp {
  0% { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.animate-fade-in-up {
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
  animation-delay: 0.2s;
  will-change: opacity, transform;
}

/* Fallback: mostrar elementos si JavaScript está deshabilitado o hay problemas */
.no-js .animate-fade-in-up,
.animate-fade-in-up[style*="animation-delay"] {
  animation-fill-mode: forwards;
}

/* Asegurar visibilidad en caso de problemas con la animación */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in-up {
    animation: none;
    opacity: 1 !important;
    transform: none !important;
  }
}

.animate-fade-in-down {
  animation: fadeInDown 0.8s ease-out forwards;
  animation-delay: 0.1s;
  opacity: 0;
}

@keyframes pulseSlow {
  0%, 100% { 
    opacity: 0.3; 
    transform: scale(1); 
  }
  50% { 
    opacity: 0.5; 
    transform: scale(1.05); 
  }
}

.animate-pulse-slow {
  animation: pulseSlow 4s ease-in-out infinite;
}

/* Gradiente radial para efectos de luz */
.bg-gradient-radial {
  background: radial-gradient(circle, var(--tw-gradient-stops));
}

/* Mejoras adicionales para el header */
#home .hero-content {
  animation: fadeInUp 1.2s ease-out forwards;
}

/* Efecto de brillo en texto */
.text-glow {
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

/* 10. NAVBAR MEJORADO - Efecto de scroll */
#navbar {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-bottom-color: rgba(212, 175, 55, 0.3);
}

/* Enlaces de navegación con efecto underline */
.nav-link:hover span:last-child {
  width: 100%;
}

/* 11. MEJORAS PARA TARJETAS DE SERVICIOS */
.card-premium {
  position: relative;
}

.card-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0), rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.card-premium:hover::before {
  opacity: 1;
}

/* 12. ANIMACIONES PARA SECCIONES */
@keyframes slideInFromBottom {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-up {
  animation: slideInFromBottom 0.8s ease-out forwards;
}

/* 13. EFECTOS DE HOVER MEJORADOS */
.group:hover .group-hover\:scale-110 {
  transform: scale(1.1);
}

/* 14. MEJORAS PARA BADGES Y ETIQUETAS */
.badge-premium {
  background: linear-gradient(135deg, #d4af37 0%, #b8963b 100%);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* 15. GRADIENTES MEJORADOS */
.bg-gradient-gold {
  background: linear-gradient(135deg, #d4af37 0%, #b8963b 100%);
}

/* 16. SOMBRAS PREMIUM */
.shadow-premium {
  box-shadow: 0 20px 60px -15px rgba(212, 175, 55, 0.3);
}

.shadow-premium-lg {
  box-shadow: 0 25px 80px -20px rgba(212, 175, 55, 0.4);
}

/* 17. EFECTOS DE OVERLAY MEJORADOS */
.overlay-gradient {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    transparent 100%
  );
}

/* 18. TRANSICIONES SUAVES */
.transition-smooth {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 9. AJUSTES RESPONSIVOS (Móviles) */
@media (max-width: 768px) {
  /* Desactivar parallax en móvil porque suele fallar en iOS/Android */
  #home .bg-fixed {
    background-attachment: scroll;
  }

  .card-premium {
    border-radius: 1.8rem;
  }

  /* Ajuste de títulos en pantallas pequeñas */
  h1 { font-size: 3.5rem !important; }
}