/* ── Blog Content Typography ── */
.blog-content {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #374151;
}

.blog-content h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #111827;
  margin: 2.5rem 0 1rem;
  line-height: 1.2;
}

.blog-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 2.25rem 0 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #ede9fe;
  line-height: 1.25;
}

.blog-content h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1f2937;
  margin: 1.75rem 0 0.625rem;
}

.blog-content h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #374151;
  margin: 1.5rem 0 0.5rem;
}

.blog-content p {
  margin: 0 0 1.25rem;
}

.blog-content a {
  color: #5B4EF0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.blog-content a:hover {
  color: #7c3aed;
}

.blog-content strong {
  font-weight: 700;
  color: #111827;
}

.blog-content em {
  font-style: italic;
  color: #4b5563;
}

.blog-content ul {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1.25rem;
}

.blog-content ul li {
  padding-left: 1.75rem;
  position: relative;
  margin-bottom: 0.5rem;
}

.blog-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5B4EF0;
}

.blog-content ol {
  padding-left: 1.5rem;
  margin: 0 0 1.25rem;
  counter-reset: item;
  list-style: none;
}

.blog-content ol li {
  counter-increment: item;
  padding-left: 0.5rem;
  margin-bottom: 0.5rem;
  position: relative;
}

.blog-content ol li::before {
  content: counter(item) ".";
  color: #5B4EF0;
  font-weight: 700;
  margin-right: 0.5rem;
}

.blog-content blockquote {
  border-left: 4px solid #5B4EF0;
  background: #f5f3ff;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: #4b5563;
}

.blog-content blockquote p {
  margin: 0;
}

.blog-content code {
  background: #f3f4f6;
  color: #5B4EF0;
  padding: 0.15em 0.45em;
  border-radius: 5px;
  font-family: 'Courier New', monospace;
  font-size: 0.875em;
}

.blog-content pre {
  background: #1e1b4b;
  color: #e0e7ff;
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.7;
}

.blog-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.blog-content img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  margin: 1.75rem 0;
  display: block;
}

.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 8px rgba(0,0,0,0.07);
}

.blog-content table thead {
  background: #5B4EF0;
  color: #fff;
}

.blog-content table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}

.blog-content table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
}

.blog-content table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.blog-content table tbody tr:hover {
  background: #f5f3ff;
}

.blog-content hr {
  border: none;
  border-top: 2px solid #ede9fe;
  margin: 2.5rem 0;
}

/* ── TOC Sidebar ── */
.toc-sidebar {
  position: sticky;
  top: 100px;
}



.toc-item {
  display: block;
  padding: 5px 12px;
  font-size: 0.875rem;
  color: #6b7280;
  border-left: 2px solid #e5e7eb;
  text-decoration: none;
  transition: all 0.2s;
  line-height: 1.5;
}

.toc-item:hover {
  color: #5B4EF0;
  border-left-color: #5B4EF0;
}

.toc-item.active {
  color: #5B4EF0;
  border-left-color: #5B4EF0;
  font-weight: 600;
  background: #f5f3ff;
}

.toc-item.toc-h3 {
  padding-left: 24px;
  font-size: 0.8125rem;
}

/* ── Blog Card Animations ── */
.blog-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  transform: translateY(20px);
}

.blog-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(91, 78, 240, 0.14);
}

.blog-card:hover .card-image {
  transform: scale(1.04);
}

.card-image-wrap {
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

.card-image {
  transition: transform 0.4s ease;
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: top;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}

/* ── Category Badge ── */
.category-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Newsletter pulse ── */
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(91, 78, 240, 0.35); }
  70% { box-shadow: 0 0 0 10px rgba(91, 78, 240, 0); }
  100% { box-shadow: 0 0 0 0 rgba(91, 78, 240, 0); }
}

.newsletter-btn {
  animation: pulse-ring 2s ease infinite;
}

/* ── Fade-up on scroll ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Pagination ── */
.page-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1.5px solid #e5e7eb;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover {
  border-color: #5B4EF0;
  color: #5B4EF0;
  background: #f5f3ff;
}

.page-btn.active {
  background: #5B4EF0;
  color: #fff;
  border-color: #5B4EF0;
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Share Buttons ── */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.share-btn:hover {
  border-color: #5B4EF0;
  color: #5B4EF0;
  background: #f5f3ff;
}

/* ── Sidebar CTA Card ── */
.sidebar-cta {
  background: linear-gradient(135deg, #1a0e4f 0%, #3b0fa8 100%);
  border-radius: 16px;
  padding: 24px 20px;
  margin-top: 24px;
}
.sidebar-cta h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.3;
}
.sidebar-cta p {
  font-size: 0.8rem;
  color: #c4b5fd;
  margin-bottom: 16px;
  line-height: 1.5;
}
.sidebar-cta a {
  display: block;
  text-align: center;
  background: #5B4EF0;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 16px;
  border-radius: 99px;
  text-decoration: none;
  transition: opacity 0.2s;
  animation: pulse-ring 2s ease infinite;
}
.sidebar-cta a:hover { opacity: 0.9; }

/* ── Markdown Content Boxes ── */

/* Pro Tip — blockquote starting with Pro Tip: */
.blog-content blockquote.tip {
  border-left: 4px solid #5B4EF0;
  background: #f5f3ff;
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
}
.blog-content blockquote.tip::before {
  content: '💡 Pro Tip';
  display: block;
  font-weight: 700;
  color: #5B4EF0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

/* Success box */
.blog-content blockquote.success {
  border-left: 4px solid #059669;
  background: #f0fdf4;
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
}

/* Warning box */
.blog-content blockquote.warning {
  border-left: 4px solid #d97706;
  background: #fffbeb;
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
}

/* Feature grid — 2-col inside content */
.blog-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 1.75rem 0;
}
.blog-feature-item {
  background: #f9fafb;
  border: 1.5px solid #ede9fe;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.blog-feature-icon {
  width: 36px;
  height: 36px;
  background: #ede9fe;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #5B4EF0;
}
.blog-feature-item h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 2px;
}
.blog-feature-item p {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0;
}

/* Article hero two-col */
.article-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 1024px) {
  .article-hero-grid { grid-template-columns: 1fr; }
  .blog-feature-grid { grid-template-columns: 1fr; }
}

/* Hero illustration */
.hero-illustration {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-illustration img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 20px;
  filter: drop-shadow(0 16px 40px rgba(91,78,240,0.18));
}

/* Article content layout */
.article-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; }
}

/* Related articles 4-col */
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1024px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .related-grid { grid-template-columns: 1fr; }
}

/* Author card */
.author-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 14px;
  border: 1.5px solid #ede9fe;
  margin-top: 8px;
}
.author-card img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Decorative sparkle */
.sparkle {
  position: absolute;
  pointer-events: none;
  color: #c4b5fd;
  opacity: 0.6;
  animation: float-sparkle 3s ease-in-out infinite;
}
@keyframes float-sparkle {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.1); }
}
