/* Custom styles for A to Z Driving School */

html {
  scroll-behavior: smooth;
}

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

/* Navbar scroll state */
.navbar-scrolled {
  background: rgba(17, 19, 22, 0.92) !important;
  backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid rgba(107, 112, 122, 0.15) !important;
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.3) !important;
}

/* Mobile menu transitions */
#mobileMenu {
  animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Floating card animations */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.floating-card-1 {
  animation: float 6s ease-in-out infinite;
}

.floating-card-2 {
  animation: float 7s ease-in-out infinite 1s;
}

.floating-card-3 {
  animation: float 5.5s ease-in-out infinite 0.5s;
}

/* Selection color */
::selection {
  background: rgba(245, 90, 40, 0.3);
  color: #f6f6f7;
}

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

::-webkit-scrollbar-track {
  background: #1e2024;
}

::-webkit-scrollbar-thumb {
  background: #43464d;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6b707a;
}

/* Focus visible styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #f55a28;
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .floating-card-1,
  .floating-card-2,
  .floating-card-3 {
    animation: none;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Scroll reveal animations (progressive enhancement) */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

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

/* Service card hover lift */
.group:hover {
  transform: translateY(-2px);
}

.group {
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
