/* Shared rich-text styles for blog detail content and blog previews. */
.blog-content {
  min-width: 0;
  color: #374151;
  line-height: 1.7;
}

.blog-content div:not(.blog-table-scroll) {
  margin-bottom: 1rem;
}

.blog-content h1 {
  margin: 2rem 0 1rem;
  color: #111827;
  font-size: 2.5rem;
  font-weight: 700;
}

.blog-content h2 {
  margin: 1.5rem 0 1rem;
  color: #111827;
  font-size: 2rem;
  font-weight: 700;
}

.blog-content h3 {
  margin: 1rem 0 0.5rem;
  color: #111827;
  font-size: 1.5rem;
  font-weight: 700;
}

.blog-content h4 {
  margin: 1rem 0 0.5rem;
  color: #111827;
  font-size: 1.25rem;
  font-weight: 700;
}

.blog-content p {
  margin-bottom: 1rem;
  color: #374151;
}

.blog-content ul,
.blog-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.blog-content ul {
  list-style: disc;
}

.blog-content ol {
  list-style: decimal;
}

.blog-content li {
  margin-bottom: 0.5rem;
  color: #374151;
}

.blog-content li ul,
.blog-content li ol {
  margin: 0.5rem 0;
}

.blog-content b,
.blog-content strong {
  color: #111827;
  font-weight: 700;
}

.blog-content a {
  color: #4f46e5;
  text-decoration: underline;
}

.blog-content a:hover {
  color: #4338ca;
}

.blog-content blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 4px solid #4f46e5;
  color: #6b7280;
  font-style: italic;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
  border-radius: 0.5rem;
}

/* Tables are wrapped at runtime so scrolling stays inside the table area. */
.blog-content .blog-table-scroll {
  width: 100%;
  max-width: 100%;
  margin: 1.5rem 0;
  overflow-x: auto;
  border: 1px solid #dbe4f0;
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

.blog-content .blog-table-scroll:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.3);
  outline-offset: 3px;
}

.blog-content .blog-table-scroll table {
  width: 100%;
  min-width: 40rem;
  margin: 0;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  color: #334155;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.blog-content .blog-table-scroll caption {
  padding: 0.875rem 1rem;
  background: #f8fafc;
  color: #334155;
  font-weight: 600;
  text-align: left;
}

.blog-content .blog-table-scroll thead th {
  padding: 0.875rem 1rem !important;
  border-right: 1px solid #334155 !important;
  border-bottom: 1px solid #334155 !important;
  background: #0f2747 !important;
  color: #ffffff !important;
  font-size: 0.875rem;
  font-weight: 700 !important;
  line-height: 1.4;
  text-align: left;
  vertical-align: middle;
  white-space: normal;
}

.blog-content .blog-table-scroll thead th:last-child {
  border-right: 0 !important;
}

.blog-content .blog-table-scroll tbody tr:nth-child(odd) > * {
  background: #ffffff !important;
}

.blog-content .blog-table-scroll tbody tr:nth-child(even) > * {
  background: #f8fafc !important;
}

.blog-content .blog-table-scroll tbody th,
.blog-content .blog-table-scroll tbody td {
  min-width: 8rem;
  padding: 0.875rem 1rem !important;
  border-right: 1px solid #dbe4f0 !important;
  border-bottom: 1px solid #dbe4f0 !important;
  color: #334155 !important;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: normal;
}

.blog-content .blog-table-scroll tbody th {
  color: #1e293b !important;
  font-weight: 600;
}

.blog-content .blog-table-scroll tbody tr > *:last-child {
  border-right: 0 !important;
}

.blog-content .blog-table-scroll tbody tr:last-child > * {
  border-bottom: 0 !important;
}

.blog-content .blog-table-scroll th > :last-child,
.blog-content .blog-table-scroll td > :last-child {
  margin-bottom: 0;
}

@media (max-width: 639px) {
  .blog-content h1 { font-size: 2rem; }
  .blog-content h2 { font-size: 1.625rem; }
  .blog-content h3 { font-size: 1.375rem; }

  .blog-content .blog-table-scroll {
    margin: 1.25rem 0;
    border-radius: 0.625rem;
  }

  .blog-content .blog-table-scroll table {
    min-width: 36rem;
    font-size: 0.875rem;
  }

  .blog-content .blog-table-scroll thead th,
  .blog-content .blog-table-scroll tbody th,
  .blog-content .blog-table-scroll tbody td {
    padding: 0.75rem !important;
  }
}
