/* Custom CSS for Bellacor */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap");

* {
  font-family: "Inter", sans-serif;
}

/* Loading Animation */
#loading {
  transition: opacity 0.5s ease-in-out;
}

#loading.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Improved Hero Parallax */
.hero-gradient {
  background: linear-gradient(
    135deg,
    theme("colors.dark") 0%,
    theme("colors.accent-purple") 50%,
    theme("colors.accent-lime") 100%
  );
  position: relative;
  overflow: hidden; /* Prevent background from extending beyond container */
  will-change: transform; /* Optimize for animations */
}

.hero-gradient::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(132, 204, 22, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, rgba(111, 48, 224, 0.1) 0%, transparent 50%); /* Usar accent-purple */
  z-index: 1;
}

/* Ensure hero content stays above background */
.hero-gradient > * {
  position: relative;
  z-index: 2;
}

/* Smooth transition for parallax */
.hero-gradient {
  transition: transform 0.5s ease-out;
}

/* Prevent parallax on mobile for better performance */
@media (max-width: 768px) {
  .hero-gradient {
    transform: none !important;
  }
}

/* Glass Effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.glass-effect:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: theme("colors.accent-lime"); /* Borde de hover con el nuevo verde */
  transform: translateY(-2px);
}

/* Card Shadows - Usando las nuevas definiciones de tailwind.config.js */
.card-shadow {
  box-shadow: theme("boxShadow.xl");
}

/* Gradient Cards - Usando los nuevos colores */
.gradient-card {
  background: linear-gradient(135deg, theme("colors.accent-lime"), theme("colors.accent-green"));
}

.purple-card {
  background: linear-gradient(135deg, theme("colors.accent-purple"), theme("colors.accent-purple")); /* Mantener el morado para estas tarjetas */
}

/* Hover Scale Animation */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.02);
}

/* Floating Animation */
.floating {
  animation: floating 3s ease-in-out infinite;
}

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

/* Fade In Animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Navigation Blur */
.nav-blur {
  backdrop-filter: blur(10px);
  background: theme("colors.dark"); /* Usar el color dark */
}

/* Section Alt Background - Usando el nuevo dark-alt */
.section-alt {
  background: theme("colors.dark"); /* Ahora dark es el fondo alternativo oscuro */
}

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

::-webkit-scrollbar-track {
  background: theme("colors.dark");
}

::-webkit-scrollbar-thumb {
  background: theme("colors.accent-lime");
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: theme("colors.accent-green");
}

/* Form Styles */
.form-input-dark {
  @apply w-full bg-white/10 border border-white/20 rounded-xl px-4 py-3 text-text-light placeholder-text-muted focus:outline-none focus:border-accent-lime transition-colors;
}

.form-input-dark:focus {
  background: rgba(255, 255, 255, 0.15);
}

.form-input-light {
  @apply w-full bg-gray-100 border border-border-light rounded-xl px-4 py-3 text-text-dark placeholder-text-muted focus:outline-none focus:border-accent-lime transition-colors;
}

.form-input-light:focus {
  background: theme("colors.light-card");
}

/* Button Styles */
.btn-primary {
  @apply bg-accent-lime text-text-dark px-6 py-3 rounded-xl font-semibold hover:bg-accent-green transition-all duration-300 hover:scale-105;
}

.btn-secondary {
  @apply bg-white/10 text-text-light px-6 py-3 rounded-xl font-semibold hover:bg-white/20 transition-all duration-300;
}

/* Loading States */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid theme("colors.accent-lime");
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-gradient {
    min-height: 80vh;
  }

  .glass-effect {
    margin-bottom: 1rem;
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Styles */
.focus-visible:focus {
  outline: 2px solid theme("colors.accent-lime");
  outline-offset: 2px;
}

/* Animation Delays */
.fade-in:nth-child(1) {
  animation-delay: 0.1s;
}
.fade-in:nth-child(2) {
  animation-delay: 0.2s;
}
.fade-in:nth-child(3) {
  animation-delay: 0.3s;
}
.fade-in:nth-child(4) {
  animation-delay: 0.4s;
}
.fade-in:nth-child(5) {
  animation-delay: 0.5s;
}
.fade-in:nth-child(6) {
  animation-delay: 0.6s;
}
