/* ============================================================
   era-article-premium.css — EraGenAI Premium Article Styles
   Load once globally; replaces all inline <style> blocks.
   ============================================================ */

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ─── ARTICLE WRAPPER ─── */
.era-premium-article {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1e293b;
  line-height: 1.85;
  max-width: 860px;
  margin: 0 auto;
}

/* ─── READING META BAR ─── */
.era-reading-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 14px 0 20px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 32px;
  font-size: 0.85rem;
  color: #64748b;
}
.era-reading-meta .era-tag {
  background: #e0e7ff;
  color: #3730a3;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 50px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.era-reading-meta .era-sep { color: #cbd5e1; }
.era-reading-meta .era-updated { color: #94a3b8; font-size: 0.82rem; }

/* ─── EXECUTIVE SUMMARY (TL;DR) ─── */
.era-tldr {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-left: 6px solid #0284c7;
  border-radius: 16px;
  padding: 28px 32px;
  margin: 0 0 40px;
}
.era-tldr h3 {
  color: #0c4a6e !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 0 0 14px !important;
  border: none !important;
  padding: 0 !important;
}
.era-tldr ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.era-tldr ul li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: #0c4a6e;
  font-size: 0.97rem;
  line-height: 1.7;
  font-weight: 500;
}
.era-tldr ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #0284c7;
  font-weight: 900;
}

/* ─── KEY METRICS STRIP ─── */
.era-metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 0 0 44px;
}
.era-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: 4px solid #4f46e5;
  border-radius: 14px;
  padding: 20px 18px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(15,23,42,0.04);
}
.era-metric-card .era-metric-value {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: #4f46e5;
  line-height: 1.1;
  margin-bottom: 6px;
}
.era-metric-card .era-metric-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}
.era-metric-card .era-metric-sub {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ─── SECTION HEADINGS ─── */
.era-premium-article h2 {
  font-size: 1.6rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  margin: 52px 0 20px !important;
  padding-bottom: 14px !important;
  border-bottom: 2px solid #e2e8f0 !important;
  line-height: 1.35 !important;
}
.era-premium-article h2:first-of-type { margin-top: 0 !important; }
.era-premium-article h3 {
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  margin: 36px 0 14px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  border: none !important;
  padding: 0 !important;
}

/* ─── BODY TEXT ─── */
.era-premium-article p {
  font-size: 1.05rem;
  color: #334155;
  line-height: 1.9;
  margin-bottom: 22px;
}

/* ─── DATA TABLES ─── */
.era-data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 0.94rem;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15,23,42,0.06);
}
.era-data-table thead tr {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
}
.era-data-table thead th {
  color: #ffffff !important;
  padding: 16px 20px;
  text-align: left;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.4px;
}
.era-data-table tbody td {
  padding: 15px 20px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  line-height: 1.7;
}
.era-data-table tbody tr:nth-child(even) td { background: #f8fafc; }
.era-data-table tbody tr:hover td { background: #f0f4ff; }

/* ─── PULL QUOTE ─── */
.era-pull-quote {
  border-left: 5px solid #4f46e5;
  padding: 20px 28px;
  margin: 36px 0;
  background: linear-gradient(135deg, #f8f9ff 0%, #eef2ff 100%);
  border-radius: 0 14px 14px 0;
}
.era-pull-quote p {
  font-size: 1.15rem !important;
  font-style: italic;
  color: #1e1b4b !important;
  font-weight: 600 !important;
  margin: 0 0 8px !important;
  line-height: 1.65 !important;
}
.era-pull-quote cite {
  font-size: 0.82rem;
  color: #6366f1;
  font-style: normal;
  font-weight: 700;
}

/* ─── CALLOUT BOXES ─── */
.era-callout {
  border-radius: 14px;
  padding: 24px 28px;
  margin: 32px 0;
}
.era-callout.era-callout-info {
  background: #eff6ff;
  border-left: 5px solid #3b82f6;
}
.era-callout.era-callout-warning {
  background: #fffbe0;
  border-left: 5px solid #f59e0b;
}
.era-callout.era-callout-success {
  background: #f0fdf4;
  border-left: 5px solid #22c55e;
}
.era-callout.era-callout-danger {
  background: #fef2f2;
  border-left: 5px solid #ef4444;
}
.era-callout h4 {
  margin: 0 0 10px !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.era-callout p { margin: 0 !important; font-size: 0.95rem !important; }

/* ─── CODE BLOCK ─── */
.era-code-block {
  background: #0b0f19;
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 24px 26px;
  margin: 32px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  overflow-x: auto;
}
.era-code-block .era-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid #1e293b;
}
.era-code-block .era-code-title {
  color: #38bdf8;
  font-weight: 800;
  font-size: 0.88rem;
}
.era-code-block .era-code-lang {
  background: #1e293b;
  color: #64748b;
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.era-code-block pre {
  margin: 0;
  font-family: 'Fira Code', Monaco, Consolas, monospace;
  font-size: 0.87rem;
  color: #e2e8f0;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ─── KEY TAKEAWAYS ─── */
.era-takeaways {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  border-radius: 18px;
  padding: 32px 36px;
  margin: 52px 0 40px;
}
.era-takeaways h3 {
  color: #e0e7ff !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin: 0 0 18px !important;
}
.era-takeaways ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: takeaway-counter;
}
.era-takeaways ol li {
  counter-increment: takeaway-counter;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
  color: #c7d2fe;
  font-size: 0.97rem;
  line-height: 1.7;
}
.era-takeaways ol li::before {
  content: counter(takeaway-counter);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: rgba(99,102,241,0.3);
  border: 1px solid #6366f1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 900;
  color: #a5b4fc;
  margin-top: 2px;
}

/* ─── AUTHOR / EXPERT BLOCK ─── */
.era-author-block {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px 28px;
  margin: 40px 0;
}
.era-author-avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #e0e7ff;
}
.era-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.era-author-avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.era-author-info .era-author-name {
  font-weight: 800;
  font-size: 1rem;
  color: #0f172a;
  margin-bottom: 3px;
}
.era-author-info .era-author-role {
  font-size: 0.82rem;
  color: #4f46e5;
  font-weight: 700;
  margin-bottom: 8px;
}
.era-author-info .era-author-bio {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.65;
  margin: 0;
}

/* ─── TOPIC CLUSTER NAVIGATION ─── */
.era-topic-nav {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px;
  margin-top: 48px;
}
.era-topic-nav h4 {
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8 !important;
  margin: 0 0 18px !important;
}
.era-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.era-topic-link {
  display: block;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none !important;
  transition: all 0.2s ease;
}
.era-topic-link:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79,70,229,0.1);
}
.era-topic-link .era-topic-cat {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}
.era-topic-link .era-topic-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
}

