/* Custom styles for Bak Solar Power */

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

/* Navbar scroll effect */
#navbar.scrolled {
  background: rgba(253, 252, 247, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(5, 150, 105, 0.08);
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #059669;
  border-radius: 1px;
  transition: width 0.3s ease;
}

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

/* Mobile menu links */
.mobile-link {
  display: block;
}

/* Service cards */
.service-card {
  position: relative;
}

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

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

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

/* Back to top button */
#backToTop.show {
  opacity: 1;
  pointer-events: all;
}

#backToTop.show:hover {
  transform: translateY(-2px);
}

/* Geometric floating animation */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float-reverse {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(20px) rotate(-5deg); }
}

.float-1 { animation: float 6s ease-in-out infinite; }
.float-2 { animation: float-reverse 8s ease-in-out infinite; }

/* Pulse dot */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

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

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

::-webkit-scrollbar-thumb {
  background: #059669;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

/* Selection color */
::selection {
  background: #059669;
  color: white;
}

/* Input autofill */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #fdfcf7 inset !important;
  color: #064e3b !important;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
  .float-1, .float-2 { animation: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
