/* ========== CUSTOM STYLES ========== */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* Header background on scroll */
#site-header.scrolled {
  background: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

#site-header:not(.scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.85);
}

#site-header:not(.scrolled) .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Nav link hover */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: all 0.2s ease;
  transform: translateX(-50%);
  opacity: 0;
}

.nav-link:hover::after {
  width: 60%;
  opacity: 1;
}

/* Mobile menu */
#mobile-menu {
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-nav-link {
  display: block;
}

/* Service cards */
.service-card {
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

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

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

.testimonial-card:hover {
  transform: translateY(-2px);
}

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

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

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

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Selection color */
::selection {
  background: #33784d;
  color: #fff;
}
