/* Blog Article Content Styling - Adapted for To Lose a Dog branding */

.article-body {
  font-size: 1.125rem;
  line-height: 1.8;
  color: hsl(280 20% 15%);
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
}

.article-body * {
  max-width: 100%;
}

/* Headings with brand gradient */
.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
  font-weight: 700;
  background: linear-gradient(135deg, hsl(280 50% 45%), hsl(280 60% 60%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.article-body h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-top: 2rem;
}

.article-body h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-top: 2.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid hsl(280 50% 45% / 0.2);
}

.article-body h3 {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  margin-top: 2rem;
}

.article-body h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  margin-top: 1.75rem;
}

.article-body p {
  margin-bottom: 1.25rem;
  color: hsl(280 20% 15%);
}

/* Links */
.article-body a {
  color: hsl(280 50% 45%);
  text-decoration: none;
  font-weight: 600;
  transition: color 150ms ease;
}

.article-body a:hover {
  color: hsl(280 60% 60%);
  text-decoration: underline;
}

/* Strong and emphasis */
.article-body strong,
.article-body b {
  color: hsl(280 20% 5%) !important;
  font-weight: 700 !important;
}

.article-body em {
  color: hsl(280 50% 35%);
}

/* Lists */
.article-body ul,
.article-body ol {
  margin: 1.25rem 0;
  padding-left: 1.75rem;
}

.article-body ul li {
  list-style-type: disc;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
  color: hsl(280 20% 15%);
}

.article-body ol li {
  list-style-type: decimal;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
  color: hsl(280 20% 15%);
}

.article-body li::marker {
  color: hsl(280 50% 45%);
}

.article-body li strong,
.article-body li b {
  color: hsl(280 20% 5%) !important;
  font-weight: 700 !important;
}

/* Nested lists */
.article-body ul ul,
.article-body ol ol,
.article-body ul ol,
.article-body ol ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Blockquotes */
.article-body blockquote {
  border-left: 4px solid hsl(280 50% 45%);
  background: linear-gradient(135deg, hsl(280 50% 45% / 0.05), hsl(40 80% 60% / 0.05));
  padding: 1.5rem;
  padding-left: 2rem;
  margin: 2rem 0;
  font-style: italic;
  color: hsl(280 20% 15%);
  border-radius: 0.5rem;
}

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

/* Code blocks */
.article-body code {
  background-color: hsl(35 25% 90%);
  color: hsl(280 50% 45%);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.article-body pre {
  background-color: hsl(280 30% 15%);
  color: hsl(35 30% 95%);
  padding: 1.5rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 2rem 0;
}

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

/* Images */
.article-body img {
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  margin: 2rem auto;
  height: auto;
  display: block;
}

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  overflow: hidden;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.article-body th {
  background: linear-gradient(135deg, hsl(280 50% 45%), hsl(280 60% 60%));
  color: white;
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
}

.article-body td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid hsl(35 20% 85%);
  color: hsl(280 20% 15%);
}

.article-body tr:nth-child(even) td {
  background-color: hsl(35 30% 97%);
  color: hsl(280 20% 15%);
}

/* Horizontal rules */
.article-body hr {
  border: none;
  border-top: 1px solid hsl(35 20% 85%);
  margin: 3rem 0;
}

/* Callout boxes - critical for SEObot content */
.article-body .sb,
.article-body .callout,
.article-body .note,
.article-body .tip,
.article-body .warning,
.article-body .info,
.article-body aside,
.article-body .kg-callout-card,
.article-body [class*="callout"],
.article-body [class*="note"],
.article-body [class*="highlight"] {
  color: hsl(280 20% 15%) !important;
  background: linear-gradient(135deg, hsl(280 50% 45% / 0.12), hsl(40 80% 60% / 0.10)) !important;
  border-left: 4px solid hsl(280 50% 45%) !important;
  padding: 1.25rem 1.5rem !important;
  border-radius: 0.875rem !important;
  margin: 2rem 0 !important;
  box-shadow: 0 4px 12px hsl(280 50% 45% / 0.08) !important;
  font-style: normal !important;
}

/* Fix text inside callouts to ensure visibility */
.article-body .sb *,
.article-body .callout *,
.article-body .note *,
.article-body aside *,
.article-body [class*="callout"] *,
.article-body [class*="note"] *,
.article-body [class*="highlight"] * {
  color: hsl(280 20% 15%) !important;
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: currentColor !important;
  background-clip: unset !important;
  text-fill-color: currentColor !important;
}

/* CRITICAL: Headings inside callouts - override gradient text */
.article-body h1.sb,
.article-body h2.sb,
.article-body h3.sb,
.article-body h4.sb,
.article-body h5.sb,
.article-body h6.sb,
.article-body h1[class*="sbb"],
.article-body h2[class*="sbb"],
.article-body h3[class*="sbb"],
.article-body h4[class*="sbb"],
.article-body h5[class*="sbb"],
.article-body h6[class*="sbb"],
.article-body .sb h1,
.article-body .sb h2,
.article-body .sb h3,
.article-body .sb h4,
.article-body .sb h5,
.article-body .sb h6,
.article-body .callout h1,
.article-body .callout h2,
.article-body .callout h3,
.article-body .callout h4,
.article-body .callout h5,
.article-body .callout h6,
.article-body .note h1,
.article-body .note h2,
.article-body .note h3,
.article-body .note h4,
.article-body .note h5,
.article-body .note h6,
.article-body aside h1,
.article-body aside h2,
.article-body aside h3,
.article-body aside h4,
.article-body aside h5,
.article-body aside h6,
.article-body [class*="callout"] h1,
.article-body [class*="callout"] h2,
.article-body [class*="callout"] h3,
.article-body [class*="callout"] h4,
.article-body [class*="callout"] h5,
.article-body [class*="callout"] h6 {
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: hsl(280 50% 45%) !important;
  text-fill-color: hsl(280 50% 45%) !important;
  color: hsl(280 50% 45%) !important;
  border-bottom: none !important;
  padding-top: 1.25rem !important;
  padding-bottom: 1.25rem !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  line-height: 1.3 !important;
}

