/* Custom styles for South Texas Backyards */

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

/* Navbar scroll state */
.navbar-scrolled {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(15, 33, 64, 0.08);
}

.navbar-scrolled .nav-link {
  color: #0f2140 !important;
}

.navbar-scrolled .logo-text {
  color: #0f2140 !important;
}

/* Service card hover lift */
.service-card {
  transform: translateY(0);
}

.service-card:hover {
  transform: translateY(-4px);
}

/* Gallery item overlay */
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 33, 64, 0.4) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Testimonial card hover */
.testimonial-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(13, 148, 136, 0.12);
}

/* Fade-in animation for scroll reveals */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delay for grid items */
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* Mobile menu animation */
#mobileMenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

#mobileMenu.open {
  max-height: 400px;
}

/* Input focus ring animation */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

/* Button ripple effect */
button, a {
  -webkit-tap-highlight-color: transparent;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .gallery-item img {
    transition: none;
  }
  .gallery-item:hover img {
    transform: none;
  }
}

/* Ensure hero text is visible without JS */
@media (max-width: 360px) {
  h1 {
    font-size: 2rem !important;
  }
}
