/* Custom styles for Santa Fe Health Care */

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

/* Mobile menu animation */
.menu-line {
  transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
  width: 24px;
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile link transitions */
.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Scroll reveal animations */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal[data-reveal-state="hidden"] {
  opacity: 0;
  transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: none;
  }
  .reveal[data-reveal-state="hidden"] {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.navbar-scrolled .font-serif,
.navbar-scrolled .text-charcoal-900 {
  color: #1c1c26 !important;
}

.navbar-scrolled .mobile-link,
.navbar-scrolled a:not(.bg-coral-500):not(.bg-coral-600) {
  color: #424255 !important;
}

.navbar-scrolled .menu-line {
  background: #1c1c26 !important;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #9c9cb0;
}

/* Selection color */
::selection {
  background: rgba(232, 99, 75, 0.2);
  color: #1c1c26;
}