/* Links inside callout headings */
.article-body .sb h1 a,
.article-body .sb h2 a,
.article-body .sb h3 a,
.article-body .sb h4 a,
.article-body .sb h5 a,
.article-body .sb h6 a,
.article-body .callout h1 a,
.article-body .callout h2 a,
.article-body .callout h3 a,
.article-body .callout h4 a,
.article-body .callout h5 a,
.article-body .callout h6 a,
.article-body .note h1 a,
.article-body .note h2 a,
.article-body .note h3 a,
.article-body .note h4 a,
.article-body .note h5 a,
.article-body .note h6 a,
.article-body aside h1 a,
.article-body aside h2 a,
.article-body aside h3 a,
.article-body aside h4 a,
.article-body aside h5 a,
.article-body aside h6 a,
.article-body [class*="callout"] h1 a,
.article-body [class*="callout"] h2 a,
.article-body [class*="callout"] h3 a,
.article-body [class*="callout"] h4 a,
.article-body [class*="callout"] h5 a,
.article-body [class*="callout"] h6 a {
  color: hsl(40 80% 60%) !important;
  -webkit-text-fill-color: hsl(40 80% 60%) !important;
  -webkit-background-clip: text !important;
  text-decoration: underline;
  background: none !important;
  background-image: none !important;
}

/* Fix paragraphs and divs inside callouts */
.article-body .sb p,
.article-body .sb div,
.article-body .callout p,
.article-body .callout div,
.article-body .note p,
.article-body .note div,
.article-body aside p,
.article-body aside div,
.article-body [class*="callout"] p,
.article-body [class*="callout"] div {
  color: hsl(280 20% 15%) !important;
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* Links inside callout text (not headings) */
.article-body .sb a,
.article-body .callout a,
.article-body .note a,
.article-body aside a {
  color: hsl(40 80% 60%) !important;
  font-weight: 600 !important;
}

/* Strong text inside callouts */
.article-body .sb strong,
.article-body .callout strong,
.article-body .note strong,
.article-body aside strong {
  color: hsl(280 50% 45%) !important;
  font-weight: 700 !important;
}

/* Warning/Alert callouts */
.article-body .warning,
.article-body .alert,
.article-body [class*="warning"] {
  background: linear-gradient(135deg, hsl(40 90% 60% / 0.12), hsl(40 80% 50% / 0.10)) !important;
  border-left-color: hsl(40 80% 50%) !important;
}

/* Info/Tip callouts */
.article-body .tip,
.article-body .info,
.article-body [class*="tip"],
.article-body [class*="info"] {
  background: linear-gradient(135deg, hsl(280 60% 60% / 0.12), hsl(280 50% 45% / 0.10)) !important;
  border-left-color: hsl(280 60% 60%) !important;
}

/* Success callouts */
.article-body .success,
.article-body [class*="success"] {
  background: linear-gradient(135deg, hsl(150 60% 50% / 0.12), hsl(150 50% 40% / 0.10)) !important;
  border-left-color: hsl(150 60% 50%) !important;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .article-body {
    color: hsl(35 30% 85%);
  }

  .article-body h1,
  .article-body h2,
  .article-body h3,
  .article-body h4,
  .article-body h5,
  .article-body h6 {
    background: linear-gradient(135deg, hsl(280 60% 60%), hsl(280 70% 70%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .article-body h2 {
    border-bottom-color: hsl(280 60% 60% / 0.2);
  }

  .article-body a {
    color: hsl(280 60% 60%);
  }

  .article-body a:hover {
    color: hsl(280 70% 70%);
  }

  .article-body strong {
    color: hsl(35 30% 95%);
  }

  .article-body em {
    color: hsl(280 60% 60%);
  }

  .article-body blockquote {
    border-left-color: hsl(280 60% 60%);
    background: linear-gradient(135deg, hsl(280 60% 60% / 0.08), hsl(40 80% 60% / 0.08));
    color: hsl(35 30% 85%);
  }

  .article-body code {
    background-color: hsl(280 20% 18%);
    color: hsl(280 60% 60%);
  }

  .article-body th {
    background: linear-gradient(135deg, hsl(280 50% 45%), hsl(280 60% 60%));
    color: white;
  }

  .article-body td {
    border-bottom-color: hsl(280 15% 30%);
    color: hsl(35 30% 90%);
    background-color: transparent;
  }

  .article-body tr:nth-child(even) td {
    background-color: hsl(280 15% 20%);
    color: hsl(35 30% 95%);
  }

  .article-body tr:nth-child(odd) td {
    background-color: hsl(280 10% 15%);
    color: hsl(35 30% 90%);
  }

  .article-body td strong,
  .article-body td b {
    color: hsl(0 0% 100%) !important;
  }

  .article-body th strong,
  .article-body th b {
    color: hsl(0 0% 100%) !important;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .article-body {
    font-size: 1rem;
  }
  
  .article-body h1 {
    font-size: 2rem;
  }
  
  .article-body h2 {
    font-size: 1.75rem;
  }
}