/* ================================================
   SupplementScout — Clean & Clinical Design System
   ================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #0B6E4F;
  --primary-light: #E8F5F0;
  --primary-dark: #084D38;
  --accent: #1A8FE3;
  --accent-light: #E8F4FD;
  --text: #1A1A2E;
  --text-secondary: #555770;
  --bg: #FFFFFF;
  --bg-alt: #F7F8FA;
  --border: #E2E4EA;
  --border-light: #F0F1F4;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.10);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1140px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.3; color: var(--text); }
h1 { font-size: 2.25rem; letter-spacing: -0.02em; }
h2 { font-size: 1.75rem; letter-spacing: -0.01em; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1.25rem; }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* --- Header --- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.95);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo svg { width: 32px; height: 32px; }
.logo span.accent { color: var(--primary); }
.logo:hover { color: var(--text); }

.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: 0.3s; }

/* --- Hero --- */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg) 100%);
}
.hero h1 { font-size: 2.75rem; margin-bottom: 16px; max-width: 700px; margin-left: auto; margin-right: auto; }
.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero-badges {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.hero-badge svg { width: 16px; height: 16px; color: var(--primary); }

/* --- Section --- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { margin-bottom: 12px; }
.section-header p { color: var(--text-secondary); max-width: 520px; margin: 0 auto; }
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 8px;
}

/* --- Article Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-image {
  width: 100%;
  height: 200px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-light);
}
.card-image .placeholder-icon { color: var(--border); }
.card-body { padding: 24px; }
.card-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.card-body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--primary); }
.card-body p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; }
.card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.card-meta span { display: flex; align-items: center; gap: 4px; }

/* --- Category Cards --- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.category-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.25s;
}
.category-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.category-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.category-icon svg { width: 24px; height: 24px; color: var(--primary); }
.category-info h3 { font-size: 1rem; margin-bottom: 2px; }
.category-info p { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0; }

/* --- Article Page --- */
.article-header { padding: 48px 0 32px; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.article-header .container { max-width: 780px; }
.article-header h1 { font-size: 2.25rem; margin-bottom: 16px; }
.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.article-meta span { display: flex; align-items: center; gap: 6px; }

.article-content { max-width: 780px; margin: 0 auto; padding: 48px 24px; }
.article-content h2 { margin: 40px 0 16px; padding-top: 24px; border-top: 1px solid var(--border-light); }
.article-content h3 { margin: 32px 0 12px; }
.article-content p { font-size: 1.05rem; line-height: 1.8; }
.article-content ul, .article-content ol { margin: 0 0 1.5rem 1.5rem; }
.article-content li { margin-bottom: 8px; line-height: 1.7; }

/* --- Product Box (Affiliate) --- */
.product-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 32px 0;
  background: var(--bg);
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.product-box.top-pick { border-color: var(--primary); border-width: 2px; }
.product-box.top-pick::before {
  content: "Top Pick";
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
}
.product-box { position: relative; }
.product-image {
  width: 120px;
  height: 120px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-info { flex: 1; }
.product-info h4 { margin-bottom: 4px; }
.product-info .brand { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 8px; }
.product-info .highlights { list-style: none; margin: 0 0 16px; padding: 0; }
.product-info .highlights li {
  font-size: 0.9rem;
  padding: 3px 0;
  padding-left: 20px;
  position: relative;
  color: var(--text-secondary);
}
.product-info .highlights li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.btn-amazon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: #FF9900;
  color: #111;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-amazon:hover { background: #E8890A; color: #111; }

/* --- Affiliate Disclosure --- */
.disclosure {
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: var(--bg-alt);
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* --- Table of Contents --- */
.toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
}
.toc h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); margin-bottom: 12px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; font-size: 0.9rem; }
.toc a { color: var(--text-secondary); }
.toc a:hover { color: var(--primary); }

/* --- Comparison Table --- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 0.9rem;
}
.comparison-table th {
  background: var(--primary);
  color: white;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.comparison-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
}
.comparison-table tr:nth-child(even) { background: var(--bg-alt); }
.comparison-table tr:hover { background: var(--primary-light); }

/* --- Sidebar --- */
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 48px; max-width: 1100px; margin: 0 auto; padding: 48px 24px; }
.sidebar-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}
.sidebar-card h4 { font-size: 0.95rem; margin-bottom: 12px; }
.sidebar-list { list-style: none; padding: 0; }
.sidebar-list li { margin-bottom: 8px; }
.sidebar-list a { font-size: 0.88rem; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.sidebar-list a:hover { color: var(--primary); }

/* --- Newsletter --- */
.newsletter {
  background: var(--primary);
  color: white;
  padding: 48px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 64px 0;
}
.newsletter h2 { color: white; margin-bottom: 8px; font-size: 1.5rem; }
.newsletter p { color: rgba(255,255,255,0.85); margin-bottom: 24px; }
.newsletter-form { display: flex; gap: 12px; max-width: 440px; margin: 0 auto; }
.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 0.95rem;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-form button {
  padding: 12px 24px;
  background: white;
  color: var(--primary);
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.newsletter-form button:hover { background: var(--primary-light); }

/* --- Footer --- */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.65);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-about .logo { color: white; margin-bottom: 12px; }
.footer-about p { font-size: 0.88rem; line-height: 1.6; }
.footer-col h4 { color: white; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.6); font-size: 0.88rem; }
.footer-col a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}
.footer-bottom a { color: rgba(255,255,255,0.5); }

/* --- Responsive --- */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 48px 0 40px; }
  .card-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
    box-shadow: var(--shadow-md);
  }
  .product-box { flex-direction: column; }
  .product-image { width: 100%; height: 160px; }
  .newsletter { padding: 32px 20px; }
  .newsletter-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-badges { gap: 12px; }
}
