/* Custom styles for Mex Body Shop */

/* Base */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-reveal-delay="1"] { transition-delay: 0.1s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.2s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.3s; }
.reveal[data-reveal-delay="4"] { transition-delay: 0.4s; }
.reveal[data-reveal-delay="5"] { transition-delay: 0.5s; }
.reveal[data-reveal-delay="6"] { transition-delay: 0.6s; }

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Floating stat card animations */
@keyframes float1 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
@keyframes float2 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}
@keyframes float3 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.floating-card-1 { animation: float1 6s ease-in-out infinite; }
.floating-card-2 { animation: float2 7s ease-in-out infinite; }
.floating-card-3 { animation: float3 5s ease-in-out infinite; }
.floating-card-4 { animation: float1 8s ease-in-out infinite; }
.floating-card-5 { animation: float2 6.5s ease-in-out infinite; }

/* Selection color */
::selection {
  background-color: rgba(75, 191, 140, 0.3);
  color: #fff;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0A1628;
}
::-webkit-scrollbar-thumb {
  background: #1D3456;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2E4D78;
}

/* Mobile menu animations */
#mobileMenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
}

#mobileMenu.open {
  max-height: 400px;
  opacity: 1;
}

/* Mobile menu link animations */
.mobile-link {
  transform: translateX(-10px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease, color 0.2s ease;
}

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

#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; }
#mobileMenu.open .mobile-link:nth-child(6) { transition-delay: 0.3s; }

/* Navbar transition */
.nav-scrolled {
  background: rgba(6, 14, 26, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(30, 62, 100, 0.3);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Form select arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237DD4AE' 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;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* Gallery image hover */
.group:hover .group-hover\:scale-105 {
  transform: scale(1.05);
}

/* Service card hover glow */
.group:hover .group-hover\:bg-mint-500\/15 {
  background-color: rgba(75, 191, 140, 0.15);
}
