/* ========================================
   Blog Article Styles - Only loaded on
   individual blog post pages
   ======================================== */

/* Article Header - accounts for fixed navigation */
.blog-article {
  padding-top: 80px; /* Space for fixed header */
}

/* Article Hero with Background Image */
.article-hero {
  position: relative;
  z-index: 1;
  padding: 120px 0 80px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.article-hero.has-image {
  min-height: 450px;
  display: flex;
  align-items: center;
}

.article-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  z-index: 1;
}

.article-hero .container {
  position: relative;
  z-index: 2;
}

.article-hero .back-link {
  display: inline-block;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin-bottom: 30px;
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
}

.article-hero .back-link:hover {
  color: #fff;
}

.article-hero-content {
  max-width: 850px;
  margin: 0 auto;
}

.article-hero .article-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.article-hero .meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.article-hero .meta-item svg {
  opacity: 0.7;
}

.article-hero h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 20px;
  line-height: 1.2;
  font-weight: 800;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.article-hero .article-intro {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
}

/* Legacy support - keep for backwards compatibility */
.article-header {
  position: inherit !important;
  padding: 60px 0;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  text-align: center;
}

.article-header .back-link {
  display: inline-block;
  color: #94a3b8;
  text-decoration: none;
  margin-bottom: 20px;
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
}

.article-header .back-link:hover {
  color: #fff;
}

.article-header h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  max-width: 800px;
  margin: 0 auto 16px;
  line-height: 1.3;
  font-weight: 800;
}

.article-intro {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.125rem;
  color: #cbd5e1;
  line-height: 1.6;
}

/* Article Featured Image (legacy) */
.article-featured-image {
  padding: 0;
  background: #f8fafc;
}

.article-featured-image .container {
  padding: 0 20px;
}

.article-featured-image img {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: block;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

/* Article Meta Bar (below image) */
.article-meta-bar {
  background: #ffffff;
  padding: 24px 0 32px;
}

.article-meta-bar .article-meta {
  max-width: 950px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.9375rem;
  color: #374151;
}

.article-meta-bar .meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-meta-bar .meta-item svg {
  color: #6b7280;
  flex-shrink: 0;
}

/* Article Body */
.article-body {
  padding: 50px 0 60px;
  background: #fff;
}

.article-content {
  max-width: 950px;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #334155;
}

/* Article Typography */
.article-content h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.625rem;
  margin: 32px 0 16px;
  color: #1e293b;
  font-weight: 700;
  line-height: 1.3;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  margin: 24px 0 12px;
  color: #1e293b;
  font-weight: 600;
  line-height: 1.4;
}

.article-content h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem;
  margin: 20px 0 10px;
  color: #1e293b;
  font-weight: 600;
}

.article-content p {
  margin: 0 0 16px;
}

.article-content ul,
.article-content ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 6px;
}

.article-content li ul,
.article-content li ol {
  margin-top: 6px;
  margin-bottom: 6px;
}

/* Article Sections - Reduce default section padding inside articles */
.article-content section {
  padding: 0;
  margin-bottom: 24px;
}

.article-content section:last-child {
  margin-bottom: 0;
}

/* Article Links */
.article-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

.article-content a:hover {
  color: var(--primary-dark);
}

/* Article Blockquotes */
.article-content blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  font-style: italic;
  color: #475569;
  border-radius: 0 8px 8px 0;
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Article Code */
.article-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 20px 24px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
  font-size: 0.9rem;
}

.article-content code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
}

.article-content p code,
.article-content li code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  color: #e11d48;
}

/* Article Images */
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 24px 0;
}

/* Article Tables */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.article-content thead {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
}

.article-content th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-content td {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.article-content tbody tr:last-child td {
  border-bottom: none;
}

.article-content tbody tr:nth-child(even) {
  background: #f8fafc;
}

.article-content tbody tr:hover {
  background: #f1f5f9;
}

.article-content td strong {
  color: #1e293b;
  font-weight: 600;
}

/* Responsive Tables */
@media (max-width: 640px) {
  .article-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .article-content th,
  .article-content td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}

/* Article FAQ Section */
.article-content .faq-section {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 2px solid #e2e8f0;
}

.article-content .faq-section h2 {
  margin-top: 0;
  margin-bottom: 24px;
}

.article-content .faq-item {
  margin-bottom: 16px;
  padding: 20px 24px;
  background: #f8fafc;
  border-radius: 12px;
  border-left: 4px solid var(--primary);
  transition: all var(--transition-fast);
}

.article-content .faq-item:hover {
  background: #f1f5f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.article-content .faq-item:last-child {
  margin-bottom: 0;
}

.article-content .faq-item h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: #1e293b;
  font-weight: 600;
}

.article-content .faq-item p {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Article Key Takeaways / Footer Box */
.article-content .article-footer,
.article-content footer.article-footer {
  margin-top: 32px;
  padding: 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.article-content .article-footer h3 {
  margin: 0 0 16px;
  font-size: 1.125rem;
  color: #1e293b;
}

.article-content .article-footer ul {
  margin: 0;
  padding-left: 20px;
}

.article-content .article-footer li {
  margin-bottom: 8px;
}

.article-content .article-footer li:last-child {
  margin-bottom: 0;
}

/* Author Bio Box */
.article-content .author-bio {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.article-content .author-bio h4 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-content .author-bio p {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
}

/* Article Share Section */
.article-share {
  max-width: 950px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.article-share > span {
  font-weight: 600;
  color: #1e293b;
}

.share-buttons {
  display: flex;
  gap: 10px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: #fff;
  transition: all var(--transition-fast);
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.facebook { background: #1877f2; }

/* Article CTA Section */
.article-cta {
  padding-top: 60px;
  padding-bottom: 60px;
  background: #1e293b;
  color: #fff;
  text-align: center;
}

.article-cta h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 12px;
}

.article-cta p {
  color: #94a3b8;
  margin-bottom: 24px;
  font-size: 1.05rem;
}

/* Article Responsive */
@media (max-width: 768px) {
  .blog-article {
    padding-top: 70px;
  }

  .article-hero {
    padding: 100px 0 60px;
    min-height: auto !important;
  }

  .article-hero.has-image {
    min-height: 350px !important;
  }

  .article-hero h1 {
    font-size: 1.75rem;
  }

  .article-hero .article-intro {
    font-size: 1rem;
  }

  .article-hero .article-meta {
    gap: 12px;
    font-size: 0.85rem;
  }

  .article-header {
    padding: 40px 0 30px;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }

  .article-intro {
    font-size: 1rem;
  }

  .article-meta-bar {
    padding: 20px 0 24px;
  }

  .article-meta-bar .article-meta {
    gap: 16px;
    font-size: 0.875rem;
  }

  .article-body {
    padding: 40px 0 50px;
  }

  .article-content {
    padding: 0 20px;
  }

  .article-content h2 {
    font-size: 1.4rem;
  }

  .article-content h3 {
    font-size: 1.15rem;
  }

  .article-share {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
  }

  .article-cta {
    padding: 50px 20px;
  }

  .article-content .faq-item {
    padding: 16px 20px;
  }
}
