/* =============================================
   hospitalvaidik.in — Global Design System
   Medical Health Tools Website
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Nunito:wght@400;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: #d1fae5;
  --secondary: #0ea5e9;
  --secondary-dark: #0284c7;
  --secondary-light: #e0f2fe;
  --accent: #6366f1;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #22c55e;

  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-hover: 0 12px 40px rgba(16,185,129,0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 70px;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --bg-card: #1e293b;
  --border: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-hover: 0 12px 40px rgba(16,185,129,0.2);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* ---- Typography ---- */
h1,h2,h3,h4,h5,h6 { font-family: 'Nunito', sans-serif; font-weight: 700; line-height: 1.3; color: var(--text); }
h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
p { color: var(--text-muted); margin-bottom: 1rem; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo .logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}
.site-logo .logo-text { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1.15rem; color: var(--text); }
.site-logo .logo-text span { color: var(--primary); }

.header-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.6rem;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}
.header-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16,185,129,0.15); }
.header-search .search-icon {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 0.9rem;
}
#search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  display: none;
  z-index: 9999;
}
#search-results.show { display: block; }
.search-result-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--primary-light); color: var(--primary-dark); }
.search-result-item .sri-badge {
  font-size: 0.7rem; background: var(--primary-light); color: var(--primary-dark);
  padding: 2px 8px; border-radius: 50px; white-space: nowrap;
}

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.btn-dark-mode {
  width: 38px; height: 38px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.btn-dark-mode:hover { border-color: var(--primary); color: var(--primary); }

.nav-toggle {
  display: none;
  width: 38px; height: 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--text-muted);
  cursor: pointer;
  align-items: center; justify-content: center;
  font-size: 1.1rem;
}

.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.main-nav a {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition);
}
.main-nav a:hover, .main-nav a.active { background: var(--primary-light); color: var(--primary-dark); }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, #ecfdf5 0%, #e0f2fe 50%, #f0f9ff 100%);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #064e3b 0%, #0c4a6e 50%, #0f172a 100%);
}
.hero::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(16,185,129,0.12) 0%, transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--primary-light); color: var(--primary-dark);
  padding: 0.35rem 1rem; border-radius: 50px;
  font-size: 0.8rem; font-weight: 600;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(16,185,129,0.3);
}
.hero h1 { margin-bottom: 1rem; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1.1rem; max-width: 600px; margin: 0 auto 2rem; }
.hero-stats {
  display: flex; justify-content: center; gap: 2rem;
  flex-wrap: wrap; margin-top: 3rem;
}
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2rem; font-weight: 800; color: var(--primary); font-family: 'Nunito', sans-serif; }
.hero-stat .label { font-size: 0.8rem; color: var(--text-muted); }

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 0.7rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  border: none; cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(16,185,129,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,185,129,0.4); color: #fff; }

.btn-outline {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.65rem 1.6rem;
  border-radius: 50px;
  font-weight: 600;
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-size: 0.95rem;
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-sm { padding: 0.45rem 1rem; font-size: 0.82rem; }
.btn-calc {
  width: 100%; padding: 0.85rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; border: none; border-radius: var(--radius-md);
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(16,185,129,0.25);
  font-family: 'Nunito', sans-serif;
}
.btn-calc:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,185,129,0.4); }

/* ---- Cards ---- */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
  display: flex; flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transition: var(--transition);
  transform-origin: left;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary); color: var(--text); }
.tool-card:hover::before { transform: scaleX(1); }
.tool-card:hover .tool-card-title { color: var(--primary); }

.tool-card-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
}
.tool-card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; }
.tool-card-desc { font-size: 0.85rem; color: var(--text-muted); flex: 1; margin-bottom: 1rem; }
.tool-card-cta {
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: var(--primary); font-size: 0.85rem; font-weight: 600;
}

