/* ===== Custom Styles for Clinton Tires ===== */

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

/* Navbar Transition */
#navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: #c8a45c;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile Menu */
.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Mobile Menu Toggle Animation */
.menu-line {
  display: block;
}

#menuToggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#menuToggle.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menuToggle.active .menu-line:nth-child(3) {
  width: 24px;
  transform: rotate(-45deg) translate(5px, -5px);
}

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

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(26, 95, 107, 0) 0%, rgba(26, 95, 107, 0) 100%);
  transition: background 0.5s ease;
  border-radius: inherit;
  z-index: 0;
}

.service-card > * {
  position: relative;
  z-index: 1;
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.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; }

/* Gold accent line animation */
@keyframes growWidth {
  from { width: 0; }
  to { width: 48px; }
}

/* Hero text animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content > * {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.hero-content > *:nth-child(1) { animation-delay: 0.2s; }
.hero-content > *:nth-child(2) { animation-delay: 0.4s; }
.hero-content > *:nth-child(3) { animation-delay: 0.6s; }
.hero-content > *:nth-child(4) { animation-delay: 0.8s; }
.hero-content > *:nth-child(5) { animation-delay: 1s; }

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

/* Custom Selection Color */
::selection {
  background: rgba(26, 95, 107, 0.2);
  color: #1a5f6b;
}

/* Focus styles */
*:focus-visible {
  outline: 2px solid #c8a45c;
  outline-offset: 2px;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px white inset !important;
}

/* Subtle parallax on hero */
@media (prefers-reduced-motion: no-preference) {
  .hero-bg {
    will-change: transform;
  }
}

/* Decorative dot pattern for sections */
.section-pattern {
  background-image: radial-gradient(circle, rgba(26, 95, 107, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}
