/* ============================================================
   BLOG - Mount Joy Home Inspection
   ============================================================ */

/* --- Blog Hero --- */
.blog-hero {
  position: relative;
  min-height: 44vh;
  display: flex;
  align-items: flex-end;
  background: var(--navy-dark);
  overflow: hidden;
  padding-top: 100px;
}
.blog-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/images/hero-house.webp');
  background-size: cover;
  background-position: center;
}
.blog-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(10,26,18,0.96) 0%, rgba(14,33,23,0.88) 55%, rgba(26,61,43,0.65) 100%);
}
.blog-hero-content {
  position: relative;
  z-index: 2;
  padding-top: 56px;
  padding-bottom: 64px;
  width: 100%;
}
.blog-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(249,115,22,0.15);
  border: 1px solid rgba(249,115,22,0.35);
  border-radius: 100px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.blog-hero-eyebrow svg { width: 13px; height: 13px; color: var(--accent); }
.blog-hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: white;
  margin-bottom: 16px;
}
.blog-hero-title span { color: var(--accent); }
.blog-hero-sub {
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255,255,255,0.6);
  max-width: 520px;
}

/* --- Blog Listing --- */
#blog-listing { background: var(--gray-50); }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 960px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }

/* --- Blog Card --- */
.blog-card {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--gray-200);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
}
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(26,61,43,0.11);
  border-color: rgba(249,115,22,0.25);
}
.blog-card-media {
  position: relative;
  height: 196px;
  overflow: hidden;
  background: var(--navy);
}
.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.blog-card:hover .blog-card-media img { transform: scale(1.05); }
.blog-card-body {
  padding: 22px 24px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 12px;
  width: fit-content;
}
.blog-cat-home    { background: rgba(249,115,22,0.12); color: #EA580C; }
.blog-cat-radon   { background: rgba(5,150,105,0.12);  color: #059669; }
.blog-cat-septic  { background: rgba(124,58,237,0.12); color: #7C3AED; }
.blog-cat-water   { background: rgba(37,99,235,0.12);  color: #2563EB; }

/* Variantes sur fond sombre (hero article) */
.article-hero .blog-cat-home    { background: rgba(251,146,60,0.2);   color: #fb923c; }
.article-hero .blog-cat-radon   { background: rgba(52,211,153,0.2);   color: #34d399; }
.article-hero .blog-cat-septic  { background: rgba(196,181,253,0.2);  color: #c4b5fd; }
.article-hero .blog-cat-water   { background: rgba(147,197,253,0.2);  color: #93c5fd; }

.blog-card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 10px;
  transition: color 0.18s;
}
.blog-card:hover .blog-card-title { color: var(--accent); }
.blog-card-excerpt {
  font-size: 13px;
  line-height: 1.72;
  color: var(--gray-600);
  flex: 1;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  color: var(--gray-400);
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--gray-100);
}
.blog-card-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.blog-card-meta svg { width: 11px; height: 11px; }
.blog-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-left: auto;
  transition: gap 0.2s;
}
.blog-card:hover .blog-card-cta { gap: 9px; }
.blog-card-cta svg { width: 12px; height: 12px; }

/* --- Article Hero --- */
.article-hero {
  position: relative;
  background: var(--navy-dark);
  overflow: hidden;
  padding-top: 100px;
}
.article-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  opacity: 0.35;
}
.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(4,12,8,0.55) 0%, rgba(4,12,8,0.45) 50%, rgba(4,12,8,0.85) 100%);
  z-index: 1;
}
.article-hero-content {
  position: relative;
  z-index: 2;
  padding-top: 56px;
  padding-bottom: 72px;
  width: 100%;
  max-width: 840px;
}
.article-hero-back {
  margin-bottom: 28px;
}
.article-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.article-hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(26px, 3.5vw, 48px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: white;
  margin-bottom: 20px;
}
.article-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}
.article-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 2px solid rgba(249,115,22,0.5);
}
.article-author-name {
  font-size: 14px;
  font-weight: 600;
  color: white;
}
.article-author-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  display: flex;
  align-items: center;
  gap: 10px;
}
.article-author-meta span { display: flex; align-items: center; gap: 4px; }
.article-author-meta svg { width: 11px; height: 11px; }

/* --- Article Image --- */
.article-featured-img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  display: block;
}

/* --- Article Body --- */
#article-body { background: white; }
#article-progress { position: sticky; top: 0; height: 2px; background: var(--accent); transform-origin: left; transform: scaleX(0); z-index: 100; box-shadow: 0 0 6px rgba(249,115,22,0.5); }

