@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Lora:wght@400;500;600;700&display=swap');

:root {
  --primary: #4A7BA7;
  --primary-light: rgba(74, 123, 167, 0.1);
  --primary-medium: rgba(74, 123, 167, 0.2);
  --green-600: #16a34a;
  --green-100: #dcfce7;
  --green-50: #f0fdf4;
  --green-800: #166534;
  --amber-100: #fef3c7;
  --amber-400: #fbbf24;
  --amber-600: #d97706;
  --blue-100: #dbeafe;
  --blue-600: #2563eb;
  --purple-100: #f3e8ff;
  --purple-600: #9333ea;
  --rose-100: #ffe4e6;
  --rose-600: #e11d48;
  --red-600: #dc2626;
  --foreground: #0f172a;
  --muted: #64748b;
  --muted-light: #f1f5f9;
  --border: #e2e8f0;
  --background: #ffffff;
  --card-bg: #ffffff;
  --radius: 0.75rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--foreground);
  background: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-family: 'Lora', Georgia, serif; font-weight: 700; line-height: 1.2; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

.container { max-w: 1200px; margin: 0 auto; padding: 0 1rem; max-width: 1200px; }
.container-sm { max-width: 900px; margin: 0 auto; padding: 0 1rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 1.5rem; border-radius: var(--radius);
  font-weight: 600; font-size: 0.875rem; cursor: pointer;
  border: none; transition: all 0.2s; text-decoration: none;
  font-family: 'DM Sans', sans-serif;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #3d6a94; }
.btn-green { background: var(--green-600); color: white; }
.btn-green:hover { background: #15803d; }
.btn-outline { background: transparent; color: var(--foreground); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--muted-light); }
.btn-lg { padding: 0.875rem 2rem; font-size: 1.125rem; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-ghost { background: transparent; color: var(--muted); border: none; }
.btn-ghost:hover { color: var(--foreground); background: var(--muted-light); }

.card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.card-content { padding: 1.5rem; }

.badge {
  display: inline-flex; align-items: center; padding: 0.25rem 0.75rem;
  border-radius: 9999px; font-size: 0.75rem; font-weight: 600;
  border: 1px solid var(--border); background: var(--muted-light);
}

.input {
  width: 100%; padding: 0.625rem 0.75rem; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.875rem; font-family: inherit;
  outline: none; transition: border-color 0.2s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

.textarea {
  width: 100%; padding: 0.625rem 0.75rem; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.875rem; font-family: inherit;
  outline: none; resize: vertical; transition: border-color 0.2s;
}
.textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-serif { font-family: 'Lora', Georgia, serif; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.flex-1 { flex: 1; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }

.hidden { display: none; }
.relative { position: relative; }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }

.overflow-hidden { overflow: hidden; }
.object-cover { object-fit: cover; }

.leading-relaxed { line-height: 1.75; }
.italic { font-style: italic; }

.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }

.bg-muted-light { background: var(--muted-light); }
.bg-primary-light { background: var(--primary-light); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Header */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem 0;
}
.site-header .logo img { height: 48px; width: auto; }
.site-header nav { display: flex; align-items: center; gap: 1rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0; background: #f8fafc;
}
.site-footer .footer-inner {
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
}
.site-footer .footer-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.5rem 1.5rem; font-size: 0.875rem;
}
.site-footer .footer-links a { color: var(--muted); transition: color 0.2s; }
.site-footer .footer-links a:hover { color: var(--foreground); text-decoration: none; }
.site-footer .copyright { font-size: 0.875rem; color: var(--muted); }
.hipaa-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--green-100); padding: 0.375rem 0.75rem;
  border-radius: 0.5rem; font-size: 0.75rem; font-weight: 600;
  color: var(--green-800);
}

/* Icon SVGs inline helper */
.icon { width: 1.25rem; height: 1.25rem; display: inline-block; vertical-align: middle; }
.icon-lg { width: 1.75rem; height: 1.75rem; }
.icon-xl { width: 3rem; height: 3rem; }

/* Feature cards */
.feature-icon {
  width: 3.5rem; height: 3.5rem; border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}

/* Toast notifications */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  padding: 1rem 1.5rem; border-radius: var(--radius);
  color: white; font-weight: 500; font-size: 0.875rem;
  z-index: 9999; transform: translateY(120%);
  transition: transform 0.3s ease;
}
.toast.show { transform: translateY(0); }
.toast-success { background: var(--green-600); }
.toast-error { background: var(--red-600); }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--muted-light) 25%, #e8ecf1 50%, var(--muted-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Blog content */
.blog-content h2 { font-size: 1.5rem; margin: 2rem 0 1rem; }
.blog-content h3 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; }
.blog-content p { margin-bottom: 1rem; color: var(--muted); line-height: 1.75; }
.blog-content ul, .blog-content ol { margin-bottom: 1rem; padding-left: 1.5rem; color: var(--muted); }
.blog-content li { margin-bottom: 0.5rem; line-height: 1.75; }
.blog-content strong { color: var(--foreground); font-weight: 600; }
.blog-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem; margin: 1.5rem 0;
  background: var(--primary-light); border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}
.blog-content a { color: var(--primary); text-decoration: underline; }
.blog-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.blog-content th, .blog-content td { padding: 0.75rem; border: 1px solid var(--border); text-align: left; }
.blog-content th { background: var(--muted-light); font-weight: 600; }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 2rem; }
.tab-btn {
  padding: 0.75rem 1.5rem; border: none; background: none; cursor: pointer;
  font-weight: 600; font-size: 0.875rem; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  font-family: 'DM Sans', sans-serif; transition: all 0.2s;
}
.tab-btn:hover { color: var(--foreground); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Search */
.search-box {
  position: relative; margin-bottom: 2rem;
}
.search-box input {
  width: 100%; padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.9375rem; font-family: inherit; outline: none;
}
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.search-box .search-icon {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  color: var(--muted); width: 1.25rem; height: 1.25rem;
}

/* Responsive */
@media (min-width: 640px) {
  .sm-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .md-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md-flex-row { flex-direction: row; }
  .md-text-left { text-align: left; }
  .md-hidden { display: none; }
  .md-block { display: block; }
  .site-footer .footer-inner { flex-direction: row; justify-content: space-between; }
}
@media (min-width: 1024px) {
  .lg-flex-row { flex-direction: row; }
  .lg-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg-text-left { text-align: left; }
  .lg-block { display: block; }
}

/* Warning/notice boxes */
.notice {
  padding: 1rem; border-radius: 0.5rem; font-size: 0.875rem;
}
.notice-amber { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.notice-green { background: var(--green-50); border: 1px solid #bbf7d0; color: var(--green-800); }

/* Star rating */
.stars { display: flex; gap: 0.125rem; }
.star { width: 1rem; height: 1rem; color: var(--amber-400); fill: var(--amber-400); }

/* Accordion */
.accordion-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.5rem; }
.accordion-header {
  width: 100%; padding: 1rem 1.25rem; display: flex; justify-content: space-between;
  align-items: center; border: none; background: none; cursor: pointer;
  font-weight: 600; font-family: 'DM Sans', sans-serif; text-align: left;
}
.accordion-header:hover { background: var(--muted-light); }
.accordion-body { padding: 0 1.25rem 1rem; display: none; }
.accordion-item.open .accordion-body { display: block; }
.accordion-chevron { transition: transform 0.2s; width: 1.25rem; height: 1.25rem; }
.accordion-item.open .accordion-chevron { transform: rotate(180deg); }

/* Print styles */
@media print {
  .site-header, .site-footer, .btn { display: none; }
  body { color: #000; }
}
