/* Custom styles for Aero Carpet Cleaning */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fdf8f4;
}
::-webkit-scrollbar-thumb {
  background: #f9d0e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #f4a9c8;
}

/* Navbar scroll state */
#navbar.scrolled {
  background: rgba(253, 248, 244, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(155, 31, 78, 0.06);
}

/* Mobile menu */
.mobile-menu-open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.menu-open .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.menu-open .menu-line:nth-child(2) {
  opacity: 0;
}
.menu-open .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 5px;
}

/* Nav links underline animation */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ec7aa8;
  transition: width 0.3s ease;
  border-radius: 1px;
}
.nav-link:hover::after {
  width: 100%;
}

/* Reveal animations — progressive enhancement */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Float animation */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* Hero decorative elements */
.hero-blob {
  animation: blob-float 8s ease-in-out infinite;
}
@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(12px, -18px) scale(1.05); }
  66% { transform: translate(-8px, 10px) scale(0.95); }
}

/* Selection color */
::selection {
  background: #f9d0e1;
  color: #7f1d41;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid #ec7aa8;
  outline-offset: 2px;
}

/* Mobile link animations */
.mobile-link {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#mobileMenu.mobile-menu-open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}
#mobileMenu.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.25s; }
#mobileMenu.mobile-menu-open .mobile-link:nth-child(6) { transition-delay: 0.3s; }

/* Back to top */
#backToTop.visible {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Service card hover — image lift */
.group:hover .group-hover\:-translate-y-1 {
  transform: translateY(-0.25rem);
}

/* 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='%239b1f4e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
