/* ===================================
   BLOG POST STYLES
   =================================== */

/* Article Header */
.article-header {
  padding: 140px 0 60px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 50%, #ecfdf5 100%);
  text-align: center;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.category-badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.875rem;
  color: white;
}

.category-badge.tips {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.category-badge.industry {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.category-badge.updates {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.article-header h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--color-text-primary);
}

.author-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.author-info img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.author-details {
  text-align: left;
  display: flex;
  flex-direction: column;
}

.author-details .name {
  font-weight: 700;
  color: var(--color-text-primary);
  font-size: 1.125rem;
}

.author-details .role {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Article Content Layout */
.article-content {
  padding: 60px 0 100px;
  background: white;
}

.blog-layout {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
}

/* Sidebar Styles */
.blog-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 15vh;
  padding-right: 1rem;
  border-right: 1px solid #e5e7eb;
  max-height: 85vh;
  overflow-y: auto;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.blog-sidebar::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.blog-sidebar {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #6b7280;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--color-primary);
}

.nav-group {
  margin-bottom: 2rem;
}

.sidebar-nav h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7280;
  margin-bottom: 0.75rem;
  font-weight: 800;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin-bottom: 0.25rem;
}

.sidebar-nav a {
  display: block;
  color: #4b5563;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 0.5rem 0.75rem;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  margin-left: -1rem;
}

.sidebar-nav a:hover {
  color: var(--color-primary);
  background-color: #f3f4f6;
  border-left-color: #d1d5db;
}

.sidebar-nav a.active {
  color: var(--color-primary);
  font-weight: 600;
  background-color: #f0fdf4;
  border-left-color: var(--color-primary);
}

/* Main Content Wrapper */
.content-wrapper {
  flex-grow: 1;
  max-width: 760px; /* Keep the reading width optimal */
  /* margin: 0 auto; Removed auto margin as it's now flex item */
}

.lead {
  font-size: 1.375rem;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 3rem;
  font-weight: 500;
}

.article-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  color: var(--color-text-primary);
}

.article-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--color-text-primary);
}

.article-content p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 1.5rem;
}

.article-content ul, 
.article-content ol {
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}

.article-content li {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 0.75rem;
}

.article-content strong {
  color: var(--color-text-primary);
  font-weight: 700;
}

/* Image Placeholder Box */
.image-placeholder-box {
  background: #f3f4f6;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 2rem;
  margin: 2.5rem 0;
  text-align: center;
  color: #6b7280;
  font-style: italic;
}

.image-placeholder-box p {
  margin-bottom: 0;
  font-size: 1rem;
}

/* Article Image */
.article-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2.5rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
}

/* CTA Box */
.cta-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  margin-top: 4rem;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.cta-box h3 {
  margin-top: 0;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.cta-box p {
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Chart Styles */
.chart-container {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
  margin: 2.5rem 0;
}

.chart-title {
  text-align: center;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--color-text-primary);
}

.simple-bar-chart {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 250px;
  padding-bottom: 20px;
  border-bottom: 2px solid #d1d5db;
  position: relative;
}

.chart-group {
  display: flex;
  gap: 10px;
  flex-direction: column;
  align-items: center;
  width: 40%;
}

.bars-wrapper {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  height: 200px;
  width: 100%;
  justify-content: center;
}

.bar {
  width: 40px;
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: height 0.5s ease;
  display: flex;
  justify-content: center;
}

.bar span {
  position: absolute;
  top: -25px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4b5563;
}

.bar.with-breaks {
  background: linear-gradient(to top, #10b981, #34d399);
}

.bar.no-breaks {
  background: linear-gradient(to top, #ef4444, #f87171);
}

.group-label {
  margin-top: 15px;
  font-weight: 600;
  color: #374151;
  text-align: center;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #4b5563;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-color.green { background: #10b981; }
.legend-color.red { background: #ef4444; }

/* Responsive Chart */
@media (max-width: 600px) {
  .bar { width: 25px; }
  .bars-wrapper { gap: 8px; }
}

/* Responsive */
@media (max-width: 1024px) {
  .blog-layout {
    flex-direction: column;
    gap: 2rem;
  }

  .blog-sidebar {
    width: 100%;
    position: static;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 2rem;
    padding-right: 0;
  }

  .content-wrapper {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .article-header {
    padding: 120px 0 40px;
  }

  .article-header h1 {
    font-size: 2rem;
  }

  .article-content {
    padding: 40px 0 80px;
  }

  .lead {
    font-size: 1.125rem;
  }

  .article-content h2 {
    font-size: 1.75rem;
  }

  .article-content p,
  .article-content li {
    font-size: 1rem;
  }

  .cta-box {
    padding: 2rem;
  }
}
