/**
 * AutoVision Initiative - Custom Styles
 * Enhances Tailwind CSS with custom properties and animations
 */

/* Base Styles */
* {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

body {
  background: #ffffff;
  scroll-behavior: smooth;
}

/* Custom Border Radius */
.rounded-2xl {
  border-radius: 1rem;
}

/* Smooth Transitions */
a, button {
  transition: all 0.3s ease;
}

/* Image Hover Effects */
img {
  transition: transform 0.3s ease;
}

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

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

::-webkit-scrollbar-thumb {
  background: #FF9900;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #e68a00;
}

/* Backdrop Blur Support */
@supports (backdrop-filter: blur(10px)) {
  .backdrop-blur-md {
    backdrop-filter: blur(10px);
  }
}

/* Focus Styles for Accessibility */
a:focus, button:focus {
  outline: 2px solid #00d4ff;
  outline-offset: 2px;
}
/* Prefer :focus-visible for better UX */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #00d4ff;
  outline-offset: 2px;
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print Styles */
@media print {
  header, footer {
    display: none;
  }
}

/* Hide scrollbar utility for horizontal sliders */
.hide-scrollbar {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}
.hide-scrollbar::-webkit-scrollbar { /* Chrome, Safari */
  display: none;
}

/* Hero background slider */
.hero-slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroFade 18s infinite ease-in-out;
}

.hero-slide:nth-child(1) {
  animation-delay: 0s;
}

.hero-slide:nth-child(2) {
  animation-delay: 6s;
}

.hero-slide:nth-child(3) {
  animation-delay: 12s;
}

@keyframes heroFade {
  0% {
    opacity: 0;
    transform: scale(1.05);
  }
  5%, 30% {
    opacity: 1;
    transform: scale(1.02);
  }
  35% {
    opacity: 0;
    transform: scale(1.05);
  }
  100% {
    opacity: 0;
    transform: scale(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    animation: none !important;
    opacity: 1 !important;
  }
  .hero-slide:nth-child(n+2) {
    display: none;
  }
}

/* Smart Glasses Carousel */
.glasses-carousel-wrapper {
  position: relative;
}

.glasses-carousel-track {
  display: flex;
  will-change: transform;
}

.glasses-card {
  width: 50%;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .glasses-card {
    width: 33.333333%;
  }
}
