/* Custom styles for Mast Plumbing */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f5f3ee;
}
::-webkit-scrollbar-thumb {
  background: #2d4f31;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #1a3020;
}

/* Selection color */
::selection {
  background: #2d4f31;
  color: #faf9f6;
}

/* Service card animation */
.service-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Navbar scroll effect */
#navbar.scrolled {
  background: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(26, 79, 48, 0.1);
}

/* Mobile menu animation */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

#mobile-menu.open {
  max-height: 400px;
  padding-top: 0;
}

/* Mobile link hover */
.mobile-link {
  position: relative;
}

.mobile-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #2d4f31;
  transition: width 0.3s ease;
}

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

/* Back to top button */
#back-to-top.visible {
  opacity: 1;
  translate: 0 0;
  pointer-events: all;
}

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

/* Hero text animation */
#hero h1 {
  opacity: 0;
  transform: translateY(40px);
  animation: heroReveal 1s ease forwards 0.3s;
}

#hero p {
  opacity: 0;
  transform: translateY(30px);
  animation: heroReveal 1s ease forwards 0.6s;
}

#hero .flex-col {
  opacity: 0;
  transform: translateY(20px);
  animation: heroReveal 1s ease forwards 0.9s;
}

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Floating shapes animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-20px) scale(1.05);
  }
}

#hero .absolute.top-1\/4 {
  animation: float 6s ease-in-out infinite;
}

#hero .absolute.bottom-1\/4 {
  animation: float 8s ease-in-out infinite 1s;
}

#hero .absolute.top-1\/2 {
  animation: float 7s ease-in-out infinite 2s;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
