/* Blog Content Styling — LearnSportsBetting.com
   Scoped under .blog-content to avoid nav/footer conflicts.
   Uses LSB design system: #16a34a green, Inter font. */

/* ─── Blog Article Layout ─── */
.blog-article {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1a1a1a;
}

.blog-article-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 24px 64px 4px;
}

/* Three-column grid: TOC + content + sidebar */
.blog-content-grid {
  display: grid;
  grid-template-columns: 180px 1fr 300px;
  gap: 28px;
  align-items: start;
}

/* Header area — spans TOC + content columns, row 1 */
.blog-header-area {
  grid-column: 1 / 3;
  grid-row: 1;
}

.blog-toc-sidebar {
  grid-column: 1;
  grid-row: 2;
}

.blog-main-content {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

.blog-sidebar {
  grid-column: 3;
  grid-row: 2;
}

/* ─── Left TOC Sidebar ─── */
.blog-toc-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

.blog-toc-sidebar::-webkit-scrollbar {
  width: 4px;
}

.blog-toc-sidebar::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.blog-toc-sidebar .toc-wrapper {
  background: transparent;
  border: none;
  border-left: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
}

.blog-toc-sidebar .toc-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #16a34a;
}

.blog-toc-sidebar .toc-title::before {
  display: none;
}

.blog-toc-sidebar .toc-list li[data-level="2"] {
  padding: 5px 8px;
  margin-bottom: 2px;
}

.blog-toc-sidebar .toc-list li[data-level="2"]::before {
  display: none;
}

.blog-toc-sidebar .toc-list li[data-level="2"] a {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.blog-toc-sidebar .toc-list li[data-level="3"] {
  padding-left: 16px;
  padding-top: 3px;
  padding-bottom: 3px;
  padding-right: 8px;
  margin-bottom: 1px;
}

.blog-toc-sidebar .toc-list li[data-level="3"]::before {
  display: none;
}

.blog-toc-sidebar .toc-list li[data-level="3"] a {
  font-size: 12px;
  color: #6b7280;
}

.blog-toc-sidebar .toc-list li[data-level="4"] {
  padding-left: 28px;
  padding-top: 2px;
  padding-bottom: 2px;
  padding-right: 8px;
  margin-bottom: 0;
}

.blog-toc-sidebar .toc-list li[data-level="4"]::before {
  display: none;
}

.blog-toc-sidebar .toc-list li[data-level="4"] a {
  font-size: 11px;
  color: #9ca3af;
}

/* Scroll-spy active state */
.toc-list a.toc-active {
  color: #16a34a !important;
  font-weight: 600 !important;
  background: rgba(22, 163, 74, 0.08);
  border-radius: 4px;
  padding: 1px 4px;
  margin: -1px -4px;
}

/* ─── Featured Tool Card (right sidebar) ─── */
.sidebar-featured-tool {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  color: #fff;
}

.sidebar-featured-label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 10px;
  border-radius: 9999px;
  margin-bottom: 12px;
}

.sidebar-featured-name {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: #fff;
}

.sidebar-featured-desc {
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 16px;
  opacity: 0.9;
}

.sidebar-featured-cta {
  display: inline-block;
  padding: 10px 20px;
  background: #fff;
  color: #16a34a;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.sidebar-featured-cta:hover {
  background: #f0fdf4;
  transform: translateY(-1px);
}

/* ─── Breadcrumbs ─── */
.blog-breadcrumbs {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.blog-breadcrumbs a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-breadcrumbs a:hover {
  color: #16a34a;
}

/* ─── Article Header ─── */
.blog-header {
  margin-bottom: 32px;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
}

.blog-meta span + span::before,
.blog-meta time + span::before,
.blog-meta span + time::before {
  content: "\00b7";
  margin-right: 12px;
}

.blog-category {
  color: #16a34a;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 13px;
}

.blog-category::before {
  content: none !important;
}

.blog-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin: 0 0 16px;
}

.blog-excerpt {
  font-size: 1.25rem;
  color: #525252;
  line-height: 1.6;
  margin: 0;
}

/* ─── Featured Image ─── */
.blog-featured-image {
  margin-bottom: 40px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.blog-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 500px;
  object-fit: cover;
}

