/* Custom styles for Federal Electric LLC */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection color */
::selection {
  background-color: rgba(74, 222, 128, 0.2);
  color: #002563;
}

/* Navbar transition states */
#navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

#navbar.scrolled .nav-link {
  color: #0f172a;
}

#navbar.scrolled #nav-brand {
  color: #0f172a;
}

#navbar.scrolled #nav-sub {
  color: #64748b;
}

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

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #4ade80, #22c55e);
  transform: scaleX(0);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left;
}

.service-card:hover::after {
  transform: scaleX(1);
}

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

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

#mobile-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.2s; }

/* Menu button animation */
.menu-line {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

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

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

#menu-btn.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(3px, -3px);
  width: 1.5rem;
}

/* Custom select styling */
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='%2394a3b8' 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 0 center;
  background-size: 12px;
  padding-right: 2rem;
}

select option {
  background-color: #ffffff;
  color: #0f172a;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  #navbar, #mobile-menu, .service-card::after {
    display: none !important;
  }
  
  body {
    color: #000;
    background: #fff;
  }
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid #22c55e;
  outline-offset: 2px;
}

/* Subtle image hover */
img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
