/* Basin Power Sweep Inc - Custom Styles */

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* Custom focus styles for accessibility */
:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

/* Hero section background fallback */
#hero > div:first-child {
  background-color: #1e3a5f; /* Fallback if image doesn't load */
}

/* Single bounce animation for scroll indicator */
@keyframes single-bounce {
  0% {
    transform: translateY(0);
  }
  20% {
    transform: translateY(-15px);
  }
  40% {
    transform: translateY(0);
  }
  60% {
    transform: translateY(-8px);
  }
  80%, 100% {
    transform: translateY(0);
  }
}

.animate-bounce {
  animation: single-bounce 1.5s ease-out forwards;
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Initial state for animated elements */
[data-animate] {
  opacity: 0;
  transform: translateY(20px);
}

/* Service card hover effect */
.group:hover .group-hover\:bg-orange-500 {
  background-color: #f97316;
}

.group:hover .group-hover\:text-white {
  color: white;
}

/* Mobile menu transition */
#mobile-menu {
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

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

/* Phone link styling */
a[href^="tel:"] {
  white-space: nowrap;
}

/* Print styles */
@media print {
  nav,
  #mobile-cta,
  .shadow-lg,
  .shadow-xl {
    display: none !important;
  }

  section {
    page-break-inside: avoid;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .animate-bounce,
  .animate-fade-in,
  [data-animate] {
    animation: none;
    opacity: 1;
    transform: none;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bg-orange-500 {
    background-color: #ea580c;
  }

  .text-slate-300,
  .text-slate-400 {
    color: #cbd5e1;
  }
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Mobile floating CTA shadow */
#mobile-cta {
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

/* Ensure proper spacing for footer on mobile when CTA is visible */
@media (max-width: 767px) {
  footer {
    padding-bottom: 100px;
  }
}

/* Service cards equal height */
#services .grid > div {
  display: flex;
  flex-direction: column;
}

#services .grid > div p {
  flex-grow: 1;
}

/* Map container responsive height */
#service-area iframe {
  min-height: 300px;
}

/* Contact form validation states */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
  border-color: #22c55e;
}

/* Loading state for form button */
button[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Logo in footer - ensure visibility on dark background */
footer img {
  filter: brightness(0) invert(1);
}