/* ---- Category Cards ---- */
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
  display: block;
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); color: var(--text); }
.category-card .cat-icon {
  width: 72px; height: 72px;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.25rem;
}
.cat-fitness .cat-icon { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.cat-pregnancy .cat-icon { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.cat-nutrition .cat-icon { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.cat-health .cat-icon { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.category-card h3 { margin-bottom: 0.4rem; }
.category-card p { font-size: 0.9rem; margin: 0; }
.cat-count {
  display: inline-block;
  background: var(--primary-light); color: var(--primary-dark);
  padding: 2px 10px; border-radius: 50px;
  font-size: 0.75rem; font-weight: 600;
  margin-top: 0.75rem;
}

/* ---- Section ---- */
.section { padding: 4rem 1.5rem; }
.section-alt { background: var(--bg-alt); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--primary-light); color: var(--primary-dark);
  padding: 0.3rem 0.9rem; border-radius: 50px;
  font-size: 0.78rem; font-weight: 600;
  margin-bottom: 0.75rem;
}
.section-header h2 { margin-bottom: 0.5rem; }
.section-header p { max-width: 560px; margin: 0 auto; }

.container { max-width: 1280px; margin: 0 auto; }
.container-sm { max-width: 900px; margin: 0 auto; }

/* ---- Grid ---- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* ---- Breadcrumb ---- */
.breadcrumb-wrap {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1.5rem;
}
.breadcrumb {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; color: var(--text-muted);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb .sep { color: var(--text-light); }

/* ---- Footer ---- */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3.5rem 1.5rem 1.5rem;
  margin-top: auto;
}
[data-theme="dark"] .site-footer { background: #020617; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  max-width: 1280px; margin: 0 auto;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #1e293b;
}
.footer-brand .site-logo .logo-text { color: #f1f5f9; }
.footer-brand p { font-size: 0.85rem; margin-top: 0.75rem; max-width: 280px; }
.footer-col h4 { color: #f1f5f9; font-size: 0.9rem; font-weight: 700; margin-bottom: 1rem; font-family: 'Nunito', sans-serif; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { color: #94a3b8; font-size: 0.85rem; transition: var(--transition); }
.footer-col ul li a:hover { color: var(--primary); padding-left: 4px; }
.footer-bottom {
  max-width: 1280px; margin: 0 auto;
  padding-top: 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem;
  font-size: 0.8rem;
}
.footer-bottom a { color: #94a3b8; }
.footer-bottom a:hover { color: var(--primary); }

/* ---- Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}
.animate-fade-up { animation: fadeUp 0.5s ease forwards; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }

/* ---- Feature Strip ---- */
.feature-strip {
  display: flex; justify-content: center; align-items: center;
  gap: 2rem; flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.feature-item {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; color: var(--text-muted); font-weight: 500;
}
.feature-item .fi-icon { color: var(--primary); font-size: 1rem; }

/* ---- Responsive ---- */
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-search { max-width: 260px; }
}
@media (max-width: 768px) {
  .header-search { display: none; }
  .hero { padding: 3.5rem 1rem 2.5rem; }
  .hero-stats { gap: 1rem; }
  .section { padding: 2.5rem 1rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- Mobile Nav Overlay ---- */
.mobile-nav {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  display: none;
}
.mobile-nav.open { display: block; }
.mobile-nav-panel {
  position: absolute;
  top: 0; right: 0;
  width: min(300px, 85vw);
  height: 100%;
  background: var(--bg-card);
  padding: 1.5rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-lg);
}
.mobile-nav.open .mobile-nav-panel { transform: translateX(0); }
.mobile-nav-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; font-size: 1.4rem;
  cursor: pointer; color: var(--text-muted);
}
.mobile-nav-links { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-nav-links a {
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
}
.mobile-nav-links a:hover { background: var(--primary-light); color: var(--primary-dark); }
.mobile-search { margin-top: 1rem; position: relative; }
.mobile-search input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.4rem;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}

/* ---- Utility ---- */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.bg-gradient { background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.rounded-xl { border-radius: var(--radius-xl); }
.shadow-md { box-shadow: var(--shadow-md); }
.gap-1 { gap: 1rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.mt-auto { margin-top: auto; }
