.h1-replacement {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

/* Article styles for DIY vs Professional post */
.article-content {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
  color: #222;
  line-height: 1.65;
  font-size: 1rem;
}

.article-header {
  text-align: center;
  margin-bottom: 1.2rem;
}

.article-featured {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.article-meta {
  color: #666;
  margin-top: 0.5rem;
}

.article-intro p {
  font-size: 1.05rem;
  color: #333;
}

.methods-list h3 {
  margin: 0.2rem 0;
}

.methods-list p,
.areas-list li {
  margin: 0.25rem 0 0.6rem 0;
}

.areas-list {
  columns: 1;
  margin-left: 0;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem 0;
}

.comparison-table th,
.comparison-table td {
  border: 1px solid #e6e6e6;
  padding: 0.6rem 0.8rem;
  text-align: left;
}

.comparison-table thead th {
  background: #faf3e6;
  color: #222;
}

/* Responsive table: horizontal-scroll fallback for narrow viewports */
.comparison-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Improve desktop padding and zebra rows */
.comparison-table th,
.comparison-table td {
  padding: 0.75rem 1rem;
  text-align: left;
}

.comparison-table tbody tr:nth-child(odd) {
  background: #fcfcfc;
}

/* Mobile: stacked table cards with inline labels (no HTML change required) */
@media (max-width: 640px) {
  .comparison-table thead {
    display: none;
  }

  .comparison-table,
  .comparison-table tbody,
  .comparison-table tr,
  .comparison-table td {
    display: block;
    width: 100%;
  }

  .comparison-table tr {
    margin: 0 0 1rem 0;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 0.6rem;
    background: #fff;
  }

  .comparison-table td {
    padding: 0.45rem 0.5rem;
    border: none;
    position: relative;
    padding-left: 46%;
  }

  .comparison-table td:before {
    position: absolute;
    left: 0.75rem;
    top: 0.45rem;
    width: 40%;
    white-space: nowrap;
    font-weight: 700;
    color: #333;
  }

  /* Labels inserted via nth-child to avoid editing HTML */
  .comparison-table tr td:nth-child(1):before {
    content: "Method";
  }

  .comparison-table tr td:nth-child(2):before {
    content: "Cost";
  }

  .comparison-table tr td:nth-child(3):before {
    content: "Lifespan";
  }

  .comparison-table tr td:nth-child(4):before {
    content: "Risk";
  }

  .comparison-table tr td:nth-child(5):before {
    content: "Best For";
  }
}

/* Small tweak: ensure table wrapper looks neat */
.comparison-table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.comparison-table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.cta-link {
  font-weight: 700;
  color: var(--color-black);
}

@media (max-width: 800px) {
  .article-content {
    padding: 0 1rem;
  }

  .article-featured {
    max-height: 260px;
  }
}

/* General article improvements: typography, spacing and image sizing */
.article-content {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: #222;
}

.article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(16, 24, 40, 0.06);
}

/* Featured image smaller on large screens for better composition */
.article-featured {
  width: 100%;
  max-width: 820px;
  height: auto;
  margin: 0.5rem auto 1.25rem;
  display: block;
}

/* Method images (under each method) — keep compact and memorable */
.methods-list .method-img {
  max-width: 420px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0.75rem auto 0.9rem;
  border-radius: 8px;
}

/* Decorative blur for a single illustrative image (use sparingly) */
.method-img.blur {
  filter: blur(5px);
  transition: filter 300ms ease-in-out;
}

/* Prefer reduced motion and avoid blur transitions on reduced-motion devices */
@media (prefers-reduced-motion: reduce) {
  .method-img.blur {
    transition: none;
  }
}

/* Pull-quote refinement */
.pull-quote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(90deg, #f7fbff, #ffffff);
  border-left: 4px solid #0077cc;
  font-style: italic;
  border-radius: 6px;
}

/* CTA improvements */
.article-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0077cc;
  color: #fff;
  padding: 1rem;
  border-radius: 10px;
  margin: 2rem 0;
  gap: 1rem;
}
.article-cta .cta-left {
  flex: 2;
}

.article-cta .cta-right {
  flex: 1;
}

.article-cta .cta-right {
  display: flex;
  justify-content: center;
}

.article-cta .cta-right a {
  background: #fff;
  color: #0077cc;
  padding: 0.55rem 0.9rem;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

/* Hover lift */
.article-cta .cta-right a:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

/* Shimmer effect */
.article-cta .cta-right a::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 120%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  animation: shimmer 2.8s infinite;
}

@keyframes shimmer {
  0% {
    left: -120%;
  }
  50% {
    left: 120%;
  }
  100% {
    left: 120%;
  }
}

/* Table polish */
/* Wrapper to enable horizontal scrolling on small screens */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Base table styling */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  /*   min-width: 600px; */
  /* keeps columns readable on desktop */
}

.comparison-table th,
.comparison-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.comparison-table tbody tr:nth-child(odd) {
  background: #fbfbfb;
}