/* ─── Table of Contents ─── */
.toc-wrapper {
  background: #f9fafb;
  border: none;
  border-left: 4px solid #16a34a;
  border-radius: 0 12px 12px 0;
  padding: 24px 24px 24px 28px;
  margin-bottom: 40px;
}

.toc-title {
  font-size: 1.125rem;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-title::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  background: #16a34a;
  border-radius: 4px;
  flex-shrink: 0;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath d='M3 4h14v2H3V4zm0 5h14v2H3V9zm0 5h10v2H3v-2z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath d='M3 4h14v2H3V4zm0 5h14v2H3V9zm0 5h10v2H3v-2z'/%3E%3C/svg%3E");
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc-counter;
}

/* H2 entries — numbered, bold */
.toc-list li[data-level="2"] {
  counter-increment: toc-counter;
  margin-bottom: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.2s;
}

.toc-list li[data-level="2"]:hover {
  background: rgba(22, 163, 74, 0.06);
}

.toc-list li[data-level="2"]::before {
  content: counter(toc-counter) ".";
  display: inline-block;
  width: 24px;
  color: #16a34a;
  font-weight: 700;
  font-size: 14px;
}

.toc-list li[data-level="2"] a {
  color: #1a1a1a;
  font-weight: 600;
  font-size: 15px;
}

/* H3 entries — indented, bullet */
.toc-list li[data-level="3"] {
  padding-left: 34px;
  margin-bottom: 4px;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-right: 10px;
  border-radius: 6px;
  transition: background 0.2s;
}

.toc-list li[data-level="3"]:hover {
  background: rgba(22, 163, 74, 0.06);
}

.toc-list li[data-level="3"]::before {
  content: "\2013";
  display: inline-block;
  width: 18px;
  color: #9ca3af;
  font-size: 13px;
}

.toc-list li[data-level="3"] a {
  color: #525252;
  font-weight: 400;
  font-size: 14px;
}

/* H4 entries — more indented, lighter */
.toc-list li[data-level="4"] {
  padding-left: 52px;
  margin-bottom: 3px;
  padding-top: 3px;
  padding-bottom: 3px;
  padding-right: 10px;
  border-radius: 6px;
  transition: background 0.2s;
}

.toc-list li[data-level="4"]:hover {
  background: rgba(22, 163, 74, 0.06);
}

.toc-list li[data-level="4"]::before {
  content: "\2022";
  display: inline-block;
  width: 16px;
  color: #d1d5db;
  font-size: 12px;
}

.toc-list li[data-level="4"] a {
  color: #6b7280;
  font-weight: 400;
  font-size: 13px;
}

/* Common TOC link styles */
.toc-list a {
  text-decoration: none;
  transition: color 0.2s;
}

.toc-list a:hover {
  color: #16a34a;
}

/* ─── Blog Content (SEObot HTML) ─── */
.blog-content {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.125rem;
  line-height: 1.8;
  color: #1a1a1a;
}

.blog-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #16a34a;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #e5e7eb;
  scroll-margin-top: 80px;
}

.blog-content h3 {
  font-size: 1.375rem;
  font-weight: 600;
  color: #15803d;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  scroll-margin-top: 80px;
}

.blog-content .intro {
  font-size: 1.25rem;
  line-height: 1.7;
  color: #374151;
  font-weight: 500;
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-left: 4px solid #16a34a;
  border-radius: 0 8px 8px 0;
}

.blog-content p {
  margin-bottom: 1.75rem;
}

.blog-content a {
  color: #16a34a;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s;
}

.blog-content a:hover {
  color: #15803d;
  text-decoration-thickness: 2px;
}

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

.blog-content ul,
.blog-content ol {
  margin-bottom: 2rem;
  padding-left: 2rem;
}

.blog-content ul {
  list-style-type: disc;
}

.blog-content ol {
  list-style-type: decimal;
}

