/* Intake Health Help Center — Style Sheet */

:root {
  --bg-primary: #0A1924;
  --bg-secondary: #0A1924;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f5f5;
  --accent: #1874D1;
  --accent-hover: #3d8fde;
  --accent-dim: rgba(24, 116, 209, 0.1);
  --text-primary: #333333;
  --text-secondary: #555555;
  --text-muted: #888888;
  --text-light: #ffffff;
  --border: #e0e0e0;
  --border-accent: rgba(24, 116, 209, 0.4);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 960px;
  --transition: 0.2s ease;
  --bg-light: #F5F5F5;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: #ffffff;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-weight: 400;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

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

h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
}

/* Header */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-light);
}

.header-logo img {
  height: 32px;
  width: auto;
}

.header-logo span {
  color: rgba(255,255,255,0.6);
  font-weight: 400;
  font-size: 0.9rem;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.2);
}

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

.header-nav a {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition);
}

.header-nav a:hover { color: #ffffff; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #0A1924 0%, #0d2233 50%, #0f2a40 100%);
  padding: 80px 24px 64px;
  text-align: center;
  border-bottom: none;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: #ffffff;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}

.hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1.125rem;
  max-width: 540px;
  margin: 0 auto 36px;
}

/* Search */
.search-wrapper {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.search-wrapper svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 20px;
  height: 20px;
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: 'Roboto', sans-serif;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: none;
  z-index: 50;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
  max-height: 400px;
  overflow-y: auto;
}

.search-results.active { display: block; }

.search-result-item {
  display: block;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-light); }

.search-result-item .result-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.search-result-item .result-snippet {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.search-result-item .result-snippet mark {
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 2px;
}

.search-no-results {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Category Cards */
.categories {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.categories h2 {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(24, 116, 209, 0.1);
}

.card-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.card .card-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card:hover .card-link { color: var(--accent-hover); }

/* LED Reference */
.led-section {
  background: var(--bg-primary);
  padding: 48px 24px 64px;
}

.led-section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.led-section h2 {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.led-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.led-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.led-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
  box-shadow: 0 0 8px currentColor;
}

.led-dot.green { background: #22c55e; color: #22c55e; }
.led-dot.yellow { background: #eab308; color: #eab308; }
.led-dot.red { background: #ef4444; color: #ef4444; }
.led-dot.blue { background: #3b82f6; color: #3b82f6; animation: pulse 2s infinite; }
.led-dot.white { background: #f0f0f0; color: #f0f0f0; animation: pulse 2s infinite; }
.led-dot.red-green {
  background: #ef4444;
  color: #ef4444;
  animation: red-green-flash 1.5s infinite;
}

@keyframes red-green-flash {
  0%, 100% { background: #ef4444; color: #ef4444; }
  50% { background: #22c55e; color: #22c55e; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.led-group-heading {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  margin-bottom: 12px;
  margin-top: 32px;
}

.led-group-heading:first-of-type {
  margin-top: 0;
}

.led-grid + .led-group-heading {
  margin-top: 32px;
}

a.led-item-link {
  text-decoration: none;
  transition: border-color var(--transition);
}

a.led-item-link:hover {
  border-color: var(--accent);
}

a.led-item-link:hover .led-info span {
  color: var(--accent);
}

.led-info strong {
  display: block;
  font-size: 0.875rem;
  color: #ffffff;
  margin-bottom: 2px;
}

.led-info span {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

/* Article Page */
.article-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent); }

.article-content h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.article-content .article-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-primary);
}

.article-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.article-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.article-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.article-content strong { color: var(--text-primary); }

.article-content ul, .article-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
  color: var(--text-secondary);
}

.article-content li { margin-bottom: 8px; line-height: 1.6; }

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.article-content th {
  text-align: left;
  padding: 12px 16px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.article-content td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.article-content tr:hover td { background: var(--bg-light); }

.article-content blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-dim);
  padding: 16px 20px;
  margin: 0 0 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-content blockquote p { margin-bottom: 0; color: var(--text-primary); }

.article-content code {
  background: var(--bg-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent);
}

.article-content pre {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.article-content pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
}

.article-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* Callout boxes */
.callout {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.callout-title {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--accent);
  margin-bottom: 8px;
}

/* Article navigation */
.article-nav {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.article-nav a {
  flex: 1;
  display: block;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  transition: border-color var(--transition);
}

.article-nav a:hover { border-color: var(--border-accent); }

.article-nav .nav-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.article-nav .nav-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.article-nav .next { text-align: right; }

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--bg-primary);
  border-top: none;
  padding: 40px 24px;
}

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

.footer-brand {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

.footer-brand strong { color: rgba(255,255,255,0.8); }

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 0.85rem;
}

.footer-links a { color: rgba(255,255,255,0.6); }
.footer-links a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 768px) {
  .hero { padding: 56px 20px 48px; }
  .hero h1 { font-size: 1.75rem; }
  .categories, .article-wrapper { padding-left: 20px; padding-right: 20px; }
  .led-section { padding-left: 20px; padding-right: 20px; }
  .card-grid { grid-template-columns: 1fr; }
  .led-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .article-nav { flex-direction: column; }
  .article-nav .next { text-align: left; }
  .header-inner { height: 56px; }
  .header-logo span { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
  .hero { padding: 40px 16px 36px; }
  .card { padding: 20px; }
  .led-grid { grid-template-columns: 1fr; }
}
