/**
 * Scroll Animations CSS
 * Animações suaves para transição entre seções
 */

/* Indicadores de Seção */
#section-indicators {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#section-indicators button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#section-indicators button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

#section-indicators button:hover::before {
  width: 100%;
  height: 100%;
}

#section-indicators button.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
}

/* Animação de entrada para seções */
.w-screen.h-screen {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.w-screen.h-screen.active {
  opacity: 1;
  transform: translateY(0);
}

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

/* Performance optimizations */
.w-screen.h-screen {
  will-change: transform, opacity;
  contain: layout style paint;
}

#map-background {
  will-change: transform, opacity;
  backface-visibility: hidden;
  perspective: 1000px;
}

#horizontal-track {
  will-change: transform;
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Loading states */
.loading {
  pointer-events: none;
  user-select: none;
}

/* Scroll indicators animation */
@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.8;
  }
}

#section-indicators button:not(.active) {
  animation: pulse 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #section-indicators {
    right: 1rem;
    padding: 0.75rem;
  }
  
  #section-indicators button {
    width: 8px;
    height: 8px;
  }
  
  #section-indicators button.active {
    width: 24px;
    height: 8px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  #section-indicators {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid white;
  }
  
  #section-indicators button {
    border: 2px solid white;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  #section-indicators button,
  #section-indicators button::before,
  .w-screen.h-screen {
    transition: none;
  }
  
  #section-indicators button:not(.active) {
    animation: none;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Focus styles for accessibility */
#section-indicators button:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.8);
  outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}
