/* ═══════════════════════════════════════════════════════════════
   Specira AI — Article Stylesheet
   Shared styles for blog posts and use case articles.
   Components: hero, body typography, stat callout, story box,
   key takeaway, inline illustration, outcomes grid, related
   section, author bio, table of contents, share widgets, CTA.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Article Hero ─── */
.article-hero { padding: 140px 40px 60px; background: linear-gradient(160deg, var(--midnight) 0%, var(--deep-navy) 45%, #1a1a3e 100%); position: relative; overflow: hidden; }
.article-hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(ellipse 800px 600px at 25% 40%, rgba(59,130,246,0.08) 0%, transparent 70%), radial-gradient(ellipse 600px 500px at 75% 30%, rgba(124,58,237,0.06) 0%, transparent 70%); pointer-events: none; }
.article-hero-content { position: relative; max-width: 760px; margin: 0 auto; }
.article-hero--centered { text-align: center; }
.article-hero--centered .article-subtitle { max-width: 600px; margin-left: auto; margin-right: auto; }
.article-hero--centered h1 { max-width: 800px; margin-left: auto; margin-right: auto; }

/* ─── Back Link ─── */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--blue-bright); text-decoration: none; margin-bottom: 24px; transition: gap 0.2s; }
.back-link:hover { gap: 10px; }
.back-link::before { content: '\2190'; }

/* ─── Hero Tags (use case pages) ─── */
.article-tags { display: flex; justify-content: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.article-tag { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--blue-bright); letter-spacing: 1.5px; text-transform: uppercase; background: rgba(59,130,246,0.12); padding: 6px 14px; border-radius: 100px; font-weight: 600; }

/* ─── Hero Tags (blog pages) ─── */
.article-hero .tag-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.article-hero .tag { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--blue-bright); letter-spacing: 1.5px; text-transform: uppercase; background: rgba(59,130,246,0.12); padding: 6px 14px; border-radius: 100px; }
.article-hero .reading-time { font-size: 13px; color: var(--gray-mid); }