.blog-content li {
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.blog-content li::marker {
  color: #16a34a;
  font-weight: 600;
}

/* Internal link callout boxes */
.blog-content .internal-link {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #16a34a;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin: 3rem 0;
  box-shadow: 0 4px 6px rgba(22, 163, 74, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.blog-content .internal-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(22, 163, 74, 0.15);
}

.blog-content .internal-link a {
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #15803d;
}

.blog-content .internal-link a::after {
  content: '\2192';
  font-size: 1.25rem;
  transition: transform 0.2s;
}

.blog-content .internal-link a:hover::after {
  transform: translateX(6px);
}

/* Tables */
.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.blog-content thead {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff;
}

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

.blog-content td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.blog-content tbody tr {
  transition: background-color 0.2s;
}

.blog-content tbody tr:hover {
  background-color: #f9fafb;
}

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

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

/* Blockquotes */
.blog-content blockquote {
  border-left: 4px solid #16a34a;
  padding: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #525252;
  background: #f9fafb;
  border-radius: 0 8px 8px 0;
}

/* Code */
.blog-content code {
  background-color: #f3f4f6;
  color: #16a34a;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Monaco', 'Courier New', monospace;
  font-weight: 500;
}

.blog-content pre {
  background-color: #1e293b;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 2rem 0;
}

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

/* Images */
.blog-content img {
  border-radius: 12px;
  margin: 2.5rem 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  height: auto;
}

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

/* ─── h4 / h5 / h6 ─── */
.blog-content h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 80px;
}

.blog-content h5 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #374151;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.blog-content h6 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* ─── Inline text elements ─── */
.blog-content em,
.blog-content i {
  font-style: italic;
}

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

.blog-content mark {
  background: linear-gradient(135deg, #fef9c3 0%, #fde68a 100%);
  color: #1a1a1a;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.blog-content sup {
  font-size: 0.75em;
  vertical-align: super;
  line-height: 0;
}

.blog-content sub {
  font-size: 0.75em;
  vertical-align: sub;
  line-height: 0;
}

.blog-content abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
  text-decoration-color: #6b7280;
}

/* ─── Nested lists ─── */
.blog-content ul ul,
.blog-content ol ol,
.blog-content ul ol,
.blog-content ol ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* ─── Figure / Figcaption ─── */
.blog-content figure {
  margin: 2.5rem 0;
  padding: 0;
}

.blog-content figure img {
  margin: 0;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  height: auto;
  display: block;
}

.blog-content figcaption {
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
  margin-top: 0.75rem;
  font-style: italic;
  line-height: 1.5;
}

/* ─── YouTube / iframe embeds (responsive 16:9) ─── */
.blog-content iframe {
  display: block;
  max-width: 100%;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 12px;
  margin: 2.5rem auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ─── Details / Summary (collapsible/accordion) ─── */
.blog-content details {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin: 1.5rem 0;
  overflow: hidden;
}

.blog-content summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
  background: #f9fafb;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s;
}

.blog-content summary:hover {
  background: #f3f4f6;
}

.blog-content summary::before {
  content: '\25B6';
  font-size: 0.7em;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.blog-content details[open] summary::before {
  transform: rotate(90deg);
}

.blog-content summary::-webkit-details-marker {
  display: none;
}

.blog-content details > *:not(summary) {
  padding: 0 1.25rem;
}

.blog-content details > p:last-child {
  padding-bottom: 1rem;
}

/* ─── Author Bio ─── */
.blog-author-bio {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 48px;
  padding: 32px;
  background: linear-gradient(135deg, #f9fafb, #f3f4f6);
  border-radius: 12px;
}

.blog-author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.blog-author-info h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px;
}

.blog-author-info p {
  font-size: 0.9375rem;
  color: #525252;
  line-height: 1.6;
  margin: 0;
}

/* ─── Newsletter CTA ─── */
.blog-newsletter {
  margin-top: 48px;
  padding: 40px 32px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  border-radius: 12px;
  text-align: center;
  color: #fff;
}

.blog-newsletter h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.blog-newsletter p {
  margin: 0 0 24px;
  opacity: 0.9;
}

.blog-newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.blog-newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}

.blog-newsletter-form input:focus {
  border-color: #fff;
}

.blog-newsletter-form button {
  padding: 12px 24px;
  background: #fff;
  color: #16a34a;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.blog-newsletter-form button:hover {
  background: #f0fdf4;
}

/* ─── Related Posts ─── */
.blog-related {
  margin-top: 48px;
}

.blog-related h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 24px;
}

.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-related-card {
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.3s, border-color 0.3s;
}

.blog-related-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: #16a34a;
}

.blog-related-img img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.blog-related-body {
  padding: 16px;
}

.blog-related-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 8px;
  line-height: 1.4;
}