/* Article with ToC sidebar */
.article-with-toc {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 56px;
  align-items: start;
  max-width: 1060px;
  margin: 0 auto;
}
@media (max-width: 1020px) { .article-with-toc { grid-template-columns: 1fr; } }

.article-content {
  padding: 64px 0 80px;
  min-width: 0;
}
@media (max-width: 768px) { .article-content { padding: 40px 0 60px; } }

/* ToC sidebar */
.article-toc {
  padding-top: 64px;
  position: sticky;
  top: 96px;
}
.toc-label {
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 14px;
}
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 0; }
.toc-list a {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: var(--gray-500);
  text-decoration: none;
  padding: 6px 0 6px 14px;
  border-left: 2px solid var(--gray-100);
  transition: color 0.2s, border-color 0.2s;
}
.toc-list a:hover, .toc-list a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}
@media (max-width: 1020px) { .article-toc { display: none; } }

/* Article typography */
.article-content h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin: 40px 0 14px;
  line-height: 1.3;
}
.article-content h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin: 28px 0 10px;
}
.article-content p {
  font-size: 16px;
  line-height: 1.82;
  color: var(--gray-600);
  margin-bottom: 20px;
}
.article-content ul, .article-content ol {
  margin: 6px 0 20px;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.article-content ul li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-600);
  padding-left: 22px;
  position: relative;
}
.article-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.article-content ol { counter-reset: list; }
.article-content ol li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-600);
  padding-left: 28px;
  position: relative;
  counter-increment: list;
}
.article-content ol li::before {
  content: counter(list);
  position: absolute;
  left: 0;
  top: 2px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  width: 18px;
  height: 18px;
  background: rgba(249,115,22,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 15px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}
.article-content thead th {
  background: var(--navy);
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 18px;
  text-align: left;
}
.article-content tbody tr { border-bottom: 1px solid var(--gray-200); }
.article-content tbody tr:last-child { border-bottom: none; }
.article-content tbody tr:nth-child(even) { background: var(--gray-50); }
.article-content tbody td {
  padding: 12px 18px;
  color: var(--gray-600);
  line-height: 1.5;
  vertical-align: middle;
}
.article-content tbody td:first-child {
  font-weight: 600;
  color: var(--navy);
}
.article-content strong { font-weight: 700; color: var(--navy); }
.article-content a { color: var(--accent); font-weight: 500; text-decoration: none; }
.article-content a:hover { text-decoration: underline; }
.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 0 16px 24px;
  margin: 28px 0;
  background: var(--gray-50);
  border-radius: 0 8px 8px 0;
}
.article-content blockquote p {
  font-style: italic;
  font-size: 17px;
  color: var(--navy);
  font-weight: 500;
  margin: 0;
}
.article-content h2:first-child, .article-content h3:first-child { margin-top: 0; }

/* --- Author Box --- */
.article-author-box {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.article-author-box-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  flex-shrink: 0;
  border: 3px solid rgba(249,115,22,0.3);
}
.article-author-box-name {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.article-author-box-role {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.article-author-box-bio {
  font-size: 14px;
  line-height: 1.7;
  color: var(--gray-600);
}

/* --- Related Posts --- */
.article-related {
  background: var(--navy-dark);
}
.article-related .section-title { color: white; }
.article-related .eyebrow { color: var(--accent); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .related-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .related-grid { grid-template-columns: 1fr; } }

/* --- Back link --- */
.btn-ghost-back { background: transparent; color: rgba(255,255,255,0.7); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; transition: color 0.2s; border: none; cursor: pointer; font-family: 'Inter', sans-serif; padding: 0; }
.btn-ghost-back:hover { color: white; }
.btn-ghost-back svg { width: 15px; height: 15px; }

/* --- CTA band light (blog pages) --- */
#cta-band.cta-band-light {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
}
#cta-band.cta-band-light .cta-v2-badge {
  background: rgba(249,115,22,0.1);
  border-color: rgba(249,115,22,0.25);
  color: var(--accent);
}
#cta-band.cta-band-light .cta-v2-title { color: var(--navy); }
#cta-band.cta-band-light .cta-v2-sub   { color: var(--gray-400); }
#cta-band.cta-band-light .cta-v2-note  { color: var(--gray-300); }
#cta-band.cta-band-light .cta-v2-phone { color: var(--navy-mid); }
#cta-band.cta-band-light .cta-v2-phone:hover { color: var(--navy); }
