/* Custom styles for Willimantic Autoworks */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a0f1e;
}
::-webkit-scrollbar-thumb {
  background: #1e3a5f;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0d9488;
}

/* Hero parallax-like effect */
#hero {
  background-attachment: fixed;
}

/* Service card hover animation */
.service-card {
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px -20px rgba(13, 148, 136, 0.15);
}

/* Fade-in on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Navbar glass effect when scrolled */
#navbar.scrolled {
  background: rgba(10, 15, 30, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(13, 148, 136, 0.1);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

/* Mobile menu transitions */
#mobileMenu {
  animation: slideDown 0.3s ease forwards;
}
#mobileMenu.hidden {
  animation: slideUp 0.25s ease forwards;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

/* Text selection color */
::selection {
  background: rgba(13, 148, 136, 0.3);
  color: #f0fdfa;
}

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

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
  .service-card { transition: none; }
  .service-card:hover { transform: none; }
}

/* Mobile menu link hover */
.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}
.mobile-link:last-child {
  border-bottom: none;
}
