/*
 * Shared stylesheet for DentaTrak marketing/content pages (Phase 1 SEO/GEO pages).
 * Mirrors the visual design already used inline on dental-case-tracking.php,
 * how-to-track-dental-cases.php, and dental-case-tracking-vs-spreadsheets.php,
 * plus adds shared components (tables, FAQ, breadcrumbs, byline) needed by
 * the new cornerstone/workflow/comparison/hub pages.
 */

:root {
  --primary-color: #1e40af;
  --primary-light: #2563eb;
  --primary-dark: #1e3a8a;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-light: #64748b;
  --background-white: #ffffff;
  --background-subtle: #f8fafc;
  --background-muted: #f1f5f9;
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --shadow-small: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

body {
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  background: var(--background-white);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  padding: 0 24px;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--primary-color); }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

.nav-login {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-login:hover { color: var(--primary-color); }

@media (max-width: 540px) {
  .nav-login { display: none; }
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--primary-color);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background 0.2s;
}

.nav-cta:hover { background: var(--primary-light); }

/* Breadcrumbs */
.breadcrumb-bar {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 24px 0;
}

.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-light);
}

.breadcrumb li { display: flex; align-items: center; gap: 6px; }

.breadcrumb a {
  color: var(--text-light);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--primary-color); }

.breadcrumb li[aria-current="page"] {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Content */
.content {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}

.content.no-breadcrumb { padding-top: 120px; }

.content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 48px;
  margin-bottom: 16px;
}

.content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 28px;
  margin-bottom: 12px;
}

.content p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.content ul, .content ol:not(.workflow-steps) {
  margin: 20px 0 20px 24px;
}

.content li {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

/* Byline / dates */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.article-meta strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.article-meta .meta-divider { color: var(--border-medium); }

/* Definition / answer box, used for direct answers near the top of a page */
.answer-box {
  background: var(--background-subtle);
  border-left: 4px solid var(--primary-color);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 24px 28px;
  margin: 0 0 28px;
}

.answer-box p {
  margin-bottom: 0;
  color: var(--text-primary);
  font-size: 1.05rem;
}

.highlight-box {
  background: var(--background-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 32px 0;
}

.highlight-box h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 12px;
}

.highlight-box p { margin-bottom: 0; }

/* Comparison tables */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.comparison-table caption {
  text-align: left;
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 12px 20px 0;
}

.comparison-table th,
.comparison-table td {
  text-align: left;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: top;
}

.comparison-table thead th {
  background: var(--background-subtle);
  color: var(--text-primary);
  font-weight: 600;
}

.comparison-table tbody tr:last-child td { border-bottom: none; }

.comparison-table td:first-child,
.comparison-table th:first-child {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

/* Workflow steps (numbered) */
.workflow-steps {
  list-style: none;
  margin: 24px 0;
  padding: 0;
  counter-reset: step;
}

.workflow-steps li {
  position: relative;
  padding-left: 48px;
  margin-bottom: 24px;
  counter-increment: step;
}

.workflow-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.workflow-steps strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 4px;
}

/* Checklist */
.checklist {
  list-style: none;
  margin: 20px 0;
  padding: 0;
}

.checklist li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 14px;
  color: var(--text-secondary);
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--primary-color);
}

/* FAQ */
.faq-item {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
}

.faq-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.faq-item h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.faq-item p { margin-bottom: 0; }

/* Related links */
.related-links {
  margin: 32px 0;
  padding: 24px 28px;
  background: var(--background-subtle);
  border-radius: var(--radius-lg);
}

.related-links h3 {
  margin-top: 0;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.related-links ul { margin: 0; list-style: none; }

.related-links li { margin-bottom: 8px; }

.related-links a {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.content-link {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

/* CTA */
.cta-section {
  background: var(--primary-color);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  margin-top: 48px;
}

.cta-section h2 {
  color: white;
  margin-top: 0;
  margin-bottom: 16px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 24px;
}

.btn-white {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  background: white;
  color: var(--primary-color);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-white:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

/* Resources hub */
.resource-group { margin-bottom: 48px; }

.resource-group h2 { margin-top: 0; }

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.resource-card {
  display: block;
  padding: 24px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
}

.resource-card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.resource-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 1.05rem;
}

.resource-card p {
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Footer */
.footer {
  padding: 48px 24px;
  background: var(--background-subtle);
  border-top: 1px solid var(--border-light);
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-link:hover { color: var(--primary-color); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-light);
}

@media (max-width: 768px) {
  .content h1 { font-size: 1.75rem; }
  .content h2 { font-size: 1.25rem; }
  .footer-inner { flex-direction: column; text-align: center; }
}
