/* ============================================
   Royal Carpet & Rug Cleaning Ks — Custom Styles
   ============================================ */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FBF5EB;
}
::-webkit-scrollbar-thumb {
  background: #D4AF6A;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #B85446;
}

/* Selection color */
::selection {
  background: #B85446;
  color: #FEFCF8;
}

/* ============================================
   Mobile menu transitions
   ============================================ */
#mobileMenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
#mobileMenu.open {
  max-height: 400px;
}

/* ============================================
   Scroll reveal animations (progressive enhancement)
   Only applied when JS runs and user prefers motion
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
  /* Stagger children */
  .reveal-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0s; }
  .reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; }
  .reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.2s; }
  .reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.3s; }
  .reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.4s; }
  .reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.5s; }
  .reveal-stagger.revealed > * {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Navbar scroll state
   ============================================ */
.navbar-scrolled {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================
   Service card hover tilt (subtle)
   ============================================ */
.group:hover {
  transform: translateY(-2px);
}
.group {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ============================================
   Floating stat cards animation
   ============================================ */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.absolute.z-10:nth-child(1) {
  animation: float 4s ease-in-out infinite;
}
.absolute.z-10:nth-child(2) {
  animation: float 4s ease-in-out infinite 1s;
}
.absolute.z-10:nth-child(3) {
  animation: float 4s ease-in-out infinite 2s;
}
