/* Custom styles for Truck Boyz Inc. */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #060E1A;
}
::-webkit-scrollbar-thumb {
  background: #C8A44E;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #D4AF5A;
}

/* Selection color */
::selection {
  background: #C8A44E;
  color: #060E1A;
}

/* Navbar transition */
#navbar {
  backdrop-filter: blur(0px);
  transition: backdrop-filter 0.5s ease, background 0.5s ease;
}

#navbar.scrolled {
  backdrop-filter: blur(20px);
  background: rgba(6, 14, 26, 0.85);
  border-bottom: 1px solid rgba(200, 164, 78, 0.1);
}

/* Navigation links */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #C8A44E;
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* Mobile menu */
.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}
#mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

/* Menu button animation */
#menu-btn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
  width: 24px;
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Hero entrance animations */
#hero-badge {
  animation: slideInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
  opacity: 0;
}

#hero-stat-1 {
  animation: slideInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
  opacity: 0;
}

#hero-stat-2 {
  animation: slideInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.75s forwards;
  opacity: 0;
}

#hero-stat-3 {
  animation: slideInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
  opacity: 0;
}

#hero-image {
  animation: slideInRight 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
  opacity: 0;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gold shimmer effect on hover for buttons */
button, a {
  -webkit-tap-highlight-color: transparent;
}

/* Form focus styles */
input:focus, select:focus, textarea:focus {
  outline: none;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  #hero-badge, #hero-stat-1, #hero-stat-2, #hero-stat-3, #hero-image {
    opacity: 1;
    animation: none;
  }
  .group:hover img {
    transform: none;
  }
}

/* Gallery image aspect ratios */
@media (max-width: 767px) {
  .md\\:row-span-2 {
    row-span: 1;
  }
}

/* Custom select dropdown arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C8A44E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Image hover zoom for gallery */
.group img {
  will-change: transform;
}

/* Subtle pulse for the gold accent dot */
@keyframes pulse-gold {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.5);
  }
}

/* Map filter override for light mode */
@media (prefers-color-scheme: light) {
  .dark-map iframe {
    filter: invert(90%) hue-rotate(180deg) brightness(0.95) contrast(1.1);
  }
}
