diff --git a/client/src/App.jsx b/client/src/App.jsx
index 2b8284f..c44e47f 100644
--- a/client/src/App.jsx
+++ b/client/src/App.jsx
@@ -33,7 +33,7 @@ import FAQ from "./components/FAQ";
import { FileText, Menu, X, LogOut } from "lucide-react";
import DarkModeToggle from "./components/DarkModeToggle";
import { useLoading } from "./context/LoadingContext.jsx";
-
+import Stats from "./components/Stats.jsx";
// Dashboard Component - Main authenticated app
@@ -372,6 +372,7 @@ function App() {
element={
<>
+
>
diff --git a/client/src/components/Stats.jsx b/client/src/components/Stats.jsx
new file mode 100644
index 0000000..b5be2fa
--- /dev/null
+++ b/client/src/components/Stats.jsx
@@ -0,0 +1,122 @@
+import React, { useState, useEffect, useRef } from 'react';
+import '../styles/Stats.css';
+
+// Stats Section Component
+function HealthStats() {
+ const [isVisible, setIsVisible] = useState(false);
+ const statsRef = useRef(null);
+
+ useEffect(() => {
+ const observer = new IntersectionObserver(
+ ([entry]) => {
+ if (entry.isIntersecting) {
+ setIsVisible(true);
+ }
+ },
+ { threshold: 0.3 }
+ );
+
+ if (statsRef.current) {
+ observer.observe(statsRef.current);
+ }
+
+ return () => {
+ if (statsRef.current) {
+ observer.unobserve(statsRef.current);
+ }
+ };
+ }, []);
+
+ return (
+
+
+
+
Our Impact in Numbers
+
+ Trusted by thousands for accurate health insights
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+// Individual Stat Card with Animation
+function StatCard({ icon, end, suffix, label, isVisible, duration, delay }) {
+ const [count, setCount] = useState(0);
+
+ useEffect(() => {
+ if (!isVisible) return;
+
+ // Add initial delay
+ const delayTimeout = setTimeout(() => {
+ let startTime;
+ const startValue = 0;
+ const endValue = end;
+
+ const animate = (currentTime) => {
+ if (!startTime) startTime = currentTime;
+ const progress = Math.min((currentTime - startTime) / duration, 1);
+
+ // Easing function for smooth animation
+ const easeOutQuart = 1 - Math.pow(1 - progress, 4);
+ const currentCount = Math.floor(easeOutQuart * (endValue - startValue) + startValue);
+
+ setCount(currentCount);
+
+ if (progress < 1) {
+ requestAnimationFrame(animate);
+ }
+ };
+
+ requestAnimationFrame(animate);
+ }, delay);
+
+ return () => clearTimeout(delayTimeout);
+ }, [isVisible, end, duration, delay]);
+
+ return (
+
+
+ {icon}
+
+
+ {count.toLocaleString()}{suffix}
+
+
{label}
+
+ );
+}
+
+// Export the component
+export default HealthStats;
\ No newline at end of file
diff --git a/client/src/styles/Stats.css b/client/src/styles/Stats.css
new file mode 100644
index 0000000..cf819b6
--- /dev/null
+++ b/client/src/styles/Stats.css
@@ -0,0 +1,336 @@
+/* ===== HEALTH STATS SECTION ===== */
+
+.health-stats-section {
+ padding: 6rem 2rem;
+ background: linear-gradient(135deg,
+ rgba(102, 126, 234, 0.05) 0%,
+ rgba(118, 75, 162, 0.05) 100%);
+ position: relative;
+ overflow: hidden;
+}
+
+.health-stats-section::before {
+ content: '';
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: radial-gradient(circle at 30% 50%,
+ rgba(102, 126, 234, 0.08) 0%,
+ transparent 50%),
+ radial-gradient(circle at 70% 50%,
+ rgba(118, 75, 162, 0.08) 0%,
+ transparent 50%);
+ pointer-events: none;
+}
+
+.health-stats-container {
+ max-width: 1200px;
+ margin: 0 auto;
+ position: relative;
+ z-index: 1;
+}
+
+.health-stats-header {
+ text-align: center;
+ margin-bottom: 4rem;
+}
+
+.health-stats-title {
+ font-size: 2.5rem;
+ font-weight: 700;
+ color: #2d3748;
+ margin-bottom: 1rem;
+ position: relative;
+ display: inline-block;
+ padding-bottom: 1rem;
+}
+
+.health-stats-title::after {
+ content: '';
+ position: absolute;
+ bottom: 0;
+ left: 50%;
+ transform: translateX(-50%);
+ width: 100px;
+ height: 4px;
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+ border-radius: 2px;
+ animation: expandWidth 1s ease-out;
+}
+
+.health-stats-subtitle {
+ font-size: 1.15rem;
+ color: #e2e3e4;
+ max-width: 600px;
+ margin: 0 auto;
+ line-height: 1.8;
+}
+
+.health-stats-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
+ gap: 2.5rem;
+ margin-top: 3rem;
+}
+
+.health-stat-card {
+ background: white;
+ padding: 3rem 2rem;
+ border-radius: 20px;
+ text-align: center;
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
+ border: 1px solid rgba(226, 232, 240, 0.8);
+ transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
+ position: relative;
+ overflow: hidden;
+}
+
+.health-stat-card::before {
+ content: '';
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 5px;
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+ transform: scaleX(0);
+ transform-origin: left;
+ transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
+}
+
+.health-stat-card:hover {
+ transform: translateY(-12px) scale(1.02);
+ box-shadow: 0 20px 50px rgba(102, 126, 234, 0.25);
+ border-color: rgba(102, 126, 234, 0.3);
+}
+
+.health-stat-card:hover::before {
+ transform: scaleX(1);
+}
+
+.health-stat-icon-wrapper {
+ width: 90px;
+ height: 90px;
+ margin: 0 auto 2rem;
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
+ transition: all 0.4s ease;
+ position: relative;
+}
+
+.health-stat-icon-wrapper::before {
+ content: '';
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ border-radius: 50%;
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+ opacity: 0.3;
+ animation: pulse-ring 2.5s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
+}
+
+@keyframes pulse-ring {
+ 0% {
+ transform: scale(1);
+ opacity: 0.5;
+ }
+ 50% {
+ transform: scale(1.3);
+ opacity: 0;
+ }
+ 100% {
+ transform: scale(1);
+ opacity: 0;
+ }
+}
+
+@keyframes expandWidth {
+ from {
+ width: 0;
+ }
+ to {
+ width: 100px;
+ }
+}
+
+.health-stat-card:hover .health-stat-icon-wrapper {
+ transform: scale(1.15) rotateY(360deg);
+ box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
+}
+
+.health-stat-icon {
+ font-size: 2.5rem;
+ filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
+}
+
+.health-stat-number {
+ font-size: 3.5rem;
+ font-weight: 700;
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+ -webkit-background-clip: text;
+ -webkit-text-fill-color: transparent;
+ background-clip: text;
+ margin-bottom: 0.75rem;
+ line-height: 1;
+ letter-spacing: -1px;
+}
+
+.health-stat-label {
+ font-size: 1.1rem;
+ color: #718096;
+ font-weight: 600;
+ text-transform: uppercase;
+ letter-spacing: 1.5px;
+ line-height: 1.4;
+}
+
+/* Dark Mode Support */
+.dark-mode .health-stats-section {
+ background: linear-gradient(135deg,
+ rgba(15, 23, 42, 0.95) 0%,
+ rgba(17, 24, 39, 0.95) 100%);
+}
+
+.dark-mode .health-stats-section::before {
+ background: radial-gradient(circle at 30% 50%,
+ rgba(102, 126, 234, 0.12) 0%,
+ transparent 50%),
+ radial-gradient(circle at 70% 50%,
+ rgba(118, 75, 162, 0.12) 0%,
+ transparent 50%);
+}
+
+.dark-mode .health-stats-title {
+ color: #f1f5f9;
+}
+
+.dark-mode .health-stats-subtitle {
+ color: #cbd5e1;
+}
+
+.dark-mode .health-stat-card {
+ background: rgba(15, 23, 42, 0.8);
+ border-color: rgba(71, 85, 105, 0.5);
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
+ backdrop-filter: blur(10px);
+ -webkit-backdrop-filter: blur(10px);
+}
+
+.dark-mode .health-stat-card:hover {
+ background: rgba(15, 23, 42, 0.95);
+ border-color: rgba(102, 126, 234, 0.5);
+ box-shadow: 0 20px 50px rgba(102, 126, 234, 0.35);
+}
+
+.dark-mode .health-stat-icon-wrapper {
+ background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
+ box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
+}
+
+.dark-mode .health-stat-icon-wrapper::before {
+ background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
+}
+
+.dark-mode .health-stat-card:hover .health-stat-icon-wrapper {
+ box-shadow: 0 15px 40px rgba(139, 92, 246, 0.6);
+}
+
+.dark-mode .health-stat-number {
+ background: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%);
+ -webkit-background-clip: text;
+ -webkit-text-fill-color: transparent;
+ background-clip: text;
+}
+
+.dark-mode .health-stat-label {
+ color: #94a3b8;
+}
+
+/* Responsive Design */
+@media (max-width: 968px) {
+ .health-stats-section {
+ padding: 5rem 1.5rem;
+ }
+
+ .health-stats-header {
+ margin-bottom: 3rem;
+ }
+
+ .health-stats-title {
+ font-size: 2rem;
+ }
+
+ .health-stats-subtitle {
+ font-size: 1.05rem;
+ }
+
+ .health-stats-grid {
+ gap: 2rem;
+ grid-template-columns: 1fr;
+ }
+
+ .health-stat-card {
+ padding: 2.5rem 2rem;
+ }
+
+ .health-stat-icon-wrapper {
+ width: 80px;
+ height: 80px;
+ }
+
+ .health-stat-icon {
+ font-size: 2.2rem;
+ }
+
+ .health-stat-number {
+ font-size: 3rem;
+ }
+
+ .health-stat-label {
+ font-size: 1rem;
+ }
+}
+
+@media (max-width: 480px) {
+ .health-stats-section {
+ padding: 4rem 1rem;
+ }
+
+ .health-stats-title {
+ font-size: 1.75rem;
+ }
+
+ .health-stats-subtitle {
+ font-size: 1rem;
+ }
+
+ .health-stat-card {
+ padding: 2rem 1.5rem;
+ border-radius: 16px;
+ }
+
+ .health-stat-icon-wrapper {
+ width: 70px;
+ height: 70px;
+ margin-bottom: 1.5rem;
+ }
+
+ .health-stat-icon {
+ font-size: 2rem;
+ }
+
+ .health-stat-number {
+ font-size: 2.5rem;
+ }
+
+ .health-stat-label {
+ font-size: 0.95rem;
+ letter-spacing: 1px;
+ }
+}
\ No newline at end of file