/* Custom styles for Affordable PC Service & Supply */

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

/* Base font smoothing */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navbar scroll state */
.navbar-scrolled {
  background: rgba(240, 253, 248, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 1px 0 rgba(10, 37, 64, 0.06);
}

/* Hero underline animation */
@keyframes underline-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0d9488, #5eead4);
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left;
}

.service-card:hover::after {
  transform: scaleX(1);
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Stagger children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0ms; }
.stagger-children .reveal:nth-child(2) { transition-delay: 80ms; }
.stagger-children .reveal:nth-child(3) { transition-delay: 160ms; }
.stagger-children .reveal:nth-child(4) { transition-delay: 240ms; }
.stagger-children .reveal:nth-child(5) { transition-delay: 320ms; }
.stagger-children .reveal:nth-child(6) { transition-delay: 400ms; }

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

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

.mobile-menu-open #mobileMenu {
  opacity: 1 !important;
  pointer-events: all !important;
}

/* Mobile menu stagger */
.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0ms; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 60ms; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 120ms; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 180ms; }

/* Hamburger animation */
.menu-active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Custom 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='%230d9488' 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;
}

/* Selection color */
::selection {
  background: #99f6e0;
  color: #0a2540;
}

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

/* Focus visible styles */
:focus-visible {
  outline: 2px solid #5eead4;
  outline-offset: 2px;
  border-radius: 4px;
}

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

::-webkit-scrollbar-track {
  background: #f0fdf8;
}

::-webkit-scrollbar-thumb {
  background: #99f6e0;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5eead4;
}
