/* O'Brien's Driving School — Custom Styles */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #161412;
}
::-webkit-scrollbar-thumb {
  background: #453f38;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #6e665a;
}

/* Selection color */
::selection {
  background: rgba(22, 163, 74, 0.3);
  color: #f7f7f5;
}

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

/* Navbar scroll state */
nav.scrolled {
  background: rgba(22, 20, 18, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(69, 63, 56, 0.5);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Service card hover glow */
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), transparent, rgba(234, 172, 8, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

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

.service-card:hover::before {
  opacity: 1;
}

/* Testimonial card hover */
.testimonial-card {
  position: relative;
  overflow: hidden;
}

.testimonial-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.testimonial-card:hover::after {
  opacity: 1;
}

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

/* Gold shimmer animation for CTA */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

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

.reveal.hidden-reveal {
  opacity: 0;
  transform: translateY(30px);
}

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

/* Select dropdown styling */
select option {
  background: #2c2824;
  color: #f7f7f5;
}

/* Image loading placeholder */
img {
  background: linear-gradient(135deg, #2c2824 0%, #37322d 100%);
}

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

/* Button ripple effect */
button, a {
  position: relative;
  overflow: visible;
}

/* Decorative gold line animation */
@keyframes goldPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* Hero text gradient animation */
@keyframes textShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating animation for decorative elements */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Subtle background pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(69, 63, 56, 0.15) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}
