/* Custom styles for NextGenJustice */

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

/* Navbar scroll state */
nav.scrolled {
  background: rgba(253, 248, 245, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

nav.scrolled .menu-line {
  background: #2D2D36;
}

/* Scroll indicator animation */
@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.animate-scroll-line {
  animation: scrollLine 1.5s ease-in-out infinite;
}

/* Mobile menu transitions */
#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

#mobileMenu.closed {
  opacity: 0;
  pointer-events: none;
}

/* Mobile link transitions */
.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Hamburger animation */
.menu-line {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menuToggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#menuToggle.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menuToggle.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 1.25rem;
}

/* Service card hover */
.service-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Select styling */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237A7A8A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .animate-scroll-line {
    animation: none;
  }

  .service-card {
    transition: none;
  }

  button, a {
    transition: none;
  }
}

/* Selection color */
::selection {
  background: rgba(244, 132, 95, 0.2);
  color: #2D2D36;
}