/* ─── Hero Title ─── */
.article-hero h1 { font-family: 'Manrope', sans-serif; font-size: clamp(30px, 4.5vw, 48px); font-weight: 800; color: white; letter-spacing: -1.5px; line-height: 1.12; margin-bottom: 20px; }
.article-hero h1 .gradient { background: linear-gradient(135deg, var(--blue), var(--violet-soft)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ─── Hero Subtitle ─── */
.article-hero .subtitle,
.article-subtitle { font-size: 18px; color: var(--gray-mid); line-height: 1.7; margin-bottom: 28px; }

/* ─── Hero Meta ─── */
.article-meta { font-size: 14px; color: var(--gray-mid); }

/* ─── Hero Author (blog) ─── */
.article-hero .author-row { display: flex; align-items: center; gap: 14px; }
.author-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.author-info { font-size: 14px; color: var(--gray-mid); line-height: 1.5; }
.author-info strong { color: white; font-weight: 600; }

/* ─── Hero Illustration (blog) ─── */
.hero-illustration { max-width: 760px; margin: 0 auto; padding: 0 40px; transform: translateY(-40px); }
.hero-illustration svg { width: 100%; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }

/* ─── Table of Contents (blog) ─── */
.article-toc { max-width: 720px; margin: 0 auto; padding: 0 40px; transform: translateY(-20px); }
.article-toc nav { background: var(--off-white); border: 1px solid var(--gray-light); border-radius: 16px; padding: 28px 32px; }
.article-toc .toc-title { font-family: 'Manrope', sans-serif; font-size: 16px; font-weight: 700; color: var(--charcoal); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.5px; }
.article-toc ol { list-style: none; counter-reset: toc; margin: 0; padding: 0; }
.article-toc ol li { counter-increment: toc; margin-bottom: 10px; }
.article-toc ol li:last-child { margin-bottom: 0; }
.article-toc ol li a { display: flex; align-items: baseline; gap: 10px; font-size: 15px; color: var(--gray-dark); line-height: 1.5; transition: color 0.2s; }
.article-toc ol li a::before { content: counter(toc) "."; font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 500; color: var(--blue); min-width: 20px; }
.article-toc ol li a:hover { color: var(--blue); }

/* ─── Article Body ─── */
.article-body { max-width: 720px; margin: 0 auto; padding: 20px 40px 80px; }
.article-body h2 { font-family: 'Manrope', sans-serif; font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: var(--charcoal); letter-spacing: -0.5px; line-height: 1.2; margin: 56px 0 20px; }
.article-body h2:first-of-type { margin-top: 32px; }
.article-body h3 { font-family: 'Manrope', sans-serif; font-size: 22px; font-weight: 600; margin: 32px 0 16px 0; color: var(--charcoal); }
.article-body p { font-size: 17px; color: var(--gray-dark); line-height: 1.85; margin-bottom: 24px; }
.article-body p strong { color: var(--charcoal); font-weight: 600; }
.article-body ul,
.article-body ol { margin: 20px 0 20px 24px; line-height: 1.8; }
.article-body li { margin-bottom: 12px; color: var(--gray-dark); font-size: 17px; }
.article-body a:not(.nav a):not(.btn):not(.cta-btn):not(.logo):not(.skip-link):not(.lang-link):not(.back-link):not(.related-card) { color: var(--text-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; transition: color 0.2s; }
.article-body a:hover { color: var(--blue); }

/* ─── Blockquote ─── */
.article-body blockquote { border-left: 4px solid var(--blue); background: var(--blue-ice); padding: 24px 28px; border-radius: 0 12px 12px 0; margin: 36px 0; }
.article-body blockquote p { font-size: 17px; font-style: italic; color: var(--charcoal); margin-bottom: 8px; line-height: 1.7; }
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body blockquote cite { font-style: normal; font-size: 14px; color: var(--text-secondary); display: block; margin-top: 8px; }

/* ─── Stat Callout ─── */
.stat-callout { background: linear-gradient(135deg, rgba(59,130,246,0.06), rgba(124,58,237,0.06)); border: 1px solid rgba(59,130,246,0.12); border-radius: 16px; padding: 32px; margin: 40px 0; text-align: center; }
.stat-callout .stat-number { font-family: 'Manrope', sans-serif; font-size: clamp(36px, 5vw, 56px); font-weight: 800; background: linear-gradient(135deg, var(--blue), var(--violet)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1.1; margin-bottom: 8px; }
.stat-callout .stat-label { font-size: 16px; color: var(--gray-dark); line-height: 1.5; }
.stat-callout .stat-source { font-size: 12px; color: var(--text-secondary); margin-top: 8px; font-family: 'JetBrains Mono', monospace; }
.stat-callout .stat-source a { color: var(--blue); text-decoration: none; border-bottom: 1px solid rgba(59,130,246,0.3); transition: border-color 0.2s; }
.stat-callout .stat-source a:hover { border-color: var(--blue); }

/* ─── Inline Illustration ─── */
.inline-illustration { margin: 48px 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--gray-light); }
.inline-illustration svg { width: 100%; display: block; }
.inline-illustration figcaption { padding: 12px 20px; background: var(--off-white); font-size: 13px; color: var(--text-secondary); text-align: center; font-style: italic; }

/* ─── Story Box ─── */
.story-box { background: var(--off-white); border-radius: 16px; padding: 36px 32px; margin: 44px 0; border: 1px solid var(--gray-light); position: relative; }
.story-box::before { content: '\2726'; position: absolute; top: -12px; left: 28px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--blue); background: var(--white); border: 1px solid var(--gray-light); border-radius: 50%; line-height: 1; }
.story-label,
.story-badge { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--blue); margin-bottom: 16px; font-weight: 600; }
.story-box p { font-size: 16px; color: var(--gray-dark); line-height: 1.8; margin-bottom: 16px; }
.story-box p:last-child { margin-bottom: 0; }
.story-box strong { color: var(--charcoal); font-weight: 600; }

/* ─── Key Takeaway ─── */
.key-takeaway { background: linear-gradient(160deg, var(--midnight), var(--deep-navy)); border-radius: 16px; padding: 36px 32px; margin: 48px 0; color: white; }
.key-takeaway h3 { font-family: 'Manrope', sans-serif; font-size: 18px; font-weight: 700; color: var(--blue-bright); margin-bottom: 16px; margin-top: 0; }
.key-takeaway p { font-size: 16px; color: rgba(255,255,255,0.8); line-height: 1.8; margin-bottom: 12px; }
.key-takeaway p:last-child { margin-bottom: 0; }
.key-takeaway ul { color: rgba(255,255,255,0.8); }
.key-takeaway li { color: rgba(255,255,255,0.8); }

/* ─── Outcomes Grid (use case pages) ─── */
.outcomes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 32px 0; }
.outcome-card { background: var(--off-white); border-radius: 16px; padding: 24px; text-align: center; border-top: 3px solid var(--blue); }
.outcome-icon { font-size: 32px; margin-bottom: 12px; height: 40px; display: flex; align-items: center; justify-content: center; }
.outcome-metric { font-family: 'Manrope', sans-serif; font-size: 28px; font-weight: 800; color: var(--blue); margin: 8px 0; }
.outcome-label { font-size: 14px; color: var(--text-secondary); font-weight: 500; }

