/* ============================================
   Professional Auto Repair — Custom Styles
   ============================================ */

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

/* --- Custom Selection Color --- */
::selection {
  background-color: #C05832;
  color: white;
}

/* --- Header Scroll State --- */
#site-header {
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#site-header.scrolled {
  background: rgba(250, 246, 240, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* --- Nav Links --- */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #C05832;
  border-radius: 1px;
  transform: translateX(-50%);
  transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
}

/* --- Mobile Nav Links --- */
.mobile-nav-link {
  display: block;
}

/* --- Service Cards --- */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #C05832, #efc96e);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 3xl 3xl 0 0;
}

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

/* --- Testimonial Cards --- */
.testimonial-card {
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(192, 88, 50, 0.1);
}

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Staggered service card animations --- */
.service-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* --- Testimonial stagger --- */
.testimonial-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.testimonial-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.testimonial-card:nth-child(1) { transition-delay: 0.05s; }
.testimonial-card:nth-child(2) { transition-delay: 0.15s; }
.testimonial-card:nth-child(3) { transition-delay: 0.25s; }

/* --- Hero image float animation --- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

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

/* --- Button ripple effect --- */
a, button {
  -webkit-tap-highlight-color: transparent;
}

/* --- Focus visible styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #C05832;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

/* --- Mobile menu transitions --- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
  opacity: 0;
}

#mobile-menu.open {
  max-height: 500px;
  opacity: 1;
}

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

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

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

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

/* --- Responsive adjustments --- */
@media (max-width: 640px) {
  .floating-card {
    display: none;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  #site-header nav {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