/* ─── CTA BLOCK ─── */
.era-cta-premium {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  margin: 48px 0;
  box-shadow: 0 16px 40px rgba(15,23,42,0.2);
}
.era-cta-premium .era-cta-eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #818cf8;
  margin-bottom: 10px;
}
.era-cta-premium h3 {
  font-size: 1.5rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin: 0 0 14px !important;
  line-height: 1.3 !important;
  border: none !important;
}
.era-cta-premium p {
  color: #c7d2fe !important;
  font-size: 0.97rem !important;
  max-width: 600px;
  margin: 0 auto 26px !important;
  line-height: 1.7 !important;
}
.era-cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 1rem;
  padding: 14px 38px;
  border-radius: 50px;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(79,70,229,0.4);
  transition: all 0.2s ease;
}
.era-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(79,70,229,0.5);
}
.era-cta-premium .era-cta-note {
  margin-top: 14px !important;
  font-size: 0.82rem !important;
  color: #818cf8 !important;
}
.era-cta-premium .era-cta-note strong { color: #fbbf24; }

/* ─── COMPARISON GRID ─── */
.era-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 32px 0;
}
.era-compare-card {
  border-radius: 14px;
  padding: 20px;
  border: 1px solid #e2e8f0;
}
.era-compare-card h4 {
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  margin: 0 0 10px !important;
}
.era-compare-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.era-compare-card ul li {
  font-size: 0.88rem;
  line-height: 1.75;
  color: inherit;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .era-tldr { padding: 20px; }
  .era-metrics-strip { grid-template-columns: repeat(2, 1fr); }
  .era-author-block { flex-direction: column; }
  .era-cta-premium { padding: 28px 20px; }
  .era-data-table { font-size: 0.85rem; }
  .era-data-table thead th, .era-data-table tbody td { padding: 12px 14px; }
}
@media (max-width: 480px) {
  .era-metrics-strip { grid-template-columns: 1fr; }
  .era-topic-grid { grid-template-columns: 1fr; }
  .era-premium-article h2 { font-size: 1.35rem !important; }
}