/* ─── Related Section (use case pages) ─── */
.related-section { margin: 48px 0; }
.related-title { font-family: 'Manrope', sans-serif; font-size: 24px; font-weight: 700; color: var(--charcoal); margin-bottom: 24px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.related-card { display: block; background: var(--off-white); border-radius: 16px; padding: 24px; text-decoration: none; color: var(--charcoal); border: 1px solid var(--gray-light); transition: border-color 0.2s, transform 0.2s; }
.related-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.related-card h3 { font-size: 18px; color: var(--charcoal); margin: 0 0 8px 0; }
.related-card p { font-size: 14px; color: var(--text-secondary); margin: 0; }

/* ─── Article CTA ─── */
.article-cta { background: linear-gradient(160deg, var(--midnight) 0%, var(--deep-navy) 50%, #1a1a3e 100%); padding: 80px 40px; text-align: center; position: relative; overflow: hidden; }
.article-cta::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(ellipse 600px 400px at 50% 40%, rgba(59,130,246,0.1) 0%, transparent 70%); pointer-events: none; }
.article-cta-inner { position: relative; max-width: 600px; margin: 0 auto; }
.article-cta h2 { font-family: 'Manrope', sans-serif; font-size: clamp(24px, 3.5vw, 36px); font-weight: 800; color: white; letter-spacing: -0.5px; margin-bottom: 16px; }
.article-cta p { font-size: 16px; color: var(--gray-mid); margin-bottom: 32px; line-height: 1.7; }

/* ─── Author Bio (blog) ─── */
.author-bio { display: flex; gap: 24px; align-items: flex-start; background: var(--off-white); border: 1px solid var(--gray-light); border-radius: 16px; padding: 32px; margin: 48px 0 0; }
.author-bio .author-avatar { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.author-bio .author-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.author-bio-content { flex: 1; }
.author-bio-content .author-name { font-family: 'Manrope', sans-serif; font-size: 18px; font-weight: 700; color: var(--charcoal); margin-bottom: 4px; }
.author-bio-content .author-title { font-size: 14px; color: var(--blue); font-weight: 500; margin-bottom: 12px; }
.author-bio-content p { font-size: 15px; color: var(--gray-dark); line-height: 1.7; margin-bottom: 0; }

/* ─── Author Links ─── */
.author-linkedin { display: inline-flex; align-items: center; margin-left: 6px; color: var(--blue-bright); text-decoration: none; vertical-align: middle; opacity: 0.7; transition: opacity 0.2s; }
.author-linkedin:hover { opacity: 1; }
.author-linkedin svg { width: 16px; height: 16px; fill: currentColor; }
.author-name-link { color: inherit; text-decoration: none; transition: color 0.2s; }
.author-name-link:hover { color: var(--blue); }
.author-avatar-link { display: block; text-decoration: none; }

/* ─── Share Sidebar (blog, desktop) ─── */
.share-sidebar { position: sticky; top: 100px; float: left; margin-left: -80px; display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 50; }
.share-sidebar .share-label { writing-mode: vertical-rl; transform: rotate(180deg); font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 500; color: var(--gray-mid); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.share-sidebar a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(96,165,250,0.06); border: 1px solid rgba(96,165,250,0.12); color: #94A3B8; transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease; text-decoration: none; }
.share-sidebar a:hover { background: rgba(59,130,246,0.15); color: #60A5FA; border-color: rgba(59,130,246,0.3); transform: scale(1.08); box-shadow: 0 4px 12px rgba(59,130,246,0.15); }
.share-sidebar a svg { width: 18px; height: 18px; fill: currentColor; }

/* ─── Share Mobile Bar (blog, mobile) ─── */
.share-mobile-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 999; background: rgba(13,27,42,0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid rgba(96,165,250,0.15); padding: 10px 16px; justify-content: center; align-items: center; gap: 12px; transform: translateY(100%); transition: transform 0.3s ease; }
.share-mobile-bar.visible { transform: translateY(0); }
.share-mobile-bar .share-label { font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 500; color: #94A3B8; letter-spacing: 0.5px; }
.share-mobile-bar a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(96,165,250,0.1); border: 1px solid rgba(96,165,250,0.2); color: #CBD5E1; transition: background-color 0.2s ease, color 0.2s ease; text-decoration: none; }
.share-mobile-bar a:active { background: rgba(59,130,246,0.25); color: #60A5FA; }
.share-mobile-bar a svg { width: 18px; height: 18px; fill: currentColor; }
.social-share { display: none !important; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Article components
   ═══════════════════════════════════════════════════════════════ */

/* ─── Tablet (769px - 1024px) ─── */
@media (min-width: 769px) and (max-width: 1024px) {
  .article-hero { padding: 120px 32px 48px; }
  .article-body { padding: 16px 32px 60px; }
  .hero-illustration { padding: 0 32px; }
  .article-toc { padding: 0 32px; }
  .article-cta { padding: 60px 32px; }
}

/* ─── Mobile (<=768px) ─── */
@media (max-width: 768px) {
  .article-hero { padding: 100px 20px 48px; }
  .article-hero h1 { font-size: clamp(26px, 6vw, 36px); }
  .article-hero .subtitle,
  .article-subtitle { font-size: 16px; }
  .hero-illustration { padding: 0 20px; transform: translateY(-24px); }
  .article-toc { padding: 0 20px; }
  .article-toc nav { padding: 20px 24px; }
  .article-body { padding: 12px 20px 60px; }
  .article-body h2 { font-size: 22px; margin-top: 44px; }
  .article-body h3 { font-size: 18px; }
  .article-body p,
  .article-body li { font-size: 16px; }
  .stat-callout { padding: 24px 20px; }
  .story-box { padding: 28px 24px; }
  .key-takeaway { padding: 28px 24px; }
  .outcomes-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .article-cta { padding: 60px 20px; }
  .share-sidebar { display: none !important; }
  .share-mobile-bar { display: flex !important; }
  .author-bio { flex-direction: column; align-items: center; text-align: center; padding: 24px; }
  .author-bio .author-avatar { width: 64px; height: 64px; }
}

/* ─── Small Mobile (<=390px) ─── */
@media (max-width: 390px) {
  .article-hero { padding: 80px 16px 40px; }
  .article-hero h1 { font-size: clamp(22px, 5.5vw, 28px); }
  .article-hero .subtitle,
  .article-subtitle { font-size: 14px; }
  .article-body { padding: 8px 16px 48px; }
  .article-body h2 { font-size: 20px; margin: 32px 0 16px 0; }
  .article-body h3 { font-size: 16px; }
  .article-body p,
  .article-body li { font-size: 15px; }
  .stat-callout { padding: 20px 16px; }
  .stat-callout .stat-number { font-size: clamp(28px, 8vw, 36px); }
  .inline-illustration { margin: 32px 0; }
  .story-box { padding: 24px 16px; }
  .story-box::before { left: 16px; }
  .key-takeaway { padding: 24px 16px; }
  .outcomes-grid { gap: 16px; }
  .outcome-card { padding: 20px; }
  .article-toc { padding: 0 16px; }
  .article-cta { padding: 48px 16px; }
}