.blog-related-body p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Tags ─── */
.blog-tags {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-tags-label {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  margin-right: 4px;
}

.blog-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #f3f4f6;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  color: #525252;
  transition: background 0.2s, color 0.2s;
}

.blog-tag:hover {
  background: #16a34a;
  color: #fff;
}

/* ─── Sidebar ─── */
.blog-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-left: 16px;
}

.sidebar-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #16a34a;
}

.sidebar-section {
  margin-bottom: 16px;
}

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

.sidebar-section-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}

.sidebar-section-title a {
  color: #16a34a;
  text-decoration: none;
  transition: color 0.2s;
}

.sidebar-section-title a:hover {
  color: #15803d;
}

.sidebar-link {
  display: block;
  font-size: 0.9375rem;
  color: #525252;
  text-decoration: none;
  padding: 5px 0 5px 12px;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.sidebar-link:hover {
  color: #16a34a;
  border-left-color: #16a34a;
}

/* ─── Under 1200px: hide left TOC, two columns ─── */
@media (max-width: 1200px) {
  .blog-header-area {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .blog-toc-sidebar {
    display: none;
  }

  .blog-main-content {
    grid-column: 1;
    grid-row: auto;
  }

  .blog-sidebar {
    grid-column: 2;
    grid-row: auto;
  }

  .blog-content-grid {
    grid-template-columns: 1fr 300px;
    gap: 32px;
  }
}

/* ─── Tablet: collapse to single column ─── */
@media (max-width: 1024px) {
  .blog-content-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .blog-header-area,
  .blog-main-content,
  .blog-sidebar {
    grid-column: 1;
    grid-row: auto;
  }

  .blog-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .sidebar-featured-tool {
    text-align: center;
  }

  .sidebar-card {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding: 20px 24px;
  }

  .sidebar-title {
    width: 100%;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  .sidebar-section {
    margin-bottom: 8px;
  }

  .sidebar-link {
    display: inline-block;
    padding: 2px 8px;
    border-left: none;
  }

  .sidebar-link:hover {
    border-left-color: transparent;
  }
}

/* ─── Mobile Responsive ─── */
@media (max-width: 768px) {
  .blog-article-inner {
    padding: 24px 16px 48px;
  }

  .blog-header h1 {
    font-size: 1.75rem;
  }

  .blog-excerpt {
    font-size: 1.0625rem;
  }

  .blog-content {
    font-size: 1rem;
  }

  .blog-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
  }

  .blog-content h3 {
    font-size: 1.25rem;
    margin-top: 1.75rem;
  }

  .blog-content .intro {
    font-size: 1.0625rem;
    padding: 1rem;
  }

  .blog-content .internal-link {
    padding: 1.25rem;
    margin: 2rem 0;
  }

  .blog-content .internal-link a {
    font-size: 1rem;
  }

  .blog-content h4 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
  }

  .blog-content table {
    font-size: 0.875rem;
    display: block;
    overflow-x: auto;
  }

  .blog-content th,
  .blog-content td {
    padding: 0.75rem;
  }

  .blog-content iframe {
    border-radius: 8px;
    margin: 2rem auto;
  }

  .blog-content details {
    margin: 1rem 0;
  }

  .blog-content summary {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }

  .blog-content details > *:not(summary) {
    padding: 0 1rem;
  }

  .blog-author-bio {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
  }

  .blog-newsletter {
    padding: 32px 20px;
  }

  .blog-newsletter-form {
    flex-direction: column;
  }

  .blog-related-grid {
    grid-template-columns: 1fr;
  }

  .toc-wrapper {
    padding: 20px 20px 20px 24px;
  }

  .toc-list li[data-level="3"] {
    padding-left: 28px;
  }

  .toc-list li[data-level="4"] {
    padding-left: 42px;
  }

  .sidebar-card {
    flex-direction: column;
    gap: 4px;
  }
}

/* ─── Print Styles ─── */
@media print {
  .blog-content {
    font-size: 12pt;
  }

  .blog-content .internal-link {
    border: 1px solid #999;
    background: #fff;
  }

  .blog-content a {
    text-decoration: underline;
    color: #000;
  }

  .blog-newsletter,
  .blog-related,
  .blog-tags,
  .blog-sidebar,
  .blog-toc-sidebar {
    display: none;
  }
}