/* ----- Mobile Card Layout (<480px) ----- */
@media (max-width: 650px) {
  .comparison-table,
  .comparison-table thead,
  .comparison-table tbody,
  .comparison-table th,
  .comparison-table td,
  .comparison-table tr {
    display: block;
  }

  .comparison-table thead {
    display: none;
    /* hide header row */
  }

  .comparison-table tr {
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid #eee;
    padding: 0.5rem;
  }

  .comparison-table td {
    position: relative;
    padding-left: 50%;
    text-align: left;
    border: none;
  }

  .comparison-table td::before {
    content: attr(data-label);
    /* show column name */
    position: absolute;
    left: 1rem;
    top: 0;
    font-weight: bold;
    white-space: nowrap;
  }
}

/* @media (max-width: 520px) {
  .comparison-table td {
    padding-left: 20%;
  }
} */

/* Readability tweaks */
.article-content h2 {
  font-size: 1.35rem;
  margin-top: 1.6rem;
  color: #0f172a;
}

.article-content h3 {
  font-size: 1.05rem;
  margin-top: 1.1rem;
  color: var(--color-black);
}

.article-content p {
  font-size: 1rem;
  margin-bottom: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }

  .methods-list .method-img {
    max-width: 100%;
  }

  .article-featured {
    max-width: 100%;
  }
}

@media (max-width: 930px) {
  .article-content {
    padding: 0 1rem;
    font-size: 0.98rem;
  }

  .article-cta {
    flex-direction: column;
    align-items: stretch;
  }
}
/* ===== Specialist checklist cards ===== */

/* ===== Specialist checklist cards ===== */

.methods-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  display: grid;
  gap: 1rem;
}

.methods-list > li {
  position: relative;
  padding: 1.1rem 1.2rem 1.1rem 3.2rem;
  border-radius: 14px;
  background: linear-gradient(90deg, #f7fbff, #ffffff);
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
  border-left: 5px solid #3b82f6;
}

.methods-list li h3 {
  margin: 0 0 0.2rem 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.methods-list li p {
  margin: 0;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.5;
}

/* Numbered circles */
.methods-list li h3::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 1rem;
  top: 1.05rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Enable counter */
.methods-list {
  counter-reset: step;
}

/* Different accent colours (like your design) */
.methods-list > li:nth-child(1) {
  border-left-color: #f59e0b;
  background: linear-gradient(90deg, #fff7ed, #ffffff);
}
.methods-list li:nth-child(1) h3::before {
  background: #f59e0b;
}

.methods-list > li:nth-child(2) {
  border-left-color: #3b82f6;
  background: linear-gradient(90deg, #eff6ff, #ffffff);
}
.methods-list li:nth-child(2) h3::before {
  background: #3b82f6;
}

.methods-list > li:nth-child(3) {
  border-left-color: #22c55e;
  background: linear-gradient(90deg, #ecfdf5, #ffffff);
}
.methods-list li:nth-child(3) h3::before {
  background: #22c55e;
}

.methods-list > li:nth-child(4) {
  border-left-color: #8b5cf6;
  background: linear-gradient(90deg, #f5f3ff, #ffffff);
}
.methods-list li:nth-child(4) h3::before {
  background: #8b5cf6;
}

.methods-list > li:nth-child(5) {
  border-left-color: #ec4899;
  background: linear-gradient(90deg, #fdf2f8, #ffffff);
}
.methods-list li:nth-child(5) h3::before {
  background: #ec4899;
}

.methods-list > li:nth-child(6) {
  border-left-color: #6366f1;
  background: linear-gradient(90deg, #eef2ff, #ffffff);
}
.methods-list li:nth-child(6) h3::before {
  background: #6366f1;
}

.methods-list > li:nth-child(7) {
  border-left-color: #14b8a6;
  background: linear-gradient(90deg, #f0fdfa, #ffffff);
}
.methods-list li:nth-child(7) h3::before {
  background: #14b8a6;
}

/* ===== Red flags box ===== */

.article-content h2 + ul {
  list-style: none;
  margin: 1.2rem 0 2rem;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: #fff5f5;
  border: 1px solid #fecaca;
}

.article-content h2 + ul li {
  position: relative;
  padding-left: 1.8rem;
  margin: 0.45rem 0;
  color: #7f1d1d;
  font-size: 0.95rem;
}

.article-content h2 + ul li::before {
  content: "▲";
  position: absolute;
  left: 0;
  top: 0;
  color: #dc2626;
  font-size: 0.8rem;
  transform: translateY(2px);
}

.restoration-features ul {
  list-style: none;
  padding-left: 0;
  font-size: 1rem;
}

/* DARK MODE */

html[data-theme="dark"] main p {
  color: rgb(255, 255, 255);
}

html[data-theme="dark"] main li p {
  color: var(--color-black);
}

html[data-theme="dark"] .areas-list {
  color: rgb(167, 165, 165);
}

html[data-theme="dark"] td {
  background-color: var(--color-white);
  color: var(--color-black);
}

html[data-theme="dark"] a {
  color: var(--color-orange);
}

html[data-theme="dark"] .restoration-features li {
  color: rgb(167, 165, 165);
}

html[data-theme="dark"] .article-meta {
  color: rgb(167, 165, 165);
}
