/**
 * Accelerated Automotive - Brand Logo Carousel
 * Infinite scrolling marquee with mouse-position-controlled direction/speed
 */

/* ========================================
   ROOT & CONTAINER
   ======================================== */

.aa-brand-carousel {
  width: 100%;
  position: relative;
  overflow: hidden;
  padding: 60px 0;
}

.aa-brand-carousel__empty {
  padding: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
}

/* ========================================
   TRACK WRAPPER & TRACKS
   ======================================== */

.aa-brand-carousel__track-wrapper {
  position: relative;
  width: 100%;
  overflow: visible;
}

.aa-brand-carousel__track {
  display: flex;
  align-items: center;
  gap: 60px;
  flex-shrink: 0;
  will-change: transform;
}

/* ========================================
   LOGO ITEMS
   ======================================== */

.aa-brand-carousel__item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  width: 120px;
}

.aa-brand-carousel__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.aa-brand-carousel__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  opacity: 0.85;
  transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
}

/* Hover effect (only on pointer devices) */
@media (hover: hover) and (pointer: fine) {
  .aa-brand-carousel__link:hover .aa-brand-carousel__img {
    opacity: 1;
    transform: scale(1.05);
  }
  
  .aa-brand-carousel__link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 4px;
    border-radius: 4px;
  }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

/* Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .aa-brand-carousel {
    padding: 30px 0;
  }
  
  .aa-brand-carousel__track {
    gap: 40px;
  }
  
  .aa-brand-carousel__item {
    height: 50px;
    width: 100px;
  }
}

/* Mobile (≤ 767px) */
@media (max-width: 767px) {
  .aa-brand-carousel {
    padding: 24px 0;
  }
  
  .aa-brand-carousel__track {
    gap: 30px;
  }
  
  .aa-brand-carousel__item {
    height: 40px;
    width: 80px;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .aa-brand-carousel__track {
    animation: none !important;
  }
  
  .aa-brand-carousel__img {
    transition: none !important;
  }
}

/* Keyboard focus styles */
.aa-brand-carousel__link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* GPU acceleration for smooth transforms */
.aa-brand-carousel__track {
  backface-visibility: hidden;
  perspective: 1000px;
  transform: translateZ(0);
}
