/* ===== Custom Styles for Crossroads Family Health Clinic ===== */

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

/* ===== Navbar ===== */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(254, 252, 251, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #7B2D3B;
  transition: width 0.3s ease;
  border-radius: 1px;
}

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

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

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

.mobile-link {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid rgba(123, 45, 59, 0.06);
}

.mobile-link:last-child {
  border-bottom: none;
}

/* Hero animations */
.hero-badge {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.hero-image {
  animation: fadeInRight 1s ease 0.3s forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Trust items */
.trust-item {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.6s ease forwards;
}

.trust-item:nth-child(1) { animation-delay: 0.1s; }
.trust-item:nth-child(2) { animation-delay: 0.2s; }
.trust-item:nth-child(3) { animation-delay: 0.3s; }
.trust-item:nth-child(4) { animation-delay: 0.4s; }

/* Scroll reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered scroll reveals */
.scroll-reveal.stagger-1 { transition-delay: 0.1s; }
.scroll-reveal.stagger-2 { transition-delay: 0.2s; }
.scroll-reveal.stagger-3 { transition-delay: 0.3s; }

/* Floating card animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

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

/* ===== Selection ===== */
::selection {
  background: rgba(123, 45, 59, 0.15);
  color: #7B2D3B;
}

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

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

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

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

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 70px;
  }

  .hero-badge {
    animation-delay: 0.1s;
  }
}

/* Print styles */
@media print {
  #navbar,
  #mobile-menu,
  .scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
