/* Custom Styles for Ryan's Heating & Air */

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0d1e3d;
}
::-webkit-scrollbar-thumb {
  background: #4164af;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #eeb130;
}

/* Selection Color */
::selection {
  background: #eeb130;
  color: #0d1e3d;
}

/* Service Card Hover Effect */
.service-card {
  transform: translateY(0);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(238, 177, 48, 0.1);
}

/* Navbar Scroll State */
nav.scrolled {
  background: rgba(9, 20, 40, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(238, 177, 48, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile Menu Animation */
.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.mobile-menu-open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}
.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Menu Button Animation */
.menu-line {
  display: block;
}
.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) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 24px;
}

/* Reveal Animations */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .service-card:hover {
    transform: none;
  }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Form Select Arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236783bf' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

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

/* Button Press Effect */
button, a {
  -webkit-tap-highlight-color: transparent;
}
button:active, a:active {
  transform: scale(0.98);
}

/* Image Loading */
img {
  opacity: 1;
  transition: opacity 0.3s ease;
}
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.5s ease;
}
img[loading="lazy"].loaded {
  opacity: 1;
}
