/* ============================================================
   PepStackr Peptide Pages — Shared Styles
   Matches pepstackr.com design language
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: #38bdf8; text-decoration: none; transition: color 0.2s; }
a:hover { color: #7dd3fc; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Nav */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: #f8fafc; letter-spacing: -0.02em; }
.logo-mark { width: 32px; height: 32px; background: linear-gradient(135deg, #22d3ee, #6366f1, #a855f7); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: #94a3b8; font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: #f1f5f9; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px; border-radius: 10px; font-weight: 600; font-size: 15px;
  border: none; cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-primary { background: linear-gradient(135deg, #0ea5e9, #6366f1); color: #fff; box-shadow: 0 4px 24px rgba(14, 165, 233, 0.25); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 32px rgba(14, 165, 233, 0.35); }
.btn-ghost { background: rgba(148, 163, 184, 0.08); color: #e2e8f0; border: 1px solid rgba(148, 163, 184, 0.15); }
.btn-ghost:hover { background: rgba(148, 163, 184, 0.15); color: #f8fafc; }

.nav-cta { display: none; }
@media (min-width: 640px) { .nav-cta { display: inline-flex; } }
a.nav-login { color: #e2e8f0; font-weight: 600; }
a.nav-login:hover { color: #fff; }
.mobile-nav { display: flex; align-items: center; gap: 12px; }
@media (min-width: 640px) { .mobile-nav { display: none; } }

/* Breadcrumb */
.breadcrumb { padding: 88px 0 0; font-size: 13px; color: #64748b; }
.breadcrumb a { color: #64748b; }
.breadcrumb a:hover { color: #94a3b8; }
.breadcrumb span { margin: 0 8px; }

/* Page Header */
.page-header { padding: 24px 0 32px; }
.page-header h1 { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; color: #f8fafc; line-height: 1.2; margin-bottom: 12px; }
.page-header .subtitle { font-size: 16px; color: #94a3b8; line-height: 1.7; max-width: 800px; }
@media (max-width: 640px) { .page-header h1 { font-size: 28px; } .page-header .subtitle { font-size: 15px; } }

.category-badge {
  display: inline-block; padding: 4px 12px; border-radius: 6px; font-size: 12px;
  font-weight: 600; border: 1px solid; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em;
}

/* Quick Facts Card */
.facts-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(30, 41, 59, 0.4));
  border: 1px solid rgba(148, 163, 184, 0.1); border-radius: 16px; padding: 24px; margin-bottom: 32px;
}
.fact-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid rgba(148, 163, 184, 0.06); gap: 16px; }
.fact-row:last-child { border-bottom: none; }
.fact-label { font-size: 13px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; flex-shrink: 0; min-width: 140px; }
.fact-value { font-size: 14px; color: #e2e8f0; text-align: right; }
@media (max-width: 640px) {
  .fact-row { flex-direction: column; gap: 4px; }
  .fact-value { text-align: left; }
}

/* Protocol Table */
.protocol-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.protocol-table th { text-align: left; font-weight: 600; color: #64748b; padding: 10px 12px; border-bottom: 1px solid rgba(148, 163, 184, 0.1); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.protocol-table td { padding: 12px; border-bottom: 1px solid rgba(148, 163, 184, 0.05); color: #e2e8f0; vertical-align: top; }
.protocol-table tr:hover td { background: rgba(14, 165, 233, 0.04); }
@media (max-width: 768px) { .protocol-table { font-size: 13px; } .protocol-table th, .protocol-table td { padding: 8px; } }

/* Embedded Calculator */
.embedded-calc {
  background: rgba(15, 23, 42, 0.5); border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 12px; padding: 24px; text-align: center;
}
.embedded-calc h3 { font-size: 16px; font-weight: 600; color: #f1f5f9; margin-bottom: 4px; }

/* Content Sections */
.content-section { padding: 32px 0; }
.content-section h2 { font-size: 24px; font-weight: 700; color: #f8fafc; margin-bottom: 16px; letter-spacing: -0.02em; }
.content-section h3 { font-size: 18px; font-weight: 600; color: #f1f5f9; margin: 24px 0 8px; }
.content-section p { color: #94a3b8; margin-bottom: 16px; line-height: 1.7; }

.divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.1), transparent); }

/* CTA Card */
.cta-card {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(99, 102, 241, 0.12));
  border: 1px solid rgba(14, 165, 233, 0.2); border-radius: 16px; padding: 32px; text-align: center; margin: 32px 0;
}
.cta-card h2 { font-size: 22px; font-weight: 700; color: #f8fafc; margin-bottom: 8px; }
.cta-card p { color: #94a3b8; margin-bottom: 20px; font-size: 15px; }

/* FAQ */
.faq-list { margin-top: 16px; }
.faq-item { border-bottom: 1px solid rgba(148, 163, 184, 0.08); padding: 16px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-size: 15px; font-weight: 600; color: #f1f5f9; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-q::after { content: "+"; font-size: 20px; color: #64748b; flex-shrink: 0; transition: transform 0.2s; }
.faq-item.open .faq-q::after { content: "\2212"; }
.faq-a { display: none; padding-top: 10px; color: #94a3b8; line-height: 1.7; font-size: 14px; }
.faq-item.open .faq-a { display: block; }

/* References */
.references-list { list-style: none; padding: 0; }
.references-list li { padding: 8px 0; border-bottom: 1px solid rgba(148, 163, 184, 0.05); font-size: 14px; }
.references-list li:last-child { border-bottom: none; }

/* Related Peptides */
.related-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.related-card {
  background: rgba(30, 41, 59, 0.5); border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 12px; padding: 16px; transition: all 0.2s; display: block;
}
.related-card:hover { border-color: rgba(14, 165, 233, 0.3); background: rgba(30, 41, 59, 0.7); }
.related-card h4 { font-size: 15px; font-weight: 600; color: #f1f5f9; margin-bottom: 4px; }
.related-card p { font-size: 13px; color: #64748b; margin: 0; }

/* Footer */
footer { padding: 48px 0; border-top: 1px solid rgba(148, 163, 184, 0.06); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-copy { font-size: 13px; color: #475569; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: #64748b; }
.footer-links a:hover { color: #94a3b8; }

/* ============================================================
   Index Page — Search, Filters, Grid
   ============================================================ */
.search-bar { margin-bottom: 16px; }
.search-bar input {
  width: 100%; max-width: 400px;
  background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 10px; padding: 12px 16px; font-size: 16px; color: #f8fafc;
  font-family: inherit; transition: border-color 0.2s;
}
.search-bar input:focus { outline: none; border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15); }
.search-bar input::placeholder { color: #475569; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter-btn {
  padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500;
  border: 1px solid rgba(148, 163, 184, 0.12); background: rgba(15, 23, 42, 0.4);
  color: #94a3b8; cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.filter-btn:hover { border-color: rgba(148, 163, 184, 0.3); color: #e2e8f0; }
.filter-btn.active { background: rgba(14, 165, 233, 0.12); border-color: rgba(14, 165, 233, 0.3); color: #38bdf8; }

.peptide-count { font-size: 13px; color: #64748b; margin-bottom: 16px; }

.peptide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
@media (max-width: 640px) { .peptide-grid { grid-template-columns: 1fr; } }

.peptide-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(30, 41, 59, 0.4));
  border: 1px solid rgba(148, 163, 184, 0.08); border-radius: 12px; padding: 20px;
  transition: all 0.2s; display: block; color: #e2e8f0;
}
.peptide-card:hover { border-color: rgba(14, 165, 233, 0.25); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); color: #e2e8f0; }
.peptide-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.peptide-card-header h3 { font-size: 17px; font-weight: 700; color: #f8fafc; margin: 0; }
.peptide-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px;
  font-weight: 600; border: 1px solid; white-space: nowrap; flex-shrink: 0;
}
.peptide-card-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: #64748b; margin-bottom: 8px; }
.peptide-card-meta span { white-space: nowrap; }
.peptide-card-desc { font-size: 13px; color: #94a3b8; margin: 0; line-height: 1.5; }
