/* ============================================
   SAFARI COMPONENTS - Componentes Interactivos
   CSS para todos los componentes animados
   ============================================ */

/* ============================================
   1. HERO PARTICLES
   ============================================ */
#hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ============================================
   2. STATS COUNTER
   ============================================ */
.stats-counter {
  text-align: center;
  padding: 1.5rem;
  margin: 1rem;
  min-width: 200px;
  transition: transform 0.3s ease;
}

.stats-counter:hover {
  transform: translateY(-5px);
}

.stats-counter__value {
  font-size: 3rem;
  font-weight: bold;
  color: #8B5CF6;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading, 'Montserrat', sans-serif);
}

.dark .stats-counter__value {
  color: #a78bfa;
}

.stats-counter__label {
  font-size: 1.2rem;
  color: #6b7280;
  font-weight: 500;
}

.dark .stats-counter__label {
  color: #9ca3af;
}

/* ============================================
   3. TESTIMONIAL CAROUSEL
   ============================================ */
.testimonial-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.dark .testimonial-carousel {
  background: rgba(31, 41, 55, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.testimonial-carousel__inner {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-carousel__item {
  flex: 0 0 100%;
  padding: 3rem 2rem;
}

.testimonial-carousel__content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.testimonial-carousel__quote {
  position: absolute;
  top: -20px;
  left: 20px;
  opacity: 0.2;
  width: 40px;
  height: 40px;
}

.testimonial-carousel__text {
  font-style: italic;
  margin-bottom: 2rem;
  font-size: 1.25rem;
  line-height: 1.8;
  color: #374151;
}

.dark .testimonial-carousel__text {
  color: #d1d5db;
}

.testimonial-carousel__author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-carousel__avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #8B5CF6;
}

.testimonial-carousel__info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.testimonial-carousel__info strong {
  color: #8B5CF6;
  font-size: 1.125rem;
  font-weight: 700;
}

.dark .testimonial-carousel__info strong {
  color: #a78bfa;
}

.testimonial-carousel__info span {
  color: #6b7280;
  font-size: 0.875rem;
}

.dark .testimonial-carousel__info span {
  color: #9ca3af;
}

.testimonial-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem 0;
}

.testimonial-carousel__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #d1d5db;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.testimonial-carousel__dot:hover {
  background-color: #9ca3af;
  transform: scale(1.2);
}

.testimonial-carousel__dot--active {
  background-color: #8B5CF6;
  width: 32px;
  border-radius: 6px;
}

.dark .testimonial-carousel__dot--active {
  background-color: #a78bfa;
}

/* ============================================
   4. INTERACTIVE FAQ
   ============================================ */
.interactive-faq {
  max-width: 800px;
  margin: 2rem auto;
}

.faq-item {
  margin-bottom: 1rem;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.dark .faq-item {
  background: rgba(31, 41, 55, 0.9);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.faq-item:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.dark .faq-item:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.faq-item__question {
  width: 100%;
  padding: 1.5rem;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.dark .faq-item__question {
  color: #f9fafb;
}

.faq-item__question:hover {
  color: #8B5CF6;
}

.faq-item__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
  color: #8B5CF6;
}

.faq-item--active .faq-item__question {
  background: linear-gradient(135deg, #8B5CF6 0%, #7c3aed 100%);
  color: white;
}

.faq-item--active .faq-item__icon {
  transform: rotate(45deg);
  color: white;
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
  padding: 0 1.5rem;
}

.faq-item--active .faq-item__answer {
  max-height: 500px;
  padding: 1.5rem;
}

.faq-item__answer p {
  color: #6b7280;
  line-height: 1.75;
  margin: 0;
}

.dark .faq-item__answer p {
  color: #9ca3af;
}

/* ============================================
   5. SCROLL ANIMATIONS
   ============================================ */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animate-in {
  opacity: 1;
  transform: translateY(0);
}

[data-animate="fade"] {
  transform: none;
}

[data-animate="slide-left"] {
  transform: translateX(-50px);
}

[data-animate="slide-left"].animate-in {
  transform: translateX(0);
}

[data-animate="slide-right"] {
  transform: translateX(50px);
}

[data-animate="slide-right"].animate-in {
  transform: translateX(0);
}

[data-animate="scale"] {
  transform: scale(0.9);
}

[data-animate="scale"].animate-in {
  transform: scale(1);
}

/* ============================================
   6. DIFERENCIAS SECTION
   ============================================ */
.diferencias-section {
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.5);
}

.dark .diferencias-section {
  background: rgba(17, 24, 39, 0.3);
}

.diferencias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 3rem auto 0;
}

.diferencia-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.dark .diferencia-card {
  background: rgba(31, 41, 55, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(139, 92, 246, 0.2);
}

.diferencia-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
}

.diferencia-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.diferencia-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #8B5CF6;
  margin-bottom: 1rem;
}

.dark .diferencia-title {
  color: #a78bfa;
}

.diferencia-text {
  color: #6b7280;
  line-height: 1.75;
  font-size: 1rem;
}

.dark .diferencia-text {
  color: #9ca3af;
}

/* ============================================
   7. RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .testimonial-carousel__item {
    padding: 2rem 1rem;
  }

  .testimonial-carousel__text {
    font-size: 1rem;
  }

  .stats-counter {
    min-width: 150px;
    padding: 1rem;
  }

  .stats-counter__value {
    font-size: 2rem;
  }

  .stats-counter__label {
    font-size: 0.875rem;
  }

  .faq-item__question {
    font-size: 1rem;
    padding: 1rem;
  }

  .faq-item__answer {
    padding: 0 1rem;
  }

  .faq-item--active .faq-item__answer {
    padding: 1rem;
  }

  .diferencias-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ============================================
   8. ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-animate] {
    opacity: 1;
    transform: none;
  }
}

/* Focus styles for accessibility */
.faq-item__question:focus,
.testimonial-carousel__dot:focus {
  outline: 2px solid #8B5CF6;
  outline-offset: 2px;
}
