/* ============================
   Coach Herbalife – Custom CSS
   ============================ */

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

/* Prevent layout shift from fixed navbar */
body {
  scroll-padding-top: 4rem;
}

/* Scroll-link active state handled via JS */
.scroll-link {
  cursor: pointer;
}

/* Hero image fallback placeholder */
.hero-placeholder {
  background: linear-gradient(135deg, #dcfce7 0%, #f0fdf4 50%, #bbf7d0 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #16a34a;
  font-weight: 600;
  font-size: 0.875rem;
  text-align: center;
  padding: 2rem;
  border-radius: 1.5rem;
  aspect-ratio: 4 / 5;
}

/* Problem cards hover effect */
.problem-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.problem-card:hover {
  transform: translateY(-2px);
}

/* FAQ animations */
.faq-content {
  transition: max-height 0.3s ease, opacity 0.3s ease;
}
.faq-content.open {
  display: block;
}
.faq-icon.open {
  transform: rotate(180deg);
}

/* Form focus ring override */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

/* Navbar transition */
nav {
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

/* WhatsApp float button (optional enhancement) */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  background: #25d366;
  border-radius: 50%;
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}
.whatsapp-float svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: white;
}

/* Smooth image loading */
img {
  transition: opacity 0.3s ease;
}

/* Section fade-in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* Lazy animation trigger via IntersectionObserver */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile menu overlay */
#mobile-menu {
  transition: max-height 0.3s ease;
}

/* Responsive tweaks */
@media (max-width: 640px) {
  h1 {
    font-size: 2.25rem;
  }
  h2 {
    font-size: 1.875rem;
  }
}

/* Print: hide nav and floating elements */
@media print {
  nav, .whatsapp-float {
    display: none !important;
  }
}
